JavaScript and TypeScript
Typed calls from the OpenAPI document, in any JavaScript runtime.
Install
bun add @trulyfinal/sdkNo 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 awaitwalks every page. - Big files go up in parts.
- A rate-limited call waits for
Retry-Afterand tries again.