import type { MetricsStore } from "./index.js"; import { type MetricsDriver } from "./sqlite.js"; /** The slice of Cloudflare D1 the metrics driver touches, typed structurally: no workers-types dependency. */ export interface D1Statement { bind(...values: unknown[]): D1Statement; all>(): Promise<{ results: T[]; }>; } export interface D1Binding { prepare(sql: string): D1Statement; /** D1 runs a batch as one transaction: a failing statement rolls back the whole sequence. */ batch(statements: D1Statement[]): Promise; } /** One project's store over a D1 binding: what a Worker hands to `defineMetrics`. */ export declare const d1Store: (db: D1Binding, project: string) => MetricsStore; /** A D1 binding as a metrics driver. */ export declare function d1Driver(db: D1Binding): MetricsDriver; //# sourceMappingURL=d1.d.ts.map