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

@ikas/app-helpers

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ikas/app-helpers - npm Package Compare versions

Comparing version 1.0.1-alpha.12 to 1.0.1-alpha.13

3

dist/helpers/app-bridge.d.ts
export declare class AppBridgeHelper {
static startListener(callback: (msg: MessageEvent) => void): void;
static stopListener(callback: (msg: MessageEvent) => void): void;
static requestToken(): void;
static closeLoader(): void;

@@ -24,3 +23,3 @@ static startMerchantPayment(merchantPaymentId: string): void;

export declare enum AppBridgeCallbackMessageType {
REQUEST_TOKEN = "REQUEST_TOKEN"
REQUEST_TOKEN_RESPONSE = "REQUEST_TOKEN_RESPONSE"
}

@@ -27,0 +26,0 @@ export declare type AppEvent = {

@@ -11,9 +11,2 @@ "use strict";

}
static requestToken() {
const event = {
type: AppBridgeMessageType.REQUEST_TOKEN,
data: {},
};
AppBridgeHelper.sendEvent(event);
}
static closeLoader() {

@@ -73,3 +66,3 @@ const event = {

var _a, _b, _c;
if (((_a = msg.data) === null || _a === void 0 ? void 0 : _a.type) === AppBridgeCallbackMessageType.REQUEST_TOKEN) {
if (((_a = msg.data) === null || _a === void 0 ? void 0 : _a.type) === AppBridgeCallbackMessageType.REQUEST_TOKEN_RESPONSE) {
const token = (_c = (_b = msg.data) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.token;

@@ -82,3 +75,7 @@ resolve(token);

AppBridgeHelper.startListener(callback);
AppBridgeHelper.requestToken();
const event = {
type: AppBridgeMessageType.REQUEST_TOKEN,
data: {},
};
AppBridgeHelper.sendEvent(event);
}

@@ -109,4 +106,4 @@ catch (e) {

(function (AppBridgeCallbackMessageType) {
AppBridgeCallbackMessageType["REQUEST_TOKEN"] = "REQUEST_TOKEN";
AppBridgeCallbackMessageType["REQUEST_TOKEN_RESPONSE"] = "REQUEST_TOKEN_RESPONSE";
})(AppBridgeCallbackMessageType = exports.AppBridgeCallbackMessageType || (exports.AppBridgeCallbackMessageType = {}));
//# sourceMappingURL=app-bridge.js.map
{
"name": "@ikas/app-helpers",
"version": "1.0.1-alpha.12",
"version": "1.0.1-alpha.13",
"description": "ikas store app helpers",

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

@@ -10,11 +10,2 @@ export class AppBridgeHelper {

static requestToken() {
const event: AppEvent = {
type: AppBridgeMessageType.REQUEST_TOKEN,
data: {},
};
AppBridgeHelper.sendEvent(event);
}
static closeLoader() {

@@ -85,3 +76,3 @@ const event: AppEvent = {

const callback = (msg: MessageEvent) => {
if (msg.data?.type === AppBridgeCallbackMessageType.REQUEST_TOKEN) {
if (msg.data?.type === AppBridgeCallbackMessageType.REQUEST_TOKEN_RESPONSE) {
const token = msg.data?.data?.token;

@@ -97,3 +88,8 @@ resolve(token);

AppBridgeHelper.requestToken();
const event: AppEvent = {
type: AppBridgeMessageType.REQUEST_TOKEN,
data: {},
};
AppBridgeHelper.sendEvent(event);
} catch (e) {

@@ -123,3 +119,3 @@ clearTimeout(timer);

export enum AppBridgeCallbackMessageType {
REQUEST_TOKEN = 'REQUEST_TOKEN',
REQUEST_TOKEN_RESPONSE = 'REQUEST_TOKEN_RESPONSE',
}

@@ -126,0 +122,0 @@

Sorry, the diff of this file is not supported yet

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