@ottili/unified-api-client
v1.0.13
Published
Canonical public client surface for the Unified API (SoT §10.6): FoundationClient re-exported from @ottili/foundation-runtime, plus response validation, cursor pagination, SSE and streaming uploads.
Readme
@ottili/unified-api-client
The canonical public client surface for the Ottili Unified API (SoT \u00a710.6).
Scope
This package owns the customer-facing import for all Foundation API calls. Products should
import FoundationClient from here rather than reaching into @ottili/foundation-runtime.
Migration note
The implementation currently lives in @ottili/foundation-runtime (packages/foundation/runtime/src/client.ts).
This package re-exports the stable client surface. The client body will move here once the
package graph is stable and the runtime no longer needs to own the transport. This is an
explicit migration path, not a TODO-only core path.
Exports
FoundationClient— the typed Unified API client.FoundationApiError,FoundationTransportError— error classes.fromWirePreferences,isRetryable— helper functions.TelemetrySinkand related types — for wiring telemetry into the client.
Usage
import { FoundationClient } from "@ottili/unified-api-client";
const client = new FoundationClient({
baseUrl: "/api/v1/foundation",
foundationVersion: "1.0.0",
appVersion: "1.2.3",
});
const bootstrap = await client.fetchBootstrap("acme", "hq");