/** * Collect inbound referential edges (single-column + composite) for Convex emit. */ import type { IR, IREntity, IRRelationship, RefAction } from '../../ir'; import type { ProjectionDiagnostic } from '../interface'; import { type NormalizedOptions } from './generator.js'; export interface FkPair { local: string; remote: string; } export interface InboundReferentialEdge { parentEntity: string; childEntity: string; childTable: string; relationshipName: string; pairs: FkPair[]; indexName: string; action: RefAction; /** TS literal(s) for setNull / setDefault — one per local pair, same order. */ patchValues?: string[]; } /** @deprecated alias */ export type InboundOnDeleteEdge = InboundReferentialEdge; /** * Pair local FK columns to parent remote columns (runtime fkColumnPairs parity). * * Tenant-scoped Convex id FKs (`[tenantId, parentId]` → `[tenantId, id]`) collapse * to the non-tenant identity pair so they share `by_parentId` with schema emit. * True business-key composites keep every column. */ export declare function resolveFkPairs(rel: IRRelationship, parent: IREntity | undefined, tenantProp: string | undefined, options: NormalizedOptions, childName: string): FkPair[]; export declare function compositeIndexName(pairs: FkPair[]): string; export declare function collectInboundOnDeleteEdges(ir: IR, options: NormalizedOptions): { edges: InboundReferentialEdge[]; diagnostics: ProjectionDiagnostic[]; }; export declare function collectInboundOnUpdateEdges(ir: IR, options: NormalizedOptions): { edges: InboundReferentialEdge[]; diagnostics: ProjectionDiagnostic[]; }; //# sourceMappingURL=referential-edges.d.ts.map