Skip to content

Repository files navigation

Wazoo Worlds

TypeScript client for the Worlds data-plane API.

JSR JSR Score GitHub Ask DeepWiki

TypeScript client for the Worlds data-plane API at data.wazoo.dev.

This package is generated from the canonical Worlds API OpenAPI document (committed in openapi/openapi.json). Use it for data-plane operations against a hosted or self-hosted Worlds service: world search, SPARQL, import, export, reindex, world lifecycle, and data-plane API keys.

For the embeddable SDK (in-process graph operations over any backend), use @worlds/sdk. For platform management-plane operations (users, usage, limits, billing) use @wazoo/client.

Install

npx jsr add @worlds/client

Usage

import { createClient, searchWorld } from "@worlds/client";

const client = createClient({
  baseUrl: "https://data.wazoo.dev",
  auth: process.env.WORLDS_DATA_PLANE_TOKEN,
});

const response = await searchWorld({
  client,
  path: { id: "w_<world-uid>" },
  body: { query: "explores" },
});

console.log(response.data?.results);

Development

Requires Deno (version pinned in .tool-versions).

deno task ci

Run deno task sync:openapi to refresh openapi/openapi.json. By default it reads the checked-in snapshot at ../worlds-api/openapi/openapi.json (a sibling checkout of the Worlds API repo). In CI (no sibling checkout) it falls back to the committed snapshot on worlds-api main via raw.githubusercontent.com. Set WORLDS_API_OPENAPI_URL=https://data.wazoo.dev/openapi.json to sync from a deployed API. CI runs deno task openapi:check so spec drift fails the build.

Run deno task generate to regenerate src/generated/ from the synced spec via @hey-api/openapi-ts.

About

TypeScript client for the Worlds data-plane API, generated from the Worlds API OpenAPI document

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages