@seed-hypermedia/client 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ /**
2
+ * GROBID HTTP client — sends PDFs to a GROBID server for full-text extraction.
3
+ *
4
+ * Expects a running GROBID instance (e.g. via Docker):
5
+ * docker run --rm -p 8070:8070 grobid/grobid:0.8.2-full
6
+ */
7
+ export declare const DEFAULT_GROBID_URL = "http://localhost:8070";
8
+ export interface GrobidOptions {
9
+ /** Base URL of the GROBID server (default: http://localhost:8070) */
10
+ grobidUrl?: string;
11
+ /** Request TEI coordinates for specific element types */
12
+ teiCoordinates?: string[];
13
+ }
14
+ /**
15
+ * Check whether a GROBID server is reachable at the given URL.
16
+ * Returns true if the server responds within the timeout, false otherwise.
17
+ */
18
+ export declare function isGrobidAvailable(grobidUrl?: string, timeoutMs?: number): Promise<boolean>;
19
+ /**
20
+ * Send a PDF to GROBID's processFulltextDocument endpoint and return TEI XML.
21
+ */
22
+ export declare function processFulltextDocument(pdfBuffer: ArrayBuffer | Buffer, options?: GrobidOptions): Promise<string>;