@meetreeve/sdk
v0.1.0
Published
Reeve server-side Node/TypeScript SDK.
Keywords
Readme
@meetreeve/sdk
Official server-side Node/TypeScript SDK for the Reeve API. Types are generated from the live OpenAPI catalog; auth, retries, and error normalization are a thin hand-written runtime on top.
Server-side only. It sends a host key, so never ship it to a browser.
Install
pnpm add @meetreeve/sdkQuickstart
import { ReeveClient, ReeveError } from "@meetreeve/sdk";
const client = new ReeveClient({ apiKey: process.env.REEVE_HOST_KEY! });
try {
const stats = await client.crm.GET("/api/crm/v1/stats");
console.log(stats);
} catch (err) {
if (err instanceof ReeveError) {
console.error(err.status, err.code, err.message, err.retryable);
}
}ReeveClient defaults baseUrl to https://api.meetreeve.com, sends
X-Reeve-Host-Key, retries 429/5xx with backoff (honoring Retry-After and the
error envelope's retryable flag), and normalizes every error shape the API
currently emits into a single ReeveError { status, code, message, retryable,
raw }.
Retries are gated by idempotency: GET/HEAD/PUT/DELETE/OPTIONS/TRACE
replay freely, while POST/PATCH replay only when you supply an
Idempotency-Key header — so a 5xx after the server already committed can't
silently duplicate a charge or a refund.
Products
One namespace per catalog group: ads, booking, channels, chat, coding,
commerce, comms, connects, credits, crm, database, dna, enrich,
knowledge, llm, maps, memory, performance, storage, studio,
video, voice.
await client.memory.GET("/api/memory/v1/namespaces");
await client.credits.GET("/api/v1/credits/org-pool");Known gap: not every response is typed
Paths, query params, and request bodies are fully typed. Success response
bodies are not, everywhere — where an upstream route has no declared response
schema the API publishes an empty one, and the generator can only render that as
unknown:
const { data } = await client.ads.GET("/api/ads/v1/campaigns", {
params: { query: { provider: "meta_ads" } },
});
// data: unknown — cast at the call site for nowCurrently affects roughly a third of success responses; ads, connects,
credits, and storage are entirely untyped, while booking, chat, coding,
dna, knowledge, performance, studio, and voice are fully typed. Being
fixed upstream — see the repo README for how to re-measure.
Source
MindFortressInc/reeve-sdks — see the repo README for the Python SDK, the spec drift gate, and how the generated code is produced.
