SDK
Use the @younndai/domains TypeScript package to fetch, validate, and introspect domain schemas.
The @younndai/domains package provides a typed, framework-agnostic SDK for working with YounndAI Domain schemas.
Install
npm install @younndai/domains
What You Get
- 31 official domains bundled — zero network, instant access
- Full registry client — 10 typed API methods + health check
- Validation engine — 5 constraint checks with async, sync, and batch modes
- JSON Schema export — convert any domain to JSON Schema draft-07
- Schema introspection — explore domain structure programmatically
- Taxonomy engine — classify domains by tier, conformance, trust, and freshness
- Offline bundles — download and use the registry without network
Quick Start
import { resolveDomain, validateRecord } from "@younndai/domains";
// Resolve a domain (bundled → local → remote)
const health = await resolveDomain("yon.health");
// Validate data against a domain record
const result = await validateRecord("yon.fintech", "TXN", {
id: "txn-001",
amount: 1500.5,
currency: "USD",
});
if (!result.valid) {
result.errors.forEach((e) => console.error(`${e.field}: ${e.message}`));
}
Subpath Exports
| Import | Description |
|---|---|
@younndai/domains | Main entry — everything |
@younndai/domains/taxonomy | Classification engine |
@younndai/domains/json-schema | JSON Schema conversion |
