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/sdk

Client

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.

hasMoreboolean

Whether another page is available.

fetchNext() => Promise<void>

Fetch the next page and append its results to results. Throws if hasMore is false.

EventResource

dataT

The 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.

On this page