@integration-app/sdk
Advanced tools
Comparing version 0.1.11 to 0.1.12
@@ -0,1 +1,25 @@ | ||
declare enum FlowRunState { | ||
RUNNING = "running", | ||
COMPLETED = "completed", | ||
FAILED = "failed" | ||
} | ||
declare enum FlowNodeRunState { | ||
RUNNING = "running", | ||
COMPLETED_ITERATION = "completed_iteration", | ||
COMPLETED = "completed", | ||
FAILED = "failed" | ||
} | ||
declare type FlowRun = { | ||
id: string; | ||
state: FlowRunState; | ||
nodeRuns: FlowNodeRun[]; | ||
} & { | ||
[prop: string]: any; | ||
}; | ||
declare type FlowNodeRun = { | ||
id: string; | ||
state: FlowNodeRunState; | ||
} & { | ||
[prop: string]: any; | ||
}; | ||
export interface IntegrationAppClientOptions { | ||
@@ -26,3 +50,3 @@ accessToken?: string; | ||
* */ | ||
runFlow(flowId: string, options?: RunFlowOptions): Promise<unknown>; | ||
runFlow(flowId: string, options?: RunFlowOptions): Promise<FlowRun>; | ||
findFlowRuns(flowId: string): Promise<any>; | ||
@@ -78,1 +102,2 @@ /** | ||
} | ||
export {}; |
@@ -137,10 +137,4 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const uri = this.getEmbedUri('flows/new', { | ||
blueprintKey: options.blueprintKey || options.blueprintKey, | ||
parameters: JSON.stringify(options.parameters), | ||
}); | ||
iframe_1.openIframe(uri, { | ||
onFlowRunComplete: options.onFlowRunComplete, | ||
onClose: options.onClose, | ||
}); | ||
const flow = yield this.createFlow(options); | ||
yield this.openFlow(flow.id, options); | ||
}); | ||
@@ -147,0 +141,0 @@ } |
{ | ||
"name": "@integration-app/sdk", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"description": "JavaScript SDK for Integration.app", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -149,10 +149,4 @@ import Pusher, { Channel } from 'pusher-js' | ||
public async openNewFlow(options: NewFlowOptions) { | ||
const uri = this.getEmbedUri('flows/new', { | ||
blueprintKey: options.blueprintKey || options.blueprintKey, | ||
parameters: JSON.stringify(options.parameters), | ||
}) | ||
openIframe(uri, { | ||
onFlowRunComplete: options.onFlowRunComplete, | ||
onClose: options.onClose, | ||
}) | ||
const flow = await this.createFlow(options) | ||
await this.openFlow(flow.id, options) | ||
} | ||
@@ -164,3 +158,6 @@ | ||
* */ | ||
public async runFlow(flowId: string, options: RunFlowOptions = {}) { | ||
public async runFlow( | ||
flowId: string, | ||
options: RunFlowOptions = {}, | ||
): Promise<FlowRun> { | ||
const { id: flowRunId } = await this.post('flow-runs', { | ||
@@ -167,0 +164,0 @@ flowId: flowId, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
8087
0
805963