/** * Nexus graph export — business logic extracted from `cleo nexus export`. * * Queries nexus.db for nodes and relations and serializes them to GEXF or * JSON. The CLI handler calls {@link exportNexusGraph} and routes output to * stdout or a file. * * @module nexus/export * @epic T9833 * @task T10062 */ /** Output format for the graph export. */ export type NexusExportFormat = 'gexf' | 'json'; /** Options for {@link exportNexusGraph}. */ export interface NexusExportOptions { /** Serialization format (default: `'gexf'`). */ format?: NexusExportFormat; /** When set, only nodes/relations belonging to this project are exported. */ projectFilter?: string; } /** Result of {@link exportNexusGraph}. */ export interface NexusExportResult { /** Serialized graph content (GEXF XML or JSON string). */ content: string; /** Number of nodes included in the export. */ nodeCount: number; /** Number of edges included in the export. */ edgeCount: number; } /** * Export the nexus graph as GEXF or JSON. * * Queries `nexus.db` for all nodes and relations, applies an optional project * filter, and serializes to the requested format. * * @param opts - Export options * @returns Serialized content and counts * @throws {Error} On unknown format or database errors */ export declare function exportNexusGraph(opts?: NexusExportOptions): Promise; //# sourceMappingURL=export.d.ts.map