Intuned Client SDK
Owned TypeScript SDK for the Intuned public APIs.
Installation
npm
npm add @intuned/client
pnpm
pnpm add @intuned/client
bun
bun add @intuned/client
yarn
yarn add @intuned/client
Getting Started
To get started, see the Intuned client API overview.
You will need:
- an API key
- a workspace ID
The SDK uses native fetch. In Node.js, use Node 18+ or provide a custom fetch implementation.
Usage
import { IntunedClient } from "@intuned/client";
const client = new IntunedClient({
apiKey: process.env["INTUNED_API_KEY"] ?? "",
workspaceId: "123e4567-e89b-12d3-a456-426614174000",
});
const result = await client.projects.runs.start("my-project", {
api: "my-awesome-api",
parameters: { hello: "world" },
});
console.log(result);
Web Tasks
client.webTasks.run(body) is a convenience over webTasks.start + webTasks.result: it starts a Web Task and polls result until the task reaches a terminal state (status === "completed" or status === "canceled"). Branch on status and outcome to handle the response.
const terminal = await client.webTasks.run(
{
task: "Extract pricing from the homepage",
startUrl: "https://example.com",
parameters: {},
outputSchema: { type: "object" },
},
{ pollIntervalMs: 5_000 },
);