| name | warp-typescript-sdk |
| description | TypeScript SDK for Warp API. Use when writing TypeScript code that calls Warp API with the warp-hr package: installing it, constructing and authenticating the client, and calling API operations. |
Warp TypeScript SDK
Generated TypeScript client for Warp API, published as warp-hr. Use the generated client instead of hand-writing HTTP requests.
Install
npm install warp-hr
Client setup and authentication
import Warp from 'warp-hr';
const client = new Warp({
apiKey: process.env['WARP_API_KEY'],
});
Provide credentials using the options below. Environment variables are read automatically when the target runtime supports them:
apiKey (env: WARP_API_KEY) — Credential for the apiKey scheme.
Calling operations
import Warp from 'warp-hr';
const client = new Warp({
apiKey: process.env['WARP_API_KEY'],
});
const list = await client.benefits.healthPlans.list({
statuses: ['active'],
});
console.log(list);
Method names, parameter shapes, and response types are generated from the API description — do not guess them. Look up the exact call signature in api.md before writing a call.
Error handling
Non-success responses throw generated API errors. Error objects expose status, headers, response body, and request metadata where the target runtime supports it.
import { APIError } from 'warp-hr';
try {
const list = await client.benefits.healthPlans.list({
statuses: ['active'],
});
} catch (err) {
if (err instanceof APIError) {
console.log(err.status, err.name, err.headers);
}
throw err;
}
Requirements
- Node.js 20+, a modern browser, or any runtime with
fetch support
Reference files
- README.md — full feature tour: client options, request options, retries and timeouts, logging.
- api.md — complete catalogue of every operation with request and response types.