Client
new Lirovo(config) is the entry point. It takes a single config object, holds your API key, and exposes the schemas, destinations, and jobs resource sub-clients.
Configuration#
new Lirovo(config) takes a single config object. Only apiKey is required; every other field has a default. The key is sent on every request as Authorization: Bearer <apiKey>.
apiKeyrequiredYour Lirovo API key. Sent as Authorization: Bearer <apiKey> on every request.
baseUrlBase URL for the API. Defaults to https://api.lirovo.ai.
fetchA custom fetch implementation (for example a test stub, or a polyfill on runtimes without a global fetch).
headersExtra headers attached to every request.
credentialsDefault request credentials mode passed through to fetch.
import { Lirovo } from "@lirovo/sdk";
const lirovo = new Lirovo({
apiKey: process.env.LIROVO_API_KEY!,
// baseUrl defaults to https://api.lirovo.ai
});Behavior#
The constructor throws if apiKey is missing ([@lirovo/sdk] `apiKey` is required.). The resolved base URL is readable at lirovo.baseUrl, which is useful for logging and debugging.
The client exposes three resource sub-clients:
lirovo.schemasfor output schemas.lirovo.destinationsfor delivery destinations.lirovo.jobsfor extraction jobs.