import { Dict } from './utils'; import { ClaimState, Claim, State, TableProps, Tables } from "./types"; import { Knex } from 'knex'; export declare type TableInfoOrErrors = Dict | string[]; export declare function getStateDir(options: any): string; export declare function storeState(state: State | Dict, new_claims?: Dict, state_loc?: string, options?: Dict): unknown; export declare function rebuildState(state_dir: string, options: Dict): boolean; export declare function sortMergeStoreState(file_dicts: Dict, state_dir: string, state_base: State, options: Dict): State | string[]; export declare function slurpDbFile(db_file: string): Dict; export declare function normalizeConnInfo(conn_info: Dict | string): Dict; export declare function isDbScpec(s: string): boolean; export declare function parseDbSpec(db_spec: string): Dict; export declare function parseDbFile(db_file: string, flat?: boolean): Dict; export declare function existsDb(db_file: string | Dict, db_name?: string): Promise; export declare function createDb(db: string | Dict, db_name?: string): Promise | string>; export declare function dropDb(db_spec: string | Dict, db_name: string): Promise | string>; export declare function connectState(state_dir: string, db_spec: string | Dict, options: Dict): Promise; export declare function toState(dir_file: string, quiet?: boolean): State; export declare type FormatType = "internal" | "hr-compact"; export declare function reformatTables(tables: Dict, format?: FormatType): Dict; export declare function reformatTopLevel(claim: ClaimState, format?: FormatType): void; export declare function normalizeClaim(claim: Claim | Dict, file: string, format?: FormatType, allow_loose?: boolean): Claim; export declare function fileToClaim(file: string, quiet?: boolean, format?: FormatType, options?: Dict): Claim; export declare function toStateClaim(file_or_db: string, options: Dict): Promise; export declare function matchDiff(candidate: Tables, target: Tables): TableInfoOrErrors; export declare function slurpXti(dir: string, db_conn: Knex | Dict): Dict; export declare type SyncResult = { type: "errors" | "queries"; r: string[]; }; export declare function syncDbWith(state: State, db_conn: Dict | string, options: Dict): Promise; export declare function dependencySort(file_dicts: Dict, state_base: State, options: Dict): Claim[]; export declare function getInitialState(tables?: Dict): State; export declare function mergeClaims(claims: Claim[], merge_base: State | null, options: Dict): State | string[];