import type { DatabaseEngine } from './common/index.js';
import type { ProjectKnowledge } from './project/core.js';
export interface SchemaDesign {
    engine: DatabaseEngine;
    tables: TableDesign[];
    indexes: IndexDesign[];
    rlsPolicies: RLSPolicy[];
    firestoreRules?: FirestoreRule[];
    migrations: MigrationStep[];
    relationships: string[];
    dataIntegrity: string[];
}
export interface TableDesign {
    name: string;
    columns: ColumnDesign[];
    primaryKey: string;
    foreignKeys: ForeignKeyDesign[];
    uniqueConstraints: string[];
    checkConstraints: string[];
}
export interface ColumnDesign {
    name: string;
    type: string;
    nullable: boolean;
    default: string | null;
    comment: string;
}
export interface ForeignKeyDesign {
    column: string;
    references: string;
    onDelete: 'CASCADE' | 'SET NULL' | 'RESTRICT' | 'NO ACTION';
    onUpdate: 'CASCADE' | 'RESTRICT' | 'NO ACTION';
}
export interface IndexDesign {
    name: string;
    table: string;
    columns: string[];
    type: 'btree' | 'hash' | 'gin' | 'gist';
    unique: boolean;
    justification: string;
}
export interface RLSPolicy {
    name: string;
    table: string;
    operation: 'SELECT' | 'INSERT' | 'UPDATE' | 'DELETE' | 'ALL';
    using: string;
    withCheck?: string;
    justification: string;
}
export interface FirestoreRule {
    collection: string;
    operations: ('read' | 'write' | 'create' | 'update' | 'delete')[];
    condition: string;
    justification: string;
}
export interface MigrationStep {
    order: number;
    sql: string;
    reversible: boolean;
    reverseSql?: string;
    dataLoss: boolean;
    warning?: string;
}
export interface DesignSchemaInput {
    specId: string;
    projectId: string;
    description?: string;
}
export interface ExtractedEntity {
    name: string;
    fields: string[];
    isJoinTable: boolean;
    relatesTo: string[];
}
export interface SmartContractSchemaSection {
    category: string;
    items: string[];
}
export interface MLSchemaConfig {
    datasetSchema: string[];
    modelConfig: string[];
    hyperparameters: string[];
    metrics: string[];
}
export interface GameSchemaDesign {
    engine: string;
    saveSystem: GameSaveSystem;
    leaderboard: GameLeaderboard;
    inventory: GameInventory;
    achievements: GameAchievement[];
    playerStats: GamePlayerStats;
}
export interface GameSaveSystem {
    strategy: 'local-file' | 'cloud-sync' | 'playerprefs' | 'scriptable-object';
    fields: string[];
    autoSave: boolean;
    slots: number;
}
export interface GameLeaderboard {
    type: 'local' | 'online' | 'both';
    fields: string[];
    maxEntries: number;
}
export interface GameInventory {
    itemFields: string[];
    maxSlots: number | null;
    stackable: boolean;
    persistence: 'save-file' | 'cloud' | 'session';
}
export interface GameAchievement {
    id: string;
    name: string;
    condition: string;
    type: 'count' | 'flag' | 'score';
}
export interface GamePlayerStats {
    fields: string[];
    persistence: 'save-file' | 'cloud' | 'session';
}
export interface SpecializedDbSchemaCheck {
    detect: (k: ProjectKnowledge) => boolean;
    generate: (names: string[], k: ProjectKnowledge) => string;
}
//# sourceMappingURL=schema.d.ts.map