TypeScript plugin SDK

Development These docs follow the development version and change with every merge.

Last updated View as Markdown

This page shows how to write a Bookclerk plugin in TypeScript with @bookclerk/plugin-sdk (api_version = 3). A TypeScript plugin runs in a workerd isolate; bookclerk-workerd injects the SDK into the isolate under its package name, so your module imports it like any dependency.

Import What it holds
@bookclerk/plugin-sdk/workerd BookclerkEntrypoint and the named *Entrypoint bases (they extend WorkerEntrypoint)
@bookclerk/plugin-sdk The ABI types, codecs and the same author classes
@bookclerk/plugin-sdk/sparse-workerd Run a workerd plugin without a built host (smoke)

Install

Depend on the package from npm, a file: path or a workspace. Never import a relative path to the embed; the module name is what the host injects.

{
  "dependencies": {
    "@bookclerk/plugin-sdk": "file:../../packages/plugin-sdk"
  }
}

Author model

A plugin is a Workers-shaped module. The default export extends BookclerkEntrypoint and implements the triggers plugin.toml declares; every named entrypoint in entrypoints = [...] is an exported class with the matching name (storefront → Storefront, cli → Cli, …) extending its base:

plugin.toml Export Base class
[[events.consumers]] default BookclerkEntrypoint.event(batch)
[triggers] jobs = [...] default BookclerkEntrypoint.job(job)
[triggers] crons = [...] default BookclerkEntrypoint.scheduled(controller)
[[databases]] default BookclerkEntrypoint.databaseMigrations(binding)
entrypoints = ["storefront"] Storefront StorefrontEntrypoint
entrypoints = ["storage"] Storage StorageEntrypoint
entrypoints = ["remoteLibrary"] RemoteLibrary RemoteLibraryEntrypoint
entrypoints = ["databaseAdapter"] DatabaseAdapter DatabaseAdapterEntrypoint
entrypoints = ["cli"] Cli CliEntrypoint
entrypoints = ["oidc"] Oidc OidcEntrypoint
entrypoints = ["metadata"] Metadata MetadataEntrypoint
entrypoints = ["covers"] Covers CoverEntrypoint
entrypoints = ["metadataFiles"] MetadataFiles MetadataFilesEntrypoint
entrypoints = ["notifier"] Notifier NotifierEntrypoint
entrypoints = ["ingress"] Ingress IngressEntrypoint
entrypoints = ["ai"] Ai AiEntrypoint
import {
  BookclerkEntrypoint,
  CliEntrypoint,
  cliArgs,
  jsonPayload,
  type CliInvokeParams,
  type EventBatch,
} from "@bookclerk/plugin-sdk/workerd";
import type { Env } from "./bookclerk-configuration.js";

export class Cli extends CliEntrypoint<Env> {
  async describe() {
    return { commands: [{ name: "ping", about: "Probe", args: [] }] };
  }
  async invoke(params: CliInvokeParams) {
    const { message = "hi" } = cliArgs(params);
    return { exitCode: 0, stdout: `pong: ${message}\n`, stderr: "", payload: jsonPayload({ pong: message }) };
  }
}

export default class MyPlugin extends BookclerkEntrypoint<Env> {
  async event(batch: EventBatch) {
    for (const msg of batch.messages) {
      if (msg.type !== "book_acquired") {
        msg.reject(`unexpected ${msg.type}`);
        continue;
      }
      await this.env.EVENTS.publish({ eventType: "echo_seen", payload: msg.body });
      msg.ack();
    }
  }
}

Identity (apiVersion, id, capabilities) comes from plugin.toml; an optional describe() on the default export only refines displayName and similar fields.

A database adapter runs each host batch through executeAdapterBatch or executeAdapterBatchStreamed, which stores the guest's replay receipt before COMMIT and, for a streamed reply, rolls back when the frames do not fit one scalar or the adapter's advertised streamed budget (executeStreamLimits(caps)) (see Isolate adapter batches).

Triggers

  • event(batch) mirrors Workers queue(batch). Each EventMessage records exactly one outcome, ack(), retry({ retryAt | delaySeconds, reason }), reject(reason), deadLetter(reason) or suspend({ checkpoint, wakeAt, wakeOnEventType, wakeOnFilter }), and the first call wins. Untouched messages ack when the handler returns and retry when it throws.
  • job(job) mirrors Workers scheduled(controller). Return (optionally { message, bytesCopied }) to complete, throw to reject (unavailable and deadline_exceeded errors are retryable, cancelled is cancelled), or call job.suspend({ checkpoint, wakeAt }) or job.retryLater({ retryAt, reason }). job.input, job.output, job.progress() and job.signal expose the granted streams and host cancellation.

The env bindings

The host grants bindings per invocation on this.env: CONFIG ([vars] plus operator settings), SECRETS ([secrets]), EVENTS ([[events.producers]]), WORK_FS ([work_fs]), and one DatabaseBinding per [[databases]] entry under its binding name. A binding's limits() returns the DbCapabilities its session negotiated (maxRequestBytes, maxStatements, maxResultBytes, maxResultRows, …); a request or result over one of them rejects with a PluginError whose code is limit_exceeded and whose limit names the cap. On a host that predates limits() the call rejects with unsupported. all() reads through the session's streamed budget when it advertises one, prepare(sql).iterate() yields rows one at a time from the same read, db.chunk(statements) splits a long list into batches that each fit one request, and db.writeChunks(...) commits those batches resumably; see Working within database limits. A storefront's scan can hand its paging to scanPage(params, fetch), which slices the store's own pages into replies the host accepts; see Paged scans. A relay [ingress] plugin also gets ORIGIN while it is the active ingress; ORIGIN.fetch(request, { clientAddress }) hands one request to the library (see Public addresses). Generate the Env type from plugin.toml:

npx bookclerk-plugin types .            # writes bookclerk-configuration.d.ts
npx bookclerk-plugin types . --out src/env.d.ts

Pushed sockets

A plugin that declares [sockets] (see Pushed sockets) gets this.env.SOCKETS, shaped like Durable Objects' hibernatable WebSockets. The host holds the connection, so the plugin may sleep between messages, and each message reaches the default entrypoint's webSocketMessage:

export default class Plugin extends BookclerkEntrypoint<Env> {
  async scheduled() {
    if ((await this.env.SOCKETS.getWebSockets()).length > 0) return;
    await this.env.SOCKETS.connect("wss://abs.example.com/socket.io/?EIO=4&transport=websocket", {
      headers: { Authorization: `Bearer ${this.env.SECRETS.token}` },
      autoResponses: [{ request: "2", response: "3" }], // answered without waking the plugin
      attachment: { library: "main" },
    });
  }

  async webSocketMessage(ws: HostWebSocket, message: string | ArrayBuffer) {
    const { library } = ws.deserializeAttachment() as { library: string };
    // …
  }

  async webSocketClose(ws: HostWebSocket, code: number, reason: string, wasClean: boolean) {}
}

Text arrives as a string and binary as an ArrayBuffer. ws.send, ws.close and ws.serializeAttachment act on the host's socket; the attachment is JSON of at most 2 KiB, kept for the socket's life, so the handler doesn't depend on memory a restart would lose. Without a webSocketMessage handler the host is told the plugin has none; without webSocketClose, closes are ignored.

A remote library whose message announced a new user returns { pollEvents: true } from webSocketMessage, and the host calls pollEvents right away instead of at its next scheduled poll.

Inbound webhooks

A plugin that declares [[webhooks]] (see Inbound webhooks) gets this.env.WEBHOOKS, read like a pulled Workers Queue. Hand url(name) to the outside service, then pull what it sent:

export default class Plugin extends BookclerkEntrypoint<Env> {
  async scheduled() {
    const { messages, missed } = await this.env.WEBHOOKS.pull("events", { batchSize: 50 });
    if (missed) await this.relist(); // requests expired unread: resynchronize
    for (const message of messages) {
      await this.handle(JSON.parse(new TextDecoder().decode(message.body)));
    }
    await this.env.WEBHOOKS.ack("events", { acks: messages.map((m) => m.leaseId) });
  }

  // Optional: called on a running plugin as soon as a request is stored.
  async webhookDelivered({ name, waiting }: WebhookDeliveredEvent) {}
}

url resolves to null when the library has no public https address or webhooks are off. Each message has leaseId, timestamp (a Date), attempts, headers (lowercase names) and body (Uint8Array); leases not acknowledged in time come back on a later pull.

Network grant

this.env.NETWORK is the grant in effect (see Network grant). A setting whose destination still awaits approval shows state: "pending", and a refused fetch() answers 403 with an x-bookclerk-error: network_not_granted header:

const row = this.env.NETWORK?.settings.find((s) => s.key === "server_url");
if (row?.state === "pending") {
  throw new Error(`Approve ${row.destination} on the plugin's consent form`);
}
const res = await fetch(`${this.env.CONFIG.server_url}/api/libraries`);
if (res.headers.get("x-bookclerk-error") === "network_not_granted") {
  // The grant does not cover it: report it, don't retry.
}

Testing database code

createTestDatabase() from @bookclerk/plugin-sdk/testkit gives a Node test suite the same binding a host grants, served by the bookclerk-db-testkit executable under one capability profile with the plugin's databaseMigrations applied. bookclerk-plugin test . runs the suite once per profile (first-party, d1 and minimum), so code that passes on the shipped adapters is also proven against D1's caps and the smallest advertisement a host accepts:

import { createTestDatabase } from "@bookclerk/plugin-sdk/testkit";

const db = await createTestDatabase({ migrations: MIGRATIONS }); // profile from `bookclerk-plugin test`
try {
  await addNotes(db.binding, ["hello"]);
} finally {
  await db.close();
}

The echo_workerd_ts example (examples/plugins-echo-workerd-ts/) is a worked plugin: a notes table it writes with chunk(), lists with iterate() or key-paged reads, sizes with limits(), and tests under every profile. See Testing against the limits.

Author tools

npx bookclerk-plugin check .
npx bookclerk-plugin types [dir] [--out <file>]
npx bookclerk-plugin fmt [--check] plugin.toml
npx bookclerk-plugin package --out dist/plugins .
npx bookclerk-plugin smoke .   # download the pinned workerd, then describe + health

check enforces the v3 author model: the main module imports the SDK, does not reference the removed BookclerkPlugin base, and exports one class per named entrypoint.

smoke does not need a built bookclerk-workerd. It downloads the pinned Cloudflare workerd into ~/.cache/bookclerk/workerd (override with BOOKCLERK_WORKERD_CACHE or BOOKCLERK_WORKERD_BIN).

Next steps

Reference

The sections below are generated from the SDK's source: one page per module, and what the package root exports.

Modules

@bookclerk/plugin-sdk — ABI types + workerd author runtime + tools.

Package root re-exports the workerd BookclerkEntrypoint base, the named *Entrypoint bases, and the camelCase ABI types from generated.ts. Prefer the dedicated subpath imports when writing guests:

  • Workerd: import { BookclerkEntrypoint } from "@bookclerk/plugin-sdk/workerd"
  • Native: Rust serve / PluginWorker
  • Tools: npx bookclerk-plugin check|fmt|types|package
  • Sparse workerd: import { runSmoke } from "@bookclerk/plugin-sdk/sparse-workerd"

See docs/plugins/README.md and docs/contributing/code-documentation.md.

Classes

ExecuteStreamDecoder

Sans-IO decoder of a streamed execute reply: feed it bytes in any split, then take the reassembled ExecuteReply.

It fails closed on more raw bytes than the budget allows, on a statement with more rows than the row cap, and on any frame out of sequence.

Constructors

Constructor
new ExecuteStreamDecoder(limits, options?): ExecuteStreamDecoder;
Parameters
Parameter Type Description
limits ExecuteStreamLimits Budget the stream is held to.
options? { retainRows?: boolean; } retainRows: false counts rows against the budget but drops them from the collected reply (for iterate()).
options.retainRows? boolean -
Returns

ExecuteStreamDecoder

Accessors

columns
Get Signature
get columns(): DbColumn[];

Columns of the statement whose rows are arriving.

Returns

DbColumn[]

The open statement's columns, or an empty list between statements.

finished
Get Signature
get finished(): boolean;

Whether the final frame (end or err) has been decoded.

Returns

boolean

True once the stream is complete.

Methods

finish()
finish(): ExecuteReply;

Takes the reassembled reply once the stream has ended.

Returns

ExecuteReply

The reply the frames described.

Throws

The adapter's PluginError when the stream ended with err, and unavailable when it ended before its final frame.

push()
push(bytes): ExecuteStreamFrame[];

Feeds the next bytes of the stream.

Parameters
Parameter Type Description
bytes Uint8Array Any slice of the frame sequence.
Returns

ExecuteStreamFrame[]

The frames completed by these bytes, in order.

Throws

PluginError limit_exceeded when the stream exceeds the byte or row budget, invalid_params when a frame is malformed or out of sequence or bytes follow the final frame.


PluginError

Thrown by the SDK when a wire union carries err. Unknown codes are kept.

Extends

  • Error

Extended by

Constructors

Constructor
new PluginError(
   code, 
   message, 
   details?
): PluginError;
Parameters
Parameter Type Description
code string Wire error code.
message string Operator-facing error text.
details? string | Readonly<Record<string, unknown>> Detail object, or its JSON text as carried on the wire.
Returns

PluginError

Overrides

Error.constructor

Properties

code
readonly code: string;

Known PluginErrorCode wire string, or unknown.

details
readonly details: Readonly<Record<string, unknown>> | undefined;

Structured detail object from the wire (details JSON), when the error carries one.

wireCode
readonly wireCode: string;

Raw wire code, including codes this SDK does not know.

Accessors

detailsText
Get Signature
get detailsText(): string;

details as the JSON text the wire carries.

Returns

string

JSON object text, or an empty string when the error has none.

limit
Get Signature
get limit(): LimitExceeded | undefined;

The exceeded cap when this is a limit_exceeded error.

Returns

LimitExceeded | undefined

The cap from details first, then from the canonical message; undefined for every other code.

Methods

fromWire()
static fromWire(
   code, 
   message, 
   details?
): PluginError;

Construct a PluginError from a Cap'n Proto / JSON wire code.

Unknown codes become unknown on PluginError.code while PluginError.wireCode keeps the raw value.

Parameters
Parameter Type Default value Description
code string undefined Wire error code (known or unknown).
message string undefined Operator-facing error text.
details? string "" details JSON text from the wire (empty when none).
Returns

PluginError

Typed plugin error.

limitExceeded()
static limitExceeded(limit): PluginError;

Builds a limit_exceeded error whose message and details both carry the exceeded cap.

Parameters
Parameter Type Description
limit LimitExceeded Exceeded cap.
Returns

PluginError

Typed plugin error.

Interfaces

AdapterBatchOptions

Options shared by the batch runners.

Extended by

Properties

timingSource
timingSource: string;

Observability source on the reply timing (for example sqlite_txn).


AdapterBatchRequest

The parts of an AdapterExecuteRequest the batch runner reads.

Properties

operationId
operationId: string;

Host-chosen idempotency key, echoed on the reply and keyed on the receipt.

receipt
receipt: AdapterReceipt;

Receipt hint; guestLen 0 means the batch carries no guest receipt.

statements
statements: AdapterBatchStatement[];

Wrapped statements in execution order (proofs are not read).


AdapterBatchStreamedOptions

Options of executeAdapterBatchStreamed.

Extends

Properties

limits
limits: ExecuteStreamLimits;

The streamed budget this adapter advertises (executeStreamLimits(caps)); the host decodes the reply under it.

timingSource
timingSource: string;

Observability source on the reply timing (for example sqlite_txn).

Inherited from

AdapterBatchOptions.timingSource


AdapterTransaction

One open transaction on the adapter's engine.

The runner calls run once per statement in order, including the finalize statements it adds (canonical SQL with ? placeholders, lowered by the adapter like any other statement), then commit, or rollback when any step failed.

Methods

commit()
commit(): Promise<void>;

Commits the transaction.

Returns

Promise<void>

Resolves once the batch is durable.

rollback()
rollback(): Promise<void>;

Rolls the transaction back.

Returns

Promise<void>

Resolves once nothing of the batch remains.

run()
run(statement): Promise<StatementResult>;

Runs one statement inside the transaction.

Parameters
Parameter Type Description
statement AdapterBatchStatement Canonical statement to lower and execute.
Returns

Promise<StatementResult>

The statement's result (rows only when resultSelection is rows).


ExecuteStreamLimits

What a receiver lets a streamed reply grow to.

Properties

bytesLimit
bytesLimit: "maxStreamedResultBytes" | "maxAtomicResultBytes";

Capability field maxBytes came from, for the error it raises.

maxBytes
maxBytes: number;

Encoded reply budget in bytes (0 = only the framing slack).

maxRows
maxRows: number;

Rows one statement may return (0 = unlimited).

rowsLimit
rowsLimit: "maxStreamedResultRows" | "maxResultRows";

Capability field maxRows came from, for the error it raises.


LimitExceeded

A negotiated SQL-v1 cap that a request or its result exceeded (limit_exceeded errors).

Properties

cap
cap: number;

The negotiated cap.

limit
limit: string;

Capability field name as advertised (maxResultBytes, maxRequestBytes, ...).

used
used: number;

The observed value that exceeded cap.


OriginBinding

env.ORIGIN: the library as a relay ingress plugin reaches it. The host serves each request on public https (never as loopback) with the client address the plugin reports.

Methods

fetch()
fetch(request, options?): Promise<Response>;

Serves one request through the library.

Only the path and query of request.url are sent; the library answers on its own public origin. Connection headers (connection, upgrade, ...) and forwarding headers (host, x-forwarded-*, forwarded, x-real-ip) are dropped.

Parameters
Parameter Type Description
request Request The request the provider delivered.
options? OriginFetchOptions The client address, when the provider reports one.
Returns

Promise<Response>

The library's response; its body streams.

Throws

invalid_params for a request the host refuses (bad method, target or headers past maxOriginHeaders / maxOriginHeaderBytes); unavailable when the library cannot serve.


OriginFetchOptions

Options for one OriginBinding.fetch.

Properties

clientAddress?
clientAddress?: string;

IP address of the client from the provider's own connection metadata (for example cf-connecting-ip on a Cloudflare relay). Omit it when the provider gives none; never take it from a header the client controls.


OriginTransport

The adapter's origin grant, as the author isolate reaches it. Never throws: every failure comes back as err.

Methods

fetch()
fetch(head, body): Promise<OriginTransportReply>;

Hand one request to the library.

Parameters
Parameter Type Description
head OriginRequest Method, origin-form target, header fields and client address.
body ReadableStream<Uint8Array<ArrayBufferLike>> | null Request body; null when the request has none.
Returns

Promise<OriginTransportReply>

The library's response or a typed failure.


OriginTransportResponse

One library response as the transport hands it to the author isolate.

Extends

  • OriginResponseHead

Properties

body
body: ReadableStream<Uint8Array<ArrayBufferLike>> | null;

Response body; null when the response has none.

headers
headers: OriginHeader[];

Response header fields in order; repeated names stay separate.

Inherited from

OriginResponseHead.headers

status
status: number;

HTTP status code, 100 to 599.

Inherited from

OriginResponseHead.status


StorePage

One page of a storefront's own library listing, as the plugin fetched it.

Properties

books
books: ScanBook[];

Titles on this store page, in the store's order; any number of them.

complete?
complete?: boolean;

On the last store page: whether the pass listed every title the account holds (a full pass). Ignored on earlier pages.

next?
next?: string;

The storefront's own cursor for the store page after this one; empty or absent when this is the last store page.

removed?
removed?: string[];

Product ids gone from the account since ScanParams.syncToken, on a delta pass only; any number of them.

storePages?
storePages?: number;

Storefront requests this fetch took; 1 when absent.

syncToken?
syncToken?: string;

On the last store page: the token the host sends as ScanParams.syncToken on the account's next pass. Ignored on earlier pages.

Type Aliases

AdapterBatchStatement

type AdapterBatchStatement = Pick<AdapterStatement, "sql" | "parameters" | "kind" | "maxRows" | "resultSelection">;

The parts of an AdapterStatement an adapter executes.


FetchStorePage

type FetchStorePage = (storeCursor, params) => Promise<StorePage>;

Fetches one store page.

Parameters

Parameter Type Description
storeCursor string The storefront's own cursor: empty for the first store page of a pass, otherwise a StorePage.next it returned.
params ScanParams The scan call's params (account, credential, sync token).

Returns

Promise<StorePage>

That store page.


OriginTransportReply

type OriginTransportReply = 
  | {
  ok: OriginTransportResponse;
}
  | {
  err: {
     code: string;
     message: string;
  };
};

One transport answer: the library's response, or a typed failure.

Variables

GUEST_READ_ONLY_REPLAY_PAYLOAD

const GUEST_READ_ONLY_REPLAY_PAYLOAD: "{\"readOnly\":true}" = '{"readOnly":true}';

Payload stored for a read-only guest batch instead of its rows: reads are not gated, so they run again on replay and need no recorded result.


GUEST_RECEIPT_CLAIM_LOST

const GUEST_RECEIPT_CLAIM_LOST: "guest receipt claimed by a concurrent attempt; retry to replay it" = "guest receipt claimed by a concurrent attempt; retry to replay it";

unavailable message when a concurrent attempt committed the receipt between this attempt's prior-receipt SELECT and its stub INSERT.


GUEST_RECEIPT_RESULT_LOST

const GUEST_RECEIPT_RESULT_LOST: "guest receipt committed without payload; original response lost" = "guest receipt committed without payload; original response lost";

Error text when a receipt committed but the reply it should hold was lost.


GUEST_RECEIPT_STUB_SUFFIX

const GUEST_RECEIPT_STUB_SUFFIX: 1 = 1;

Receipt stub INSERT after the guest statements.


GUEST_RECEIPT_WRAP_PREFIX

const GUEST_RECEIPT_WRAP_PREFIX: 2 = 2;

Prune + prior-receipt SELECT statements ahead of the guest statements.


GUEST_REPLAY_PAYLOAD_MAX_BYTES

const GUEST_REPLAY_PAYLOAD_MAX_BYTES: 65536 = 65536;

Largest replay payload, in UTF-8 bytes, a receipt stores for a write batch.


STREAM_FRAME_TARGET_BYTES

const STREAM_FRAME_TARGET_BYTES: number;

Encoded size an encoder aims for per rows frame (one wider row may exceed it).

Functions

collectExecuteStream()

function collectExecuteStream(chunks, limits): Promise<ExecuteReply>;

Collects an async chunk source into one reply under limits.

Parameters

Parameter Type Description
chunks AsyncIterable<Uint8Array<ArrayBufferLike>> Frame bytes as the transport delivers them.
limits ExecuteStreamLimits Budget the stream is held to.

Returns

Promise<ExecuteReply>

The reassembled reply.


decodeExecuteStream()

function decodeExecuteStream(bytes, limits): ExecuteReply;

Decodes a whole frame sequence under limits.

Parameters

Parameter Type Description
bytes Uint8Array Every frame, concatenated.
limits ExecuteStreamLimits Budget the stream is held to.

Returns

ExecuteReply

The reassembled reply.

Throws

See ExecuteStreamDecoder.push and ExecuteStreamDecoder.finish.


encodeExecuteStream()

function encodeExecuteStream(
   reply, 
   frameTargetBytes?, 
   maxBytes?
): Uint8Array;

Frames reply as the byte sequence executeStreamed answers: head, each statement with its rows split near frameTargetBytes, then end. A slice whose frame still exceeds one scalar is halved until each frame fits or holds one row.

Parameters

Parameter Type Default value Description
reply ExecuteReply undefined The committed reply.
frameTargetBytes? number STREAM_FRAME_TARGET_BYTES Estimated encoded size to aim for per rows frame.
maxBytes? number Number.POSITIVE_INFINITY Stop as soon as the frames pass this many bytes.

Returns

Uint8Array

Every frame, concatenated.

Throws

PluginError limit_exceeded (maxScalarBytes) when the frames pass maxBytes.


executeAdapterBatch()

function executeAdapterBatch(
   request, 
   begin, 
   options
): Promise<ExecuteReply>;

Runs one host batch in a transaction and commits it with its replay receipt.

Parameters

Parameter Type Description
request AdapterBatchRequest The adapter request (execute).
begin () => Promise<AdapterTransaction> Opens a transaction on the adapter's engine.
options AdapterBatchOptions Timing source.

Returns

Promise<ExecuteReply>

The committed reply, wrap statements included (the host unwraps it).

Throws

Whatever a statement, the finalize or commit raised, after the transaction was rolled back; PluginError unavailable when a prior receipt committed without its reply.


executeAdapterBatchStreamed()

function executeAdapterBatchStreamed(
   request, 
   begin, 
   options
): Promise<Uint8Array<ArrayBufferLike>>;

Runs one host batch for executeStreamed and commits it only when the host can receive its frames.

The frames are encoded inside the transaction. Encoding stops with limit_exceeded (maxScalarBytes) as soon as they pass one invoke scalar, the finished frames are decoded under options.limits the way the host decodes them, and the reassembled reply's encoded size is held to options.limits.maxBytes the way the host validates it (the decoder alone allows framing slack past the budget). Any failure rolls the batch back, so nothing commits that the host would refuse.

Parameters

Parameter Type Description
request AdapterBatchRequest The adapter request (executeStreamed).
begin () => Promise<AdapterTransaction> Opens a transaction on the adapter's engine.
options AdapterBatchStreamedOptions Timing source and the advertised streamed budget.

Returns

Promise<Uint8Array<ArrayBufferLike>>

Every frame of the committed reply, concatenated.

Throws

PluginError limit_exceeded when the frames do not fit one scalar or the budget, or whatever executeAdapterBatch throws.


executeStreamLimits()

function executeStreamLimits(caps): ExecuteStreamLimits;

The streamed budget of caps, or its inline caps when the session does not stream.

Parameters

Parameter Type Description
caps DbCapabilities Session capabilities (limits()).

Returns

ExecuteStreamLimits

Limits for an ExecuteStreamDecoder.


guestBatchIsReadOnly()

function guestBatchIsReadOnly(statements, guestLen): boolean;

True when every guest statement inside the receipt wrap is a SELECT.

An empty or out-of-range guest slice is not read-only, so a write batch never skips its replay payload.

Parameters

Parameter Type Description
statements readonly Pick<AdapterBatchStatement, "kind">[] The wrapped statements.
guestLen number Guest statement count from the receipt hint.

Returns

boolean

Whether the batch only reads.


guestReceiptFinalizeStatements()

function guestReceiptFinalizeStatements(
   partial, 
   guestLen, 
   guestHash, 
   readOnly
): AdapterBatchStatement[];

Statements that persist the guest reply on the claimed receipt.

Empty when the prior receipt already holds a payload, belongs to a different request (the host reports the conflict), or is an in-flight claim whose stub this attempt did not insert.

Parameters

Parameter Type Description
partial ExecuteReply The wrapped reply so far (prefix, guest and stub results).
guestLen number Guest statement count from the receipt hint.
guestHash string Guest requestHash from the receipt hint.
readOnly boolean Whether the guest slice only reads (guestBatchIsReadOnly).

Returns

AdapterBatchStatement[]

The finalize statements to run before COMMIT.

Throws

PluginError unavailable when a prior receipt committed without its reply, internal when the wrap shape is malformed or the payload is over GUEST_REPLAY_PAYLOAD_MAX_BYTES.


guestReplayPayload()

function guestReplayPayload(reply): string;

The replay payload for a guest reply: the JSON envelope the host decodes, {"operation_id", "statements", "timing"} with each value in the host's serde form.

Parameters

Parameter Type Description
reply ExecuteReply The guest slice of the reply.

Returns

string

The payload text.

Throws

PluginError internal when a cell does not encode or the payload is over GUEST_REPLAY_PAYLOAD_MAX_BYTES.


limitExceededMessage()

function limitExceededMessage(limit): string;

Canonical message for a limit error: limit exceeded: maxResultBytes is 262144; used 300000.

Parameters

Parameter Type Description
limit LimitExceeded Exceeded cap.

Returns

string

Message text the host and every SDK parse back with parseLimitExceeded.


parseLimitExceeded()

function parseLimitExceeded(message): LimitExceeded | undefined;

Parses a message produced by limitExceededMessage, possibly wrapped in further text.

Parameters

Parameter Type Description
message string Error text.

Returns

LimitExceeded | undefined

The exceeded cap, or undefined when the text is not a limit error.


rawStreamCeiling()

function rawStreamCeiling(limits): number;

Raw frame bytes a receiver accepts before failing closed: the reply budget plus one eighth for frame headers and one window of slack.

Parameters

Parameter Type Description
limits ExecuteStreamLimits Budget.

Returns

number

Byte ceiling on the whole frame sequence and on any one frame.


requirePluginMigrationRegistration()

function requirePluginMigrationRegistration(migrations): PluginMigration[];

Rejects a plugin migration registration that exceeds ABI resource limits.

Parameters

Parameter Type Description
migrations PluginMigration[] Ordered databaseMigrations registration.

Returns

PluginMigration[]

The same array when within limits.

Throws

Error with code / wireCode payload_too_large when a limit is exceeded.


runAdapterBatch()

function runAdapterBatch(
   request, 
   txn, 
   options
): Promise<ExecuteReply>;

Runs the wrapped statements and the receipt finalize on an open transaction, without committing.

After the prior-receipt SELECT, a completed receipt for this operation skips the remaining guest work (its results are padded so the wrap shape stays intact) and the host replays the stored reply.

Parameters

Parameter Type Description
request AdapterBatchRequest The adapter request.
txn Pick<AdapterTransaction, "run"> The open transaction.
options AdapterBatchOptions Timing source.

Returns

Promise<ExecuteReply>

The reply to deliver once the transaction commits.

Throws

PluginError unavailable when a prior receipt committed without its reply, internal when the wrap shape is malformed or the payload is over GUEST_REPLAY_PAYLOAD_MAX_BYTES, invalid_params when a result cell is not a valid DbValue, or whatever run threw.


scanPage()

function scanPage(params, fetchStorePage): Promise<ScanPage>;

Answers one scan call from the storefront's own pages.

Fetches the store page params.cursor names and returns at most MAX_SCAN_PAGE_BOOKS of its titles and removed ids. A store page larger than that is returned over several calls, each fetching it again. The pass ends on the last slice of the store page whose StorePage.next is empty, which carries that page's syncToken and complete.

Parameters

Parameter Type Description
params ScanParams The scan call's params.
fetchStorePage FetchStorePage Fetches one store page.

Returns

Promise<ScanPage>

The reply for this call.

Example

scan(params: ScanParams): Promise<ScanPage> {
  return scanPage(params, async (storeCursor) => {
    const page = Number(storeCursor || "1");
    const listing = await this.library(params.accountId, page);
    return {
      books: listing.items.map(toScanBook),
      next: listing.hasMore ? String(page + 1) : "",
      complete: true,
    };
  });
}

Throws

PluginError invalid_cursor when the cursor was not written by this helper or no longer fits the store page (the store changed mid-pass), so the host restarts the pass; internal when a store cursor is too long for a scan cursor.


shouldSkipRemainingGuestWork()

function shouldSkipRemainingGuestWork(
   results, 
   total, 
   guestHash
): boolean;

True when the prefix results show a completed prior receipt, so the guest statements must not run again.

An in-flight claim with the same hash and a read-only receipt with the same hash do not skip; a receipt with a different hash does (the host reports the conflict).

Parameters

Parameter Type Description
results readonly StatementResult[] Results so far.
total number Wrapped statement count.
guestHash string Guest requestHash from the receipt hint.

Returns

boolean

Whether to pad the remaining results instead of running them.


streamsResults()

function streamsResults(caps): boolean;

True when caps advertises a streamed result budget.

Parameters

Parameter Type Description
caps DbCapabilities Session capabilities (limits()).

Returns

boolean

Whether executeStreamed is worth calling on this session.

References

Abridgement

Re-exports Abridgement


AccountCredential

Re-exports AccountCredential


AdapterDatabaseSession

Re-exports AdapterDatabaseSession


AdapterEnv

Re-exports AdapterEnv


AdapterExecuteRequest

Re-exports AdapterExecuteRequest


AdapterReceipt

Re-exports AdapterReceipt


AdapterSessionReply

Re-exports AdapterSessionReply


AdapterStatement

Re-exports AdapterStatement


AiBinding

Re-exports AiBinding


AiEmbedText

Re-exports AiEmbedText


AiEntrypoint

Re-exports AiEntrypoint


AiInput

Re-exports AiInput


AiModel

Re-exports AiModel


AiModelList

Re-exports AiModelList


AiModels

Re-exports AiModels


AiModelsReply

Re-exports AiModelsReply


AiOutput

Re-exports AiOutput


AiRunner

Re-exports AiRunner


AiRunOk

Re-exports AiRunOk


AiRunParams

Re-exports AiRunParams


AiRunReply

Re-exports AiRunReply


AiTask

Re-exports AiTask


AiTextEmbeddingsInput

Re-exports AiTextEmbeddingsInput


AiTextEmbeddingsOutput

Re-exports AiTextEmbeddingsOutput


AiTextEmbeddingsRequest

Re-exports AiTextEmbeddingsRequest


AiTextEmbeddingsResponse

Re-exports AiTextEmbeddingsResponse


AiTextRole

Re-exports AiTextRole


allowedEntrypointFamilies

Re-exports allowedEntrypointFamilies


AtomicTransport

Re-exports AtomicTransport


AuthenticateUserParams

Re-exports AuthenticateUserParams


AuthorStub

Re-exports AuthorStub


Bindings

Re-exports Bindings


BookclerkEntrypoint

Re-exports BookclerkEntrypoint


BookclerkEnv

Re-exports BookclerkEnv


Brand

Re-exports Brand


ByteRange

Re-exports ByteRange


ByteSource

Re-exports ByteSource


Cancellation

Re-exports Cancellation


CancelledOutcome

Re-exports CancelledOutcome


CancelWatchLike

Re-exports CancelWatchLike


canonicalExecuteRequestHash

Re-exports canonicalExecuteRequestHash


CatalogCapabilities

Re-exports CatalogCapabilities


CatalogDetail

Re-exports CatalogDetail


CatalogDetailParams

Re-exports CatalogDetailParams


CatalogDetailReply

Re-exports CatalogDetailReply


CatalogField

Re-exports CatalogField


CatalogHit

Re-exports CatalogHit


CatalogHits

Re-exports CatalogHits


CatalogHitsReply

Re-exports CatalogHitsReply


CatalogSort

Re-exports CatalogSort


ChangesPage

Re-exports ChangesPage


ChangesReply

Re-exports ChangesReply


ChangesRequest

Re-exports ChangesRequest


ChapterKind

Re-exports ChapterKind


ChapterMarker

Re-exports ChapterMarker


Checkpoint

Re-exports Checkpoint


chunkIndexes

Re-exports chunkIndexes


CliArg

Re-exports CliArg


CliArgKind

Re-exports CliArgKind


cliArgs

Re-exports cliArgs


CliArgSpec

Re-exports CliArgSpec


CliCommandSpec

Re-exports CliCommandSpec


CliEntrypoint

Re-exports CliEntrypoint


CliInvokeParams

Re-exports CliInvokeParams


CliInvokeReply

Re-exports CliInvokeReply


CliInvokeResult

Re-exports CliInvokeResult


CliSchema

Re-exports CliSchema


CliSchemaReply

Re-exports CliSchemaReply


ColumnReference

Re-exports ColumnReference


CompletedOutcome

Re-exports CompletedOutcome


ConfigOption

Re-exports ConfigOption


ConfigOptionValue

Re-exports ConfigOptionValue


ContentSource

Re-exports ContentSource


CopyReply

Re-exports CopyReply


CopyResult

Re-exports CopyResult


CoverCondition

Re-exports CoverCondition


CoverEntrypoint

Re-exports CoverEntrypoint


CoverFetcher

Re-exports CoverFetcher


CoverFetchParams

Re-exports CoverFetchParams


CoverImage

Re-exports CoverImage


CoverImages

Re-exports CoverImages


CoverImagesReply

Re-exports CoverImagesReply


createDatabaseBinding

Re-exports createDatabaseBinding


CreateTableSchema

Re-exports CreateTableSchema


Credit

Re-exports Credit


CreditLevel

Re-exports CreditLevel


CreditRole

Re-exports CreditRole


D1ExecResult

Re-exports D1ExecResult


D1Meta

Re-exports D1Meta


D1Result

Re-exports D1Result


Database

Re-exports Database


DatabaseAdapterConfig

Re-exports DatabaseAdapterConfig


DatabaseAdapterEntrypoint

Re-exports DatabaseAdapterEntrypoint


DatabaseBinding

Re-exports DatabaseBinding


DatabaseBindingOptions

Re-exports DatabaseBindingOptions


dataMigrationOp

Re-exports dataMigrationOp


DbBootstrap

Re-exports DbBootstrap


DbBootstrapReply

Re-exports DbBootstrapReply


DbCapabilities

Re-exports DbCapabilities


DbCapabilitiesReply

Re-exports DbCapabilitiesReply


DbColumn

Re-exports DbColumn


DbResultSelection

Re-exports DbResultSelection


DbRow

Re-exports DbRow


DbStatement

Re-exports DbStatement


DbStatementKind

Re-exports DbStatementKind


DbTiming

Re-exports DbTiming


DbType

Re-exports DbType


DbValue

Re-exports DbValue


decodeDbCapabilitiesReply

Re-exports decodeDbCapabilitiesReply


decodeDbValue

Re-exports decodeDbValue


decodeExecuteRequest

Re-exports decodeExecuteRequest


decodeExecuteResultReply

Re-exports decodeExecuteResultReply


decodeExtensibleConfig

Re-exports decodeExtensibleConfig


DeleteManyReply

Re-exports DeleteManyReply


DeleteManyResult

Re-exports DeleteManyResult


DeliveredCheckpoint

Re-exports DeliveredCheckpoint


DescribeReply

Re-exports DescribeReply


Destination

Re-exports Destination


DiagnoseReply

Re-exports DiagnoseReply


DiagnoseResult

Re-exports DiagnoseResult


DomainEvent

Re-exports DomainEvent


EmptyReply

Re-exports EmptyReply


encodeDbCapabilitiesReply

Re-exports encodeDbCapabilitiesReply


encodeDbValue

Re-exports encodeDbValue


encodeExecuteRequest

Re-exports encodeExecuteRequest


encodeExecuteResultReply

Re-exports encodeExecuteResultReply


Entrypoint

Re-exports Entrypoint


ENTRYPOINT_BINDINGS

Re-exports ENTRYPOINT_BINDINGS


ENTRYPOINT_CLASSES

Re-exports ENTRYPOINT_CLASSES


EntrypointName

Re-exports EntrypointName


Entrypoints

Re-exports Entrypoints


EntrypointsReply

Re-exports EntrypointsReply


EventAck

Re-exports EventAck


EventBatch

Re-exports EventBatch


EventBatchReply

Re-exports EventBatchReply


eventBatchResults

Re-exports eventBatchResults


EventConsumer

Re-exports EventConsumer


EventConsumerSpec

Re-exports EventConsumerSpec


EventDeadLetter

Re-exports EventDeadLetter


EventMessage

Re-exports EventMessage


EventOutcome

Re-exports EventOutcome


EventPollReply

Re-exports EventPollReply


EventPollResult

Re-exports EventPollResult


EventPublisher

Re-exports EventPublisher


EventPublisherBinding

Re-exports EventPublisherBinding


EventReadOptions

Re-exports EventReadOptions


EventReadPage

Re-exports EventReadPage


EventReadReply

Re-exports EventReadReply


EventReadRequest

Re-exports EventReadRequest


EventReject

Re-exports EventReject


EventResult

Re-exports EventResult


EventRetry

Re-exports EventRetry


EventSuspended

Re-exports EventSuspended


EventSuspendOptions

Re-exports EventSuspendOptions


ExecuteReply

Re-exports ExecuteReply


executeReplyToD1Results

Re-exports executeReplyToD1Results


ExecuteRequest

Re-exports ExecuteRequest


ExecuteResultReply

Re-exports ExecuteResultReply


ExecuteStreamFrame

Re-exports ExecuteStreamFrame


ExecuteStreamHead

Re-exports ExecuteStreamHead


ExecuteStreamReply

Re-exports ExecuteStreamReply


ExecuteStreamStatement

Re-exports ExecuteStreamStatement


ExpandCandidatesParams

Re-exports ExpandCandidatesParams


Explicitness

Re-exports Explicitness


ExpressionKind

Re-exports ExpressionKind


ExtensibleConfig

Re-exports ExtensibleConfig


ExternalUser

Re-exports ExternalUser


ExternalUserReply

Re-exports ExternalUserReply


FEATURE_SCALAR_LIMITS

Re-exports FEATURE_SCALAR_LIMITS


FEATURE_STORAGE_CHANGES

Re-exports FEATURE_STORAGE_CHANGES


FEATURE_STORAGE_CONDITIONAL_WRITE

Re-exports FEATURE_STORAGE_CONDITIONAL_WRITE


FEATURE_STORAGE_COPY

Re-exports FEATURE_STORAGE_COPY


FEATURE_STORAGE_DELETE_MANY

Re-exports FEATURE_STORAGE_DELETE_MANY


FEATURE_STORAGE_HEAD_MANY

Re-exports FEATURE_STORAGE_HEAD_MANY


FEATURE_STORAGE_MOVE

Re-exports FEATURE_STORAGE_MOVE


FEATURE_STORAGE_MOVE_MANY

Re-exports FEATURE_STORAGE_MOVE_MANY


FEATURE_STREAMS

Re-exports FEATURE_STREAMS


FetchedFile

Re-exports FetchedFile


FetchedFileRole

Re-exports FetchedFileRole


FetchOptions

Re-exports FetchOptions


FetchTitleParams

Re-exports FetchTitleParams


FetchTitleReply

Re-exports FetchTitleReply


ForeignKeyConstraint

Re-exports ForeignKeyConstraint


GetOk

Re-exports GetOk


GetReply

Re-exports GetReply


GrantedContext

Re-exports GrantedContext


GrantedDatabaseTransport

Re-exports GrantedDatabaseTransport


GrantedFetcher

Re-exports GrantedFetcher


GrantedJobCapabilities

Re-exports GrantedJobCapabilities


GuestDatabase

Re-exports GuestDatabase


GuestDatabaseReply

Re-exports GuestDatabaseReply


HandleReply

Re-exports HandleReply


HeadManyReply

Re-exports HeadManyReply


HeadManyResult

Re-exports HeadManyResult


HeadOk

Re-exports HeadOk


HeadReply

Re-exports HeadReply


HealthOk

Re-exports HealthOk


HealthReply

Re-exports HealthReply


HostWebSocket

Re-exports HostWebSocket


Identifier

Re-exports Identifier


IdentifierScheme

Re-exports IdentifierScheme


IdentityExportReply

Re-exports IdentityExportReply


IdentityHighWater

Re-exports IdentityHighWater


Ingress

Re-exports Ingress


IngressEntrypoint

Re-exports IngressEntrypoint


IngressHealth

Re-exports IngressHealth


IngressHealthReply

Re-exports IngressHealthReply


IngressStarted

Re-exports IngressStarted


IngressStartReply

Re-exports IngressStartReply


Instant

Re-exports Instant


IntegerArithKind

Re-exports IntegerArithKind


IntegerArithSite

Re-exports IntegerArithSite


Invocation

Re-exports Invocation


invocationOf

Re-exports invocationOf


IsolationReq

Re-exports IsolationReq


JobCheckpoint

Re-exports JobCheckpoint


JobCompletion

Re-exports JobCompletion


JobController

Re-exports JobController


JobInvocation

Re-exports JobInvocation


JobOutcome

Re-exports JobOutcome


jobOutcomeFor

Re-exports jobOutcomeFor


JobOutcomeRecord

Re-exports JobOutcomeRecord


JobRetryOptions

Re-exports JobRetryOptions


JobRunner

Re-exports JobRunner


JobRunnerContext

Re-exports JobRunnerContext


JobSuspendOptions

Re-exports JobSuspendOptions


JsonObject

Re-exports JsonObject


jsonPayload

Re-exports jsonPayload


KeyOutcome

Re-exports KeyOutcome


KeyPair

Re-exports KeyPair


KvDeleteOk

Re-exports KvDeleteOk


KvDeleteReply

Re-exports KvDeleteReply


KvGetOk

Re-exports KvGetOk


KvGetReply

Re-exports KvGetReply


KvListKey

Re-exports KvListKey


KvListKeyBinding

Re-exports KvListKeyBinding


KvListOk

Re-exports KvListOk


KvListOptions

Re-exports KvListOptions


KvListOptionsBinding

Re-exports KvListOptionsBinding


KvListReply

Re-exports KvListReply


KvListResultBinding

Re-exports KvListResultBinding


KvNamespace

Re-exports KvNamespace


KvNamespaceBinding

Re-exports KvNamespaceBinding


KvPutOk

Re-exports KvPutOk


KvPutOptions

Re-exports KvPutOptions


KvPutOptionsBinding

Re-exports KvPutOptionsBinding


KvPutReply

Re-exports KvPutReply


KvValueType

Re-exports KvValueType


KvValueWithMetadata

Re-exports KvValueWithMetadata


ListDealsParams

Re-exports ListDealsParams


ListeningProgress

Re-exports ListeningProgress


ListOptions

Re-exports ListOptions


ListPage

Re-exports ListPage


ListReply

Re-exports ListReply


LoginCompleteParams

Re-exports LoginCompleteParams


LoginParams

Re-exports LoginParams


LoginReply

Re-exports LoginReply


LoginResult

Re-exports LoginResult


LoginStartReply

Re-exports LoginStartReply


LoginStartResult

Re-exports LoginStartResult


MAX_BATCH_KEYS

Re-exports MAX_BATCH_KEYS


MAX_CHANGES_CURSOR_BYTES

Re-exports MAX_CHANGES_CURSOR_BYTES


MAX_CHANGES_PAGE

Re-exports MAX_CHANGES_PAGE


MAX_CHECKPOINT_BYTES

Re-exports MAX_CHECKPOINT_BYTES


MAX_LIST_PAGE

Re-exports MAX_LIST_PAGE


MAX_PLUGIN_MIGRATION_OPS

Re-exports MAX_PLUGIN_MIGRATION_OPS


MAX_PLUGIN_MIGRATION_REGISTRATION_BYTES

Re-exports MAX_PLUGIN_MIGRATION_REGISTRATION_BYTES


MAX_PLUGIN_MIGRATION_TOTAL_OPS

Re-exports MAX_PLUGIN_MIGRATION_TOTAL_OPS


MAX_SCALAR_BYTES

Re-exports MAX_SCALAR_BYTES


MAX_STREAM_WINDOW_BYTES

Re-exports MAX_STREAM_WINDOW_BYTES


MAX_WRITE_KEY_BYTES

Re-exports MAX_WRITE_KEY_BYTES


MediaKind

Re-exports MediaKind


MediaSupport

Re-exports MediaSupport


MetadataAudioFile

Re-exports MetadataAudioFile


MetadataChapter

Re-exports MetadataChapter


MetadataChapters

Re-exports MetadataChapters


MetadataChaptersParams

Re-exports MetadataChaptersParams


MetadataChaptersReply

Re-exports MetadataChaptersReply


MetadataEntrypoint

Re-exports MetadataEntrypoint


MetadataField

Re-exports MetadataField


MetadataFileParsed

Re-exports MetadataFileParsed


MetadataFileParseParams

Re-exports MetadataFileParseParams


MetadataFileParseReply

Re-exports MetadataFileParseReply


MetadataFileRecord

Re-exports MetadataFileRecord


MetadataFileRendered

Re-exports MetadataFileRendered


MetadataFileRenderParams

Re-exports MetadataFileRenderParams


MetadataFileRenderReply

Re-exports MetadataFileRenderReply


MetadataFiles

Re-exports MetadataFiles


MetadataFilesEntrypoint

Re-exports MetadataFilesEntrypoint


MetadataLookupParams

Re-exports MetadataLookupParams


MetadataProvider

Re-exports MetadataProvider


MetadataRecord

Re-exports MetadataRecord


MetadataRecords

Re-exports MetadataRecords


MetadataRecordsReply

Re-exports MetadataRecordsReply


MetadataSearchParams

Re-exports MetadataSearchParams


MoveManyPage

Re-exports MoveManyPage


MoveManyReply

Re-exports MoveManyReply


MoveManyRequest

Re-exports MoveManyRequest


MoveManyTarget

Re-exports MoveManyTarget


MoveOptions

Re-exports MoveOptions


MoveReply

Re-exports MoveReply


MoveResult

Re-exports MoveResult


NamedDatabase

Re-exports NamedDatabase


NamedEntrypoint

Re-exports NamedEntrypoint


NamedKv

Re-exports NamedKv


NamedQueue

Re-exports NamedQueue


NamedSqlType

Re-exports NamedSqlType


NamedStub

Re-exports NamedStub


NetworkGrant

Re-exports NetworkGrant


NotificationAlertAction

Re-exports NotificationAlertAction


NotificationAudience

Re-exports NotificationAudience


NotificationField

Re-exports NotificationField


NotificationMessage

Re-exports NotificationMessage


NotificationRaiser

Re-exports NotificationRaiser


NotificationSeverity

Re-exports NotificationSeverity


Notifier

Re-exports Notifier


NotifierEntrypoint

Re-exports NotifierEntrypoint


NotifyBinding

Re-exports NotifyBinding


NotifyDestination

Re-exports NotifyDestination


NotifyDestinationKind

Re-exports NotifyDestinationKind


NotifyRaise

Re-exports NotifyRaise


NotifyRaised

Re-exports NotifyRaised


NotifyRaiseParams

Re-exports NotifyRaiseParams


NotifyRaiseReply

Re-exports NotifyRaiseReply


NotifySendParams

Re-exports NotifySendParams


NotifySendReply

Re-exports NotifySendReply


NotifySent

Re-exports NotifySent


NotifyValidated

Re-exports NotifyValidated


NotifyValidateParams

Re-exports NotifyValidateParams


NotifyValidateReply

Re-exports NotifyValidateReply


ObjectChange

Re-exports ObjectChange


ObjectChangeKind

Re-exports ObjectChangeKind


ObjectInfo

Re-exports ObjectInfo


ObjectMetadata

Re-exports ObjectMetadata


OfferedAacProfile

Re-exports OfferedAacProfile


OfferedCodec

Re-exports OfferedCodec


Oidc

Re-exports Oidc


OidcClientsOk

Re-exports OidcClientsOk


OidcClientsReply

Re-exports OidcClientsReply


OidcClientTemplate

Re-exports OidcClientTemplate


OidcEntrypoint

Re-exports OidcEntrypoint


OpenOk

Re-exports OpenOk


OpenReply

Re-exports OpenReply


OptionalColumnReference

Re-exports OptionalColumnReference


Origin

Re-exports Origin


OriginFetchReply

Re-exports OriginFetchReply


OriginHeader

Re-exports OriginHeader


OriginRequest

Re-exports OriginRequest


OriginResponse

Re-exports OriginResponse


packEmbeddingVectors

Re-exports packEmbeddingVectors


parseDbValue

Re-exports parseDbValue


PhysicalAccess

Re-exports PhysicalAccess


PlainFetch

Re-exports PlainFetch


PluginCapabilities

Re-exports PluginCapabilities


PluginCli

Re-exports PluginCli


PluginDescribe

Re-exports PluginDescribe


PluginErrorCode

Re-exports PluginErrorCode


PluginEvent

Re-exports PluginEvent


PluginMigration

Re-exports PluginMigration


PluginMigrationOp

Re-exports PluginMigrationOp


PluginMigrationsOk

Re-exports PluginMigrationsOk


PluginMigrationsReply

Re-exports PluginMigrationsReply


PluginWorker

Re-exports PluginWorker


PortalAuthMode

Re-exports PortalAuthMode


PreparedStatement

Re-exports PreparedStatement


PricedRecord

Re-exports PricedRecord


PriceLookup

Re-exports PriceLookup


PRODUCT_API_VERSION

Re-exports PRODUCT_API_VERSION


ProgressSink

Re-exports ProgressSink


PublishEvent

Re-exports PublishEvent


PublishOk

Re-exports PublishOk


PublishReply

Re-exports PublishReply


PullOk

Re-exports PullOk


PullReply

Re-exports PullReply


PurchaseHint

Re-exports PurchaseHint


PurchaseHintAnswer

Re-exports PurchaseHintAnswer


PurchaseHintParams

Re-exports PurchaseHintParams


PurchaseHintReply

Re-exports PurchaseHintReply


PurchaseHintResult

Re-exports PurchaseHintResult


PurchaseHintsParams

Re-exports PurchaseHintsParams


PurchaseHintsReply

Re-exports PurchaseHintsReply


PurchaseHintsResult

Re-exports PurchaseHintsResult


PutReply

Re-exports PutReply


PutResult

Re-exports PutResult


QualityOffer

Re-exports QualityOffer


QualityOffersParams

Re-exports QualityOffersParams


QualityOffersReply

Re-exports QualityOffersReply


QualityOffersResult

Re-exports QualityOffersResult


QueueBatch

Re-exports QueueBatch


QueueBatchOk

Re-exports QueueBatchOk


QueueBatchReply

Re-exports QueueBatchReply


queueBatchResults

Re-exports queueBatchResults


QueueBinding

Re-exports QueueBinding


QueueConsumer

Re-exports QueueConsumer


QueueMessage

Re-exports QueueMessage


QueueOutcome

Re-exports QueueOutcome


QueueProducer

Re-exports QueueProducer


QueueResult

Re-exports QueueResult


QueueRetry

Re-exports QueueRetry


QueueRetryOptions

Re-exports QueueRetryOptions


QueueSendBatchEntry

Re-exports QueueSendBatchEntry


QueueSendMessage

Re-exports QueueSendMessage


QueueSendOk

Re-exports QueueSendOk


QueueSendOptions

Re-exports QueueSendOptions


QueueSendReply

Re-exports QueueSendReply


ReadOptions

Re-exports ReadOptions


ReadResult

Re-exports ReadResult


RejectedOutcome

Re-exports RejectedOutcome


RemoteLibrary

Re-exports RemoteLibrary


RemoteLibraryEntrypoint

Re-exports RemoteLibraryEntrypoint


ResolvedAssignment

Re-exports ResolvedAssignment


ResolvedSqlType

Re-exports ResolvedSqlType


ResolvedStatement

Re-exports ResolvedStatement


RetryableOutcome

Re-exports RetryableOutcome


RetryOptions

Re-exports RetryOptions


RetryToken

Re-exports RetryToken


RevokeAccountParams

Re-exports RevokeAccountParams


ScalarLimits

Re-exports ScalarLimits


ScanBook

Re-exports ScanBook


ScanLibraryParams

Re-exports ScanLibraryParams


ScanPage

Re-exports ScanPage


ScanParams

Re-exports ScanParams


ScanReply

Re-exports ScanReply


ScheduledController

Re-exports ScheduledController


ScheduledHandler

Re-exports ScheduledHandler


SchemaAction

Re-exports SchemaAction


SchemaCreate

Re-exports SchemaCreate


schemaMigrationOp

Re-exports schemaMigrationOp


SearchCatalogParams

Re-exports SearchCatalogParams


SeriesEntry

Re-exports SeriesEntry


SettingGrantState

Re-exports SettingGrantState


SettingNetworkGrant

Re-exports SettingNetworkGrant


SettingNetworkKind

Re-exports SettingNetworkKind


SocketAutoResponse

Re-exports SocketAutoResponse


SocketAutoResponsePair

Re-exports SocketAutoResponsePair


SocketClosed

Re-exports SocketClosed


SocketConnectOptions

Re-exports SocketConnectOptions


SocketConnectReply

Re-exports SocketConnectReply


SocketConnectRequest

Re-exports SocketConnectRequest


SocketFrame

Re-exports SocketFrame


SocketHandler

Re-exports SocketHandler


SocketHeader

Re-exports SocketHeader


SocketInfo

Re-exports SocketInfo


SocketList

Re-exports SocketList


SocketListReply

Re-exports SocketListReply


SocketMessage

Re-exports SocketMessage


SocketMessageData

Re-exports SocketMessageData


SocketMessageOk

Re-exports SocketMessageOk


SocketMessageReply

Re-exports SocketMessageReply


Sockets

Re-exports Sockets


SocketsBinding

Re-exports SocketsBinding


SocketSendData

Re-exports SocketSendData


Source

Re-exports Source


SourceAccount

Re-exports SourceAccount


SourceAccounts

Re-exports SourceAccounts


SourceAccountsReply

Re-exports SourceAccountsReply


SqlSpan

Re-exports SqlSpan


StatementResult

Re-exports StatementResult


statementResultToD1Result

Re-exports statementResultToD1Result


StorageBinding

Re-exports StorageBinding


StorageEntrypoint

Re-exports StorageEntrypoint


StorefrontEntrypoint

Re-exports StorefrontEntrypoint


SuspendedOutcome

Re-exports SuspendedOutcome


SyncListeningReply

Re-exports SyncListeningReply


SyncListeningResult

Re-exports SyncListeningResult


TableConstraint

Re-exports TableConstraint


TextCollateSite

Re-exports TextCollateSite


TitleQualityOffer

Re-exports TitleQualityOffer


toBridgeJson

Re-exports toBridgeJson


TranslateKeysReply

Re-exports TranslateKeysReply


TranslateKeysResult

Re-exports TranslateKeysResult


TypedDbStatement

Re-exports TypedDbStatement


unpackEmbeddingVectors

Re-exports unpackEmbeddingVectors


UserRelationsReply

Re-exports UserRelationsReply


WebhookAckRequest

Re-exports WebhookAckRequest


WebhookDelivered

Re-exports WebhookDelivered


WebhookDeliveredEvent

Re-exports WebhookDeliveredEvent


WebhookDelivery

Re-exports WebhookDelivery


WebhookHandler

Re-exports WebhookHandler


WebhookHeader

Re-exports WebhookHeader


WebhookMessage

Re-exports WebhookMessage


WebhookPullOptions

Re-exports WebhookPullOptions


WebhookPullPage

Re-exports WebhookPullPage


WebhookPullReply

Re-exports WebhookPullReply


WebhookPullRequest

Re-exports WebhookPullRequest


WebhookPullResult

Re-exports WebhookPullResult


Webhooks

Re-exports Webhooks


WebhooksBinding

Re-exports WebhooksBinding


WebhookUrl

Re-exports WebhookUrl


WebhookUrlReply

Re-exports WebhookUrlReply


WireEventBatch

Re-exports WireEventBatch


WireQueueBatch

Re-exports WireQueueBatch


WorkKind

Re-exports WorkKind


wrapPluginFromBinding

Re-exports wrapPluginFromBinding


wrapPluginFromNative

Re-exports wrapPluginFromNative


WriteChunksError

Re-exports WriteChunksError


writeChunksOperationId

Re-exports writeChunksOperationId


WriteChunksOptions

Re-exports WriteChunksOptions


WriteOptions

Re-exports WriteOptions


WriteProgress

Re-exports WriteProgress

Source: docs/plugins/sdk/typescript/README.md at main · View as Markdown