import { CueAuth } from './auth'; export declare const ENDPOINT_EXTRACTION = "/semantic-extraction/extract"; export interface ExtractionRequest { /** PNG (or other image) blob of the document page to extract from. */ image: Blob; /** SemanticTemplate JSON object. */ template: object; /** Project / space ID used by the extraction service. */ projectId: string; /** IRI of the pre-selected content category; omit to let the model classify. */ category?: string | null; /** Plain text of the page, used as additional context. */ text?: string | null; /** Desired RDF serialisation — defaults to `'json-ld'`. */ rdfFormat?: 'json-ld' | 'turtle' | 'ntriples' | 'xml'; } export interface ExtractionResponse { /** Parsed JSON-LD document ready for `cue-rdf-graph`. */ jsonld: object; } /** * Client for the Cue semantic-extraction endpoint. * * Exposed as `cue.api.extraction`. * * @example * ```ts * const result = await cue.api.extraction.extract({ * image: pngBlob, * template: myTemplate, * projectId: 'my-project', * }); * // result.jsonld is a JSON-LD document for cue-rdf-graph * ``` */ export declare class CueExtraction { private readonly _auth; private readonly _gatewayUrl; constructor(_auth: CueAuth, _gatewayUrl: string); /** * Run semantic extraction on a document page image. * * Sends a multipart/form-data POST to `/semantic-extraction/extract`. * Always requests JSON-LD so the result can be displayed directly in * `cue-rdf-graph` without any further parsing. */ extract(request: ExtractionRequest): Promise; }