@integration-app/sdk
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -674,3 +674,3 @@ (function (global, factory) { | ||
*/ | ||
function openIframe(uri, callbacks) { | ||
function openIframe(uri, callbacks = {}) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -772,3 +772,3 @@ if (!initialized) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.startImport = exports.init = void 0; | ||
exports.openNewFlow = exports.startImport = exports.init = void 0; | ||
@@ -797,2 +797,10 @@ const DEFAULT_UI_URI = 'https://ui.integration.app'; | ||
exports.startImport = startImport; | ||
function openNewFlow(options) { | ||
const uri = getEmbedUri('flows/new', options, { | ||
blueprintKey: options.blueprintKey, | ||
flowConfig: JSON.stringify(options.flowConfig), | ||
}); | ||
iframe.openIframe(uri); | ||
} | ||
exports.openNewFlow = openNewFlow; | ||
function getEmbedUri(page, options, params) { | ||
@@ -820,8 +828,10 @@ const key = appKey || options.appKey; | ||
var index = unwrapExports(dist); | ||
var dist_1 = dist.startImport; | ||
var dist_2 = dist.init; | ||
var dist_1 = dist.openNewFlow; | ||
var dist_2 = dist.startImport; | ||
var dist_3 = dist.init; | ||
exports.default = index; | ||
exports.init = dist_2; | ||
exports.startImport = dist_1; | ||
exports.init = dist_3; | ||
exports.openNewFlow = dist_1; | ||
exports.startImport = dist_2; | ||
@@ -828,0 +838,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
declare type Callbacks = { | ||
[key: string]: (...args: any[]) => void; | ||
}; | ||
export declare function openIframe(uri: string, callbacks: Callbacks): Promise<void>; | ||
export declare function openIframe(uri: string, callbacks?: Callbacks): Promise<void>; | ||
export declare function init(): void; | ||
export {}; |
@@ -26,3 +26,3 @@ "use strict"; | ||
*/ | ||
function openIframe(uri, callbacks) { | ||
function openIframe(uri, callbacks = {}) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -29,0 +29,0 @@ if (!initialized) { |
export declare function init(options: InitOptions): void; | ||
export declare function startImport(options: NewImportOptions): void; | ||
export declare function openNewFlow(options: NewFlowOptions): void; | ||
interface InitOptions { | ||
@@ -12,2 +13,6 @@ uiUri?: string; | ||
} | ||
interface NewFlowOptions extends InitOptions { | ||
blueprintKey: string; | ||
flowConfig: any; | ||
} | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.startImport = exports.init = void 0; | ||
exports.openNewFlow = exports.startImport = exports.init = void 0; | ||
const iframe_1 = require("./iframe"); | ||
@@ -28,2 +28,10 @@ const DEFAULT_UI_URI = 'https://ui.integration.app'; | ||
exports.startImport = startImport; | ||
function openNewFlow(options) { | ||
const uri = getEmbedUri('flows/new', options, { | ||
blueprintKey: options.blueprintKey, | ||
flowConfig: JSON.stringify(options.flowConfig), | ||
}); | ||
iframe_1.openIframe(uri); | ||
} | ||
exports.openNewFlow = openNewFlow; | ||
function getEmbedUri(page, options, params) { | ||
@@ -30,0 +38,0 @@ const key = appKey || options.appKey; |
{ | ||
"name": "@integration-app/sdk", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "JavaScript SDK for Integration.app", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
164982
1336