import type Database from 'better-sqlite3'; import type { Relation, RelationType, RelationQueryOptions } from './entity'; /** * Get a relation type definition by name. */ export declare function getRelationType(db: Database.Database, name: string): RelationType | undefined; /** * Create a relation with full constraint enforcement (AD-0017). * All checks run in a single transaction; inverse auto-created if defined. * * Validation order per AD-0017: * 1. Self-relation check * 2. Entity existence * 3. Relation type existence * 4. Type constraint * 5. Cardinality constraint * 6. Duplicate check * 7. Insert primary * 8. Insert inverse */ export declare function createRelation(db: Database.Database, fromId: string, relType: string, toId: string, properties?: Record): Relation; /** * Remove a relation by ID. * Also removes any inverse relation. */ export declare function removeRelation(db: Database.Database, relationId: number): void; /** * Query relations for an entity. */ export declare function queryRelations(db: Database.Database, options: RelationQueryOptions): Relation[]; /** * Get all relation types. */ export declare function listRelationTypes(db: Database.Database): RelationType[]; //# sourceMappingURL=relation.d.ts.map