import { bus } from './bus'; import { helperUtil } from './helperUtil'; export declare type Column = { type: bus.COLUMN; name: string; unique: boolean; notNull: boolean; default: any; isList: boolean; }; export declare type ColumnInput = Partial>; declare type BaseEdge = { name: string; start: string; startKey: string; end: string; endKey: string; }; export declare type OneToOneEdge = BaseEdge & { kind: 'oneToOne'; columnName: string; required: boolean; }; export declare type OneToManyEdge = BaseEdge & { kind: 'oneToMany'; columnName: string; required: boolean; }; export declare type ManyToManyEdge = BaseEdge & { kind: 'manyToMany'; startColumn: string; endColumn: string; }; export declare type Edge = OneToOneEdge | OneToManyEdge | ManyToManyEdge; declare type EdgeInputOmitKeys = 'start' | 'end' | 'kind' | 'tableName' | 'name'; export declare type OneToOneEdgeInput = helperUtil.makeOptional, 'required'>; export declare type OneToManyEdgeInput = helperUtil.makeOptional, 'required'>; export declare type ManyToManyEdgeInput = Omit; export declare type EdgeInput = Omit | Omit | Omit; export declare type Table = { name: string; idKey: string; idType: bus.ID; columns: Column[]; }; export declare type Commits = { name: string; }[]; export declare type Schema = { commits: Commits; tables: bus.Table[]; edges: bus.Edge[]; }; export declare type RelationalColumn = Column & { references?: [string, string]; primary: boolean; }; export declare type RelationalTable = Omit & { columns: RelationalColumn[]; isJoinTable: boolean; }; export declare type RelationalSchema = { tables: RelationalTable[]; }; export declare type OOPField = { key: string; type: bus.COLUMN; isList: boolean; notNull: boolean; }; export declare type OOPRelation = { key: string; related: string; edgeName: string; isList: boolean; notNull: boolean; }; export declare type OOPModel = { name: string; fields: OOPField[]; relations: OOPRelation[]; }; export declare type OOPSchema = { models: OOPModel[]; }; export declare type DB = { db: string; url: string; }; export declare const genDefault: { [k in bus.COLUMN]: () => any; }; export {};