TypeScript / JavaScript SDK
The @zeridion/flare package is a thin, dependency-free wrapper around the Zeridion Flare REST API using native fetch. It follows the same wire contract as every other Flare SDK.
npm install @zeridion/flare
Runtime: Node 20+, Bun, Deno, Cloudflare Workers, Vercel Edge, Fastly Compute@Edge JS, or any environment with native fetch and crypto.subtle (or node:crypto in Node).
Quick start
import { FlareClient } from "@zeridion/flare";
const flare = new FlareClient({ apiKey: process.env.FLARE_API_KEY! });
const job = await flare.createJob({
job_type: "SendWelcomeEmail",
payload: { email: "alice@example.com", name: "Alice" },
queue: "default",
max_attempts: 3,
});
console.log(job.id, job.state); // "job_abc123", "pending"
The SDK is a REST client — you enqueue jobs by type name, and your own worker process polls and executes them. See the Quick Start for the full poll-and-ack worker loop.
Reference
| Page | What it covers |
|---|---|
| FlareClient | Constructor options, RequestOptions, and every job / worker / webhook method. |
| Types | Request and response type definitions shared across the client. |
| Error handling | The typed error hierarchy (AuthError, QuotaError, NotFoundError, ConflictError, RateLimitError) and catch patterns. |
See also
- SDKs overview — feature parity matrix across all 7 official SDKs
- Jobs API — wire-level reference for the endpoints this SDK wraps
- Errors — status codes and error envelopes used by every SDK