/** * Runtime link service backed by Drizzle — executes raw SQL against the * dynamically-named pivot tables materialised from {@link LinkDefinition}s. */ import type { LinkDefinition, LinkService } from "@voyantjs/core"; import type { DrizzleClient } from "./types.js"; /** * Create a runtime {@link LinkService} for the given set of link definitions. * * The service supports both a positional API (`create(linkKey, leftId, rightId)`) * and a Medusa-style spec API (`create({ moduleA: { a_id }, moduleB: { b_id } })`) * resolved against the provided definitions. */ export declare function createLinkService(getDb: () => DrizzleClient, definitions: LinkDefinition[]): LinkService; /** * Materialise every link definition's pivot table (CREATE TABLE + indexes). * Intended for use by a `db:sync-links` CLI command in templates. * * Runs each DDL statement individually against the provided Drizzle client. */ export declare function syncLinks(db: DrizzleClient, definitions: LinkDefinition[]): Promise; //# sourceMappingURL=links.d.ts.map