'use client'; import { ExportedStats } from "./optimizer/statistics.cjs"; import { LiveQueryOptimization, OptimizedQuery } from "./query.cjs"; import { RepoPolicyConfig } from "./ci/policy.cjs"; import { RpcStub } from "capnweb"; //#region src/websocket-server.d.ts type IndexDefinition = { schemaName: string; tableName: string; indexName: string; indexType?: string; isUnique?: boolean; columns: Array<{ name: string; order?: "ASC" | "DESC"; opclass?: string; }>; wherePredicate?: string; }; type ExtensionPresence = { type: "present"; extensionName: "pg_stat_statements" | "pg_stat_monitor"; needsRestart: boolean; } | { type: "missing"; }; type RepoConfig = { minimumCost: number; regressionThreshold: number; ignoredQueryHashes: string[]; lastSeenQueryHashes: string[]; acknowledgedQueryHashes: string[]; comparisonBranch?: string; conditionPolicies: RepoPolicyConfig; }; interface ServerApi { pushQuery(queries: OptimizedQuery[]): Promise; pushStats(stats: ExportedStats[]): Promise; pushSchema(schema: unknown): Promise; pushEncryptedStats(stats: Uint8Array): Promise; setExtensionPresence(presence: ExtensionPresence): Promise; log(line: string, process?: string): Promise; ping(): Promise; getRepoConfig(repo: string, branch: string): Promise; getProductionStats(): Promise; } interface ClientApi { repull(): Promise; refreshQueries(): Promise; updateStatistics(stats: ExportedStats[]): Promise; hideIndex(indexName: string): Promise; addIndex(index: IndexDefinition): Promise; runQuery(query: string): Promise; resetStats(): Promise; } type ConnectionMode = { kind: "persistent"; environment?: string; } | { kind: "ci"; branch: string; sha: string; label?: string; }; interface UnauthenticatedServerApi { authenticate(token: string, client: RpcStub, mode: ConnectionMode): Promise; } //#endregion export { ClientApi, ConnectionMode, ExtensionPresence, IndexDefinition, RepoConfig, ServerApi, UnauthenticatedServerApi }; //# sourceMappingURL=websocket-server.d.cts.map