Skip to content

Commit

Permalink
Merge pull request #443 from VKCOM/akadyrov/add_recommendations_method
Browse files Browse the repository at this point in the history
Add "VKWebAppRecommend" method typings
  • Loading branch information
7lexik0n committed Aug 22, 2023
2 parents f8b489d + c8238d0 commit dfe3aed
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 dfe3aed

Please sign in to comment.