SDK reference
API overview
The public TypeScript API, organized by what you want to record.
Client and configuration
| API | Purpose |
|---|---|
createFlowmark(config?) | Create a Node.js, Next.js, or browser client |
defineConfig(config) | Type-check configuration without loading a file |
flush() / shutdown() | Wait for delivery or close a client |
Run markers
Get a run handle with flowmark.workflow(name, options?).
All marker methods below return void except operation().
See workflows and runs for the lifecycle map.
Loading diagram
| API | Purpose |
|---|---|
workflow() / runId | Start an independent execution and identify it |
step() | Record a semantic checkpoint without executing code |
operation() | Measure an independently identified operation |
progress() | Record absolute progress so far |
error() | Record a problem without ending the run |
done() / fail() | Report terminal completion or failure |
setProperties() | Append discovered context |
Types and adapters
- Data types and bounds: JSON values, results, failures, progress, and exported types.
- Browser proxy:
createFlowmarkProxy()and its responses. - Advanced exports: custom transports, low-level
workflow(), memory transport, and typed errors.
Runtime differences
The normal Node.js and browser clients expose workflow, flush, and
shutdown. The Next.js adapter exposes only workflow and manages delivery
with after(). Run handles have the same marker API across integrations.
Need a runnable starting point rather than a method lookup? Read the quickstart, Next.js guide, or browser guide.