JavaScript SDK
The
@rimora/velora package provides a fully-typed, ergonomic interface to the Velora Jobs API. Create, manage, and observe scheduled HTTP jobs without writing raw fetch calls or managing auth headers manually.TypeScript-firstComplete types for all requests, responses, and error shapes.
Node + BrowserWorks anywhere that provides a fetch implementation.
VeloraErrorTyped error class with HTTP status + server body for clean error handling.
HMAC signingBuilt-in computeHmacSignature utility for webhook payload verification.
Zero dependenciesNo runtime deps. Bring your own fetch (node-fetch, undici, native).
ESM + CJS friendlyESM build with postbuild import patching for broad Node.js compatibility.
Velora cron jobs now sign outgoing webhook payloads with `X-Hub-Signature-256`. Use `computeHmacSignature(secret, body)` to validate those requests when building webhook handlers.
Install
npm install @rimora/veloraQuick Start
import { VeloraClient } from '@rimora/velora'
import fetch from 'node-fetch'
const client = new VeloraClient({
apiKey: process.env.VELORA_API_KEY,
fetch: fetch as any // required in Node.js; omit in browsers
})
// List your first 10 jobs
const { jobs, total } = await client.listJobs({ limit: 10 })
console.log(`${total} total jobs:`, jobs)
// Create a job
const created = await client.createJob({
name: 'Daily digest',
target_url: 'https://yourapp.com/cron/daily',
method: 'POST',
schedule_cron: '0 9 * * 1-5',
timezone: 'America/New_York'
})
console.log('Created job id:', created.id)SDK Reference
All methods are async and return typed responses. Every non-2xx response throws a
VeloraError with a status code and body. See Error Handling for patterns.| Method | Description | Scope |
|---|---|---|
listJobs(params?) | List jobs with pagination and status filter | jobs:read |
createJob(payload) | Create a new scheduled HTTP job | jobs:create |
getJob(id) | Fetch a single job by ID | jobs:read |
updateJob(id, payload) | Update mutable job fields | jobs:update |
deleteJob(id) | Delete a job and its run history | jobs:delete |
pauseJob(id) | Pause a job | jobs:update |
resumeJob(id) | Resume a paused job | jobs:update |
triggerJob(id) | Manually trigger an immediate run | jobs:trigger |
enqueueJob(id) | Alias to triggerJob — enqueue an immediate run | jobs:trigger |
listJobRuns(id, params?) | List execution run history for a job | jobs:read |
getUsage() | Get usage counts and plan limits | jobs:read |
getPlan() | Get active subscription and plan details | any |
triggerWebhook(id, body?, opts?) | Trigger a public webhook (no auth needed) | none |
regenerateWebhookSecret(id) | Regenerate the webhook signing secret | jobs:write |
computeHmacSignature(secret, body) | Compute HMAC-SHA256 for webhook payloads | utility |
Guides
- Installation — Package setup, Node.js fetch, environment variables
- Configuration — All
ClientOptionsand environment variable support - Error Handling — Catching
VeloraError, error shapes, retry strategies
Node.js users: pass a fetch implementation via `options.fetch` (e.g. `node-fetch` or `undici`). The SDK will throw on construction if no fetch is available.