@worlds/client) is a typed HTTP client generated
from the canonical
Worlds Data API OpenAPI document. It
mirrors the management-plane client pattern: @wazoo/client talks to the
platform API, @worlds/client talks to the data plane.
Use it for remote data-plane operations: world lifecycle, import, export,
search, SPARQL, and reindexing against data.wazoo.dev.
For an embeddable, provider-swappable interface over the same operations, use
the Worlds SDK instead.
Install
Create a client
Data-plane requests authenticate with awzw_ world token:
List worlds
Search
The data-plane search endpoint performs hybrid retrieval across a world:content, so an agent can bind the exact entity before running
SPARQL.
Import data
SPARQL
Export and reindex
Exporting large worlds
exportWorld paginates. limit is the page size (a positive integer,
defaulting to 1000 quads for application/json and text/plain; serialized RDF
formats return the whole world when limit is omitted), and offset is where
the page starts. When more quads remain, the response carries the next offset as
nextOffset in JSON bodies (and as the X-Next-Offset header in every format).
A nextOffset of undefined means you have reached the end.
Loop until the world is fully exported:
limit/offset as strings: they are query parameters, and the generated
types type them that way.
Self-hosting
Point the client at a self-hosted Worlds Data API instance by overridingbaseUrl:
Generated code
The package is generated with@hey-api/openapi-ts from a committed OpenAPI
snapshot in the
wazootech/worlds-client-ts
repository. Run deno task sync:openapi to refresh the snapshot, and
deno task generate to regenerate src/generated/. CI fails if the checked-in
snapshot drifts from the canonical document.