Skip to content

Commit

Permalink
Add "VKWebAppRecommend" method typings
Browse files Browse the repository at this point in the history
  • Loading branch information
7lexik0n committed Aug 22, 2023
1 parent f8b489d commit c8238d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/core/src/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export const DESKTOP_METHODS = [
'VKWebAppScrollTopStop',
'VKWebAppShowSlidesSheet',
'VKWebAppTranslate',
'VKWebAppRecommend',

// Desktop web specific events
...(IS_DESKTOP_VK
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/types/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,7 @@ export type RequestPropsMap = {
VKWebAppCallStart: {};
VKWebAppCallJoin: CallJoinRequest;
VKWebAppCallGetStatus: {};
VKWebAppRecommend: {};
};

/**
Expand Down Expand Up @@ -1295,6 +1296,7 @@ export type ReceiveDataMap = {
VKWebAppCallGetStatus: CallGetStatusResponse;
VKWebAppCallLeft: CallLeftResponse;
VKWebAppCallFinished: CallFinishedResponse;
VKWebAppRecommend: { result: true };
};
/* eslint-enable @typescript-eslint/ban-types */

Expand Down Expand Up @@ -1665,4 +1667,5 @@ export type ReceiveEventMap = EventReceiveNames<
'VKWebAppCallGetStatus',
'VKWebAppCallGetStatusResult',
'VKWebAppCallGetStatusFailed'
>;
> &
EventReceiveNames<'VKWebAppRecommend', 'VKWebAppRecommendResult', 'VKWebAppRecommendFailed'>;

0 comments on commit c8238d0

Please sign in to comment.