@ikas/app-helpers
Advanced tools
Comparing version 1.0.1-alpha.6 to 1.0.1-alpha.9
@@ -10,2 +10,3 @@ export declare class AppBridgeHelper { | ||
static openOrderPage(orderId: string): void; | ||
static closeApp(): void; | ||
static sendEvent(event: AppEvent): void; | ||
@@ -19,3 +20,4 @@ } | ||
OPEN_ORDER_PAGE = "OPEN_ORDER_PAGE", | ||
REQUEST_TOKEN = "REQUEST_TOKEN" | ||
REQUEST_TOKEN = "REQUEST_TOKEN", | ||
CLOSE_APP = "CLOSE_APP" | ||
} | ||
@@ -22,0 +24,0 @@ export declare enum AppBridgeCallbackMessageType { |
@@ -61,2 +61,9 @@ "use strict"; | ||
}; | ||
AppBridgeHelper.closeApp = function () { | ||
var event = { | ||
type: AppBridgeMessageType.CLOSE_APP, | ||
data: {}, | ||
}; | ||
AppBridgeHelper.sendEvent(event); | ||
}; | ||
AppBridgeHelper.sendEvent = function (event) { | ||
@@ -77,2 +84,3 @@ //@ts-ignore | ||
AppBridgeMessageType["REQUEST_TOKEN"] = "REQUEST_TOKEN"; | ||
AppBridgeMessageType["CLOSE_APP"] = "CLOSE_APP"; | ||
})(AppBridgeMessageType = exports.AppBridgeMessageType || (exports.AppBridgeMessageType = {})); | ||
@@ -79,0 +87,0 @@ var AppBridgeCallbackMessageType; |
{ | ||
"name": "@ikas/app-helpers", | ||
"version": "1.0.1-alpha.6", | ||
"version": "1.0.1-alpha.9", | ||
"description": "ikas store app helpers", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -70,2 +70,11 @@ export class AppBridgeHelper { | ||
static closeApp() { | ||
const event: AppEvent = { | ||
type: AppBridgeMessageType.CLOSE_APP, | ||
data: {}, | ||
}; | ||
AppBridgeHelper.sendEvent(event); | ||
} | ||
static sendEvent(event: AppEvent) { | ||
@@ -85,2 +94,3 @@ //@ts-ignore | ||
REQUEST_TOKEN = "REQUEST_TOKEN", | ||
CLOSE_APP = "CLOSE_APP", | ||
} | ||
@@ -87,0 +97,0 @@ |
Sorry, the diff of this file is not supported yet
16295
266