Overview
The Bevor TypeScript SDK
The Bevor SDK provides a typed TypeScript client for security analyses, findings, remediations, and related workflows.
Installation
bun install @bevorai/sdkClient
import { BevorClient } from "@bevorai/sdk";
const client = new BevorClient({ apiKey: "YOUR_API_KEY" });
const analyses = await client.analyses.list();Expanded Types
Certain resources accept a withPagination or withStreaming option. If true is passed, the response extends the standard API response with added functionality, returning one of the SDK-only wrapper types below instead of the plain schema.
const analyses = await client.analyses.list({}, { withPagination: true });
const run = await client.analyses.run(analysisId, undefined, { withStreaming: true });PaginatedResource
resultsT[]Every item fetched so far, in the same shape as the underlying (non-paginated) response.
currentPagination<T>The most recently fetched page.
hasMorebooleanWhether another page is available.
fetchNext() => Promise<void>Fetch the next page and append its results to results. Throws if hasMore is false.
EventResource
dataTThe underlying data of the requested resource.
streamCompletion(options?: RequestOptions) => AsyncGenerator<E>Opens an SSE connection and yields typed events until the resource completes. As status events arrive, data is refreshed. Returns immediately if the resource has already completed.

