/** * Composition helpers for the internal mapped MikroORM runtime. * * This module opens storage, migrates the entity and sync schemas, registers * mapping routes, and returns the planner resources. Entity lifecycle work is * executed by `MikroOrmScalarPersistenceProvider`; no ORM facade is created. */ import type { TypedSheetsEntityMapping, TypedSheetsEntityMappingRegistry } from "../../../../contracts/sync-orm/mapping/contracts.js"; import type { MappedFlushSyncHook, RegisteredTypedSheetsMappedProjection, TypedSheetsEntityWriterOptions } from "../../../../orm/persistence/support/contracts.js"; import type { RegisteredSyncProjectionDefinition } from "../../../../contracts/sheets/sheetsProvisioning.js"; import { type InitializeMikroOrmSqliteAdapterOptions, type MikroOrmSqliteAdapter } from "../storage/MikroOrmSqliteAdapter.js"; import type { ScalarEntityFlushCoordinator } from "../../../../contracts/storage/scalar.js"; /** Options for opening and registering one mapped SQLite runtime. */ export interface InitializeMappedRuntimeOptions extends InitializeMikroOrmSqliteAdapterOptions { readonly mappings: TypedSheetsEntityMappingRegistry | readonly TypedSheetsEntityMapping[]; readonly writer: TypedSheetsEntityWriterOptions; /** Optional service-side conflict planning hook inside the same flush transaction. */ readonly syncFlushHook?: MappedFlushSyncHook; /** Called after local projection registration succeeds. */ readonly onRegisteredProjections?: (definitions: readonly RegisteredSyncProjectionDefinition[]) => Promise; } /** Resources shared by the scalar provider and internal sync supervisors. */ export interface InitializedMappedRuntime { readonly storage: MikroOrmSqliteAdapter; readonly mappings: TypedSheetsEntityMappingRegistry; readonly registrations: readonly RegisteredTypedSheetsMappedProjection[]; readonly flushCoordinator: ScalarEntityFlushCoordinator; } /** Opens storage, migrates schemas, registers mapping routes, and builds the planner. */ export declare function initializeMappedRuntime(options: InitializeMappedRuntimeOptions): Promise; //# sourceMappingURL=MikroOrmMappedRuntime.d.ts.map