import { Schema } from 'effect'; import { Resource, type Context } from '@dxos/context'; import { EchoSchema } from '@dxos/echo-schema'; import { type EchoDatabase } from './database'; import type { RegisterSchemaInput, SchemaRegistry, SchemaRegistryPreparedQuery, SchemaRegistryQuery } from './schema-registry-api'; export type EchoSchemaRegistryOptions = { /** * Run a reactive query for dynamic schemas. * @default true */ reactiveQuery?: boolean; /** * Preload all schema during open. * @default true */ preloadSchemaOnOpen?: boolean; }; /** * Per-space set of mutable schemas. */ export declare class EchoSchemaRegistry extends Resource implements SchemaRegistry { private readonly _db; private readonly _reactiveQuery; private readonly _preloadSchemaOnOpen; private readonly _schemaById; private readonly _schemaByType; private readonly _unsubscribeById; private readonly _schemaSubscriptionCallbacks; constructor(_db: EchoDatabase, { reactiveQuery, preloadSchemaOnOpen }?: EchoSchemaRegistryOptions); protected _open(ctx: Context): Promise; protected _close(ctx: Context): Promise; query(query?: SchemaRegistryQuery): SchemaRegistryPreparedQuery; register(inputs: RegisterSchemaInput[]): Promise; hasSchema(schema: Schema.Schema.AnyNoContext): boolean; /** * @deprecated Use `query` instead. */ getSchema(typename: string): EchoSchema | undefined; /** * @deprecated Use `query` instead. */ getSchemaById(id: string): EchoSchema | undefined; private _register; private _addSchema; private _unregister; private _subscribe; private _notifySchemaListChanged; } //# sourceMappingURL=echo-schema-registry.d.ts.map