import { ServerProxy } from '../server/server.js'; /** Recursive type descriptor sent to the dashboard client for building CRUD editors. */ export interface TypeInfo { kind: string; display: string; /** For 'link' kind: the linked model's tableName. */ linkedModel?: string; /** For 'array', 'set', and opt('or' with undef) kinds: the element/inner type. */ inner?: TypeInfo; /** For 'record' kind: the value type. */ innerValue?: TypeInfo; /** For 'or' kind: all union choices (includes the undef literal for opt). */ choices?: TypeInfo[]; /** True when this is opt(T) — an or(undef, T) with exactly one non-undefined branch. */ isOptional?: boolean; /** For 'literal' kind: the JSON-serialized literal value. */ literalValue?: string; } declare function describeIndex(index: any): { fields: string[]; fieldTypes: TypeInfo[]; computed: boolean; kind: "primary" | "unique" | "secondary"; }; declare class DashboardAPI { listModels(): { tableName: string; indexCount: number; fieldCount: number; streamTypeCount: number; }[]; getModel(name: string): { tableName: string; fields: { name: string; type: TypeInfo; description?: string; hasDefault: boolean; isPk: boolean; }[]; indexes: { name: string; info: ReturnType; }[]; streamTypes: { id: any; fields: any; cache: any; }[]; }; listApiMethods(): { name: string; kind: "function" | "value"; }[]; getApiMethodSource(name: string): string | undefined; findRecords(modelName: string, indexName: string, opts?: { search?: any; reverse?: boolean; limit?: number; }): { rows: { pk: any; values: Record; }[]; indexFields: string[]; scanned: number; }; getRecord(modelName: string, pk: any): Record | undefined; streamRecord(modelName: string, streamTypeId: number, pk: any): any; createRecord(modelName: string, values: Record): Promise; updateRecord(modelName: string, pk: any, values: Record): Promise; deleteRecord(modelName: string, pk: any): Promise; getDebugState(mode: 'channels' | 'sockets' | 'workers' | 'kv'): { channel: Uint8Array; subscribers: { [socketId: number]: number; }; }[]; } /** * RPC entry point. Re-export this from your top-level api file: * * ```ts * export { _dashboard } from 'lowlander/dashboard'; * ``` * * On first call, a password is generated (or reused from the * `LOWLANDER_DASHBOARD_PASSWORD` env var) and printed to the server console. */ export declare function _dashboard(password: string): ServerProxy; export type { DashboardAPI }; export declare function _dashboardAllFieldsStream(modelName: string): void; //# sourceMappingURL=server.d.ts.map