Developer docs

JavaScript and TypeScript

Typed calls from the OpenAPI document, in any JavaScript runtime.

Updated

Install

bun add @trulyfinal/sdk

No dependencies. Runs in Node 18+, Deno, Bun, Cloudflare Workers and browsers. Every call is typed from the OpenAPI document.

Use it

import { TrulyFinal } from "@trulyfinal/sdk";

const tf = new TrulyFinal({ apiKey: process.env.TRULYFINAL_API_KEY });
const project = await tf.projects.create({ name: "Spring campaign" });
const { file } = await tf.files.upload(project.id, { file: pdfBytes, filename: "brochure.pdf" });
await tf.projects.inviteReviewers(project.id, { reviewers: [{ email: "anna@client.com" }], fileIds: [file.id] });

for await (const p of tf.projects.all({ status: "active" })) console.log(p.name);

What it does for you

  • Lists page themselves: for await walks every page.
  • Big files go up in parts.
  • A rate-limited call waits for Retry-After and tries again.

Next: AI assistants (MCP)

Chat