import type { DKGAgent } from '@origintrail-official/dkg-agent'; import type { Quad, StoreWorkPriority } from '@origintrail-official/dkg-storage'; declare const QUERY_CATALOG_META_SUBGRAPH = "meta"; export declare class QueryCatalogValidationError extends Error { readonly code = "QUERY_CATALOG_INVALID_WRITE"; constructor(message: string); } export declare class QueryCatalogWriteConflictError extends Error { readonly code = "QUERY_CATALOG_WRITE_CONFLICT"; constructor(message: string); } export interface QueryCatalogReadOptions { signal?: AbortSignal; priority?: StoreWorkPriority; source?: string; callerAgentAddress?: string; /** Temporary read-old bridge for canary data written before this rewrite. */ includeLegacyDirectGraph?: boolean; } export interface QueryCatalogWriteOptions { callerAgentAddress?: string; } export interface QueryCatalogWriteResult { contextGraphId: string; graph: string; subGraphName: typeof QUERY_CATALOG_META_SUBGRAPH; assertionName: string; assertionUri: string; scopeGraphs: string[]; /** Convenience field retained when the whole catalog has one scope. */ scopeGraph?: string; queryCount: number; triplesWritten: number; alreadyExists: boolean; } export declare function contextGraphQueryCatalogMetaUri(contextGraphId: string): string; export declare function legacyContextGraphQueryCatalogGraphUri(contextGraphId: string): string; export declare function buildContextGraphQueryCatalogSelect(graph?: string): string; /** * Read the catalog through the Context Graph query engine so authorization, * view routing, cancellation, and the registered `meta` subgraph boundary are * the same as every other Context Graph read. The exact legacy graph is read * only during the migration window and is never a write target here. */ export declare function readContextGraphQueryCatalogBindings(agent: DKGAgent, contextGraphId: string, options?: QueryCatalogReadOptions): Promise>>; /** * Persist one immutable catalog entry as a normal WM Knowledge Asset in the * Context Graph's registered `meta` subgraph. A content-derived assertion name * makes transport retries idempotent. Partial append failures are recoverable * because retries only add missing triples and never delete existing data. */ export declare function writeContextGraphQueryCatalog(agent: DKGAgent, contextGraphId: string, quads: readonly Quad[], options?: QueryCatalogWriteOptions): Promise; export {}; //# sourceMappingURL=query-catalog-service.d.ts.map