Reference
SDK
A typed client for the REST API, for when you're integrating Fimaflow into your own application instead of scripting it from the CLI.
Demo placeholderCalling the SDK from a Node.js script
Installing
Shell
npm install @fimaflow/sdkBasic usage
TypeScript
import { Fimaflow } from "@fimaflow/sdk"
const fimaflow = new Fimaflow({ apiKey: process.env.FIMAFLOW_API_KEY })
const workflows = await fimaflow.workflows.list()
const run = await fimaflow.workflows.run(workflowId, {
input: { sku: "TSHIRT-M", qty: 2 },
})
console.log(run.status, run.output)Every method mirrors the REST API one to one — types are generated from the same OpenAPI schema, so a change on the server shows up as a type error in your editor before it ever reaches production.
Streaming execution logs
TypeScript
for await (const log of fimaflow.workflows.streamLogs(workflowId, executionId)) {
console.log(log.level, log.message)
}Same live view you get in the builder's Execution panel, available from your own backend or scripts.