TypeScript SDK reference
Auto-generated symbol reference for @sonnylabs/sdk — every public class, method, options bag, error subclass, and helper, rendered from the JSDoc on the source.
This is the full symbol-by-symbol reference for the official Sonny Labs
TypeScript SDK (@sonnylabs/sdk).
Every page on this branch is generated at build time from the JSDoc on
the source under the npm package (@sonnylabs/sdk),
so it stays in lock-step with what npm install @sonnylabs/sdk actually
ships.
If you are integrating the SDK for the first time, start with the TypeScript quickstart — it walks through install, key minting, the first scan, error handling, idempotency, retries, self-hosted base URLs, and webhook verification with prose and copy-pasteable snippets. This reference is for looking up a specific symbol once you already know what you need.
Pages
SonnyLabsClient
The main API client — construction options, methods for the /v1/* surface, and the underlying openapi-fetch escape hatch.
SonnyLabsClientOptions
Constructor options bag — apiKey, baseUrl, apiVersion, timeoutMs, maxRetries, and the fetch / userAgent overrides.
Error classes
The typed error hierarchy that maps RFC 9457 problem+json envelopes onto subclasses by code namespace.
ProblemEnvelope
The duck-typed shape of an RFC 9457 application/problem+json body, plus per-field ProblemFieldError.
verifyWebhook
Constant-time HMAC verification helper for inbound webhook deliveries, plus VerifyWebhookOptions for tolerance and clock injection.
Webhooks
Verify Sonny Labs outbound webhook signatures (HMAC-SHA256 over {t}.{body}) using the helpers shipped in the Python and TypeScript SDKs.
SonnyLabsClient
The main @sonnylabs/sdk client class — constructor, scan methods, identity and API-key endpoints, and the underlying openapi-fetch escape hatch.