@front-finance/link
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -44,4 +44,7 @@ "use strict"; | ||
var iframeUrlObject; | ||
var iframeElement = function () { | ||
return document.getElementById(popup_1.iframeId); | ||
}; | ||
function eventsListener(event) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; | ||
switch (event.data.type) { | ||
@@ -98,5 +101,10 @@ case 'brokerageAccountAccessToken': { | ||
if (currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.accessTokens) { | ||
var iframeElement = document.getElementById(popup_1.iframeId); | ||
(_j = iframeElement.contentWindow) === null || _j === void 0 ? void 0 : _j.postMessage({ type: 'frontAccessTokens', payload: currentOptions.accessTokens }, (iframeUrlObject === null || iframeUrlObject === void 0 ? void 0 : iframeUrlObject.origin) || 'https://web.getfront.com'); | ||
(_j = iframeElement().contentWindow) === null || _j === void 0 ? void 0 : _j.postMessage({ type: 'frontAccessTokens', payload: currentOptions.accessTokens }, (iframeUrlObject === null || iframeUrlObject === void 0 ? void 0 : iframeUrlObject.origin) || 'https://web.getfront.com'); | ||
} | ||
if (currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.transferDestinationTokens) { | ||
(_k = iframeElement().contentWindow) === null || _k === void 0 ? void 0 : _k.postMessage({ | ||
type: 'frontTransferDestinationTokens', | ||
payload: currentOptions.transferDestinationTokens | ||
}, (iframeUrlObject === null || iframeUrlObject === void 0 ? void 0 : iframeUrlObject.origin) || 'https://web.getfront.com'); | ||
} | ||
break; | ||
@@ -106,3 +114,3 @@ } | ||
if ((0, event_types_1.isFrontEventTypeKey)(event.data.type)) { | ||
(_k = currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.onEvent) === null || _k === void 0 ? void 0 : _k.call(currentOptions, event.data); | ||
(_l = currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.onEvent) === null || _l === void 0 ? void 0 : _l.call(currentOptions, event.data); | ||
} | ||
@@ -109,0 +117,0 @@ break; |
@@ -107,2 +107,7 @@ import type { BrokerType } from '@front-finance/api'; | ||
accessTokens?: IntegrationAccessToken[]; | ||
/** | ||
* (Optional) An array of integration access tokens. | ||
* Can be used to initialize the crypto transfers flow as an alternative to the target addresses. | ||
*/ | ||
transferDestinationTokens?: IntegrationAccessToken[]; | ||
} |
@@ -41,4 +41,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
var iframeUrlObject; | ||
var iframeElement = function () { | ||
return document.getElementById(iframeId); | ||
}; | ||
function eventsListener(event) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; | ||
switch (event.data.type) { | ||
@@ -95,5 +98,10 @@ case 'brokerageAccountAccessToken': { | ||
if (currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.accessTokens) { | ||
var iframeElement = document.getElementById(iframeId); | ||
(_j = iframeElement.contentWindow) === null || _j === void 0 ? void 0 : _j.postMessage({ type: 'frontAccessTokens', payload: currentOptions.accessTokens }, (iframeUrlObject === null || iframeUrlObject === void 0 ? void 0 : iframeUrlObject.origin) || 'https://web.getfront.com'); | ||
(_j = iframeElement().contentWindow) === null || _j === void 0 ? void 0 : _j.postMessage({ type: 'frontAccessTokens', payload: currentOptions.accessTokens }, (iframeUrlObject === null || iframeUrlObject === void 0 ? void 0 : iframeUrlObject.origin) || 'https://web.getfront.com'); | ||
} | ||
if (currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.transferDestinationTokens) { | ||
(_k = iframeElement().contentWindow) === null || _k === void 0 ? void 0 : _k.postMessage({ | ||
type: 'frontTransferDestinationTokens', | ||
payload: currentOptions.transferDestinationTokens | ||
}, (iframeUrlObject === null || iframeUrlObject === void 0 ? void 0 : iframeUrlObject.origin) || 'https://web.getfront.com'); | ||
} | ||
break; | ||
@@ -103,3 +111,3 @@ } | ||
if (isFrontEventTypeKey(event.data.type)) { | ||
(_k = currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.onEvent) === null || _k === void 0 ? void 0 : _k.call(currentOptions, event.data); | ||
(_l = currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.onEvent) === null || _l === void 0 ? void 0 : _l.call(currentOptions, event.data); | ||
} | ||
@@ -106,0 +114,0 @@ break; |
{ | ||
"name": "@front-finance/link", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Front Finance accounts connection client lib", | ||
@@ -9,2 +9,3 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@types/jest": "^29.5.4", | ||
"@typescript-eslint/eslint-plugin": "^4.21.0", | ||
@@ -16,8 +17,7 @@ "@typescript-eslint/parser": "^4.21.0", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
"jest": "^29.6.4", | ||
"jest-environment-jsdom": "^29.6.4", | ||
"prettier": "^2.2.1", | ||
"typescript": "^4.6.4", | ||
"ts-jest": "^29.1.1", | ||
"jest": "^29.6.4", | ||
"@types/jest": "^29.5.4", | ||
"jest-environment-jsdom": "^29.6.4" | ||
"typescript": "^4.6.4" | ||
}, | ||
@@ -43,2 +43,2 @@ "dependencies": {}, | ||
"types": "index.d.ts" | ||
} | ||
} |
@@ -107,2 +107,7 @@ import type { BrokerType } from '@front-finance/api'; | ||
accessTokens?: IntegrationAccessToken[]; | ||
/** | ||
* (Optional) An array of integration access tokens. | ||
* Can be used to initialize the crypto transfers flow as an alternative to the target addresses. | ||
*/ | ||
transferDestinationTokens?: IntegrationAccessToken[]; | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
45615
832