Error wrapper for non-2xx FileBackbone API responses.
Extends Error
(any)
(any)
HTTP client for FileBackbone JSON API (Authorization: Bearer <public_id>.<secret>).
Node: uses undici with long timeouts (FBB_FETCH_TIMEOUT_MS, default 10 minutes).
Browser: pass fetchImpl: window.fetch.bind(window) (no dispatcher / undici).
Auth modes:
token (Bearer header added)token, set csrfToken for mutating requests(Object)
| Name | Description |
|---|---|
$0.baseUrl any
|
|
$0.token any
|
|
$0.csrfToken any
|
|
$0.fetchImpl any
|
|
$0.dispatcher any
|
PUT body to a presigned object URL (no FileBackbone auth header).
(any)
Request a presigned URL for uploading raw blob bytes. Use this when you already have file content and want to upload first, then commit later.
(any)
Check whether a blob object id already exists in storage. Use this to skip uploads for content that is already present.
(any)
Create an API credential from a browser-authenticated session. Use in internal admin flows where a signed-in user manages service credentials.
(any)
Create a repository in a workspace. Use this for app UI flows that need a single API-based repo bootstrap path.
(any)
List branches for a repository. Use this to populate branch selectors and branch-aware UI flows.
(any)
Create a new branch from an existing branch/head. Use this before experimental edits or parallel work streams.
(any)
(any)
Merge one branch into another. Use this for normal integration; endpoint fast-forwards when possible.
Resolve merge conflicts returned by merge_branches. Use this after a conflict response to submit per-path resolutions. Why: conflict paths must be resolved explicitly and atomically so the final merge commit is deterministic.
(number)
(Object)
| Name | Description |
|---|---|
body.into_branch string
|
Branch receiving the merge. |
body.from_branch string
|
Branch being merged in. |
body.expected_into_head (string | null)
|
CAS guard: current into-branch head oid. |
body.resolutions Object<string, (
|
Exact conflict-path map from merge conflict response.
Keys are repo-relative conflict paths; each value is either:
|
List commit history for a repo/branch. Use this for timeline views, audit trails, and debugging change lineage.
(any)
(any)
Read a tree snapshot at a branch/commit/path. Use this to browse directories and files without downloading raw file bytes.
(any)
(any)
Request a presigned URL for uploading file content intended for a repo. Use this when ingesting large files through object-store direct upload.
(any)
(any)
Commit a previously uploaded file into repo history. Use this after presign_file_upload + object PUT to finalize the change on a branch.
(any)
(any)
Create a directory entry in repo history. Use this for explicit folder scaffolding in branch workflows.
(any)
(any)
Delete a file or directory path and commit that change. Use this for controlled removals with full history retention.
(any)
(any)
Move or rename a file/directory path and commit the update. Use this for refactors or reorganizing project structures.
(any)
(any)
Create a symlink entry in repo history. Use this when your workflow needs link semantics instead of copied content.
(any)
(any)
Request a presigned URL to download a committed file. Use this for secure direct object-store downloads from app backends/clients.
(any)
(any)
Retrieve raw file bytes through the API endpoint. Use this for small/inline reads when presigned download is unnecessary.
(any)
(any)
Write text content directly to a path and commit. Use this for editor-like text updates without presign upload steps.
(any)
(any)
Create a staging workspace for batched changes. Use this when a user is making multiple related edits and you do not want partial state on the branch. Why: you can keep draft changes isolated, review/validate them together, and commit atomically once they are coherent. This reduces half-applied updates, lowers merge/conflict noise, and gives UI flows a safer "draft then publish" model.
(any)
(any)
Read staged entries for a staging workspace. Use this to display draft changes before commit.
(any)
(any)
Add or update staged changes in a staging workspace. Use this repeatedly as users edit multiple files in a draft session.
(any)
(any)
(any)
Delete a staging workspace and discard draft edits. Use this when a draft is abandoned or reset.
(any)
(any)
Commit all staged changes to repo history in one operation. Use this to apply multi-file edits atomically with head checks.
(any)
(any)
(any)