// SPDX-License-Identifier: LicenseRef-ConusAI-Template-1.0 // The shape of a one-login store (the mariadb and mongodb profiles, dialect/): what app.ts keeps of it // and what `/api/ready` asks of it. Types only, so the composition root and the engines meet here. import type { DataSource, SystemDataSource } from "@conusai-kit/data" import type { LiveLog } from "@conusai-kit/live-server" /** A data source of the mariadb or mongodb profile: what the request container and the kit's ports need. */ export type DialectDataSource = DataSource & SystemDataSource & { close(): Promise } /** The readiness probes of a one-login store (router.ts `/api/ready`): its query and its recorded migrations. */ export interface StoreProbes { store(): Promise applied(): Promise> /** Resolves once the store is proven usable at boot (MongoDB: a replica set, AT-D15). */ boot(): Promise } /** One engine's data source and probes, over the URL of its profile. */ export interface EngineStore { readonly data: DialectDataSource readonly probes: StoreProbes /** The engine's live log (mariadb, mongodb); built once, on the first stream. */ readonly liveLog?: () => LiveLog }