Browse Source

Update to layer 184

Painor 9 tháng trước cách đây
mục cha
commit
c31f63c4d4

+ 1 - 1
gramjs/Version.ts

@@ -1 +1 @@
-export const version = "2.22.0";
+export const version = "2.23.0";

+ 2 - 6
gramjs/client/TelegramClient.ts

@@ -1049,11 +1049,8 @@ export class TelegramClient extends TelegramBaseClient {
      * // Leaving chat
      * await client.kickParticipant(chat, 'me');
      */
-    kickParticipant(
-        entity:EntityLike,
-        participant:EntityLike
-    ) {
-        return chatMethods.kickParticipant(this,entity,participant)
+    kickParticipant(entity: EntityLike, participant: EntityLike) {
+        return chatMethods.kickParticipant(this, entity, participant);
     }
 
     //endregion
@@ -1574,7 +1571,6 @@ export class TelegramClient extends TelegramBaseClient {
     static get events() {
         return require("../events");
     }
-    
 
     // endregion
 }

+ 36 - 31
gramjs/client/chats.ts

@@ -1,6 +1,12 @@
 import type { TelegramClient } from "./TelegramClient";
 import type { EntitiesLike, Entity, EntityLike, ValueOf } from "../define";
-import { sleep, getMinBigInt, TotalList, betterConsoleLog, returnBigInt } from "../Helpers";
+import {
+    sleep,
+    getMinBigInt,
+    TotalList,
+    betterConsoleLog,
+    returnBigInt,
+} from "../Helpers";
 import { RequestIter } from "../requestIter";
 import { helpers, utils } from "../";
 import { Api } from "../tl";
@@ -451,44 +457,43 @@ export async function kickParticipant(
 ) {
     const peer = await client.getInputEntity(entity);
     const user = await client.getInputEntity(participant);
-    let resp
-    let request
-    
+    let resp;
+    let request;
+
     const type = helpers._entityType(peer);
-    if(type === helpers._EntityType.CHAT){
+    if (type === helpers._EntityType.CHAT) {
         request = new Api.messages.DeleteChatUser({
             chatId: returnBigInt(getPeerId(entity)),
-            userId:returnBigInt(getPeerId(participant))
-        })
+            userId: returnBigInt(getPeerId(participant)),
+        });
         resp = await client.invoke(request);
-    }
-    else if(type === helpers._EntityType.CHANNEL){
-        if(user instanceof Api.InputPeerSelf){
+    } else if (type === helpers._EntityType.CHANNEL) {
+        if (user instanceof Api.InputPeerSelf) {
             request = new Api.channels.LeaveChannel({
-                channel:peer
-            })
-            resp = await client.invoke(request)
-        }
-        else{
+                channel: peer,
+            });
+            resp = await client.invoke(request);
+        } else {
             request = new Api.channels.EditBanned({
-                channel:peer,
-                participant:user,
+                channel: peer,
+                participant: user,
                 bannedRights: new Api.ChatBannedRights({
-                    untilDate:0,
-                    viewMessages:true
+                    untilDate: 0,
+                    viewMessages: true,
+                }),
+            });
+            resp = await client.invoke(request);
+            await sleep(500);
+            await client.invoke(
+                new Api.channels.EditBanned({
+                    channel: peer,
+                    participant: user,
+                    bannedRights: new Api.ChatBannedRights({ untilDate: 0 }),
                 })
-            })
-            resp = await client.invoke(request)
-            await sleep(500)
-            await client.invoke(new Api.channels.EditBanned({
-                channel:peer,
-                participant:user,
-                bannedRights:new Api.ChatBannedRights({untilDate:0})
-            }))
+            );
         }
+    } else {
+        throw new Error("You must pass either a channel or a chat");
     }
-    else{
-        throw new Error("You must pass either a channel or a chat")
-    }
-    return client._getResponseMessage(request,resp,entity)
+    return client._getResponseMessage(request, resp, entity);
 }

+ 3 - 2
gramjs/client/messages.ts

@@ -1175,8 +1175,9 @@ export async function getCommentData(
             msgId: utils.getMessageId(message),
         })
     );
-    const relevantMessage = result.messages
-                            .reduce((p: Api.TypeMessage, c: Api.TypeMessage) => (p && p.id < c.id ? p : c));
+    const relevantMessage = result.messages.reduce(
+        (p: Api.TypeMessage, c: Api.TypeMessage) => (p && p.id < c.id ? p : c)
+    );
     let chat;
     for (const c of result.chats) {
         if (

+ 1 - 1
gramjs/extensions/markdownv2.ts

@@ -36,7 +36,7 @@ export class MarkdownV2Parser {
             '<tg-emoji emoji-id="$2">$1</tg-emoji>'
         );
 
-        // 
+        //
         return HTMLParser.parse(message);
     }
 

+ 393 - 47
gramjs/tl/api.d.ts

@@ -482,6 +482,18 @@ export namespace Api {
         optional?: boolean;
         url: string;
     }
+    export class InputMediaPaidMedia extends VirtualClass<{
+        starsAmount: long;
+        extendedMedia: Api.TypeInputMedia[];
+    }> {
+        CONSTRUCTOR_ID: 2858819523;
+        SUBCLASS_OF_ID: 4210575092;
+        classType: "constructor";
+        className: "InputMediaPaidMedia";
+        static fromReader(reader: Reader): InputMediaPaidMedia;
+        starsAmount: long;
+        extendedMedia: Api.TypeInputMedia[];
+    }
     export class InputChatPhotoEmpty extends VirtualClass<void> {
         CONSTRUCTOR_ID: 480546647;
         SUBCLASS_OF_ID: 3572182388;
@@ -1177,6 +1189,8 @@ export namespace Api {
         viewForumAsMessages?: boolean;
         restrictedSponsored?: boolean;
         canViewRevenue?: boolean;
+        paidMediaAllowed?: boolean;
+        canViewStarsRevenue?: boolean;
         id: long;
         about: string;
         participantsCount?: int;
@@ -1242,6 +1256,8 @@ export namespace Api {
         viewForumAsMessages?: boolean;
         restrictedSponsored?: boolean;
         canViewRevenue?: boolean;
+        paidMediaAllowed?: boolean;
+        canViewStarsRevenue?: boolean;
         id: long;
         about: string;
         participantsCount?: int;
@@ -1685,6 +1701,18 @@ export namespace Api {
         prizeDescription?: string;
         untilDate: int;
     }
+    export class MessageMediaPaidMedia extends VirtualClass<{
+        starsAmount: long;
+        extendedMedia: Api.TypeMessageExtendedMedia[];
+    }> {
+        CONSTRUCTOR_ID: 2827297937;
+        SUBCLASS_OF_ID: 1198308914;
+        classType: "constructor";
+        className: "MessageMediaPaidMedia";
+        static fromReader(reader: Reader): MessageMediaPaidMedia;
+        starsAmount: long;
+        extendedMedia: Api.TypeMessageExtendedMedia[];
+    }
     export class MessageActionEmpty extends VirtualClass<void> {
         CONSTRUCTOR_ID: 3064919984;
         SUBCLASS_OF_ID: 2256589094;
@@ -2213,6 +2241,26 @@ export namespace Api {
         buttonId: int;
         peers: Api.TypeRequestedPeer[];
     }
+    export class MessageActionPaymentRefunded extends VirtualClass<{
+        // flags: null;
+        peer: Api.TypePeer;
+        currency: string;
+        totalAmount: long;
+        payload?: bytes;
+        charge: Api.TypePaymentCharge;
+    }> {
+        CONSTRUCTOR_ID: 1102307842;
+        SUBCLASS_OF_ID: 2256589094;
+        classType: "constructor";
+        className: "MessageActionPaymentRefunded";
+        static fromReader(reader: Reader): MessageActionPaymentRefunded;
+        // flags: null;
+        peer: Api.TypePeer;
+        currency: string;
+        totalAmount: long;
+        payload?: bytes;
+        charge: Api.TypePaymentCharge;
+    }
     export class Dialog extends VirtualClass<{
         // flags: null;
         pinned?: boolean;
@@ -4402,16 +4450,16 @@ export namespace Api {
     export class UpdateMessageExtendedMedia extends VirtualClass<{
         peer: Api.TypePeer;
         msgId: int;
-        extendedMedia: Api.TypeMessageExtendedMedia;
+        extendedMedia: Api.TypeMessageExtendedMedia[];
     }> {
-        CONSTRUCTOR_ID: 1517529484;
+        CONSTRUCTOR_ID: 3584300836;
         SUBCLASS_OF_ID: 2676568142;
         classType: "constructor";
         className: "UpdateMessageExtendedMedia";
         static fromReader(reader: Reader): UpdateMessageExtendedMedia;
         peer: Api.TypePeer;
         msgId: int;
-        extendedMedia: Api.TypeMessageExtendedMedia;
+        extendedMedia: Api.TypeMessageExtendedMedia[];
     }
     export class UpdateChannelPinnedTopic extends VirtualClass<{
         // flags: null;
@@ -4797,6 +4845,42 @@ export namespace Api {
         static fromReader(reader: Reader): UpdateStarsBalance;
         balance: long;
     }
+    export class UpdateBusinessBotCallbackQuery extends VirtualClass<{
+        // flags: null;
+        queryId: long;
+        userId: long;
+        connectionId: string;
+        message: Api.TypeMessage;
+        replyToMessage?: Api.TypeMessage;
+        chatInstance: long;
+        data?: bytes;
+    }> {
+        CONSTRUCTOR_ID: 513998247;
+        SUBCLASS_OF_ID: 2676568142;
+        classType: "constructor";
+        className: "UpdateBusinessBotCallbackQuery";
+        static fromReader(reader: Reader): UpdateBusinessBotCallbackQuery;
+        // flags: null;
+        queryId: long;
+        userId: long;
+        connectionId: string;
+        message: Api.TypeMessage;
+        replyToMessage?: Api.TypeMessage;
+        chatInstance: long;
+        data?: bytes;
+    }
+    export class UpdateStarsRevenueStatus extends VirtualClass<{
+        peer: Api.TypePeer;
+        status: Api.TypeStarsRevenueStatus;
+    }> {
+        CONSTRUCTOR_ID: 2776936473;
+        SUBCLASS_OF_ID: 2676568142;
+        classType: "constructor";
+        className: "UpdateStarsRevenueStatus";
+        static fromReader(reader: Reader): UpdateStarsRevenueStatus;
+        peer: Api.TypePeer;
+        status: Api.TypeStarsRevenueStatus;
+    }
     export class UpdatesTooLong extends VirtualClass<void> {
         CONSTRUCTOR_ID: 3809980286;
         SUBCLASS_OF_ID: 2331323052;
@@ -7919,8 +8003,9 @@ export namespace Api {
         entities?: Api.TypeMessageEntity[];
         media?: Api.TypeInputMedia;
         date: int;
+        effect?: long;
     }> {
-        CONSTRUCTOR_ID: 1070397423;
+        CONSTRUCTOR_ID: 761606687;
         SUBCLASS_OF_ID: 869564229;
         classType: "constructor";
         className: "DraftMessage";
@@ -7933,6 +8018,7 @@ export namespace Api {
         entities?: Api.TypeMessageEntity[];
         media?: Api.TypeInputMedia;
         date: int;
+        effect?: long;
     }
     export class StickerSetCovered extends VirtualClass<{
         set: Api.TypeStickerSet;
@@ -12546,25 +12632,19 @@ export namespace Api {
         users: Api.TypeUser[];
     }
     export class WebViewResultUrl extends VirtualClass<{
-        queryId: long;
+        // flags: null;
+        fullsize?: boolean;
+        queryId?: long;
         url: string;
     }> {
-        CONSTRUCTOR_ID: 202659196;
+        CONSTRUCTOR_ID: 1294139288;
         SUBCLASS_OF_ID: 2479793990;
         classType: "constructor";
         className: "WebViewResultUrl";
         static fromReader(reader: Reader): WebViewResultUrl;
-        queryId: long;
-        url: string;
-    }
-    export class SimpleWebViewResultUrl extends VirtualClass<{
-        url: string;
-    }> {
-        CONSTRUCTOR_ID: 2284811963;
-        SUBCLASS_OF_ID: 367977435;
-        classType: "constructor";
-        className: "SimpleWebViewResultUrl";
-        static fromReader(reader: Reader): SimpleWebViewResultUrl;
+        // flags: null;
+        fullsize?: boolean;
+        queryId?: long;
         url: string;
     }
     export class WebViewMessageSent extends VirtualClass<{
@@ -13371,16 +13451,6 @@ export namespace Api {
         document?: Api.TypeDocument;
         hash: long;
     }
-    export class AppWebViewResultUrl extends VirtualClass<{
-        url: string;
-    }> {
-        CONSTRUCTOR_ID: 1008422669;
-        SUBCLASS_OF_ID: 472163347;
-        classType: "constructor";
-        className: "AppWebViewResultUrl";
-        static fromReader(reader: Reader): AppWebViewResultUrl;
-        url: string;
-    }
     export class InlineBotWebView extends VirtualClass<{
         text: string;
         url: string;
@@ -13686,22 +13756,26 @@ export namespace Api {
         cooldownUntilDate?: int;
     }
     export class MediaAreaCoordinates extends VirtualClass<{
+        // flags: null;
         x: double;
         y: double;
         w: double;
         h: double;
         rotation: double;
+        radius?: double;
     }> {
-        CONSTRUCTOR_ID: 64088654;
+        CONSTRUCTOR_ID: 3486113794;
         SUBCLASS_OF_ID: 491031609;
         classType: "constructor";
         className: "MediaAreaCoordinates";
         static fromReader(reader: Reader): MediaAreaCoordinates;
+        // flags: null;
         x: double;
         y: double;
         w: double;
         h: double;
         rotation: double;
+        radius?: double;
     }
     export class MediaAreaVenue extends VirtualClass<{
         coordinates: Api.TypeMediaAreaCoordinates;
@@ -13740,16 +13814,20 @@ export namespace Api {
         resultId: string;
     }
     export class MediaAreaGeoPoint extends VirtualClass<{
+        // flags: null;
         coordinates: Api.TypeMediaAreaCoordinates;
         geo: Api.TypeGeoPoint;
+        address?: Api.TypeGeoPointAddress;
     }> {
-        CONSTRUCTOR_ID: 3750443810;
+        CONSTRUCTOR_ID: 3402974509;
         SUBCLASS_OF_ID: 4084038642;
         classType: "constructor";
         className: "MediaAreaGeoPoint";
         static fromReader(reader: Reader): MediaAreaGeoPoint;
+        // flags: null;
         coordinates: Api.TypeMediaAreaCoordinates;
         geo: Api.TypeGeoPoint;
+        address?: Api.TypeGeoPointAddress;
     }
     export class MediaAreaSuggestedReaction extends VirtualClass<{
         // flags: null;
@@ -13797,6 +13875,18 @@ export namespace Api {
         channel: Api.TypeInputChannel;
         msgId: int;
     }
+    export class MediaAreaUrl extends VirtualClass<{
+        coordinates: Api.TypeMediaAreaCoordinates;
+        url: string;
+    }> {
+        CONSTRUCTOR_ID: 926421125;
+        SUBCLASS_OF_ID: 4084038642;
+        classType: "constructor";
+        className: "MediaAreaUrl";
+        static fromReader(reader: Reader): MediaAreaUrl;
+        coordinates: Api.TypeMediaAreaCoordinates;
+        url: string;
+    }
     export class PeerStories extends VirtualClass<{
         // flags: null;
         peer: Api.TypePeer;
@@ -14776,6 +14866,13 @@ export namespace Api {
         static fromReader(reader: Reader): StarsTransactionPeer;
         peer: Api.TypePeer;
     }
+    export class StarsTransactionPeerAds extends VirtualClass<void> {
+        CONSTRUCTOR_ID: 1617438738;
+        SUBCLASS_OF_ID: 1102483843;
+        classType: "constructor";
+        className: "StarsTransactionPeerAds";
+        static fromReader(reader: Reader): StarsTransactionPeerAds;
+    }
     export class StarsTopupOption extends VirtualClass<{
         // flags: null;
         extended?: boolean;
@@ -14799,6 +14896,8 @@ export namespace Api {
     export class StarsTransaction extends VirtualClass<{
         // flags: null;
         refund?: boolean;
+        pending?: boolean;
+        failed?: boolean;
         id: string;
         stars: long;
         date: int;
@@ -14806,14 +14905,21 @@ export namespace Api {
         title?: string;
         description?: string;
         photo?: Api.TypeWebDocument;
+        transactionDate?: int;
+        transactionUrl?: string;
+        botPayload?: bytes;
+        msgId?: int;
+        extendedMedia?: Api.TypeMessageMedia[];
     }> {
-        CONSTRUCTOR_ID: 3429923250;
+        CONSTRUCTOR_ID: 766853519;
         SUBCLASS_OF_ID: 2257078130;
         classType: "constructor";
         className: "StarsTransaction";
         static fromReader(reader: Reader): StarsTransaction;
         // flags: null;
         refund?: boolean;
+        pending?: boolean;
+        failed?: boolean;
         id: string;
         stars: long;
         date: int;
@@ -14821,6 +14927,75 @@ export namespace Api {
         title?: string;
         description?: string;
         photo?: Api.TypeWebDocument;
+        transactionDate?: int;
+        transactionUrl?: string;
+        botPayload?: bytes;
+        msgId?: int;
+        extendedMedia?: Api.TypeMessageMedia[];
+    }
+    export class FoundStory extends VirtualClass<{
+        peer: Api.TypePeer;
+        story: Api.TypeStoryItem;
+    }> {
+        CONSTRUCTOR_ID: 3900361664;
+        SUBCLASS_OF_ID: 3005049029;
+        classType: "constructor";
+        className: "FoundStory";
+        static fromReader(reader: Reader): FoundStory;
+        peer: Api.TypePeer;
+        story: Api.TypeStoryItem;
+    }
+    export class GeoPointAddress extends VirtualClass<{
+        // flags: null;
+        countryIso2: string;
+        state?: string;
+        city?: string;
+        street?: string;
+    }> {
+        CONSTRUCTOR_ID: 3729546643;
+        SUBCLASS_OF_ID: 2522202840;
+        classType: "constructor";
+        className: "GeoPointAddress";
+        static fromReader(reader: Reader): GeoPointAddress;
+        // flags: null;
+        countryIso2: string;
+        state?: string;
+        city?: string;
+        street?: string;
+    }
+    export class StarsRevenueStatus extends VirtualClass<{
+        // flags: null;
+        withdrawalEnabled?: boolean;
+        currentBalance: long;
+        availableBalance: long;
+        overallRevenue: long;
+        nextWithdrawalAt?: int;
+    }> {
+        CONSTRUCTOR_ID: 2033461574;
+        SUBCLASS_OF_ID: 1031643121;
+        classType: "constructor";
+        className: "StarsRevenueStatus";
+        static fromReader(reader: Reader): StarsRevenueStatus;
+        // flags: null;
+        withdrawalEnabled?: boolean;
+        currentBalance: long;
+        availableBalance: long;
+        overallRevenue: long;
+        nextWithdrawalAt?: int;
+    }
+    export class InputStarsTransaction extends VirtualClass<{
+        // flags: null;
+        refund?: boolean;
+        id: string;
+    }> {
+        CONSTRUCTOR_ID: 543876817;
+        SUBCLASS_OF_ID: 300026090;
+        classType: "constructor";
+        className: "InputStarsTransaction";
+        static fromReader(reader: Reader): InputStarsTransaction;
+        // flags: null;
+        refund?: boolean;
+        id: string;
     }
     export class ResPQ extends VirtualClass<{
         nonce: int128;
@@ -16046,18 +16221,20 @@ export namespace Api {
         export class SentCodeTypeFirebaseSms extends VirtualClass<{
             // flags: null;
             nonce?: bytes;
+            playIntegrityProjectId?: long;
             playIntegrityNonce?: bytes;
             receipt?: string;
             pushTimeout?: int;
             length: int;
         }> {
-            CONSTRUCTOR_ID: 331943703;
+            CONSTRUCTOR_ID: 10475318;
             SUBCLASS_OF_ID: 4284159374;
             classType: "constructor";
             className: "auth.SentCodeTypeFirebaseSms";
             static fromReader(reader: Reader): SentCodeTypeFirebaseSms;
             // flags: null;
             nonce?: bytes;
+            playIntegrityProjectId?: long;
             playIntegrityNonce?: bytes;
             receipt?: string;
             pushTimeout?: int;
@@ -18865,6 +19042,40 @@ export namespace Api {
             chats: Api.TypeChat[];
             users: Api.TypeUser[];
         }
+        export class StarsRevenueStats extends VirtualClass<{
+            revenueGraph: Api.TypeStatsGraph;
+            status: Api.TypeStarsRevenueStatus;
+            usdRate: double;
+        }> {
+            CONSTRUCTOR_ID: 3375085371;
+            SUBCLASS_OF_ID: 2772915699;
+            classType: "constructor";
+            className: "payments.StarsRevenueStats";
+            static fromReader(reader: Reader): StarsRevenueStats;
+            revenueGraph: Api.TypeStatsGraph;
+            status: Api.TypeStarsRevenueStatus;
+            usdRate: double;
+        }
+        export class StarsRevenueWithdrawalUrl extends VirtualClass<{
+            url: string;
+        }> {
+            CONSTRUCTOR_ID: 497778871;
+            SUBCLASS_OF_ID: 2221318382;
+            classType: "constructor";
+            className: "payments.StarsRevenueWithdrawalUrl";
+            static fromReader(reader: Reader): StarsRevenueWithdrawalUrl;
+            url: string;
+        }
+        export class StarsRevenueAdsAccountUrl extends VirtualClass<{
+            url: string;
+        }> {
+            CONSTRUCTOR_ID: 961445665;
+            SUBCLASS_OF_ID: 1243777813;
+            classType: "constructor";
+            className: "payments.StarsRevenueAdsAccountUrl";
+            static fromReader(reader: Reader): StarsRevenueAdsAccountUrl;
+            url: string;
+        }
     }
 
     export namespace phone {
@@ -19404,6 +19615,26 @@ export namespace Api {
             users: Api.TypeUser[];
             nextOffset?: string;
         }
+        export class FoundStories extends VirtualClass<{
+            // flags: null;
+            count: int;
+            stories: Api.TypeFoundStory[];
+            nextOffset?: string;
+            chats: Api.TypeChat[];
+            users: Api.TypeUser[];
+        }> {
+            CONSTRUCTOR_ID: 3806230327;
+            SUBCLASS_OF_ID: 393808693;
+            classType: "constructor";
+            className: "stories.FoundStories";
+            static fromReader(reader: Reader): FoundStories;
+            // flags: null;
+            count: int;
+            stories: Api.TypeFoundStory[];
+            nextOffset?: string;
+            chats: Api.TypeChat[];
+            users: Api.TypeUser[];
+        }
     }
 
     export namespace premium {
@@ -19840,6 +20071,11 @@ export namespace Api {
             | payments.GiveawayInfo
             | payments.GiveawayInfoResults;
         export type TypeStarsStatus = payments.StarsStatus;
+        export type TypeStarsRevenueStats = payments.StarsRevenueStats;
+        export type TypeStarsRevenueWithdrawalUrl =
+            payments.StarsRevenueWithdrawalUrl;
+        export type TypeStarsRevenueAdsAccountUrl =
+            payments.StarsRevenueAdsAccountUrl;
     }
 
     export namespace phone {
@@ -19896,6 +20132,7 @@ export namespace Api {
         export type TypeStoryViews = stories.StoryViews;
         export type TypePeerStories = stories.PeerStories;
         export type TypeStoryReactionsList = stories.StoryReactionsList;
+        export type TypeFoundStories = stories.FoundStories;
     }
 
     export namespace premium {
@@ -23528,10 +23765,11 @@ export namespace Api {
                 message: string;
                 entities?: Api.TypeMessageEntity[];
                 media?: Api.TypeInputMedia;
+                effect?: long;
             }>,
             Bool
         > {
-            CONSTRUCTOR_ID: 2146678790;
+            CONSTRUCTOR_ID: 3547514318;
             SUBCLASS_OF_ID: 4122188204;
             classType: "request";
             className: "messages.SaveDraft";
@@ -23544,6 +23782,7 @@ export namespace Api {
             message: string;
             entities?: Api.TypeMessageEntity[];
             media?: Api.TypeInputMedia;
+            effect?: long;
         }
         export class GetAllDrafts extends Request<void, Api.TypeUpdates> {
             CONSTRUCTOR_ID: 1782549861;
@@ -25235,6 +25474,7 @@ export namespace Api {
                 // flags: null;
                 fromBotMenu?: boolean;
                 silent?: boolean;
+                compact?: boolean;
                 peer: Api.TypeEntityLike;
                 bot: Api.TypeEntityLike;
                 url?: string;
@@ -25254,6 +25494,7 @@ export namespace Api {
             // flags: null;
             fromBotMenu?: boolean;
             silent?: boolean;
+            compact?: boolean;
             peer: Api.TypeEntityLike;
             bot: Api.TypeEntityLike;
             url?: string;
@@ -25293,22 +25534,24 @@ export namespace Api {
                 // flags: null;
                 fromSwitchWebview?: boolean;
                 fromSideMenu?: boolean;
+                compact?: boolean;
                 bot: Api.TypeEntityLike;
                 url?: string;
                 startParam?: string;
                 themeParams?: Api.TypeDataJSON;
                 platform: string;
             }>,
-            Api.TypeSimpleWebViewResult
+            Api.TypeWebViewResult
         > {
-            CONSTRUCTOR_ID: 440815626;
-            SUBCLASS_OF_ID: 367977435;
+            CONSTRUCTOR_ID: 1094336115;
+            SUBCLASS_OF_ID: 2479793990;
             classType: "request";
             className: "messages.RequestSimpleWebView";
             static fromReader(reader: Reader): RequestSimpleWebView;
             // flags: null;
             fromSwitchWebview?: boolean;
             fromSideMenu?: boolean;
+            compact?: boolean;
             bot: Api.TypeEntityLike;
             url?: string;
             startParam?: string;
@@ -25623,21 +25866,23 @@ export namespace Api {
             Partial<{
                 // flags: null;
                 writeAllowed?: boolean;
+                compact?: boolean;
                 peer: Api.TypeEntityLike;
                 app: Api.TypeInputBotApp;
                 startParam?: string;
                 themeParams?: Api.TypeDataJSON;
                 platform: string;
             }>,
-            Api.TypeAppWebViewResult
+            Api.TypeWebViewResult
         > {
-            CONSTRUCTOR_ID: 2354723644;
-            SUBCLASS_OF_ID: 472163347;
+            CONSTRUCTOR_ID: 1398901710;
+            SUBCLASS_OF_ID: 2479793990;
             classType: "request";
             className: "messages.RequestAppWebView";
             static fromReader(reader: Reader): RequestAppWebView;
             // flags: null;
             writeAllowed?: boolean;
+            compact?: boolean;
             peer: Api.TypeEntityLike;
             app: Api.TypeInputBotApp;
             startParam?: string;
@@ -28273,12 +28518,14 @@ export namespace Api {
                 // flags: null;
                 inbound?: boolean;
                 outbound?: boolean;
+                ascending?: boolean;
                 peer: Api.TypeEntityLike;
                 offset: string;
+                limit: int;
             }>,
             payments.TypeStarsStatus
         > {
-            CONSTRUCTOR_ID: 1731904249;
+            CONSTRUCTOR_ID: 2543029594;
             SUBCLASS_OF_ID: 1855724911;
             classType: "request";
             className: "payments.GetStarsTransactions";
@@ -28286,8 +28533,10 @@ export namespace Api {
             // flags: null;
             inbound?: boolean;
             outbound?: boolean;
+            ascending?: boolean;
             peer: Api.TypeEntityLike;
             offset: string;
+            limit: int;
         }
         export class SendStarsForm extends Request<
             Partial<{
@@ -28321,6 +28570,68 @@ export namespace Api {
             userId: Api.TypeEntityLike;
             chargeId: string;
         }
+        export class GetStarsRevenueStats extends Request<
+            Partial<{
+                // flags: null;
+                dark?: boolean;
+                peer: Api.TypeEntityLike;
+            }>,
+            payments.TypeStarsRevenueStats
+        > {
+            CONSTRUCTOR_ID: 3642751702;
+            SUBCLASS_OF_ID: 2772915699;
+            classType: "request";
+            className: "payments.GetStarsRevenueStats";
+            static fromReader(reader: Reader): GetStarsRevenueStats;
+            // flags: null;
+            dark?: boolean;
+            peer: Api.TypeEntityLike;
+        }
+        export class GetStarsRevenueWithdrawalUrl extends Request<
+            Partial<{
+                peer: Api.TypeEntityLike;
+                stars: long;
+                password: Api.TypeInputCheckPasswordSRP;
+            }>,
+            payments.TypeStarsRevenueWithdrawalUrl
+        > {
+            CONSTRUCTOR_ID: 331081907;
+            SUBCLASS_OF_ID: 2221318382;
+            classType: "request";
+            className: "payments.GetStarsRevenueWithdrawalUrl";
+            static fromReader(reader: Reader): GetStarsRevenueWithdrawalUrl;
+            peer: Api.TypeEntityLike;
+            stars: long;
+            password: Api.TypeInputCheckPasswordSRP;
+        }
+        export class GetStarsRevenueAdsAccountUrl extends Request<
+            Partial<{
+                peer: Api.TypeEntityLike;
+            }>,
+            payments.TypeStarsRevenueAdsAccountUrl
+        > {
+            CONSTRUCTOR_ID: 3520589765;
+            SUBCLASS_OF_ID: 1243777813;
+            classType: "request";
+            className: "payments.GetStarsRevenueAdsAccountUrl";
+            static fromReader(reader: Reader): GetStarsRevenueAdsAccountUrl;
+            peer: Api.TypeEntityLike;
+        }
+        export class GetStarsTransactionsByID extends Request<
+            Partial<{
+                peer: Api.TypeEntityLike;
+                id: Api.TypeInputStarsTransaction[];
+            }>,
+            payments.TypeStarsStatus
+        > {
+            CONSTRUCTOR_ID: 662973742;
+            SUBCLASS_OF_ID: 1855724911;
+            classType: "request";
+            className: "payments.GetStarsTransactionsByID";
+            static fromReader(reader: Reader): GetStarsTransactionsByID;
+            peer: Api.TypeEntityLike;
+            id: Api.TypeInputStarsTransaction[];
+        }
     }
 
     export namespace stickers {
@@ -29915,6 +30226,27 @@ export namespace Api {
             peer: Api.TypeEntityLike;
             id: int[];
         }
+        export class SearchPosts extends Request<
+            Partial<{
+                // flags: null;
+                hashtag?: string;
+                area?: Api.TypeMediaArea;
+                offset: string;
+                limit: int;
+            }>,
+            stories.TypeFoundStories
+        > {
+            CONSTRUCTOR_ID: 1827279210;
+            SUBCLASS_OF_ID: 393808693;
+            classType: "request";
+            className: "stories.SearchPosts";
+            static fromReader(reader: Reader): SearchPosts;
+            // flags: null;
+            hashtag?: string;
+            area?: Api.TypeMediaArea;
+            offset: string;
+            limit: int;
+        }
     }
 
     export namespace premium {
@@ -30121,7 +30453,8 @@ export namespace Api {
         | InputMediaPoll
         | InputMediaDice
         | InputMediaStory
-        | InputMediaWebPage;
+        | InputMediaWebPage
+        | InputMediaPaidMedia;
     export type TypeInputChatPhoto =
         | InputChatPhotoEmpty
         | InputChatUploadedPhoto
@@ -30181,7 +30514,8 @@ export namespace Api {
         | MessageMediaDice
         | MessageMediaStory
         | MessageMediaGiveaway
-        | MessageMediaGiveawayResults;
+        | MessageMediaGiveawayResults
+        | MessageMediaPaidMedia;
     export type TypeMessageAction =
         | MessageActionEmpty
         | MessageActionChatCreate
@@ -30225,7 +30559,8 @@ export namespace Api {
         | MessageActionGiveawayLaunch
         | MessageActionGiveawayResults
         | MessageActionBoostApply
-        | MessageActionRequestedPeerSentMe;
+        | MessageActionRequestedPeerSentMe
+        | MessageActionPaymentRefunded;
     export type TypeDialog = Dialog | DialogFolder;
     export type TypePhoto = PhotoEmpty | Photo;
     export type TypePhotoSize =
@@ -30416,7 +30751,9 @@ export namespace Api {
         | UpdateBotDeleteBusinessMessage
         | UpdateNewStoryReaction
         | UpdateBroadcastRevenueTransactions
-        | UpdateStarsBalance;
+        | UpdateStarsBalance
+        | UpdateBusinessBotCallbackQuery
+        | UpdateStarsRevenueStatus;
     export type TypeUpdates =
         | UpdatesTooLong
         | UpdateShortMessage
@@ -31008,7 +31345,6 @@ export namespace Api {
     export type TypeAttachMenuBots = AttachMenuBotsNotModified | AttachMenuBots;
     export type TypeAttachMenuBotsBot = AttachMenuBotsBot;
     export type TypeWebViewResult = WebViewResultUrl;
-    export type TypeSimpleWebViewResult = SimpleWebViewResultUrl;
     export type TypeWebViewMessageSent = WebViewMessageSent;
     export type TypeBotMenuButton =
         | BotMenuButtonDefault
@@ -31082,7 +31418,6 @@ export namespace Api {
     export type TypeAutoSaveException = AutoSaveException;
     export type TypeInputBotApp = InputBotAppID | InputBotAppShortName;
     export type TypeBotApp = BotAppNotModified | BotApp;
-    export type TypeAppWebViewResult = AppWebViewResultUrl;
     export type TypeInlineBotWebView = InlineBotWebView;
     export type TypeReadParticipantDate = ReadParticipantDate;
     export type TypeInputChatlist = InputChatlistDialogFilter;
@@ -31107,7 +31442,8 @@ export namespace Api {
         | MediaAreaGeoPoint
         | MediaAreaSuggestedReaction
         | MediaAreaChannelPost
-        | InputMediaAreaChannelPost;
+        | InputMediaAreaChannelPost
+        | MediaAreaUrl;
     export type TypePeerStories = PeerStories;
     export type TypePremiumGiftCodeOption = PremiumGiftCodeOption;
     export type TypePrepaidGiveaway = PrepaidGiveaway;
@@ -31181,9 +31517,14 @@ export namespace Api {
         | StarsTransactionPeerPlayMarket
         | StarsTransactionPeerPremiumBot
         | StarsTransactionPeerFragment
-        | StarsTransactionPeer;
+        | StarsTransactionPeer
+        | StarsTransactionPeerAds;
     export type TypeStarsTopupOption = StarsTopupOption;
     export type TypeStarsTransaction = StarsTransaction;
+    export type TypeFoundStory = FoundStory;
+    export type TypeGeoPointAddress = GeoPointAddress;
+    export type TypeStarsRevenueStatus = StarsRevenueStatus;
+    export type TypeInputStarsTransaction = InputStarsTransaction;
     export type TypeResPQ = ResPQ;
     export type TypeP_Q_inner_data =
         | PQInnerData
@@ -31775,6 +32116,10 @@ export namespace Api {
         | payments.GetStarsTransactions
         | payments.SendStarsForm
         | payments.RefundStarsCharge
+        | payments.GetStarsRevenueStats
+        | payments.GetStarsRevenueWithdrawalUrl
+        | payments.GetStarsRevenueAdsAccountUrl
+        | payments.GetStarsTransactionsByID
         | stickers.CreateStickerSet
         | stickers.RemoveStickerFromSet
         | stickers.ChangeStickerPosition
@@ -31869,6 +32214,7 @@ export namespace Api {
         | stories.TogglePeerStoriesHidden
         | stories.GetStoryReactionsList
         | stories.TogglePinnedToTop
+        | stories.SearchPosts
         | premium.GetBoostsList
         | premium.GetMyBoosts
         | premium.ApplyBoost

+ 33 - 15
gramjs/tl/apiTl.js

@@ -35,6 +35,7 @@ inputMediaPoll#f94e5f1 flags:# poll:Poll correct_answers:flags.0?Vector<bytes> s
 inputMediaDice#e66fbf7b emoticon:string = InputMedia;
 inputMediaStory#89fdd778 peer:InputPeer id:int = InputMedia;
 inputMediaWebPage#c21b8849 flags:# force_large_media:flags.0?true force_small_media:flags.1?true optional:flags.2?true url:string = InputMedia;
+inputMediaPaidMedia#aa661fc3 stars_amount:long extended_media:Vector<InputMedia> = InputMedia;
 inputChatPhotoEmpty#1ca48f57 = InputChatPhoto;
 inputChatUploadedPhoto#bdcdaec0 flags:# file:flags.0?InputFile video:flags.1?InputFile video_start_ts:flags.2?double video_emoji_markup:flags.3?VideoSize = InputChatPhoto;
 inputChatPhoto#8953ad37 id:InputPhoto = InputChatPhoto;
@@ -81,7 +82,7 @@ chatForbidden#6592a1a7 id:long title:string = Chat;
 channel#aadfc8f flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true noforwards:flags.27?true join_to_send:flags.28?true join_request:flags.29?true forum:flags.30?true flags2:# stories_hidden:flags2.1?true stories_hidden_min:flags2.2?true stories_unavailable:flags2.3?true id:long access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int restriction_reason:flags.9?Vector<RestrictionReason> admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int usernames:flags2.0?Vector<Username> stories_max_id:flags2.4?int color:flags2.7?PeerColor profile_color:flags2.8?PeerColor emoji_status:flags2.9?EmojiStatus level:flags2.10?int = Chat;
 channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat;
 chatFull#2633421b flags:# can_set_username:flags.7?true has_scheduled:flags.8?true translations_disabled:flags.19?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector<long> available_reactions:flags.18?ChatReactions reactions_limit:flags.20?int = ChatFull;
-channelFull#bbab348d flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true restricted_sponsored:flags2.11?true can_view_revenue:flags2.12?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions reactions_limit:flags2.13?int stories:flags2.4?PeerStories wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet = ChatFull;
+channelFull#bbab348d flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true restricted_sponsored:flags2.11?true can_view_revenue:flags2.12?true paid_media_allowed:flags2.14?true can_view_stars_revenue:flags2.15?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions reactions_limit:flags2.13?int stories:flags2.4?PeerStories wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet = ChatFull;
 chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant;
 chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant;
 chatParticipantAdmin#a0933f5b user_id:long inviter_id:long date:int = ChatParticipant;
@@ -108,6 +109,7 @@ messageMediaDice#3f7ee58b value:int emoticon:string = MessageMedia;
 messageMediaStory#68cb6283 flags:# via_mention:flags.1?true peer:Peer id:int story:flags.0?StoryItem = MessageMedia;
 messageMediaGiveaway#daad85b0 flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.2?true channels:Vector<long> countries_iso2:flags.1?Vector<string> prize_description:flags.3?string quantity:int months:int until_date:int = MessageMedia;
 messageMediaGiveawayResults#c6991068 flags:# only_new_subscribers:flags.0?true refunded:flags.2?true channel_id:long additional_peers_count:flags.3?int launch_msg_id:int winners_count:int unclaimed_count:int winners:Vector<long> months:int prize_description:flags.1?string until_date:int = MessageMedia;
+messageMediaPaidMedia#a8852491 stars_amount:long extended_media:Vector<MessageExtendedMedia> = MessageMedia;
 messageActionEmpty#b6aef7b0 = MessageAction;
 messageActionChatCreate#bd47cbad title:string users:Vector<long> = MessageAction;
 messageActionChatEditTitle#b5a1ce5a title:string = MessageAction;
@@ -151,6 +153,7 @@ messageActionGiveawayLaunch#332ba9ed = MessageAction;
 messageActionGiveawayResults#2a9fadc5 winners_count:int unclaimed_count:int = MessageAction;
 messageActionBoostApply#cc02aa6d boosts:int = MessageAction;
 messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector<RequestedPeer> = MessageAction;
+messageActionPaymentRefunded#41b3e202 flags:# peer:Peer currency:string total_amount:long payload:flags.0?bytes charge:PaymentCharge = MessageAction;
 dialog#d58a08c6 flags:# pinned:flags.2?true unread_mark:flags.3?true view_forum_as_messages:flags.6?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int ttl_period:flags.5?int = Dialog;
 dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;
 photoEmpty#2331b22d id:long = Photo;
@@ -331,7 +334,7 @@ updateUserEmojiStatus#28373599 user_id:long emoji_status:EmojiStatus = Update;
 updateRecentEmojiStatuses#30f443db = Update;
 updateRecentReactions#6f7863f4 = Update;
 updateMoveStickerSetToTop#86fccf85 flags:# masks:flags.0?true emojis:flags.1?true stickerset:long = Update;
-updateMessageExtendedMedia#5a73a98c peer:Peer msg_id:int extended_media:MessageExtendedMedia = Update;
+updateMessageExtendedMedia#d5a41724 peer:Peer msg_id:int extended_media:Vector<MessageExtendedMedia> = Update;
 updateChannelPinnedTopic#192efbe3 flags:# pinned:flags.0?true channel_id:long topic_id:int = Update;
 updateChannelPinnedTopics#fe198602 flags:# channel_id:long order:flags.0?Vector<int> = Update;
 updateUser#20529438 user_id:long = Update;
@@ -362,6 +365,8 @@ updateBotDeleteBusinessMessage#a02a982e connection_id:string peer:Peer messages:
 updateNewStoryReaction#1824e40b story_id:int peer:Peer reaction:Reaction = Update;
 updateBroadcastRevenueTransactions#dfd961f5 peer:Peer balances:BroadcastRevenueBalances = Update;
 updateStarsBalance#fb85198 balance:long = Update;
+updateBusinessBotCallbackQuery#1ea2fda7 flags:# query_id:long user_id:long connection_id:string message:Message reply_to_message:flags.2?Message chat_instance:long data:flags.0?bytes = Update;
+updateStarsRevenueStatus#a584b019 peer:Peer status:StarsRevenueStatus = Update;
 updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
 updates.differenceEmpty#5d75a138 date:int seq:int = updates.Difference;
 updates.difference#f49ca0 new_messages:Vector<Message> new_encrypted_messages:Vector<EncryptedMessage> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> state:updates.State = updates.Difference;
@@ -632,7 +637,7 @@ auth.sentCodeTypeMissedCall#82006484 prefix:string length:int = auth.SentCodeTyp
 auth.sentCodeTypeEmailCode#f450f59b flags:# apple_signin_allowed:flags.0?true google_signin_allowed:flags.1?true email_pattern:string length:int reset_available_period:flags.3?int reset_pending_date:flags.4?int = auth.SentCodeType;
 auth.sentCodeTypeSetUpEmailRequired#a5491dea flags:# apple_signin_allowed:flags.0?true google_signin_allowed:flags.1?true = auth.SentCodeType;
 auth.sentCodeTypeFragmentSms#d9565c39 url:string length:int = auth.SentCodeType;
-auth.sentCodeTypeFirebaseSms#13c90f17 flags:# nonce:flags.0?bytes play_integrity_nonce:flags.2?bytes receipt:flags.1?string push_timeout:flags.1?int length:int = auth.SentCodeType;
+auth.sentCodeTypeFirebaseSms#9fd736 flags:# nonce:flags.0?bytes play_integrity_project_id:flags.2?long play_integrity_nonce:flags.2?bytes receipt:flags.1?string push_timeout:flags.1?int length:int = auth.SentCodeType;
 auth.sentCodeTypeSmsWord#a416ac81 flags:# beginning:flags.0?string = auth.SentCodeType;
 auth.sentCodeTypeSmsPhrase#b37794af flags:# beginning:flags.0?string = auth.SentCodeType;
 messages.botCallbackAnswer#36585ea4 flags:# alert:flags.1?true has_url:flags.3?true native_ui:flags.4?true message:flags.0?string url:flags.2?string cache_time:int = messages.BotCallbackAnswer;
@@ -655,7 +660,7 @@ contacts.topPeersNotModified#de266ef5 = contacts.TopPeers;
 contacts.topPeers#70b772a8 categories:Vector<TopPeerCategoryPeers> chats:Vector<Chat> users:Vector<User> = contacts.TopPeers;
 contacts.topPeersDisabled#b52c939d = contacts.TopPeers;
 draftMessageEmpty#1b0c841a flags:# date:flags.0?int = DraftMessage;
-draftMessage#3fccf7ef flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo message:string entities:flags.3?Vector<MessageEntity> media:flags.5?InputMedia date:int = DraftMessage;
+draftMessage#2d65321f flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo message:string entities:flags.3?Vector<MessageEntity> media:flags.5?InputMedia date:int effect:flags.7?long = DraftMessage;
 messages.featuredStickersNotModified#c6dc0c66 count:int = messages.FeaturedStickers;
 messages.featuredStickers#be382906 flags:# premium:flags.0?true hash:long count:int sets:Vector<StickerSetCovered> unread:Vector<long> = messages.FeaturedStickers;
 messages.recentStickersNotModified#b17f890 = messages.RecentStickers;
@@ -1076,8 +1081,7 @@ attachMenuBot#d90d8dfe flags:# inactive:flags.0?true has_settings:flags.1?true r
 attachMenuBotsNotModified#f1d88a5c = AttachMenuBots;
 attachMenuBots#3c4301c0 hash:long bots:Vector<AttachMenuBot> users:Vector<User> = AttachMenuBots;
 attachMenuBotsBot#93bf667f bot:AttachMenuBot users:Vector<User> = AttachMenuBotsBot;
-webViewResultUrl#c14557c query_id:long url:string = WebViewResult;
-simpleWebViewResultUrl#882f76bb url:string = SimpleWebViewResult;
+webViewResultUrl#4d22ff98 flags:# fullsize:flags.1?true query_id:flags.0?long url:string = WebViewResult;
 webViewMessageSent#c94511c flags:# msg_id:flags.0?InputBotInlineMessageID = WebViewMessageSent;
 botMenuButtonDefault#7533a588 = BotMenuButton;
 botMenuButtonCommands#4258c205 = BotMenuButton;
@@ -1163,7 +1167,6 @@ inputBotAppShortName#908c0407 bot_id:InputUser short_name:string = InputBotApp;
 botAppNotModified#5da674b7 = BotApp;
 botApp#95fcd1d6 flags:# id:long access_hash:long short_name:string title:string description:string photo:Photo document:flags.0?Document hash:long = BotApp;
 messages.botApp#eb50adf5 flags:# inactive:flags.0?true request_write_access:flags.1?true has_settings:flags.2?true app:BotApp = messages.BotApp;
-appWebViewResultUrl#3c1b4f0d url:string = AppWebViewResult;
 inlineBotWebView#b57295d5 text:string url:string = InlineBotWebView;
 readParticipantDate#4a4ff172 user_id:long date:int = ReadParticipantDate;
 inputChatlistDialogFilter#f3e0da33 filter_id:int = InputChatlist;
@@ -1193,13 +1196,14 @@ inputReplyToMessage#22c0f6d5 flags:# reply_to_msg_id:int top_msg_id:flags.0?int
 inputReplyToStory#5881323a peer:InputPeer story_id:int = InputReplyTo;
 exportedStoryLink#3fc9053b link:string = ExportedStoryLink;
 storiesStealthMode#712e27fd flags:# active_until_date:flags.0?int cooldown_until_date:flags.1?int = StoriesStealthMode;
-mediaAreaCoordinates#3d1ea4e x:double y:double w:double h:double rotation:double = MediaAreaCoordinates;
+mediaAreaCoordinates#cfc9e002 flags:# x:double y:double w:double h:double rotation:double radius:flags.0?double = MediaAreaCoordinates;
 mediaAreaVenue#be82db9c coordinates:MediaAreaCoordinates geo:GeoPoint title:string address:string provider:string venue_id:string venue_type:string = MediaArea;
 inputMediaAreaVenue#b282217f coordinates:MediaAreaCoordinates query_id:long result_id:string = MediaArea;
-mediaAreaGeoPoint#df8b3b22 coordinates:MediaAreaCoordinates geo:GeoPoint = MediaArea;
+mediaAreaGeoPoint#cad5452d flags:# coordinates:MediaAreaCoordinates geo:GeoPoint address:flags.0?GeoPointAddress = MediaArea;
 mediaAreaSuggestedReaction#14455871 flags:# dark:flags.0?true flipped:flags.1?true coordinates:MediaAreaCoordinates reaction:Reaction = MediaArea;
 mediaAreaChannelPost#770416af coordinates:MediaAreaCoordinates channel_id:long msg_id:int = MediaArea;
 inputMediaAreaChannelPost#2271f2bf coordinates:MediaAreaCoordinates channel:InputChannel msg_id:int = MediaArea;
+mediaAreaUrl#37381085 coordinates:MediaAreaCoordinates url:string = MediaArea;
 peerStories#9a35e999 flags:# peer:Peer max_read_id:flags.0?int stories:Vector<StoryItem> = PeerStories;
 stories.peerStories#cae68768 stories:PeerStories chats:Vector<Chat> users:Vector<User> = stories.PeerStories;
 messages.webPage#fd5e12bd webpage:WebPage chats:Vector<Chat> users:Vector<User> = messages.WebPage;
@@ -1309,9 +1313,18 @@ starsTransactionPeerPlayMarket#7b560a0b = StarsTransactionPeer;
 starsTransactionPeerPremiumBot#250dbaf8 = StarsTransactionPeer;
 starsTransactionPeerFragment#e92fd902 = StarsTransactionPeer;
 starsTransactionPeer#d80da15d peer:Peer = StarsTransactionPeer;
+starsTransactionPeerAds#60682812 = StarsTransactionPeer;
 starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
-starsTransaction#cc7079b2 flags:# refund:flags.3?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument = StarsTransaction;
+starsTransaction#2db5418f flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector<MessageMedia> = StarsTransaction;
 payments.starsStatus#8cf4ee60 flags:# balance:long history:Vector<StarsTransaction> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.StarsStatus;
+foundStory#e87acbc0 peer:Peer story:StoryItem = FoundStory;
+stories.foundStories#e2de7737 flags:# count:int stories:Vector<FoundStory> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = stories.FoundStories;
+geoPointAddress#de4c5d93 flags:# country_iso2:string state:flags.0?string city:flags.1?string street:flags.2?string = GeoPointAddress;
+starsRevenueStatus#79342946 flags:# withdrawal_enabled:flags.0?true current_balance:long available_balance:long overall_revenue:long next_withdrawal_at:flags.1?int = StarsRevenueStatus;
+payments.starsRevenueStats#c92bb73b revenue_graph:StatsGraph status:StarsRevenueStatus usd_rate:double = payments.StarsRevenueStats;
+payments.starsRevenueWithdrawalUrl#1dab80b7 url:string = payments.StarsRevenueWithdrawalUrl;
+payments.starsRevenueAdsAccountUrl#394e7f21 url:string = payments.StarsRevenueAdsAccountUrl;
+inputStarsTransaction#206ae6d1 flags:# refund:flags.0?true id:string = InputStarsTransaction;
 ---functions---
 invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
 invokeAfterMsgs#3dc4b4f0 {X:Type} msg_ids:Vector<long> query:!X = X;
@@ -1549,7 +1562,7 @@ messages.editInlineBotMessage#83557dba flags:# no_webpage:flags.1?true invert_me
 messages.getBotCallbackAnswer#9342ca07 flags:# game:flags.1?true peer:InputPeer msg_id:int data:flags.0?bytes password:flags.2?InputCheckPasswordSRP = messages.BotCallbackAnswer;
 messages.setBotCallbackAnswer#d58f130a flags:# alert:flags.1?true query_id:long message:flags.0?string url:flags.2?string cache_time:int = Bool;
 messages.getPeerDialogs#e470bcfd peers:Vector<InputDialogPeer> = messages.PeerDialogs;
-messages.saveDraft#7ff3b806 flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo peer:InputPeer message:string entities:flags.3?Vector<MessageEntity> media:flags.5?InputMedia = Bool;
+messages.saveDraft#d372c5ce flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo peer:InputPeer message:string entities:flags.3?Vector<MessageEntity> media:flags.5?InputMedia effect:flags.7?long = Bool;
 messages.getAllDrafts#6a3f8d65 = Updates;
 messages.getFeaturedStickers#64780b14 hash:long = messages.FeaturedStickers;
 messages.readFeaturedStickers#5b118126 id:Vector<long> = Bool;
@@ -1649,9 +1662,9 @@ messages.searchSentMedia#107e31a0 q:string filter:MessagesFilter limit:int = mes
 messages.getAttachMenuBots#16fcc2cb hash:long = AttachMenuBots;
 messages.getAttachMenuBot#77216192 bot:InputUser = AttachMenuBotsBot;
 messages.toggleBotInAttachMenu#69f59d69 flags:# write_allowed:flags.0?true bot:InputUser enabled:Bool = Bool;
-messages.requestWebView#269dc2c1 flags:# from_bot_menu:flags.4?true silent:flags.5?true peer:InputPeer bot:InputUser url:flags.1?string start_param:flags.3?string theme_params:flags.2?DataJSON platform:string reply_to:flags.0?InputReplyTo send_as:flags.13?InputPeer = WebViewResult;
+messages.requestWebView#269dc2c1 flags:# from_bot_menu:flags.4?true silent:flags.5?true compact:flags.7?true peer:InputPeer bot:InputUser url:flags.1?string start_param:flags.3?string theme_params:flags.2?DataJSON platform:string reply_to:flags.0?InputReplyTo send_as:flags.13?InputPeer = WebViewResult;
 messages.prolongWebView#b0d81a83 flags:# silent:flags.5?true peer:InputPeer bot:InputUser query_id:long reply_to:flags.0?InputReplyTo send_as:flags.13?InputPeer = Bool;
-messages.requestSimpleWebView#1a46500a flags:# from_switch_webview:flags.1?true from_side_menu:flags.2?true bot:InputUser url:flags.3?string start_param:flags.4?string theme_params:flags.0?DataJSON platform:string = SimpleWebViewResult;
+messages.requestSimpleWebView#413a3e73 flags:# from_switch_webview:flags.1?true from_side_menu:flags.2?true compact:flags.7?true bot:InputUser url:flags.3?string start_param:flags.4?string theme_params:flags.0?DataJSON platform:string = WebViewResult;
 messages.sendWebViewResultMessage#a4314f5 bot_query_id:string result:InputBotInlineResult = WebViewMessageSent;
 messages.sendWebViewData#dc0242c8 bot:InputUser random_id:long button_text:string data:string = Updates;
 messages.transcribeAudio#269e9a49 peer:InputPeer msg_id:int = messages.TranscribedAudio;
@@ -1673,7 +1686,7 @@ messages.getEmojiProfilePhotoGroups#21a548f3 hash:int = messages.EmojiGroups;
 messages.searchCustomEmoji#2c11c0d7 emoticon:string hash:long = EmojiList;
 messages.togglePeerTranslations#e47cb579 flags:# disabled:flags.0?true peer:InputPeer = Bool;
 messages.getBotApp#34fdc5c3 app:InputBotApp hash:long = messages.BotApp;
-messages.requestAppWebView#8c5a3b3c flags:# write_allowed:flags.0?true peer:InputPeer app:InputBotApp start_param:flags.1?string theme_params:flags.2?DataJSON platform:string = AppWebViewResult;
+messages.requestAppWebView#53618bce flags:# write_allowed:flags.0?true compact:flags.7?true peer:InputPeer app:InputBotApp start_param:flags.1?string theme_params:flags.2?DataJSON platform:string = WebViewResult;
 messages.setChatWallPaper#8ffacae1 flags:# for_both:flags.3?true revert:flags.4?true peer:InputPeer wallpaper:flags.0?InputWallPaper settings:flags.2?WallPaperSettings id:flags.1?int = Updates;
 messages.searchEmojiStickerSets#92b4494c flags:# exclude_featured:flags.0?true q:string hash:long = messages.FoundStickerSets;
 messages.getSavedDialogs#5381d21a flags:# exclude_pinned:flags.0?true offset_date:int offset_id:int offset_peer:InputPeer limit:int hash:long = messages.SavedDialogs;
@@ -1841,9 +1854,13 @@ payments.getGiveawayInfo#f4239425 peer:InputPeer msg_id:int = payments.GiveawayI
 payments.launchPrepaidGiveaway#5ff58f20 peer:InputPeer giveaway_id:long purpose:InputStorePaymentPurpose = Updates;
 payments.getStarsTopupOptions#c00ec7d3 = Vector<StarsTopupOption>;
 payments.getStarsStatus#104fcfa7 peer:InputPeer = payments.StarsStatus;
-payments.getStarsTransactions#673ac2f9 flags:# inbound:flags.0?true outbound:flags.1?true peer:InputPeer offset:string = payments.StarsStatus;
+payments.getStarsTransactions#97938d5a flags:# inbound:flags.0?true outbound:flags.1?true ascending:flags.2?true peer:InputPeer offset:string limit:int = payments.StarsStatus;
 payments.sendStarsForm#2bb731d flags:# form_id:long invoice:InputInvoice = payments.PaymentResult;
 payments.refundStarsCharge#25ae8f4a user_id:InputUser charge_id:string = Updates;
+payments.getStarsRevenueStats#d91ffad6 flags:# dark:flags.0?true peer:InputPeer = payments.StarsRevenueStats;
+payments.getStarsRevenueWithdrawalUrl#13bbe8b3 peer:InputPeer stars:long password:InputCheckPasswordSRP = payments.StarsRevenueWithdrawalUrl;
+payments.getStarsRevenueAdsAccountUrl#d1d7efc5 peer:InputPeer = payments.StarsRevenueAdsAccountUrl;
+payments.getStarsTransactionsByID#27842d2e peer:InputPeer id:Vector<InputStarsTransaction> = payments.StarsStatus;
 stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true emojis:flags.5?true text_color:flags.6?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector<InputStickerSetItem> software:flags.3?string = messages.StickerSet;
 stickers.removeStickerFromSet#f7760f51 sticker:InputDocument = messages.StickerSet;
 stickers.changeStickerPosition#ffb6d4ca sticker:InputDocument position:int = messages.StickerSet;
@@ -1938,6 +1955,7 @@ stories.getChatsToSend#a56a8b60 = messages.Chats;
 stories.togglePeerStoriesHidden#bd0415c4 peer:InputPeer hidden:Bool = Bool;
 stories.getStoryReactionsList#b9b2881f flags:# forwards_first:flags.2?true peer:InputPeer id:int reaction:flags.0?Reaction offset:flags.1?string limit:int = stories.StoryReactionsList;
 stories.togglePinnedToTop#b297e9b peer:InputPeer id:Vector<int> = Bool;
+stories.searchPosts#6cea116a flags:# hashtag:flags.0?string area:flags.1?MediaArea offset:string limit:int = stories.FoundStories;
 premium.getBoostsList#60f67660 flags:# gifts:flags.0?true peer:InputPeer offset:string limit:int = premium.BoostsList;
 premium.getMyBoosts#be77b4a = premium.MyBoosts;
 premium.applyBoost#6b7da746 flags:# slots:flags.0?Vector<int> peer:InputPeer = premium.MyBoosts;

+ 42 - 18
gramjs/tl/static/api.tl

@@ -44,6 +44,7 @@ inputMediaPoll#f94e5f1 flags:# poll:Poll correct_answers:flags.0?Vector<bytes> s
 inputMediaDice#e66fbf7b emoticon:string = InputMedia;
 inputMediaStory#89fdd778 peer:InputPeer id:int = InputMedia;
 inputMediaWebPage#c21b8849 flags:# force_large_media:flags.0?true force_small_media:flags.1?true optional:flags.2?true url:string = InputMedia;
+inputMediaPaidMedia#aa661fc3 stars_amount:long extended_media:Vector<InputMedia> = InputMedia;
 
 inputChatPhotoEmpty#1ca48f57 = InputChatPhoto;
 inputChatUploadedPhoto#bdcdaec0 flags:# file:flags.0?InputFile video:flags.1?InputFile video_start_ts:flags.2?double video_emoji_markup:flags.3?VideoSize = InputChatPhoto;
@@ -101,7 +102,7 @@ channel#aadfc8f flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5
 channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat;
 
 chatFull#2633421b flags:# can_set_username:flags.7?true has_scheduled:flags.8?true translations_disabled:flags.19?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string requests_pending:flags.17?int recent_requesters:flags.17?Vector<long> available_reactions:flags.18?ChatReactions reactions_limit:flags.20?int = ChatFull;
-channelFull#bbab348d flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true restricted_sponsored:flags2.11?true can_view_revenue:flags2.12?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions reactions_limit:flags2.13?int stories:flags2.4?PeerStories wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet = ChatFull;
+channelFull#bbab348d flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true participants_hidden:flags2.2?true translations_disabled:flags2.3?true stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true restricted_sponsored:flags2.11?true can_view_revenue:flags2.12?true paid_media_allowed:flags2.14?true can_view_stars_revenue:flags2.15?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string requests_pending:flags.28?int recent_requesters:flags.28?Vector<long> default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions reactions_limit:flags2.13?int stories:flags2.4?PeerStories wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet = ChatFull;
 
 chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant;
 chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant;
@@ -133,6 +134,7 @@ messageMediaDice#3f7ee58b value:int emoticon:string = MessageMedia;
 messageMediaStory#68cb6283 flags:# via_mention:flags.1?true peer:Peer id:int story:flags.0?StoryItem = MessageMedia;
 messageMediaGiveaway#daad85b0 flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.2?true channels:Vector<long> countries_iso2:flags.1?Vector<string> prize_description:flags.3?string quantity:int months:int until_date:int = MessageMedia;
 messageMediaGiveawayResults#c6991068 flags:# only_new_subscribers:flags.0?true refunded:flags.2?true channel_id:long additional_peers_count:flags.3?int launch_msg_id:int winners_count:int unclaimed_count:int winners:Vector<long> months:int prize_description:flags.1?string until_date:int = MessageMedia;
+messageMediaPaidMedia#a8852491 stars_amount:long extended_media:Vector<MessageExtendedMedia> = MessageMedia;
 
 messageActionEmpty#b6aef7b0 = MessageAction;
 messageActionChatCreate#bd47cbad title:string users:Vector<long> = MessageAction;
@@ -177,6 +179,7 @@ messageActionGiveawayLaunch#332ba9ed = MessageAction;
 messageActionGiveawayResults#2a9fadc5 winners_count:int unclaimed_count:int = MessageAction;
 messageActionBoostApply#cc02aa6d boosts:int = MessageAction;
 messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector<RequestedPeer> = MessageAction;
+messageActionPaymentRefunded#41b3e202 flags:# peer:Peer currency:string total_amount:long payload:flags.0?bytes charge:PaymentCharge = MessageAction;
 
 dialog#d58a08c6 flags:# pinned:flags.2?true unread_mark:flags.3?true view_forum_as_messages:flags.6?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int ttl_period:flags.5?int = Dialog;
 dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;
@@ -384,7 +387,7 @@ updateUserEmojiStatus#28373599 user_id:long emoji_status:EmojiStatus = Update;
 updateRecentEmojiStatuses#30f443db = Update;
 updateRecentReactions#6f7863f4 = Update;
 updateMoveStickerSetToTop#86fccf85 flags:# masks:flags.0?true emojis:flags.1?true stickerset:long = Update;
-updateMessageExtendedMedia#5a73a98c peer:Peer msg_id:int extended_media:MessageExtendedMedia = Update;
+updateMessageExtendedMedia#d5a41724 peer:Peer msg_id:int extended_media:Vector<MessageExtendedMedia> = Update;
 updateChannelPinnedTopic#192efbe3 flags:# pinned:flags.0?true channel_id:long topic_id:int = Update;
 updateChannelPinnedTopics#fe198602 flags:# channel_id:long order:flags.0?Vector<int> = Update;
 updateUser#20529438 user_id:long = Update;
@@ -415,6 +418,8 @@ updateBotDeleteBusinessMessage#a02a982e connection_id:string peer:Peer messages:
 updateNewStoryReaction#1824e40b story_id:int peer:Peer reaction:Reaction = Update;
 updateBroadcastRevenueTransactions#dfd961f5 peer:Peer balances:BroadcastRevenueBalances = Update;
 updateStarsBalance#fb85198 balance:long = Update;
+updateBusinessBotCallbackQuery#1ea2fda7 flags:# query_id:long user_id:long connection_id:string message:Message reply_to_message:flags.2?Message chat_instance:long data:flags.0?bytes = Update;
+updateStarsRevenueStatus#a584b019 peer:Peer status:StarsRevenueStatus = Update;
 
 updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
 
@@ -759,7 +764,7 @@ auth.sentCodeTypeMissedCall#82006484 prefix:string length:int = auth.SentCodeTyp
 auth.sentCodeTypeEmailCode#f450f59b flags:# apple_signin_allowed:flags.0?true google_signin_allowed:flags.1?true email_pattern:string length:int reset_available_period:flags.3?int reset_pending_date:flags.4?int = auth.SentCodeType;
 auth.sentCodeTypeSetUpEmailRequired#a5491dea flags:# apple_signin_allowed:flags.0?true google_signin_allowed:flags.1?true = auth.SentCodeType;
 auth.sentCodeTypeFragmentSms#d9565c39 url:string length:int = auth.SentCodeType;
-auth.sentCodeTypeFirebaseSms#13c90f17 flags:# nonce:flags.0?bytes play_integrity_nonce:flags.2?bytes receipt:flags.1?string push_timeout:flags.1?int length:int = auth.SentCodeType;
+auth.sentCodeTypeFirebaseSms#9fd736 flags:# nonce:flags.0?bytes play_integrity_project_id:flags.2?long play_integrity_nonce:flags.2?bytes receipt:flags.1?string push_timeout:flags.1?int length:int = auth.SentCodeType;
 auth.sentCodeTypeSmsWord#a416ac81 flags:# beginning:flags.0?string = auth.SentCodeType;
 auth.sentCodeTypeSmsPhrase#b37794af flags:# beginning:flags.0?string = auth.SentCodeType;
 
@@ -792,7 +797,7 @@ contacts.topPeers#70b772a8 categories:Vector<TopPeerCategoryPeers> chats:Vector<
 contacts.topPeersDisabled#b52c939d = contacts.TopPeers;
 
 draftMessageEmpty#1b0c841a flags:# date:flags.0?int = DraftMessage;
-draftMessage#3fccf7ef flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo message:string entities:flags.3?Vector<MessageEntity> media:flags.5?InputMedia date:int = DraftMessage;
+draftMessage#2d65321f flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo message:string entities:flags.3?Vector<MessageEntity> media:flags.5?InputMedia date:int effect:flags.7?long = DraftMessage;
 
 messages.featuredStickersNotModified#c6dc0c66 count:int = messages.FeaturedStickers;
 messages.featuredStickers#be382906 flags:# premium:flags.0?true hash:long count:int sets:Vector<StickerSetCovered> unread:Vector<long> = messages.FeaturedStickers;
@@ -1420,9 +1425,7 @@ attachMenuBots#3c4301c0 hash:long bots:Vector<AttachMenuBot> users:Vector<User>
 
 attachMenuBotsBot#93bf667f bot:AttachMenuBot users:Vector<User> = AttachMenuBotsBot;
 
-webViewResultUrl#c14557c query_id:long url:string = WebViewResult;
-
-simpleWebViewResultUrl#882f76bb url:string = SimpleWebViewResult;
+webViewResultUrl#4d22ff98 flags:# fullsize:flags.1?true query_id:flags.0?long url:string = WebViewResult;
 
 webViewMessageSent#c94511c flags:# msg_id:flags.0?InputBotInlineMessageID = WebViewMessageSent;
 
@@ -1552,8 +1555,6 @@ botApp#95fcd1d6 flags:# id:long access_hash:long short_name:string title:string
 
 messages.botApp#eb50adf5 flags:# inactive:flags.0?true request_write_access:flags.1?true has_settings:flags.2?true app:BotApp = messages.BotApp;
 
-appWebViewResultUrl#3c1b4f0d url:string = AppWebViewResult;
-
 inlineBotWebView#b57295d5 text:string url:string = InlineBotWebView;
 
 readParticipantDate#4a4ff172 user_id:long date:int = ReadParticipantDate;
@@ -1603,14 +1604,15 @@ exportedStoryLink#3fc9053b link:string = ExportedStoryLink;
 
 storiesStealthMode#712e27fd flags:# active_until_date:flags.0?int cooldown_until_date:flags.1?int = StoriesStealthMode;
 
-mediaAreaCoordinates#3d1ea4e x:double y:double w:double h:double rotation:double = MediaAreaCoordinates;
+mediaAreaCoordinates#cfc9e002 flags:# x:double y:double w:double h:double rotation:double radius:flags.0?double = MediaAreaCoordinates;
 
 mediaAreaVenue#be82db9c coordinates:MediaAreaCoordinates geo:GeoPoint title:string address:string provider:string venue_id:string venue_type:string = MediaArea;
 inputMediaAreaVenue#b282217f coordinates:MediaAreaCoordinates query_id:long result_id:string = MediaArea;
-mediaAreaGeoPoint#df8b3b22 coordinates:MediaAreaCoordinates geo:GeoPoint = MediaArea;
+mediaAreaGeoPoint#cad5452d flags:# coordinates:MediaAreaCoordinates geo:GeoPoint address:flags.0?GeoPointAddress = MediaArea;
 mediaAreaSuggestedReaction#14455871 flags:# dark:flags.0?true flipped:flags.1?true coordinates:MediaAreaCoordinates reaction:Reaction = MediaArea;
 mediaAreaChannelPost#770416af coordinates:MediaAreaCoordinates channel_id:long msg_id:int = MediaArea;
 inputMediaAreaChannelPost#2271f2bf coordinates:MediaAreaCoordinates channel:InputChannel msg_id:int = MediaArea;
+mediaAreaUrl#37381085 coordinates:MediaAreaCoordinates url:string = MediaArea;
 
 peerStories#9a35e999 flags:# peer:Peer max_read_id:flags.0?int stories:Vector<StoryItem> = PeerStories;
 
@@ -1800,13 +1802,30 @@ starsTransactionPeerPlayMarket#7b560a0b = StarsTransactionPeer;
 starsTransactionPeerPremiumBot#250dbaf8 = StarsTransactionPeer;
 starsTransactionPeerFragment#e92fd902 = StarsTransactionPeer;
 starsTransactionPeer#d80da15d peer:Peer = StarsTransactionPeer;
+starsTransactionPeerAds#60682812 = StarsTransactionPeer;
 
 starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
 
-starsTransaction#cc7079b2 flags:# refund:flags.3?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument = StarsTransaction;
+starsTransaction#2db5418f flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector<MessageMedia> = StarsTransaction;
 
 payments.starsStatus#8cf4ee60 flags:# balance:long history:Vector<StarsTransaction> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.StarsStatus;
 
+foundStory#e87acbc0 peer:Peer story:StoryItem = FoundStory;
+
+stories.foundStories#e2de7737 flags:# count:int stories:Vector<FoundStory> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = stories.FoundStories;
+
+geoPointAddress#de4c5d93 flags:# country_iso2:string state:flags.0?string city:flags.1?string street:flags.2?string = GeoPointAddress;
+
+starsRevenueStatus#79342946 flags:# withdrawal_enabled:flags.0?true current_balance:long available_balance:long overall_revenue:long next_withdrawal_at:flags.1?int = StarsRevenueStatus;
+
+payments.starsRevenueStats#c92bb73b revenue_graph:StatsGraph status:StarsRevenueStatus usd_rate:double = payments.StarsRevenueStats;
+
+payments.starsRevenueWithdrawalUrl#1dab80b7 url:string = payments.StarsRevenueWithdrawalUrl;
+
+payments.starsRevenueAdsAccountUrl#394e7f21 url:string = payments.StarsRevenueAdsAccountUrl;
+
+inputStarsTransaction#206ae6d1 flags:# refund:flags.0?true id:string = InputStarsTransaction;
+
 ---functions---
 
 invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@@ -2050,7 +2069,7 @@ messages.editInlineBotMessage#83557dba flags:# no_webpage:flags.1?true invert_me
 messages.getBotCallbackAnswer#9342ca07 flags:# game:flags.1?true peer:InputPeer msg_id:int data:flags.0?bytes password:flags.2?InputCheckPasswordSRP = messages.BotCallbackAnswer;
 messages.setBotCallbackAnswer#d58f130a flags:# alert:flags.1?true query_id:long message:flags.0?string url:flags.2?string cache_time:int = Bool;
 messages.getPeerDialogs#e470bcfd peers:Vector<InputDialogPeer> = messages.PeerDialogs;
-messages.saveDraft#7ff3b806 flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo peer:InputPeer message:string entities:flags.3?Vector<MessageEntity> media:flags.5?InputMedia = Bool;
+messages.saveDraft#d372c5ce flags:# no_webpage:flags.1?true invert_media:flags.6?true reply_to:flags.4?InputReplyTo peer:InputPeer message:string entities:flags.3?Vector<MessageEntity> media:flags.5?InputMedia effect:flags.7?long = Bool;
 messages.getAllDrafts#6a3f8d65 = Updates;
 messages.getFeaturedStickers#64780b14 hash:long = messages.FeaturedStickers;
 messages.readFeaturedStickers#5b118126 id:Vector<long> = Bool;
@@ -2150,9 +2169,9 @@ messages.searchSentMedia#107e31a0 q:string filter:MessagesFilter limit:int = mes
 messages.getAttachMenuBots#16fcc2cb hash:long = AttachMenuBots;
 messages.getAttachMenuBot#77216192 bot:InputUser = AttachMenuBotsBot;
 messages.toggleBotInAttachMenu#69f59d69 flags:# write_allowed:flags.0?true bot:InputUser enabled:Bool = Bool;
-messages.requestWebView#269dc2c1 flags:# from_bot_menu:flags.4?true silent:flags.5?true peer:InputPeer bot:InputUser url:flags.1?string start_param:flags.3?string theme_params:flags.2?DataJSON platform:string reply_to:flags.0?InputReplyTo send_as:flags.13?InputPeer = WebViewResult;
+messages.requestWebView#269dc2c1 flags:# from_bot_menu:flags.4?true silent:flags.5?true compact:flags.7?true peer:InputPeer bot:InputUser url:flags.1?string start_param:flags.3?string theme_params:flags.2?DataJSON platform:string reply_to:flags.0?InputReplyTo send_as:flags.13?InputPeer = WebViewResult;
 messages.prolongWebView#b0d81a83 flags:# silent:flags.5?true peer:InputPeer bot:InputUser query_id:long reply_to:flags.0?InputReplyTo send_as:flags.13?InputPeer = Bool;
-messages.requestSimpleWebView#1a46500a flags:# from_switch_webview:flags.1?true from_side_menu:flags.2?true bot:InputUser url:flags.3?string start_param:flags.4?string theme_params:flags.0?DataJSON platform:string = SimpleWebViewResult;
+messages.requestSimpleWebView#413a3e73 flags:# from_switch_webview:flags.1?true from_side_menu:flags.2?true compact:flags.7?true bot:InputUser url:flags.3?string start_param:flags.4?string theme_params:flags.0?DataJSON platform:string = WebViewResult;
 messages.sendWebViewResultMessage#a4314f5 bot_query_id:string result:InputBotInlineResult = WebViewMessageSent;
 messages.sendWebViewData#dc0242c8 bot:InputUser random_id:long button_text:string data:string = Updates;
 messages.transcribeAudio#269e9a49 peer:InputPeer msg_id:int = messages.TranscribedAudio;
@@ -2174,7 +2193,7 @@ messages.getEmojiProfilePhotoGroups#21a548f3 hash:int = messages.EmojiGroups;
 messages.searchCustomEmoji#2c11c0d7 emoticon:string hash:long = EmojiList;
 messages.togglePeerTranslations#e47cb579 flags:# disabled:flags.0?true peer:InputPeer = Bool;
 messages.getBotApp#34fdc5c3 app:InputBotApp hash:long = messages.BotApp;
-messages.requestAppWebView#8c5a3b3c flags:# write_allowed:flags.0?true peer:InputPeer app:InputBotApp start_param:flags.1?string theme_params:flags.2?DataJSON platform:string = AppWebViewResult;
+messages.requestAppWebView#53618bce flags:# write_allowed:flags.0?true compact:flags.7?true peer:InputPeer app:InputBotApp start_param:flags.1?string theme_params:flags.2?DataJSON platform:string = WebViewResult;
 messages.setChatWallPaper#8ffacae1 flags:# for_both:flags.3?true revert:flags.4?true peer:InputPeer wallpaper:flags.0?InputWallPaper settings:flags.2?WallPaperSettings id:flags.1?int = Updates;
 messages.searchEmojiStickerSets#92b4494c flags:# exclude_featured:flags.0?true q:string hash:long = messages.FoundStickerSets;
 messages.getSavedDialogs#5381d21a flags:# exclude_pinned:flags.0?true offset_date:int offset_id:int offset_peer:InputPeer limit:int hash:long = messages.SavedDialogs;
@@ -2349,9 +2368,13 @@ payments.getGiveawayInfo#f4239425 peer:InputPeer msg_id:int = payments.GiveawayI
 payments.launchPrepaidGiveaway#5ff58f20 peer:InputPeer giveaway_id:long purpose:InputStorePaymentPurpose = Updates;
 payments.getStarsTopupOptions#c00ec7d3 = Vector<StarsTopupOption>;
 payments.getStarsStatus#104fcfa7 peer:InputPeer = payments.StarsStatus;
-payments.getStarsTransactions#673ac2f9 flags:# inbound:flags.0?true outbound:flags.1?true peer:InputPeer offset:string = payments.StarsStatus;
+payments.getStarsTransactions#97938d5a flags:# inbound:flags.0?true outbound:flags.1?true ascending:flags.2?true peer:InputPeer offset:string limit:int = payments.StarsStatus;
 payments.sendStarsForm#2bb731d flags:# form_id:long invoice:InputInvoice = payments.PaymentResult;
 payments.refundStarsCharge#25ae8f4a user_id:InputUser charge_id:string = Updates;
+payments.getStarsRevenueStats#d91ffad6 flags:# dark:flags.0?true peer:InputPeer = payments.StarsRevenueStats;
+payments.getStarsRevenueWithdrawalUrl#13bbe8b3 peer:InputPeer stars:long password:InputCheckPasswordSRP = payments.StarsRevenueWithdrawalUrl;
+payments.getStarsRevenueAdsAccountUrl#d1d7efc5 peer:InputPeer = payments.StarsRevenueAdsAccountUrl;
+payments.getStarsTransactionsByID#27842d2e peer:InputPeer id:Vector<InputStarsTransaction> = payments.StarsStatus;
 
 stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true emojis:flags.5?true text_color:flags.6?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector<InputStickerSetItem> software:flags.3?string = messages.StickerSet;
 stickers.removeStickerFromSet#f7760f51 sticker:InputDocument = messages.StickerSet;
@@ -2453,6 +2476,7 @@ stories.getChatsToSend#a56a8b60 = messages.Chats;
 stories.togglePeerStoriesHidden#bd0415c4 peer:InputPeer hidden:Bool = Bool;
 stories.getStoryReactionsList#b9b2881f flags:# forwards_first:flags.2?true peer:InputPeer id:int reaction:flags.0?Reaction offset:flags.1?string limit:int = stories.StoryReactionsList;
 stories.togglePinnedToTop#b297e9b peer:InputPeer id:Vector<int> = Bool;
+stories.searchPosts#6cea116a flags:# hashtag:flags.0?string area:flags.1?MediaArea offset:string limit:int = stories.FoundStories;
 
 premium.getBoostsList#60f67660 flags:# gifts:flags.0?true peer:InputPeer offset:string limit:int = premium.BoostsList;
 premium.getMyBoosts#be77b4a = premium.MyBoosts;
@@ -2470,4 +2494,4 @@ smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool;
 
 fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
 
-// LAYER 181
+// LAYER 184

+ 2 - 2
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "telegram",
-  "version": "2.22.0",
+  "version": "2.22.2",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "telegram",
-      "version": "2.22.0",
+      "version": "2.22.2",
       "license": "MIT",
       "dependencies": {
         "@cryptography/aes": "^0.1.1",

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "telegram",
-  "version": "2.22.0",
+  "version": "2.23.0",
   "description": "NodeJS/Browser MTProto API Telegram client library,",
   "main": "index.js",
   "types": "index.d.ts",