-
Notifications
You must be signed in to change notification settings - Fork 0
FAQ
No. The client re-exports the types it needs and adds the HTTP methods. Install @ontomorph/holon-types on its own only when you want the contract without the client, for example to build your own transport or share codes across a codebase. See Home.
No. Pure types, plus a handful of small helpers and enums. Nothing is pulled in at install time.
The VocabularyId enum lists the supported source vocabularies: SNOMED-CT, RxNorm, LOINC, ICD11, HPO, FMA, and others. See API-Reference.
Every HOLON error and error response uses the ErrorCode enum, carried by HolonError (.code: ErrorCode, .details?: unknown). Subclasses InvalidEclError, InvalidCqlError, ValidationError, and TransactionError cover the query and validation layers. Match on err.code rather than on message strings. See Guides.
ServiceResult<T> is a discriminated-union type the HOLON services return. Build it with ok(data) or err(message, code), and branch on .success. It puts the expected failure path in the return type instead of a thrown exception. Throwing is still available through HolonError for unexpected failures.
It is written for TypeScript: types, enums, error classes, and result helpers. The enums, error classes, and ok() / err() helpers exist at runtime; the interfaces are type-only.
@ontomorph/holon-client is the HTTP client built on these types. @ontomorph/dtp-sdk is the DTP digital-twin SDK. This package is the foundation the client and the HOLON services build on.
Developer docs: https://developer.ontomorph.com/docs. Issues: https://github.com/ontomorph-core/holon-types/issues.