Growth.Talent

TypeScript SDK

A typed client for the Growth.Talent API, auto-generated from the OpenAPI 3.1 spec via @hey-api/openapi-ts. Runtime validation and the published spec are guaranteed in sync — change the spec, regenerate, types update.

Prefer Python? See /docs/sdk-python. Same OpenAPI spec generates both clients.

Install

terminal
pnpm add @growthtalent/sdk
# or: npm install @growthtalent/sdk
# or: yarn add @growthtalent/sdk
# or: bun add @growthtalent/sdk

Quickstart

quickstart.ts
import { configureGrowthTalent, getJobs, postApplications, getMe } from "@growthtalent/sdk";

configureGrowthTalent({ apiKey: process.env.GT_API_KEY });

// Public read — no key required
const { data: jobs } = await getJobs({
  query: { q: "head of growth", market: "usa", limit: 5 },
});
console.log(jobs?.data); // typed JobShort[] — full IntelliSense

// Authenticated
const { data: me } = await getMe();
console.log(`Signed in as ${me?.candidate?.name}`);

// Apply on the candidate's behalf
const { data: result } = await postApplications({
  body: {
    jobSlugOrId: "head-of-growth-the-mobile-first-company",
    message: "Hi — built growth at Spendesk #4 to unicorn.",
    via: "magic",
  },
});

Configuration

configure.ts
configureGrowthTalent({
  apiKey: "gt_live_...",                           // optional; reads GT_API_KEY env if omitted
  baseUrl: "https://www.growthtalent.org/api/v1",  // override for staging
  fetch: customFetch,                              // optional fetch impl with retries / logging
});

// Per-request override (multi-tenant)
const result = await getMe({
  headers: { Authorization: `Bearer ${userKey}` },
});

What you get

  • Every endpoint as a typed function (getJobs, patchMe, postApplications, …)
  • Full request/response types (JobShort, JobFull, Candidate, …)
  • Query strings and bodies validated by TypeScript at compile time
  • ThrowOnError generic — opt in to thrown errors instead of { data, error } discriminated union
  • Dual ESM + CJS bundle, .d.ts types, works in Node 20+, browser, edge, Bun, Cloudflare Workers

Regenerate from the latest spec

When the spec evolves, refresh the generated client:

pnpm --filter @growthtalent/sdk generate   # pulls latest openapi.json from prod
pnpm --filter @growthtalent/sdk build