import { Dict, BaseTypes } from './utils'; export declare type ClaimId = { branch: string; version: number; }; export declare type FormatType = "internal" | "hr-compact"; export declare type FormatTypeWUnk = FormatType | "?"; export declare type ClaimStateSource = "*file" | "*state" | "*db"; export declare function isTableProps(o: any): o is TableProps; export declare type TableProps = { ___branch?: string; [k: string]: ColumnProps | string; }; export declare type Tables = Dict; export interface ClaimState { source?: ClaimStateSource; file?: string; format: FormatTypeWUnk; ___tables: Tables; } export interface Claim extends ClaimState { id: ClaimId; depends?: Dict; ___dependee?: Dict; } export interface State extends ClaimState { modules: Dict; depends_acc?: Dict>>; directory?: string; connection?: any; } export interface Depends { [table: string]: Dict | "*UNREF" | number; } export declare function versionOf(d: Depends): number; export declare function isClaimState(o: any): o is ClaimState; export declare function isClaim(o: any): o is Claim; export declare function isState(o: any): o is State; export declare type BTDict1 = Dict | BaseTypes; export declare type BTDict2 = Dict | BaseTypes; export declare type BTDict3 = Dict | BaseTypes; export declare type ForeignKey = { table: string; column: string; constraint_name?: string; }; export interface BaseColumnProps { data_type?: string; is_nullable?: boolean; is_unique?: boolean; is_primary_key?: boolean; has_auto_increment?: boolean; default?: BaseTypes; comment?: string; max_length?: number; numeric_precision?: number; numeric_scale?: number; [k: string]: any; } export interface DependColumnProps extends BaseColumnProps { foreign_key?: ForeignKey; } export interface RefColumnProps extends DependColumnProps { ___version?: number; } export interface ColumnProps extends BaseColumnProps { ___refs?: Dict; ___branch?: string; foreign_key?: ForeignKey | "*NOT"; }