Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vkontakte/vk-bridge

Package Overview
Dependencies
Maintainers
13
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vkontakte/vk-bridge - npm Package Compare versions

Comparing version 2.1.6 to 2.1.7

2

dist/browser.min.js

@@ -1,1 +0,1 @@

!function(){"use strict";var a=function(){return(a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function d(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],p=0,a=i.length;p<a;p++,r++)o[r]=i[p];return o}function o(i,e){var o,r,p=(o={current:0,next:function(){return++this.current}},r={},{add:function(e,t){var n=null!=t?t:o.next();return r[n]=e,n},resolve:function(e,t,n){var o=r[e];o&&(n(t)?o.resolve(t):o.reject(t),r[e]=null)}});return e(function(e){if(e.detail&&e.detail.data&&"request_id"in e.detail.data){var t=e.detail.data,n=t.request_id,o=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(t,["request_id"]);n&&p.resolve(n,o,function(e){return!("error_type"in e)})}}),function(o,r){return void 0===r&&(r={}),new Promise(function(e,t){var n=p.add({resolve:e,reject:t},r.request_id);i(o,a(a({},r),{request_id:n}))})}}var e="undefined"!=typeof window,s=Boolean(e&&window.AndroidBridge),u=Boolean(e&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),l=e&&!s&&!u,t=l&&"mobile_web"===new URLSearchParams(location.search).get("vk_platform"),r=l?"message":"VKWebAppEvent",c=d(["VKWebAppInit","VKWebAppGetCommunityAuthToken","VKWebAppAddToCommunity","VKWebAppGetUserInfo","VKWebAppSetLocation","VKWebAppGetClientVersion","VKWebAppGetPhoneNumber","VKWebAppGetEmail","VKWebAppGetGeodata","VKWebAppSetTitle","VKWebAppGetAuthToken","VKWebAppCallAPIMethod","VKWebAppJoinGroup","VKWebAppAllowMessagesFromGroup","VKWebAppDenyNotifications","VKWebAppAllowNotifications","VKWebAppOpenPayForm","VKWebAppOpenApp","VKWebAppShare","VKWebAppShowWallPostBox","VKWebAppScroll","VKWebAppResizeWindow","VKWebAppShowOrderBox","VKWebAppShowLeaderBoardBox","VKWebAppShowInviteBox","VKWebAppShowRequestBox","VKWebAppAddToFavorites","VKWebAppShowCommunityWidgetPreviewBox"],l&&!t?["VKWebAppShowStoryBox"]:[]),b=e?window.AndroidBridge:void 0,f=u?window.webkit.messageHandlers:void 0;function n(e,t){var n=t||{bubbles:!1,cancelable:!1,detail:void 0},o=document.createEvent("CustomEvent");return o.initCustomEvent(e,!!n.bubbles,!!n.cancelable,n.detail),o}"undefined"==typeof window||window.CustomEvent||(window.CustomEvent=(n.prototype=Event.prototype,n));var i=function(n){var i=void 0,p=[];function e(e){p.push(e)}"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(r,function(t){if(u||s)return d(p).map(function(e){return e.call(null,t)});if(l&&t&&t.data){var e=t.data,n=e.type,o=e.data,r=e.frameId;n&&"VKWebAppSettings"===n?i=r:d(p).map(function(e){return e({detail:{type:n,data:o}})})}});var t=o(function(e,t){b&&b[e]?b[e](JSON.stringify(t)):f&&f[e]&&"function"==typeof f[e].postMessage?f[e].postMessage(t):l&&parent.postMessage({handler:e,params:t,type:"vk-connect",webFrameId:i,connectVersion:n},"*")},e);return{send:t,sendPromise:t,subscribe:e,unsubscribe:function(e){var t=p.indexOf(e);-1<t&&p.splice(t,1)},supports:function(e){return s?!(!b||"function"!=typeof b[e]):u?!(!f||!f[e]||"function"!=typeof f[e].postMessage):l&&-1<c.indexOf(e)},isWebView:function(){return u||s}}}("2.1.6");window.vkBridge=window.vkConnect=i}();
!function(){"use strict";var a=function(){return(a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function d(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var i=arguments[t],p=0,a=i.length;p<a;p++,r++)o[r]=i[p];return o}function o(i,e){var o,r,p=(o={current:0,next:function(){return++this.current}},r={},{add:function(e,t){var n=null!=t?t:o.next();return r[n]=e,n},resolve:function(e,t,n){var o=r[e];o&&(n(t)?o.resolve(t):o.reject(t),r[e]=null)}});return e(function(e){if(e.detail&&e.detail.data&&"request_id"in e.detail.data){var t=e.detail.data,n=t.request_id,o=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(t,["request_id"]);n&&p.resolve(n,o,function(e){return!("error_type"in e)})}}),function(o,r){return void 0===r&&(r={}),new Promise(function(e,t){var n=p.add({resolve:e,reject:t},r.request_id);i(o,a(a({},r),{request_id:n}))})}}var e="undefined"!=typeof window,s=Boolean(e&&window.AndroidBridge),u=Boolean(e&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),l=e&&!s&&!u,t=l&&/(^\?|&)vk_platform=mobile_web(&|$)/.test(location.search),r=l?"message":"VKWebAppEvent",b=d(["VKWebAppInit","VKWebAppGetCommunityAuthToken","VKWebAppAddToCommunity","VKWebAppGetUserInfo","VKWebAppSetLocation","VKWebAppGetClientVersion","VKWebAppGetPhoneNumber","VKWebAppGetEmail","VKWebAppGetGeodata","VKWebAppSetTitle","VKWebAppGetAuthToken","VKWebAppCallAPIMethod","VKWebAppJoinGroup","VKWebAppAllowMessagesFromGroup","VKWebAppDenyNotifications","VKWebAppAllowNotifications","VKWebAppOpenPayForm","VKWebAppOpenApp","VKWebAppShare","VKWebAppShowWallPostBox","VKWebAppScroll","VKWebAppShowOrderBox","VKWebAppShowLeaderBoardBox","VKWebAppShowInviteBox","VKWebAppShowRequestBox","VKWebAppAddToFavorites","VKWebAppShowCommunityWidgetPreviewBox"],l&&!t?["VKWebAppResizeWindow","VKWebAppShowStoryBox"]:[]),c=e?window.AndroidBridge:void 0,f=u?window.webkit.messageHandlers:void 0;function n(e,t){var n=t||{bubbles:!1,cancelable:!1,detail:void 0},o=document.createEvent("CustomEvent");return o.initCustomEvent(e,!!n.bubbles,!!n.cancelable,n.detail),o}"undefined"==typeof window||window.CustomEvent||(window.CustomEvent=(n.prototype=Event.prototype,n));var i=function(n){var i=void 0,p=[];function e(e){p.push(e)}"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(r,function(t){if(u||s)return d(p).map(function(e){return e.call(null,t)});if(l&&t&&t.data){var e=t.data,n=e.type,o=e.data,r=e.frameId;n&&"VKWebAppSettings"===n?i=r:d(p).map(function(e){return e({detail:{type:n,data:o}})})}});var t=o(function(e,t){c&&c[e]?c[e](JSON.stringify(t)):f&&f[e]&&"function"==typeof f[e].postMessage?f[e].postMessage(t):l&&parent.postMessage({handler:e,params:t,type:"vk-connect",webFrameId:i,connectVersion:n},"*")},e);return{send:t,sendPromise:t,subscribe:e,unsubscribe:function(e){var t=p.indexOf(e);-1<t&&p.splice(t,1)},supports:function(e){return s?!(!c||"function"!=typeof c[e]):u?!(!f||!f[e]||"function"!=typeof f[e].postMessage):l&&-1<b.indexOf(e)},isWebView:function(){return u||s}}}("2.1.7");window.vkBridge=window.vkConnect=i}();

@@ -55,3 +55,3 @@ /*! *****************************************************************************

return ++this.current;
}
},
};

@@ -97,3 +97,3 @@ }

}
}
},
};

@@ -144,3 +144,3 @@ }

/** Is the runtime environment m.vk.com */
var IS_MVK = IS_WEB && new URLSearchParams(location.search).get('vk_platform') === 'mobile_web';
var IS_MVK = IS_WEB && /(^\?|&)vk_platform=mobile_web(&|$)/.test(location.search);
/** Is the runtime environment vk.com */

@@ -173,3 +173,2 @@ var IS_DESKTOP_VK = IS_WEB && !IS_MVK;

'VKWebAppScroll',
'VKWebAppResizeWindow',
'VKWebAppShowOrderBox',

@@ -181,3 +180,3 @@ 'VKWebAppShowLeaderBoardBox',

'VKWebAppShowCommunityWidgetPreviewBox'
], (IS_DESKTOP_VK ? ['VKWebAppShowStoryBox'] : []));
], (IS_DESKTOP_VK ? ['VKWebAppResizeWindow', 'VKWebAppShowStoryBox'] : []));
/** Android VK Bridge interface. */

@@ -226,3 +225,3 @@ var androidBridge = IS_CLIENT_SIDE

webFrameId: webFrameId,
connectVersion: version
connectVersion: version,
}, '*');

@@ -310,3 +309,3 @@ }

supports: supports,
isWebView: isWebView
isWebView: isWebView,
};

@@ -330,3 +329,3 @@ }

var version = "2.1.6";
var version = "2.1.7";

@@ -365,3 +364,3 @@ /**

return bridge.send.apply(bridge, args);
}
},
};

@@ -368,0 +367,0 @@ var chain = middlewares

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var __assign=function(){return(__assign=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function __rest(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)n.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(r[t[o]]=e[t[o]])}return r}function __spreadArrays(){for(var e=0,n=0,r=arguments.length;n<r;n++)e+=arguments[n].length;var t=Array(e),o=0;for(n=0;n<r;n++)for(var i=arguments[n],a=0,d=i.length;a<d;a++,o++)t[o]=i[a];return t}function createCounter(){return{current:0,next:function(){return++this.current}}}function createRequestResolver(){var t=createCounter(),o={};return{add:function(e,n){var r=null!=n?n:t.next();return o[r]=e,r},resolve:function(e,n,r){var t=o[e];t&&(r(n)?t.resolve(n):t.reject(n),o[e]=null)}}}function promisifySend(i,e){var a=createRequestResolver();return e(function(e){if(e.detail&&e.detail.data&&"request_id"in e.detail.data){var n=e.detail.data,r=n.request_id,t=__rest(n,["request_id"]);r&&a.resolve(r,t,function(e){return!("error_type"in e)})}}),function(t,o){return void 0===o&&(o={}),new Promise(function(e,n){var r=a.add({resolve:e,reject:n},o.request_id);i(t,__assign(__assign({},o),{request_id:r}))})}}var IS_CLIENT_SIDE="undefined"!=typeof window,IS_ANDROID_WEBVIEW=Boolean(IS_CLIENT_SIDE&&window.AndroidBridge),IS_IOS_WEBVIEW=Boolean(IS_CLIENT_SIDE&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),IS_WEB=IS_CLIENT_SIDE&&!IS_ANDROID_WEBVIEW&&!IS_IOS_WEBVIEW,IS_MVK=IS_WEB&&"mobile_web"===new URLSearchParams(location.search).get("vk_platform"),IS_DESKTOP_VK=IS_WEB&&!IS_MVK,EVENT_TYPE=IS_WEB?"message":"VKWebAppEvent",DESKTOP_METHODS=__spreadArrays(["VKWebAppInit","VKWebAppGetCommunityAuthToken","VKWebAppAddToCommunity","VKWebAppGetUserInfo","VKWebAppSetLocation","VKWebAppGetClientVersion","VKWebAppGetPhoneNumber","VKWebAppGetEmail","VKWebAppGetGeodata","VKWebAppSetTitle","VKWebAppGetAuthToken","VKWebAppCallAPIMethod","VKWebAppJoinGroup","VKWebAppAllowMessagesFromGroup","VKWebAppDenyNotifications","VKWebAppAllowNotifications","VKWebAppOpenPayForm","VKWebAppOpenApp","VKWebAppShare","VKWebAppShowWallPostBox","VKWebAppScroll","VKWebAppResizeWindow","VKWebAppShowOrderBox","VKWebAppShowLeaderBoardBox","VKWebAppShowInviteBox","VKWebAppShowRequestBox","VKWebAppAddToFavorites","VKWebAppShowCommunityWidgetPreviewBox"],IS_DESKTOP_VK?["VKWebAppShowStoryBox"]:[]),androidBridge=IS_CLIENT_SIDE?window.AndroidBridge:void 0,iosBridge=IS_IOS_WEBVIEW?window.webkit.messageHandlers:void 0;function createVKBridge(r){var i=void 0,a=[];function e(e){a.push(e)}"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(EVENT_TYPE,function(n){if(IS_IOS_WEBVIEW||IS_ANDROID_WEBVIEW)return __spreadArrays(a).map(function(e){return e.call(null,n)});if(IS_WEB&&n&&n.data){var e=n.data,r=e.type,t=e.data,o=e.frameId;r&&"VKWebAppSettings"===r?i=o:__spreadArrays(a).map(function(e){return e({detail:{type:r,data:t}})})}});var n=promisifySend(function(e,n){androidBridge&&androidBridge[e]?androidBridge[e](JSON.stringify(n)):iosBridge&&iosBridge[e]&&"function"==typeof iosBridge[e].postMessage?iosBridge[e].postMessage(n):IS_WEB&&parent.postMessage({handler:e,params:n,type:"vk-connect",webFrameId:i,connectVersion:r},"*")},e);return{send:n,sendPromise:n,subscribe:e,unsubscribe:function(e){var n=a.indexOf(e);-1<n&&a.splice(n,1)},supports:function(e){return IS_ANDROID_WEBVIEW?!(!androidBridge||"function"!=typeof androidBridge[e]):IS_IOS_WEBVIEW?!(!iosBridge||!iosBridge[e]||"function"!=typeof iosBridge[e].postMessage):!!IS_WEB&&-1<DESKTOP_METHODS.indexOf(e)},isWebView:function(){return IS_IOS_WEBVIEW||IS_ANDROID_WEBVIEW}}}function createCustomEventPolyfill(){function e(e,n){var r=n||{bubbles:!1,cancelable:!1,detail:void 0},t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!!r.bubbles,!!r.cancelable,r.detail),t}return e.prototype=Event.prototype,e}var version="2.1.6";function applyMiddleware(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.includes(void 0)||t.includes(null)?applyMiddleware.apply(void 0,t.filter(function(e){return"function"==typeof e})):function(r){if(0===t.length)return r;var e,n={subscribe:r.subscribe,send:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return r.send.apply(r,e)}};return e=t.filter(function(e){return"function"==typeof e}).map(function(e){return e(n)}).reduce(function(n,r){return function(e){return n(r(e))}})(r.send),__assign(__assign({},r),{send:e})}}"undefined"==typeof window||window.CustomEvent||(window.CustomEvent=createCustomEventPolyfill());var bridge=createVKBridge(version);exports.applyMiddleware=applyMiddleware,exports.default=bridge;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var __assign=function(){return(__assign=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function __rest(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)n.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(r[t[o]]=e[t[o]])}return r}function __spreadArrays(){for(var e=0,n=0,r=arguments.length;n<r;n++)e+=arguments[n].length;var t=Array(e),o=0;for(n=0;n<r;n++)for(var i=arguments[n],a=0,d=i.length;a<d;a++,o++)t[o]=i[a];return t}function createCounter(){return{current:0,next:function(){return++this.current}}}function createRequestResolver(){var t=createCounter(),o={};return{add:function(e,n){var r=null!=n?n:t.next();return o[r]=e,r},resolve:function(e,n,r){var t=o[e];t&&(r(n)?t.resolve(n):t.reject(n),o[e]=null)}}}function promisifySend(i,e){var a=createRequestResolver();return e(function(e){if(e.detail&&e.detail.data&&"request_id"in e.detail.data){var n=e.detail.data,r=n.request_id,t=__rest(n,["request_id"]);r&&a.resolve(r,t,function(e){return!("error_type"in e)})}}),function(t,o){return void 0===o&&(o={}),new Promise(function(e,n){var r=a.add({resolve:e,reject:n},o.request_id);i(t,__assign(__assign({},o),{request_id:r}))})}}var IS_CLIENT_SIDE="undefined"!=typeof window,IS_ANDROID_WEBVIEW=Boolean(IS_CLIENT_SIDE&&window.AndroidBridge),IS_IOS_WEBVIEW=Boolean(IS_CLIENT_SIDE&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),IS_WEB=IS_CLIENT_SIDE&&!IS_ANDROID_WEBVIEW&&!IS_IOS_WEBVIEW,IS_MVK=IS_WEB&&/(^\?|&)vk_platform=mobile_web(&|$)/.test(location.search),IS_DESKTOP_VK=IS_WEB&&!IS_MVK,EVENT_TYPE=IS_WEB?"message":"VKWebAppEvent",DESKTOP_METHODS=__spreadArrays(["VKWebAppInit","VKWebAppGetCommunityAuthToken","VKWebAppAddToCommunity","VKWebAppGetUserInfo","VKWebAppSetLocation","VKWebAppGetClientVersion","VKWebAppGetPhoneNumber","VKWebAppGetEmail","VKWebAppGetGeodata","VKWebAppSetTitle","VKWebAppGetAuthToken","VKWebAppCallAPIMethod","VKWebAppJoinGroup","VKWebAppAllowMessagesFromGroup","VKWebAppDenyNotifications","VKWebAppAllowNotifications","VKWebAppOpenPayForm","VKWebAppOpenApp","VKWebAppShare","VKWebAppShowWallPostBox","VKWebAppScroll","VKWebAppShowOrderBox","VKWebAppShowLeaderBoardBox","VKWebAppShowInviteBox","VKWebAppShowRequestBox","VKWebAppAddToFavorites","VKWebAppShowCommunityWidgetPreviewBox"],IS_DESKTOP_VK?["VKWebAppResizeWindow","VKWebAppShowStoryBox"]:[]),androidBridge=IS_CLIENT_SIDE?window.AndroidBridge:void 0,iosBridge=IS_IOS_WEBVIEW?window.webkit.messageHandlers:void 0;function createVKBridge(r){var i=void 0,a=[];function e(e){a.push(e)}"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(EVENT_TYPE,function(n){if(IS_IOS_WEBVIEW||IS_ANDROID_WEBVIEW)return __spreadArrays(a).map(function(e){return e.call(null,n)});if(IS_WEB&&n&&n.data){var e=n.data,r=e.type,t=e.data,o=e.frameId;r&&"VKWebAppSettings"===r?i=o:__spreadArrays(a).map(function(e){return e({detail:{type:r,data:t}})})}});var n=promisifySend(function(e,n){androidBridge&&androidBridge[e]?androidBridge[e](JSON.stringify(n)):iosBridge&&iosBridge[e]&&"function"==typeof iosBridge[e].postMessage?iosBridge[e].postMessage(n):IS_WEB&&parent.postMessage({handler:e,params:n,type:"vk-connect",webFrameId:i,connectVersion:r},"*")},e);return{send:n,sendPromise:n,subscribe:e,unsubscribe:function(e){var n=a.indexOf(e);-1<n&&a.splice(n,1)},supports:function(e){return IS_ANDROID_WEBVIEW?!(!androidBridge||"function"!=typeof androidBridge[e]):IS_IOS_WEBVIEW?!(!iosBridge||!iosBridge[e]||"function"!=typeof iosBridge[e].postMessage):!!IS_WEB&&-1<DESKTOP_METHODS.indexOf(e)},isWebView:function(){return IS_IOS_WEBVIEW||IS_ANDROID_WEBVIEW}}}function createCustomEventPolyfill(){function e(e,n){var r=n||{bubbles:!1,cancelable:!1,detail:void 0},t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!!r.bubbles,!!r.cancelable,r.detail),t}return e.prototype=Event.prototype,e}var version="2.1.7";function applyMiddleware(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.includes(void 0)||t.includes(null)?applyMiddleware.apply(void 0,t.filter(function(e){return"function"==typeof e})):function(r){if(0===t.length)return r;var e,n={subscribe:r.subscribe,send:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return r.send.apply(r,e)}};return e=t.filter(function(e){return"function"==typeof e}).map(function(e){return e(n)}).reduce(function(n,r){return function(e){return n(r(e))}})(r.send),__assign(__assign({},r),{send:e})}}"undefined"==typeof window||window.CustomEvent||(window.CustomEvent=createCustomEventPolyfill());var bridge=createVKBridge(version);exports.applyMiddleware=applyMiddleware,exports.default=bridge;

@@ -1,1 +0,1 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).vkBridge={})}(this,function(e){"use strict";var a=function(){return(a=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)};function u(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var o=Array(e),r=0;for(n=0;n<t;n++)for(var i=arguments[n],p=0,a=i.length;p<a;p++,r++)o[r]=i[p];return o}function o(i,e){var o,r,p=(o={current:0,next:function(){return++this.current}},r={},{add:function(e,n){var t=null!=n?n:o.next();return r[t]=e,t},resolve:function(e,n,t){var o=r[e];o&&(t(n)?o.resolve(n):o.reject(n),r[e]=null)}});return e(function(e){if(e.detail&&e.detail.data&&"request_id"in e.detail.data){var n=e.detail.data,t=n.request_id,o=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t}(n,["request_id"]);t&&p.resolve(t,o,function(e){return!("error_type"in e)})}}),function(o,r){return void 0===r&&(r={}),new Promise(function(e,n){var t=p.add({resolve:e,reject:n},r.request_id);i(o,a(a({},r),{request_id:t}))})}}var n="undefined"!=typeof window,d=Boolean(n&&window.AndroidBridge),s=Boolean(n&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),f=n&&!d&&!s,t=f&&"mobile_web"===new URLSearchParams(location.search).get("vk_platform"),r=f?"message":"VKWebAppEvent",l=u(["VKWebAppInit","VKWebAppGetCommunityAuthToken","VKWebAppAddToCommunity","VKWebAppGetUserInfo","VKWebAppSetLocation","VKWebAppGetClientVersion","VKWebAppGetPhoneNumber","VKWebAppGetEmail","VKWebAppGetGeodata","VKWebAppSetTitle","VKWebAppGetAuthToken","VKWebAppCallAPIMethod","VKWebAppJoinGroup","VKWebAppAllowMessagesFromGroup","VKWebAppDenyNotifications","VKWebAppAllowNotifications","VKWebAppOpenPayForm","VKWebAppOpenApp","VKWebAppShare","VKWebAppShowWallPostBox","VKWebAppScroll","VKWebAppResizeWindow","VKWebAppShowOrderBox","VKWebAppShowLeaderBoardBox","VKWebAppShowInviteBox","VKWebAppShowRequestBox","VKWebAppAddToFavorites","VKWebAppShowCommunityWidgetPreviewBox"],f&&!t?["VKWebAppShowStoryBox"]:[]),c=n?window.AndroidBridge:void 0,b=s?window.webkit.messageHandlers:void 0;function i(e,n){var t=n||{bubbles:!1,cancelable:!1,detail:void 0},o=document.createEvent("CustomEvent");return o.initCustomEvent(e,!!t.bubbles,!!t.cancelable,t.detail),o}"undefined"==typeof window||window.CustomEvent||(window.CustomEvent=(i.prototype=Event.prototype,i));var p=function(t){var i=void 0,p=[];function e(e){p.push(e)}"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(r,function(n){if(s||d)return u(p).map(function(e){return e.call(null,n)});if(f&&n&&n.data){var e=n.data,t=e.type,o=e.data,r=e.frameId;t&&"VKWebAppSettings"===t?i=r:u(p).map(function(e){return e({detail:{type:t,data:o}})})}});var n=o(function(e,n){c&&c[e]?c[e](JSON.stringify(n)):b&&b[e]&&"function"==typeof b[e].postMessage?b[e].postMessage(n):f&&parent.postMessage({handler:e,params:n,type:"vk-connect",webFrameId:i,connectVersion:t},"*")},e);return{send:n,sendPromise:n,subscribe:e,unsubscribe:function(e){var n=p.indexOf(e);-1<n&&p.splice(n,1)},supports:function(e){return d?!(!c||"function"!=typeof c[e]):s?!(!b||!b[e]||"function"!=typeof b[e].postMessage):f&&-1<l.indexOf(e)},isWebView:function(){return s||d}}}("2.1.6");e.applyMiddleware=function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.includes(void 0)||o.includes(null)?e.apply(void 0,o.filter(function(e){return"function"==typeof e})):function(t){if(0===o.length)return t;var e,n={subscribe:t.subscribe,send:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.send.apply(t,e)}};return e=o.filter(function(e){return"function"==typeof e}).map(function(e){return e(n)}).reduce(function(n,t){return function(e){return n(t(e))}})(t.send),a(a({},t),{send:e})}},e.default=p,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).vkBridge={})}(this,function(e){"use strict";var u=function(){return(u=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)};function a(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var o=Array(e),r=0;for(n=0;n<t;n++)for(var i=arguments[n],p=0,u=i.length;p<u;p++,r++)o[r]=i[p];return o}function o(i,e){var o,r,p=(o={current:0,next:function(){return++this.current}},r={},{add:function(e,n){var t=null!=n?n:o.next();return r[t]=e,t},resolve:function(e,n,t){var o=r[e];o&&(t(n)?o.resolve(n):o.reject(n),r[e]=null)}});return e(function(e){if(e.detail&&e.detail.data&&"request_id"in e.detail.data){var n=e.detail.data,t=n.request_id,o=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t}(n,["request_id"]);t&&p.resolve(t,o,function(e){return!("error_type"in e)})}}),function(o,r){return void 0===r&&(r={}),new Promise(function(e,n){var t=p.add({resolve:e,reject:n},r.request_id);i(o,u(u({},r),{request_id:t}))})}}var n="undefined"!=typeof window,d=Boolean(n&&window.AndroidBridge),s=Boolean(n&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),f=n&&!d&&!s,t=f&&/(^\?|&)vk_platform=mobile_web(&|$)/.test(location.search),r=f?"message":"VKWebAppEvent",l=a(["VKWebAppInit","VKWebAppGetCommunityAuthToken","VKWebAppAddToCommunity","VKWebAppGetUserInfo","VKWebAppSetLocation","VKWebAppGetClientVersion","VKWebAppGetPhoneNumber","VKWebAppGetEmail","VKWebAppGetGeodata","VKWebAppSetTitle","VKWebAppGetAuthToken","VKWebAppCallAPIMethod","VKWebAppJoinGroup","VKWebAppAllowMessagesFromGroup","VKWebAppDenyNotifications","VKWebAppAllowNotifications","VKWebAppOpenPayForm","VKWebAppOpenApp","VKWebAppShare","VKWebAppShowWallPostBox","VKWebAppScroll","VKWebAppShowOrderBox","VKWebAppShowLeaderBoardBox","VKWebAppShowInviteBox","VKWebAppShowRequestBox","VKWebAppAddToFavorites","VKWebAppShowCommunityWidgetPreviewBox"],f&&!t?["VKWebAppResizeWindow","VKWebAppShowStoryBox"]:[]),c=n?window.AndroidBridge:void 0,b=s?window.webkit.messageHandlers:void 0;function i(e,n){var t=n||{bubbles:!1,cancelable:!1,detail:void 0},o=document.createEvent("CustomEvent");return o.initCustomEvent(e,!!t.bubbles,!!t.cancelable,t.detail),o}"undefined"==typeof window||window.CustomEvent||(window.CustomEvent=(i.prototype=Event.prototype,i));var p=function(t){var i=void 0,p=[];function e(e){p.push(e)}"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(r,function(n){if(s||d)return a(p).map(function(e){return e.call(null,n)});if(f&&n&&n.data){var e=n.data,t=e.type,o=e.data,r=e.frameId;t&&"VKWebAppSettings"===t?i=r:a(p).map(function(e){return e({detail:{type:t,data:o}})})}});var n=o(function(e,n){c&&c[e]?c[e](JSON.stringify(n)):b&&b[e]&&"function"==typeof b[e].postMessage?b[e].postMessage(n):f&&parent.postMessage({handler:e,params:n,type:"vk-connect",webFrameId:i,connectVersion:t},"*")},e);return{send:n,sendPromise:n,subscribe:e,unsubscribe:function(e){var n=p.indexOf(e);-1<n&&p.splice(n,1)},supports:function(e){return d?!(!c||"function"!=typeof c[e]):s?!(!b||!b[e]||"function"!=typeof b[e].postMessage):f&&-1<l.indexOf(e)},isWebView:function(){return s||d}}}("2.1.7");e.applyMiddleware=function e(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return o.includes(void 0)||o.includes(null)?e.apply(void 0,o.filter(function(e){return"function"==typeof e})):function(t){if(0===o.length)return t;var e,n={subscribe:t.subscribe,send:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.send.apply(t,e)}};return e=o.filter(function(e){return"function"==typeof e}).map(function(e){return e(n)}).reduce(function(n,t){return function(e){return n(t(e))}})(t.send),u(u({},t),{send:e})}},e.default=p,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -9,2 +9,2 @@ import { VKBridgeSubscribeHandler, AnyRequestMethodName, RequestProps, RequestIdProp } from './types/bridge';

*/
export declare function promisifySend(sendEvent: <K extends AnyRequestMethodName>(method: K, props?: RequestProps<K> & RequestIdProp) => void, subscribe: (fn: VKBridgeSubscribeHandler) => void): <K extends "VKWebAppInit" | "VKWebAppAddToCommunity" | "VKWebAppAllowMessagesFromGroup" | "VKWebAppAllowNotifications" | "VKWebAppCallAPIMethod" | "VKWebAppCopyText" | "VKWebAppGetAuthToken" | "VKWebAppClose" | "VKWebAppOpenApp" | "VKWebAppDenyNotifications" | "VKWebAppFlashGetInfo" | "VKWebAppFlashSetLevel" | "VKWebAppGetClientVersion" | "VKWebAppGetCommunityToken" | "VKWebAppGetCommunityAuthToken" | "VKWebAppCommunityAccessToken" | "VKWebAppCommunityToken" | "VKWebAppAudioPause" | "VKWebAppGetEmail" | "VKWebAppGetFriends" | "VKWebAppGetGeodata" | "VKWebAppGetPersonalCard" | "VKWebAppGetPhoneNumber" | "VKWebAppGetUserInfo" | "VKWebAppJoinGroup" | "VKWebAppOpenCodeReader" | "VKWebAppOpenContacts" | "VKWebAppOpenPayForm" | "VKWebAppOpenQR" | "VKWebAppResizeWindow" | "VKWebAppScroll" | "VKWebAppSetLocation" | "VKWebAppSetViewSettings" | "VKWebAppShare" | "VKWebAppShowCommunityWidgetPreviewBox" | "VKWebAppShowImages" | "VKWebAppShowInviteBox" | "VKWebAppShowLeaderBoardBox" | "VKWebAppShowMessageBox" | "VKWebAppShowOrderBox" | "VKWebAppShowRequestBox" | "VKWebAppShowWallPostBox" | "VKWebAppStorageGet" | "VKWebAppStorageGetKeys" | "VKWebAppStorageSet" | "VKWebAppTapticImpactOccurred" | "VKWebAppTapticNotificationOccurred" | "VKWebAppTapticSelectionChanged" | "VKWebAppAddToFavorites" | "VKWebAppSendPayload" | "VKWebAppDisableSwipeBack" | "VKWebAppEnableSwipeBack" | "VKWebAppShowStoryBox" | "VKWebAppAccelerometerStart" | "VKWebAppAccelerometerStop" | "VKWebAppGyroscopeStart" | "VKWebAppGyroscopeStop" | "VKWebAppDeviceMotionStart" | "VKWebAppDeviceMotionStop" | "VKWebAppSubscribeStoryApp">(method: K, props?: import(".").RequestPropsMap[K] & RequestIdProp) => Promise<K extends "VKWebAppInit" | "VKWebAppAddToCommunity" | "VKWebAppAllowMessagesFromGroup" | "VKWebAppAllowNotifications" | "VKWebAppCallAPIMethod" | "VKWebAppCopyText" | "VKWebAppGetAuthToken" | "VKWebAppClose" | "VKWebAppOpenApp" | "VKWebAppDenyNotifications" | "VKWebAppFlashGetInfo" | "VKWebAppFlashSetLevel" | "VKWebAppGetClientVersion" | "VKWebAppGetCommunityToken" | "VKWebAppGetCommunityAuthToken" | "VKWebAppCommunityAccessToken" | "VKWebAppCommunityToken" | "VKWebAppAudioPause" | "VKWebAppGetEmail" | "VKWebAppGetFriends" | "VKWebAppGetGeodata" | "VKWebAppGetPersonalCard" | "VKWebAppGetPhoneNumber" | "VKWebAppGetUserInfo" | "VKWebAppJoinGroup" | "VKWebAppOpenCodeReader" | "VKWebAppOpenContacts" | "VKWebAppOpenPayForm" | "VKWebAppOpenQR" | "VKWebAppResizeWindow" | "VKWebAppScroll" | "VKWebAppSetLocation" | "VKWebAppSetViewSettings" | "VKWebAppShare" | "VKWebAppShowCommunityWidgetPreviewBox" | "VKWebAppShowImages" | "VKWebAppShowInviteBox" | "VKWebAppShowLeaderBoardBox" | "VKWebAppShowMessageBox" | "VKWebAppShowOrderBox" | "VKWebAppShowRequestBox" | "VKWebAppShowWallPostBox" | "VKWebAppStorageGet" | "VKWebAppStorageGetKeys" | "VKWebAppStorageSet" | "VKWebAppTapticImpactOccurred" | "VKWebAppTapticNotificationOccurred" | "VKWebAppTapticSelectionChanged" | "VKWebAppAddToFavorites" | "VKWebAppSendPayload" | "VKWebAppDisableSwipeBack" | "VKWebAppEnableSwipeBack" | "VKWebAppShowStoryBox" | "VKWebAppAccelerometerStart" | "VKWebAppAccelerometerStop" | "VKWebAppGyroscopeStart" | "VKWebAppGyroscopeStop" | "VKWebAppDeviceMotionStart" | "VKWebAppDeviceMotionStop" | "VKWebAppSubscribeStoryApp" | "VKWebAppAudioPaused" | "VKWebAppAudioStopped" | "VKWebAppAudioTrackChanged" | "VKWebAppAudioUnpaused" | "VKWebAppInitAds" | "VKWebAppLoadAds" | "VKWebAppUpdateConfig" | "VKWebAppUpdateInsets" | "VKWebAppViewHide" | "VKWebAppViewRestore" | "VKWebAppAccelerometerChanged" | "VKWebAppGyroscopeChanged" | "VKWebAppDeviceMotionChanged" | "VKWebAppLocationChanged" ? import(".").ReceiveDataMap[K] : void>;
export declare function promisifySend(sendEvent: <K extends AnyRequestMethodName>(method: K, props?: RequestProps<K> & RequestIdProp) => void, subscribe: (fn: VKBridgeSubscribeHandler) => void): <K extends "VKWebAppInit" | "VKWebAppAddToCommunity" | "VKWebAppAllowMessagesFromGroup" | "VKWebAppAllowNotifications" | "VKWebAppCallAPIMethod" | "VKWebAppCopyText" | "VKWebAppDownloadFile" | "VKWebAppGetAuthToken" | "VKWebAppClose" | "VKWebAppOpenApp" | "VKWebAppDenyNotifications" | "VKWebAppFlashGetInfo" | "VKWebAppFlashSetLevel" | "VKWebAppGetClientVersion" | "VKWebAppGetCommunityToken" | "VKWebAppGetCommunityAuthToken" | "VKWebAppCommunityAccessToken" | "VKWebAppCommunityToken" | "VKWebAppAudioPause" | "VKWebAppGetEmail" | "VKWebAppGetFriends" | "VKWebAppGetGeodata" | "VKWebAppGetPersonalCard" | "VKWebAppGetPhoneNumber" | "VKWebAppGetUserInfo" | "VKWebAppJoinGroup" | "VKWebAppOpenCodeReader" | "VKWebAppOpenContacts" | "VKWebAppOpenPayForm" | "VKWebAppOpenQR" | "VKWebAppResizeWindow" | "VKWebAppScroll" | "VKWebAppSetLocation" | "VKWebAppSetViewSettings" | "VKWebAppShare" | "VKWebAppShowCommunityWidgetPreviewBox" | "VKWebAppShowImages" | "VKWebAppShowInviteBox" | "VKWebAppShowLeaderBoardBox" | "VKWebAppShowMessageBox" | "VKWebAppShowOrderBox" | "VKWebAppShowRequestBox" | "VKWebAppShowWallPostBox" | "VKWebAppStorageGet" | "VKWebAppStorageGetKeys" | "VKWebAppStorageSet" | "VKWebAppTapticImpactOccurred" | "VKWebAppTapticNotificationOccurred" | "VKWebAppTapticSelectionChanged" | "VKWebAppAddToFavorites" | "VKWebAppSendPayload" | "VKWebAppDisableSwipeBack" | "VKWebAppEnableSwipeBack" | "VKWebAppShowStoryBox" | "VKWebAppAccelerometerStart" | "VKWebAppAccelerometerStop" | "VKWebAppGyroscopeStart" | "VKWebAppGyroscopeStop" | "VKWebAppDeviceMotionStart" | "VKWebAppDeviceMotionStop" | "VKWebAppSubscribeStoryApp">(method: K, props?: import(".").RequestPropsMap[K] & RequestIdProp) => Promise<K extends "VKWebAppInit" | "VKWebAppAddToCommunity" | "VKWebAppAllowMessagesFromGroup" | "VKWebAppAllowNotifications" | "VKWebAppCallAPIMethod" | "VKWebAppCopyText" | "VKWebAppDownloadFile" | "VKWebAppGetAuthToken" | "VKWebAppClose" | "VKWebAppOpenApp" | "VKWebAppDenyNotifications" | "VKWebAppFlashGetInfo" | "VKWebAppFlashSetLevel" | "VKWebAppGetClientVersion" | "VKWebAppGetCommunityToken" | "VKWebAppGetCommunityAuthToken" | "VKWebAppCommunityAccessToken" | "VKWebAppCommunityToken" | "VKWebAppAudioPause" | "VKWebAppGetEmail" | "VKWebAppGetFriends" | "VKWebAppGetGeodata" | "VKWebAppGetPersonalCard" | "VKWebAppGetPhoneNumber" | "VKWebAppGetUserInfo" | "VKWebAppJoinGroup" | "VKWebAppOpenCodeReader" | "VKWebAppOpenContacts" | "VKWebAppOpenPayForm" | "VKWebAppOpenQR" | "VKWebAppResizeWindow" | "VKWebAppScroll" | "VKWebAppSetLocation" | "VKWebAppSetViewSettings" | "VKWebAppShare" | "VKWebAppShowCommunityWidgetPreviewBox" | "VKWebAppShowImages" | "VKWebAppShowInviteBox" | "VKWebAppShowLeaderBoardBox" | "VKWebAppShowMessageBox" | "VKWebAppShowOrderBox" | "VKWebAppShowRequestBox" | "VKWebAppShowWallPostBox" | "VKWebAppStorageGet" | "VKWebAppStorageGetKeys" | "VKWebAppStorageSet" | "VKWebAppTapticImpactOccurred" | "VKWebAppTapticNotificationOccurred" | "VKWebAppTapticSelectionChanged" | "VKWebAppAddToFavorites" | "VKWebAppSendPayload" | "VKWebAppDisableSwipeBack" | "VKWebAppEnableSwipeBack" | "VKWebAppShowStoryBox" | "VKWebAppAccelerometerStart" | "VKWebAppAccelerometerStop" | "VKWebAppGyroscopeStart" | "VKWebAppGyroscopeStop" | "VKWebAppDeviceMotionStart" | "VKWebAppDeviceMotionStop" | "VKWebAppSubscribeStoryApp" | "VKWebAppAudioPaused" | "VKWebAppAudioStopped" | "VKWebAppAudioTrackChanged" | "VKWebAppAudioUnpaused" | "VKWebAppInitAds" | "VKWebAppLoadAds" | "VKWebAppUpdateConfig" | "VKWebAppUpdateInsets" | "VKWebAppViewHide" | "VKWebAppViewRestore" | "VKWebAppAccelerometerChanged" | "VKWebAppGyroscopeChanged" | "VKWebAppDeviceMotionChanged" | "VKWebAppLocationChanged" ? import(".").ReceiveDataMap[K] : void>;

@@ -187,5 +187,5 @@ /** Type of the Personal Card */

/**
* Widget type
* Community widget type
*/
export declare type WidgetType = 'text' | 'list' | 'table' | 'tiles' | 'compact_list' | 'cover_list' | 'match' | 'matches';
export declare type CommunityWidgetType = 'text' | 'list' | 'table' | 'tiles' | 'compact_list' | 'cover_list' | 'match' | 'matches' | 'donation';
/**

@@ -262,3 +262,3 @@ * Output data from code reader

/** Widget type */
type: WidgetType;
type: CommunityWidgetType;
/** Community ID */

@@ -406,3 +406,3 @@ group_id: number;

*/
tooltip_text_key: string;
tooltip_text_key: 'tooltip_open_post' | 'tooltip_open_photo' | 'tooltip_open_page' | 'tooltip_open_default';
};

@@ -602,2 +602,6 @@ export declare type StoryActionTime = {

};
VKWebAppDownloadFile: {
url: string;
filename: string;
};
VKWebAppGetAuthToken: {

@@ -734,2 +738,5 @@ app_id: number;

};
VKWebAppDownloadFile: {
result: true;
};
VKWebAppGetAuthToken: {

@@ -955,3 +962,3 @@ access_token: string;

*/
export declare type ReceiveEventMap = EventReceiveNames<'VKWebAppInit', 'VKWebAppInitResult', 'VKWebAppInitFailed'> & EventReceiveNames<'VKWebAppAddToCommunity', 'VKWebAppAddToCommunityResult', 'VKWebAppAddToCommunityFailed'> & EventReceiveNames<'VKWebAppAllowMessagesFromGroup', 'VKWebAppAllowMessagesFromGroupResult', 'VKWebAppAllowMessagesFromGroupFailed'> & EventReceiveNames<'VKWebAppAllowNotifications', 'VKWebAppAllowNotificationsResult', 'VKWebAppAllowNotificationsFailed'> & EventReceiveNames<'VKWebAppCallAPIMethod', 'VKWebAppCallAPIMethodResult', 'VKWebAppCallAPIMethodFailed'> & EventReceiveNames<'VKWebAppCopyText', 'VKWebAppCopyTextResult', 'VKWebAppCopyTextFailed'> & EventReceiveNames<'VKWebAppGetAuthToken', 'VKWebAppAccessTokenReceived', 'VKWebAppAccessTokenFailed'> & EventReceiveNames<'VKWebAppClose', 'VKWebAppCloseResult', 'VKWebAppCloseFailed'> & EventReceiveNames<'VKWebAppOpenApp', 'VKWebAppOpenAppResult', 'VKWebAppOpenAppFailed'> & EventReceiveNames<'VKWebAppDenyNotifications', 'VKWebAppDenyNotificationsResult', 'VKWebAppDenyNotificationsFailed'> & EventReceiveNames<'VKWebAppFlashGetInfo', 'VKWebAppFlashGetInfoResult', 'VKWebAppFlashGetInfoFailed'> & EventReceiveNames<'VKWebAppFlashSetLevel', 'VKWebAppFlashSetLevelResult', 'VKWebAppFlashSetLevelFailed'> & EventReceiveNames<'VKWebAppGetClientVersion', 'VKWebAppGetClientVersionResult', 'VKWebAppGetClientVersionFailed'> & EventReceiveNames<'VKWebAppGetCommunityToken', 'VKWebAppGetCommunityTokenResult', 'VKWebAppGetCommunityTokenFailed'> & EventReceiveNames<'VKWebAppGetCommunityAuthToken', 'VKWebAppGetCommunityAuthTokenResult', 'VKWebAppGetCommunityAuthTokenFailed'> & EventReceiveNames<'VKWebAppCommunityAccessToken', 'VKWebAppCommunityAccessTokenResult', 'VKWebAppCommunityAccessTokenFailed'> & EventReceiveNames<'VKWebAppCommunityToken', 'VKWebAppCommunityTokenResult', 'VKWebAppCommunityTokenFailed'> & EventReceiveNames<'VKWebAppAudioPause', 'VKWebAppAudioPauseResult', 'VKWebAppAudioPauseFailed'> & EventReceiveNames<'VKWebAppGetEmail', 'VKWebAppGetEmailResult', 'VKWebAppGetEmailFailed'> & EventReceiveNames<'VKWebAppGetFriends', 'VKWebAppGetFriendsResult', 'VKWebAppGetFriendsFailed'> & EventReceiveNames<'VKWebAppGetGeodata', 'VKWebAppGetGeodataResult', 'VKWebAppGetGeodataFailed'> & EventReceiveNames<'VKWebAppGetPersonalCard', 'VKWebAppGetPersonalCardResult', 'VKWebAppGetPersonalCardFailed'> & EventReceiveNames<'VKWebAppGetPhoneNumber', 'VKWebAppGetPhoneNumberResult', 'VKWebAppGetPhoneNumberFailed'> & EventReceiveNames<'VKWebAppGetUserInfo', 'VKWebAppGetUserInfoResult', 'VKWebAppGetUserInfoFailed'> & EventReceiveNames<'VKWebAppJoinGroup', 'VKWebAppJoinGroupResult', 'VKWebAppJoinGroupFailed'> & EventReceiveNames<'VKWebAppOpenCodeReader', 'VKWebAppOpenCodeReaderResult', 'VKWebAppOpenCodeReaderFailed'> & EventReceiveNames<'VKWebAppOpenContacts', 'VKWebAppOpenContactsResult', 'VKWebAppOpenContactsFailed'> & EventReceiveNames<'VKWebAppOpenPayForm', 'VKWebAppOpenPayFormResult', 'VKWebAppOpenPayFormFailed'> & EventReceiveNames<'VKWebAppOpenQR', 'VKWebAppOpenQRResult', 'VKWebAppOpenQRFailed'> & EventReceiveNames<'VKWebAppResizeWindow', 'VKWebAppResizeWindowResult', 'VKWebAppResizeWindowFailed'> & EventReceiveNames<'VKWebAppScroll', 'VKWebAppScrollResult', 'VKWebAppScrollFailed'> & EventReceiveNames<'VKWebAppSetLocation', 'VKWebAppSetLocationResult', 'VKWebAppSetLocationFailed'> & EventReceiveNames<'VKWebAppSetViewSettings', 'VKWebAppSetViewSettingsResult', 'VKWebAppSetViewSettingsFailed'> & EventReceiveNames<'VKWebAppShare', 'VKWebAppShareResult', 'VKWebAppShareFailed'> & EventReceiveNames<'VKWebAppShowCommunityWidgetPreviewBox', 'VKWebAppShowCommunityWidgetPreviewBoxResult', 'VKWebAppShowCommunityWidgetPreviewBoxFailed'> & EventReceiveNames<'VKWebAppShowImages', 'VKWebAppShowImagesResult', 'VKWebAppShowImagesFailed'> & EventReceiveNames<'VKWebAppShowInviteBox', 'VKWebAppShowInviteBoxResult', 'VKWebAppShowInviteBoxFailed'> & EventReceiveNames<'VKWebAppShowLeaderBoardBox', 'VKWebAppShowLeaderBoardBoxResult', 'VKWebAppShowLeaderBoardBoxFailed'> & EventReceiveNames<'VKWebAppShowMessageBox', 'VKWebAppShowMessageBoxResult', 'VKWebAppShowMessageBoxFailed'> & EventReceiveNames<'VKWebAppShowOrderBox', 'VKWebAppShowOrderBoxResult', 'VKWebAppShowOrderBoxFailed'> & EventReceiveNames<'VKWebAppShowRequestBox', 'VKWebAppShowRequestBoxResult', 'VKWebAppShowRequestBoxFailed'> & EventReceiveNames<'VKWebAppShowWallPostBox', 'VKWebAppShowWallPostBoxResult', 'VKWebAppShowWallPostBoxFailed'> & EventReceiveNames<'VKWebAppStorageGet', 'VKWebAppStorageGetResult', 'VKWebAppStorageGetFailed'> & EventReceiveNames<'VKWebAppStorageGetKeys', 'VKWebAppStorageGetKeysResult', 'VKWebAppStorageGetKeysFailed'> & EventReceiveNames<'VKWebAppStorageSet', 'VKWebAppStorageSetResult', 'VKWebAppStorageSetFailed'> & EventReceiveNames<'VKWebAppTapticImpactOccurred', 'VKWebAppTapticImpactOccurredResult', 'VKWebAppTapticImpactOccurredFailed'> & EventReceiveNames<'VKWebAppTapticNotificationOccurred', 'VKWebAppTapticNotificationOccurredResult', 'VKWebAppTapticNotificationOccurredFailed'> & EventReceiveNames<'VKWebAppTapticSelectionChanged', 'VKWebAppTapticSelectionChangedResult', 'VKWebAppTapticSelectionChangedFailed'> & EventReceiveNames<'VKWebAppAddToFavorites', 'VKWebAppAddToFavoritesResult', 'VKWebAppAddToFavoritesFailed'> & EventReceiveNames<'VKWebAppSendPayload', 'VKWebAppSendPayloadResult', 'VKWebAppSendPayloadFailed'> & EventReceiveNames<'VKWebAppDisableSwipeBack', 'VKWebAppDisableSwipeBackResult', 'VKWebAppDisableSwipeBackFailed'> & EventReceiveNames<'VKWebAppEnableSwipeBack', 'VKWebAppEnableSwipeBackResult', 'VKWebAppEnableSwipeBackFailed'> & EventReceiveNames<'VKWebAppShowStoryBox', 'VKWebAppShowStoryBoxResult', 'VKWebAppShowStoryBoxFailed'> & EventReceiveNames<'VKWebAppAccelerometerStart', 'VKWebAppAccelerometerStartResult', 'VKWebAppAccelerometerStartFailed'> & EventReceiveNames<'VKWebAppAccelerometerStop', 'VKWebAppAccelerometerStopResult', 'VKWebAppAccelerometerStopFailed'> & EventReceiveNames<'VKWebAppGyroscopeStart', 'VKWebAppGyroscopeStartResult', 'VKWebAppGyroscopeStartFailed'> & EventReceiveNames<'VKWebAppGyroscopeStop', 'VKWebAppGyroscopeStopResult', 'VKWebAppGyroscopeStopFailed'> & EventReceiveNames<'VKWebAppDeviceMotionStart', 'VKWebAppDeviceMotionStartResult', 'VKWebAppDeviceMotionStartFailed'> & EventReceiveNames<'VKWebAppDeviceMotionStop', 'VKWebAppDeviceMotionStopResult', 'VKWebAppDeviceMotionStopFailed'> & EventReceiveNames<'VKWebAppSubscribeStoryApp', 'VKWebAppSubscribeStoryAppResult', 'VKWebAppSubscribeStoryAppFailed'>;
export declare type ReceiveEventMap = EventReceiveNames<'VKWebAppInit', 'VKWebAppInitResult', 'VKWebAppInitFailed'> & EventReceiveNames<'VKWebAppAddToCommunity', 'VKWebAppAddToCommunityResult', 'VKWebAppAddToCommunityFailed'> & EventReceiveNames<'VKWebAppAllowMessagesFromGroup', 'VKWebAppAllowMessagesFromGroupResult', 'VKWebAppAllowMessagesFromGroupFailed'> & EventReceiveNames<'VKWebAppAllowNotifications', 'VKWebAppAllowNotificationsResult', 'VKWebAppAllowNotificationsFailed'> & EventReceiveNames<'VKWebAppCallAPIMethod', 'VKWebAppCallAPIMethodResult', 'VKWebAppCallAPIMethodFailed'> & EventReceiveNames<'VKWebAppCopyText', 'VKWebAppCopyTextResult', 'VKWebAppCopyTextFailed'> & EventReceiveNames<'VKWebAppDownloadFile', 'VKWebAppDownloadFileResult', 'VKWebAppDownloadFileFailed'> & EventReceiveNames<'VKWebAppGetAuthToken', 'VKWebAppAccessTokenReceived', 'VKWebAppAccessTokenFailed'> & EventReceiveNames<'VKWebAppClose', 'VKWebAppCloseResult', 'VKWebAppCloseFailed'> & EventReceiveNames<'VKWebAppOpenApp', 'VKWebAppOpenAppResult', 'VKWebAppOpenAppFailed'> & EventReceiveNames<'VKWebAppDenyNotifications', 'VKWebAppDenyNotificationsResult', 'VKWebAppDenyNotificationsFailed'> & EventReceiveNames<'VKWebAppFlashGetInfo', 'VKWebAppFlashGetInfoResult', 'VKWebAppFlashGetInfoFailed'> & EventReceiveNames<'VKWebAppFlashSetLevel', 'VKWebAppFlashSetLevelResult', 'VKWebAppFlashSetLevelFailed'> & EventReceiveNames<'VKWebAppGetClientVersion', 'VKWebAppGetClientVersionResult', 'VKWebAppGetClientVersionFailed'> & EventReceiveNames<'VKWebAppGetCommunityToken', 'VKWebAppGetCommunityTokenResult', 'VKWebAppGetCommunityTokenFailed'> & EventReceiveNames<'VKWebAppGetCommunityAuthToken', 'VKWebAppGetCommunityAuthTokenResult', 'VKWebAppGetCommunityAuthTokenFailed'> & EventReceiveNames<'VKWebAppCommunityAccessToken', 'VKWebAppCommunityAccessTokenResult', 'VKWebAppCommunityAccessTokenFailed'> & EventReceiveNames<'VKWebAppCommunityToken', 'VKWebAppCommunityTokenResult', 'VKWebAppCommunityTokenFailed'> & EventReceiveNames<'VKWebAppAudioPause', 'VKWebAppAudioPauseResult', 'VKWebAppAudioPauseFailed'> & EventReceiveNames<'VKWebAppGetEmail', 'VKWebAppGetEmailResult', 'VKWebAppGetEmailFailed'> & EventReceiveNames<'VKWebAppGetFriends', 'VKWebAppGetFriendsResult', 'VKWebAppGetFriendsFailed'> & EventReceiveNames<'VKWebAppGetGeodata', 'VKWebAppGetGeodataResult', 'VKWebAppGetGeodataFailed'> & EventReceiveNames<'VKWebAppGetPersonalCard', 'VKWebAppGetPersonalCardResult', 'VKWebAppGetPersonalCardFailed'> & EventReceiveNames<'VKWebAppGetPhoneNumber', 'VKWebAppGetPhoneNumberResult', 'VKWebAppGetPhoneNumberFailed'> & EventReceiveNames<'VKWebAppGetUserInfo', 'VKWebAppGetUserInfoResult', 'VKWebAppGetUserInfoFailed'> & EventReceiveNames<'VKWebAppJoinGroup', 'VKWebAppJoinGroupResult', 'VKWebAppJoinGroupFailed'> & EventReceiveNames<'VKWebAppOpenCodeReader', 'VKWebAppOpenCodeReaderResult', 'VKWebAppOpenCodeReaderFailed'> & EventReceiveNames<'VKWebAppOpenContacts', 'VKWebAppOpenContactsResult', 'VKWebAppOpenContactsFailed'> & EventReceiveNames<'VKWebAppOpenPayForm', 'VKWebAppOpenPayFormResult', 'VKWebAppOpenPayFormFailed'> & EventReceiveNames<'VKWebAppOpenQR', 'VKWebAppOpenQRResult', 'VKWebAppOpenQRFailed'> & EventReceiveNames<'VKWebAppResizeWindow', 'VKWebAppResizeWindowResult', 'VKWebAppResizeWindowFailed'> & EventReceiveNames<'VKWebAppScroll', 'VKWebAppScrollResult', 'VKWebAppScrollFailed'> & EventReceiveNames<'VKWebAppSetLocation', 'VKWebAppSetLocationResult', 'VKWebAppSetLocationFailed'> & EventReceiveNames<'VKWebAppSetViewSettings', 'VKWebAppSetViewSettingsResult', 'VKWebAppSetViewSettingsFailed'> & EventReceiveNames<'VKWebAppShare', 'VKWebAppShareResult', 'VKWebAppShareFailed'> & EventReceiveNames<'VKWebAppShowCommunityWidgetPreviewBox', 'VKWebAppShowCommunityWidgetPreviewBoxResult', 'VKWebAppShowCommunityWidgetPreviewBoxFailed'> & EventReceiveNames<'VKWebAppShowImages', 'VKWebAppShowImagesResult', 'VKWebAppShowImagesFailed'> & EventReceiveNames<'VKWebAppShowInviteBox', 'VKWebAppShowInviteBoxResult', 'VKWebAppShowInviteBoxFailed'> & EventReceiveNames<'VKWebAppShowLeaderBoardBox', 'VKWebAppShowLeaderBoardBoxResult', 'VKWebAppShowLeaderBoardBoxFailed'> & EventReceiveNames<'VKWebAppShowMessageBox', 'VKWebAppShowMessageBoxResult', 'VKWebAppShowMessageBoxFailed'> & EventReceiveNames<'VKWebAppShowOrderBox', 'VKWebAppShowOrderBoxResult', 'VKWebAppShowOrderBoxFailed'> & EventReceiveNames<'VKWebAppShowRequestBox', 'VKWebAppShowRequestBoxResult', 'VKWebAppShowRequestBoxFailed'> & EventReceiveNames<'VKWebAppShowWallPostBox', 'VKWebAppShowWallPostBoxResult', 'VKWebAppShowWallPostBoxFailed'> & EventReceiveNames<'VKWebAppStorageGet', 'VKWebAppStorageGetResult', 'VKWebAppStorageGetFailed'> & EventReceiveNames<'VKWebAppStorageGetKeys', 'VKWebAppStorageGetKeysResult', 'VKWebAppStorageGetKeysFailed'> & EventReceiveNames<'VKWebAppStorageSet', 'VKWebAppStorageSetResult', 'VKWebAppStorageSetFailed'> & EventReceiveNames<'VKWebAppTapticImpactOccurred', 'VKWebAppTapticImpactOccurredResult', 'VKWebAppTapticImpactOccurredFailed'> & EventReceiveNames<'VKWebAppTapticNotificationOccurred', 'VKWebAppTapticNotificationOccurredResult', 'VKWebAppTapticNotificationOccurredFailed'> & EventReceiveNames<'VKWebAppTapticSelectionChanged', 'VKWebAppTapticSelectionChangedResult', 'VKWebAppTapticSelectionChangedFailed'> & EventReceiveNames<'VKWebAppAddToFavorites', 'VKWebAppAddToFavoritesResult', 'VKWebAppAddToFavoritesFailed'> & EventReceiveNames<'VKWebAppSendPayload', 'VKWebAppSendPayloadResult', 'VKWebAppSendPayloadFailed'> & EventReceiveNames<'VKWebAppDisableSwipeBack', 'VKWebAppDisableSwipeBackResult', 'VKWebAppDisableSwipeBackFailed'> & EventReceiveNames<'VKWebAppEnableSwipeBack', 'VKWebAppEnableSwipeBackResult', 'VKWebAppEnableSwipeBackFailed'> & EventReceiveNames<'VKWebAppShowStoryBox', 'VKWebAppShowStoryBoxResult', 'VKWebAppShowStoryBoxFailed'> & EventReceiveNames<'VKWebAppAccelerometerStart', 'VKWebAppAccelerometerStartResult', 'VKWebAppAccelerometerStartFailed'> & EventReceiveNames<'VKWebAppAccelerometerStop', 'VKWebAppAccelerometerStopResult', 'VKWebAppAccelerometerStopFailed'> & EventReceiveNames<'VKWebAppGyroscopeStart', 'VKWebAppGyroscopeStartResult', 'VKWebAppGyroscopeStartFailed'> & EventReceiveNames<'VKWebAppGyroscopeStop', 'VKWebAppGyroscopeStopResult', 'VKWebAppGyroscopeStopFailed'> & EventReceiveNames<'VKWebAppDeviceMotionStart', 'VKWebAppDeviceMotionStartResult', 'VKWebAppDeviceMotionStartFailed'> & EventReceiveNames<'VKWebAppDeviceMotionStop', 'VKWebAppDeviceMotionStopResult', 'VKWebAppDeviceMotionStopFailed'> & EventReceiveNames<'VKWebAppSubscribeStoryApp', 'VKWebAppSubscribeStoryAppResult', 'VKWebAppSubscribeStoryAppFailed'>;
export {};
import { AnyRequestMethodName, AnyReceiveMethodName, AnyRequestMethodNameWithProps, AnyRequestMethodNameWithoutProps, AnyMethodName, AnyIOMethodName, AnyRequestOnlyMethodName, AnyReceiveOnlyMethodName } from './bridge';
import { CommunityWidgetType } from './data';
/**

@@ -50,1 +51,7 @@ * Name of a method that can be sent.

export declare type IOMethodName = AnyIOMethodName;
/**
* Community widget type
* @alias CommunityWidgetType
* @deprecated
*/
export declare type WidgetType = CommunityWidgetType;
{
"name": "@vkontakte/vk-bridge",
"version": "2.1.6",
"version": "2.1.7",
"description": "Connects a Mini App with VK client",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc