SDK overview
@holaboss/client is a headless SDK for the customer-facing surface of a Holaboss org — portal tables and files, and an employee chat you render yourself.
Reference · SDK
@holaboss/client is a headless client SDK for the customer-facing side of a Holaboss org. It hands
you the data and the primitives; you own the interface. It ships two surfaces:
- Portal data — the signed-in customer's tables and files, via
createApiTransport/createPortalData. This is what a customer portal is built on. → Portal data - Chat — an employee conversation you can embed and style yourself, via
createHolaClient/useChat. → Chat
Install
bun add @holaboss/clientTransport-agnostic
Every create* factory takes a { baseUrl, token } config. token may be a string or an async
getter, so a refreshed token is used on each request:
type Config = {
baseUrl: string;
token: string | (() => string | Promise<string>);
};You can also pass your own transport (implementing HolaTransport) to target a different backend —
the hooks and components don't change.
New to the portal model? Start with Bring your own portal — it walks through sign-in and the SDK end to end.
Everything it exports
| Area | Exports |
|---|---|
| Portal data | createApiTransport, createPortalData, PortalData + PortalRow / PortalTable / PortalFile types |
| Chat client | createHolaClient, HolaClient, createWidgetTransport |
| React | useChat, useThread, <Chat>, HolaProvider, useHolaClient |
| Streaming | textDeltaOf, thinkingDeltaOf, toolEventOf + HolaStreamHandlers |
| Files | useArtifactUrl |
Status: v0.2.0-beta. Chat is stable; the portal-data surface is the newer half and still
settling. Pin the version and check the changelog before upgrading.
Bring your own portal
Build and host your own customer portal on Holaboss using the publishable key and the @holaboss/client SDK.
Portal data
The customer's tables and files — createApiTransport / createPortalData and the PortalData surface (listRows, insertRow, patchRow, deleteRow, uploadFile, fileLink).