@ikas/app-helpers
Advanced tools
Comparing version 1.0.1-alpha.0 to 1.0.1-alpha.2
export declare class AppBridgeHelper { | ||
static getToken(): void; | ||
static sendToken(token: string): void; | ||
static closeLoader(): void; | ||
@@ -14,3 +16,5 @@ static startMerchantPayment(merchantPaymentId: string): void; | ||
OPEN_PRODUCT_PAGE = "OPEN_PRODUCT_PAGE", | ||
OPEN_ORDER_PAGE = "OPEN_ORDER_PAGE" | ||
OPEN_ORDER_PAGE = "OPEN_ORDER_PAGE", | ||
GET_TOKEN = "GET_TOKEN", | ||
SEND_TOKEN = "SEND_TOKEN" | ||
} | ||
@@ -17,0 +21,0 @@ export declare type AppEvent = { |
@@ -7,2 +7,18 @@ "use strict"; | ||
} | ||
AppBridgeHelper.getToken = function () { | ||
var event = { | ||
type: AppBridgeMessageType.GET_TOKEN, | ||
data: {}, | ||
}; | ||
AppBridgeHelper.sendEvent(event); | ||
}; | ||
AppBridgeHelper.sendToken = function (token) { | ||
var event = { | ||
type: AppBridgeMessageType.SEND_TOKEN, | ||
data: { | ||
token: token, | ||
}, | ||
}; | ||
AppBridgeHelper.sendEvent(event); | ||
}; | ||
AppBridgeHelper.closeLoader = function () { | ||
@@ -63,3 +79,5 @@ var event = { | ||
AppBridgeMessageType["OPEN_ORDER_PAGE"] = "OPEN_ORDER_PAGE"; | ||
AppBridgeMessageType["GET_TOKEN"] = "GET_TOKEN"; | ||
AppBridgeMessageType["SEND_TOKEN"] = "SEND_TOKEN"; | ||
})(AppBridgeMessageType = exports.AppBridgeMessageType || (exports.AppBridgeMessageType = {})); | ||
//# sourceMappingURL=app-bridge.js.map |
{ | ||
"name": "@ikas/app-helpers", | ||
"version": "1.0.1-alpha.0", | ||
"version": "1.0.1-alpha.2", | ||
"description": "ikas store app helpers", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
export class AppBridgeHelper { | ||
static getToken() { | ||
const event: AppEvent = { | ||
type: AppBridgeMessageType.GET_TOKEN, | ||
data: {}, | ||
}; | ||
AppBridgeHelper.sendEvent(event); | ||
} | ||
static sendToken(token: string) { | ||
const event: AppEvent = { | ||
type: AppBridgeMessageType.SEND_TOKEN, | ||
data: { | ||
token, | ||
}, | ||
}; | ||
AppBridgeHelper.sendEvent(event); | ||
} | ||
static closeLoader() { | ||
@@ -66,2 +86,4 @@ const event: AppEvent = { | ||
OPEN_ORDER_PAGE = 'OPEN_ORDER_PAGE', | ||
GET_TOKEN = "GET_TOKEN", | ||
SEND_TOKEN = "SEND_TOKEN" | ||
} | ||
@@ -68,0 +90,0 @@ |
Sorry, the diff of this file is not supported yet
14769
241