/** * Port of RelationBuilder.php — generates Eloquent relation methods. */ interface RelationResult { method: string; imports: string[]; } interface RelationContext { sourceTableName: string; targetTableName: string; /** Non-conventional physical table resolved from an explicit pivot schema. * Omitted when Laravel can infer the joining table from model basenames. */ pivotTableName?: string; /** Property names declared on the explicit `kind: pivot` schema for * this M2M (e.g. `["position", "notes"]`). Surfaced in the generated * `belongsToMany()` chain via `->withPivot(...)` so consumers can * read those columns through the relation. Empty / undefined when * the user has not added custom columns to the pivot schema. */ pivotProperties?: string[]; } /** Build Eloquent relation method PHP code. */ export declare function buildRelation(propName: string, property: Record, modelNamespace: string, context?: RelationContext): RelationResult | null; /** Generate the table name Laravel's joiningTable() infers from model basenames. */ export declare function generatePivotTableName(sourceModel: string, targetModel: string): string; /** Get the return type hint for a relation. */ export declare function getReturnType(relation: string): string; /** * Build a chained `->orderBy('col', 'dir')` PHP fragment from an OrderByList. * Returns an empty string if no ordering is configured. Issue #40. */ export declare function formatOrderByChain(orderBy: unknown): string; export {};