busabase-sdk 0.10.3 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +11 -1
  2. package/dist/index.d.ts +18768 -18496
  3. package/dist/index.js +262 -124
  4. package/package.json +3 -3
package/README.md CHANGED
@@ -72,7 +72,17 @@ The Node-only helper writes `~/.busabase/airapps/<app-id>.json` with an owner-on
72
72
 
73
73
  ## Data client entry points
74
74
 
75
- **`Busabase` class** — an ergonomic wrapper with namespaced methods (`bb.bases`, `bb.records`, `bb.changeRequests`, `bb.nodes`, `bb.views`, `bb.assets`, `bb.skills`, `bb.docs`, `bb.folders`, `bb.comments`, `bb.auditEvents`, `bb.agent`, `bb.agentTasks`, `bb.embedLinks`, `bb.search()`, `bb.health()`, `bb.me()`). Drop to `bb.client` for the raw oRPC client (e.g. `bb.client.system.meta()`).
75
+ **`Busabase` class** — an ergonomic wrapper with namespaced methods (`bb.bases`, `bb.records`, `bb.changeRequests`, `bb.nodes`, `bb.views`, `bb.assets`, `bb.fileTrees`, `bb.files`, `bb.docs`, `bb.comments`, `bb.auditEvents`, `bb.agent`, `bb.agentTasks`, `bb.embedLinks`, `bb.search()`, `bb.grep()`, `bb.health()`, `bb.me()`). Drop to `bb.client` for the raw oRPC client (e.g. `bb.client.system.meta()`).
76
+
77
+ Reading or listing nodes goes through `bb.nodes`, whatever the node's type:
78
+
79
+ ```ts
80
+ const docs = await bb.nodes.list({ types: ["doc"] }); // flat summaries, one call
81
+ const detail = await bb.nodes.get({ nodeId }); // discriminated by `detail.type`
82
+ if (detail.type === "doc") console.log(detail.body);
83
+ ```
84
+
85
+ `bb.nodes.get` replaced the per-type gets (`docs.get` / `files.get` / `folders.get` / `fileTrees.get`), so a caller holding an id no longer has to discover the node's type before it can read it — and there is no `bb.folders` namespace any more (a folder is `type: "folder"`). `bb.docs` / `bb.files` / `bb.fileTrees` remain for the operations that are genuinely type-specific: creating a node, reading a Doc line range, updating a Doc body, and listing/reading a Skill-, Drive-, or AirApp file.
76
86
 
77
87
  **`createBusabaseClient(config?)`** — returns the raw, fully-typed [oRPC](https://orpc.unnoq.com) client directly, if you'd rather not wrap it in a class:
78
88