/** * Port of TypeMapper.php — type mappings for PHP casts, rules, resources. */ import type { SchemaReader } from './schema-reader.js'; type Rule = string | ['rule_in', string[]] | ['rule_unique_ignore', string, string]; /** * Effective primary-key type for a ManyToOne foreign key column. * Property-level `idType:` wins (required for targets outside the schema set), * then the target schema's `options.id`, then an integer-family default. * Issue #237. */ export declare function resolveFkIdType(property: Record, target: string, reader: SchemaReader): string; /** Laravel validation rule type for a ManyToOne FK (Issue #36, #237). */ export declare function resolveFkRuleType(property: Record, target: string, reader: SchemaReader): 'integer' | 'uuid' | 'string'; /** Eloquent cast for a ManyToOne FK column. */ export declare function resolveFkCast(property: Record, target: string, reader: SchemaReader): 'integer' | 'string' | null; /** `@property` doc type for a ManyToOne FK column. */ export declare function resolveFkPhpDocType(property: Record, target: string, reader: SchemaReader, nullable: boolean): string; /** Map Omnify property type to PHP cast. */ export declare function toCast(type: string, property?: Record): string | null; /** Map Omnify property type to PHP doc type. */ export declare function toPhpDocType(type: string, nullable?: boolean): string; /** * Generate validation rules for a property (Store request). * * @param fkRuleType - For ManyToOne associations, the validation rule type * matching the target schema's primary key ('integer' for Int/BigInt PKs, * 'uuid' for Uuid PKs, 'string' for Ulid/String PKs). Defaults to 'integer' * for backwards compatibility. Issue #36. */ export declare function toStoreRules(property: Record, tableName: string, fkRuleType?: 'integer' | 'uuid' | 'string'): Rule[]; /** Generate validation rules for a property (Update request). */ export declare function toUpdateRules(property: Record, tableName: string, modelRouteParam: string, fkRuleType?: 'integer' | 'uuid' | 'string'): Rule[]; /** Format validation rules as PHP code string. */ export declare function formatRules(rules: Rule[]): string; /** Resolve enum values from property definition. */ export declare function resolveEnumValues(property: Record): string[] | null; /** Check if a property type should be hidden by default. */ export declare function isHiddenByDefault(type: string): boolean; /** Check if a property needs a cast. */ export declare function needsCast(type: string): boolean; /** Get the resource output expression for a property. */ export declare function toResourceExpression(fieldName: string, type: string): string; export {};