# TypeScript SDK

Use the official TypeScript client from trusted server-side JavaScript runtimes.

- [Source on GitHub](https://github.com/luranta/sdk-typescript): Inspect the stable runtime and disposable generated models.
- [npm package](https://www.npmjs.com/package/@luranta/sdk): Install the provenance-backed public release when enabled.

## Installation

### npm

```shell
npm install @luranta/sdk
```

### Yarn

```shell
yarn add @luranta/sdk
```

### pnpm

```shell
pnpm add @luranta/sdk
```

### Bun

```shell
bun add @luranta/sdk
```

## Quick start

### TypeScript

```ts
import { Luranta } from "@luranta/sdk"

const luranta = new Luranta({
  apiKey: process.env.LURANTA_API_KEY!,
})

const page = await luranta.jobs.list({
  roles: ["software-engineering"],
  limit: 3,
})

for (const job of page.data) {
  console.log(job.title)
}
```

## Key features

| Feature | Behaviour |
| --- | --- |
| Resources | jobs, companies and reference collections |
| Pagination | Async cursor iterators stop on repeated or malformed cursors |
| Retries | Only explicit non-billable 408, 429 and selected 5xx responses |
| Raw responses | Request ID and billing headers remain available |
| Runtime | Bun, Node.js and browser-compatible fetch for trusted edge code |

> **Authentication:** Pass the key from a server-side environment variable. Never put it in browser-delivered JavaScript, storage, analytics or URLs.
