import { d as EnvSecretMetadata, f as EnvSecretStore, r as EnvAccessStore } from "./bridge-Cs9YfQWk.js"; import { SQL } from "drizzle-orm"; //#region src/database.d.ts export interface EnvDatabase { run(query: SQL): unknown; all(query: SQL): unknown[] | PromiseLike; } export interface DatabaseEnvStore { /** SQL predicate for atomically updating related records at a secret revision. */ revisionCondition(key: string, revision: string | null): Promise; /** The keys of the namespace with their metadata, by key. It never reads a value. */ list(): Promise<(EnvSecretMetadata & { key: string; })[]>; /** Delete a key. Returns `false` when the namespace has no such key. Activity and grants stay. */ remove(key: string): Promise; /** * Re-encrypts every value of the namespace that another key sealed with the current key, the first of * `encryptionKeys`. Revisions stay the same. A value that a write replaces during the rotation keeps the new write. */ rotate(): Promise; secrets: EnvSecretStore; access: EnvAccessStore; } /** The result of `DatabaseEnvStore.rotate()`. */ export interface EnvStoreRotation { /** Values re-encrypted with the current key. */ rotated: number; /** Values that the current key already sealed, or that a concurrent write replaced. */ skipped: number; } /** * The namespaces that start with `prefix` and hold at least one key, in text order. A Console that keeps one namespace * for each project and stage, such as `:production`, finds the stages of a project with it. */ export declare function listDatabaseEnvNamespaces(db: EnvDatabase, prefix: string): Promise; /** * Persistent encrypted values, activity, and grants on a ViteHub SQLite/Drizzle database. * `encryptionKeys` is the keyring: the current 32-byte key first, then previous keys that still decrypt older values. */ export declare function createDatabaseEnvStore(options: { db: EnvDatabase; encryptionKeys: readonly Uint8Array[]; namespace?: string; previews?: boolean; }): DatabaseEnvStore; //#endregion