/** * Adapts the official `typesense` Node SDK client to the catalog package's * minimal `TypesenseClient` interface. * * The one behavioral wrinkle this smooths over: the SDK's `documents().import()` * THROWS an `ImportError` when any row fails (for array input) instead of * returning the per-row results. That would short-circuit the catalog * indexer's own import-failure policy (`importFailureMode`), making * `--best-effort` impossible and producing a less informative error than the * adapter's summary. We catch that error and return its `importResults` array * so the adapter stays the single decision point for how to treat row failures * — matching the fetch-based client used in the worker, which also returns the * raw results rather than throwing. */ import type { TypesenseClient } from "./typesense.js"; /** Structural surface implemented by the official Typesense Node SDK client. */ export interface TypesenseSdkClientLike { collections(name?: string): unknown; } export declare function asTypesenseClient(client: TypesenseSdkClientLike): TypesenseClient;