WarmHubClient
Primary TypeScript client for the WarmHub API.
The client groups API calls by domain (repo, thing, shape, commit,
subscription, and related surfaces), applies configured authentication to
every request, and normalizes most transport and backend failures through
WarmHubError. Streamed commit writes may instead throw
PartialStreamSubmissionError when an append outcome is ambiguous.
https://docs.warmhub.ai/sdk/client/
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new WarmHubClient(
apiUrl?,options?):WarmHubClient
Create a WarmHub client.
Pass either an options object or the legacy (apiUrl, options) form. The
options object form is preferred for new code.
Parameters
Section titled “Parameters”apiUrl?
Section titled “apiUrl?”string
options?
Section titled “options?”Returns
Section titled “Returns”WarmHubClient
Constructor
Section titled “Constructor”new WarmHubClient(
options?):WarmHubClient
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”WarmHubClient
Properties
Section titled “Properties”apiUrl
Section titled “apiUrl”
readonlyapiUrl:string
The resolved API base URL the client issues requests against. Defaults to
DEFAULT_API_URL when no apiUrl is passed to the constructor.
readonlyauth:object
Authentication helpers for browser sign-in flows, session checks, and token diagnostics.
getClientId
Section titled “getClientId”getClientId: () =>
Promise<string>
Return the configured browser authentication client ID.
Use this in browser sign-in flows that need to initialize the configured auth provider before redirecting or opening a login UI.
Returns
Section titled “Returns”Promise<string>
sync: () =>
Promise<{ success: boolean; }>
Sync the authenticated identity with WarmHub.
Call after a browser or server session is established so WarmHub can provision or refresh the corresponding user and personal organization records.
Returns
Section titled “Returns”Promise<{ success: boolean; }>
currentUser
Section titled “currentUser”currentUser: () =>
Promise<CurrentUserInfo>
Return the current authenticated WarmHub user.
Throws when the request is unauthenticated or the token cannot be resolved.
Returns
Section titled “Returns”Promise<CurrentUserInfo>
whoami
Section titled “whoami”whoami: () =>
Promise<WhoamiInfo>
Return authentication status, identity details, and token scope diagnostics for the current request.
Returns
Section titled “Returns”Promise<WhoamiInfo>
access
Section titled “access”
readonlyaccess:object
Lightweight permission checks for UI gating and service-side authorization probes.
checkRepoPermission
Section titled “checkRepoPermission”checkRepoPermission: (
orgName,repoName,permission) =>Promise<boolean>
Check whether the caller has a repo-scoped permission.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
permission
Section titled “permission”string
Permission string such as repo:read, repo:write, repo:configure, or repo:admin.
Returns
Section titled “Returns”Promise<boolean>
checkOrgPermission
Section titled “checkOrgPermission”checkOrgPermission: (
orgName,permission) =>Promise<boolean>
Check whether the caller has an org-scoped permission.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
permission
Section titled “permission”string
Permission string such as org:read, org:configure, or org:admin.
Returns
Section titled “Returns”Promise<boolean>
diagnostics
Section titled “diagnostics”
readonlydiagnostics:object
Connectivity and compatibility helpers for checking the configured WarmHub backend.
ping: () =>
Promise<PingResult>
Perform a health-check request against the configured backend URL.
This uses the HTTP health endpoint rather than tRPC, so it is useful for distinguishing connection failures from procedure-level errors.
Returns
Section titled “Returns”Promise<PingResult>
capabilities
Section titled “capabilities”capabilities: () =>
Promise<{ apiVersion: string; minSupportedSdk: string; features: Record<string, boolean>; }>
Return backend API version, minimum supported SDK version, and feature flags.
Returns
Section titled “Returns”Promise<{ apiVersion: string; minSupportedSdk: string; features: Record<string, boolean>; }>
assertCompatible
Section titled “assertCompatible”assertCompatible: () =>
Promise<void>
Verify the installed SDK is at or above the backend’s advertised
minimum supported version, throwing a WarmHubError with a clear
“upgrade to >=X” message when it is not.
Call this once at startup (e.g. immediately after constructing the client) to fail fast on SDK version skew, rather than discovering a removed route deep in the commit pipeline as an opaque error. The result is cached on the client instance — repeated calls reuse the first network round-trip and re-throw the same error if too old.
Returns
Section titled “Returns”Promise<void>
https://github.com/warmhub/warmhub-app/issues/3081
component
Section titled “component”
readonlycomponent:object
Installed component inspection for packages that add shapes, subscriptions, credentials, and seed data to a repository.
The top-level methods cover per-repo installation queries, bundled system installs, and the registry-backed install pipeline used by wh component install <org/name>.
list: (
orgName,repoName,opts?) =>Promise<{ items: Array<{ componentId: string; componentName: string; version?: string; state?: string; source?: string; sourceRef?: string; resolvedSha?: string; manifestHash?: string; installedAt?: string; checkedAt?: string; active: boolean; wref: string; }>; nextCursor?: string; }>
List components installed in a repository.
Pass pagination options when a repository may have many installed components.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
ComponentListOptions
Returns
Section titled “Returns”Promise<{ items: Array<{ componentId: string; componentName: string; version?: string; state?: string; source?: string; sourceRef?: string; resolvedSha?: string; manifestHash?: string; installedAt?: string; checkedAt?: string; active: boolean; wref: string; }>; nextCursor?: string; }>
get: (
orgName,repoName,componentId) =>Promise<{ componentId: string; componentName: string; version?: string; state?: string; source?: string; sourceRef?: string; resolvedSha?: string; manifestHash?: string; installedAt?: string; checkedAt?: string; active: boolean; wref: string; install: { wref: string; pinnedWref?: string; name: string; kind: 'shape' | 'thing' | 'assertion' | 'collection'; shape?: string; shapeName?: string; validatedShape?: string; version: number; data?: unknown; active: boolean; aboutWref?: string; committerWref?: string; createdByWref?: string; metadata?: { durableId: string; thingCreatedAt: number; versionCreatedAt: number; }; }; ownedShapes: Array<{ name: string; kind: 'shape'; active: boolean; version: { version: number; operation: 'add' | 'revise' | 'retract'; data: unknown; dataHash: string; } | null; componentId?: string; }>; ownedThings: Array<{ wref: string; name: string; kind: 'shape' | 'thing' | 'assertion' | 'collection'; shapeName?: string; componentId?: string; version: number; createdAt: number; data?: unknown; active: boolean; aboutWref?: string; metadata?: { durableId: string; thingCreatedAt: number; versionCreatedAt: number; }; }>; }>
Fetch one installed component by component ID.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
componentId
Section titled “componentId”string
Returns
Section titled “Returns”Promise<{ componentId: string; componentName: string; version?: string; state?: string; source?: string; sourceRef?: string; resolvedSha?: string; manifestHash?: string; installedAt?: string; checkedAt?: string; active: boolean; wref: string; install: { wref: string; pinnedWref?: string; name: string; kind: 'shape' | 'thing' | 'assertion' | 'collection'; shape?: string; shapeName?: string; validatedShape?: string; version: number; data?: unknown; active: boolean; aboutWref?: string; committerWref?: string; createdByWref?: string; metadata?: { durableId: string; thingCreatedAt: number; versionCreatedAt: number; }; }; ownedShapes: Array<{ name: string; kind: 'shape'; active: boolean; version: { version: number; operation: 'add' | 'revise' | 'retract'; data: unknown; dataHash: string; } | null; componentId?: string; }>; ownedThings: Array<{ wref: string; name: string; kind: 'shape' | 'thing' | 'assertion' | 'collection'; shapeName?: string; componentId?: string; version: number; createdAt: number; data?: unknown; active: boolean; aboutWref?: string; metadata?: { durableId: string; thingCreatedAt: number; versionCreatedAt: number; }; }>; }>
installSystem
Section titled “installSystem”installSystem: (
orgName,repoName,componentId) =>Promise<{ componentId: string; componentName: string; version: string; state: 'ready' | 'unchanged'; componentInstallShapeCreated: boolean; componentInstallShapeReconciled: boolean; componentConfigShapeCreated: boolean; componentConfigShapeReconciled: boolean; componentInstallRecordCreated: boolean; componentInstallRecordReconciled: boolean; identityShapeCreated: boolean; identityShapeReconciled: boolean; }>
Install an allowlisted bundled system component into a repository.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
componentId
Section titled “componentId”string
Returns
Section titled “Returns”Promise<{ componentId: string; componentName: string; version: string; state: 'ready' | 'unchanged'; componentInstallShapeCreated: boolean; componentInstallShapeReconciled: boolean; componentConfigShapeCreated: boolean; componentConfigShapeReconciled: boolean; componentInstallRecordCreated: boolean; componentInstallRecordReconciled: boolean; identityShapeCreated: boolean; identityShapeReconciled: boolean; }>
registry
Section titled “registry”registry:
object
Registered-component identity and install-pipeline operations.
This sub-surface drives the backend-mediated install flow that powers wh component install <org/name>. It manages registered component identities (register, unregister, list, view, update) and the install pipeline (resolve mints an install id, downloadSource fetches the source archive through the backend, setupCall dispatches the optional setup callback). Use these when building a custom installer; most callers should run the CLI instead.
registry.register
Section titled “registry.register”register: (
orgName,componentName,input) =>Promise<{ id: string; ownerOrgName: string; componentName: string; ref: string; isPrivate: boolean; mintedTokens: boolean; sourceUrl?: string; sourceDefaultRef?: string; setupUrl?: string; uninstallUrl?: string; allowedCallbackDomains: string[]; credentialSetId?: string; credentialSetName?: string; description?: string; createdAt: number; updatedAt: number; }>
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
componentName
Section titled “componentName”string
input?
Section titled “input?”{ isPrivate?: boolean; mintedTokens?: boolean; sourceUrl?: string; sourceDefaultRef?: string; setupUrl?: string; uninstallUrl?: string; allowedCallbackDomains?: string[]; credentialSetName?: string; description?: string; } = {}
Returns
Section titled “Returns”Promise<{ id: string; ownerOrgName: string; componentName: string; ref: string; isPrivate: boolean; mintedTokens: boolean; sourceUrl?: string; sourceDefaultRef?: string; setupUrl?: string; uninstallUrl?: string; allowedCallbackDomains: string[]; credentialSetId?: string; credentialSetName?: string; description?: string; createdAt: number; updatedAt: number; }>
registry.unregister
Section titled “registry.unregister”unregister: (
orgName,componentName) =>Promise<{unregistered:true; }>
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
componentName
Section titled “componentName”string
Returns
Section titled “Returns”Promise<{ unregistered: true; }>
registry.list
Section titled “registry.list”list: (
orgName) =>Promise<unknown>
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
Returns
Section titled “Returns”Promise<unknown>
registry.view
Section titled “registry.view”view: (
orgName,componentName) =>Promise<{ id: string; ownerOrgName: string; componentName: string; ref: string; isPrivate: boolean; mintedTokens: boolean; sourceUrl?: string; sourceDefaultRef?: string; setupUrl?: string; uninstallUrl?: string; allowedCallbackDomains: string[]; credentialSetId?: string; credentialSetName?: string; description?: string; createdAt: number; updatedAt: number; }>
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
componentName
Section titled “componentName”string
Returns
Section titled “Returns”Promise<{ id: string; ownerOrgName: string; componentName: string; ref: string; isPrivate: boolean; mintedTokens: boolean; sourceUrl?: string; sourceDefaultRef?: string; setupUrl?: string; uninstallUrl?: string; allowedCallbackDomains: string[]; credentialSetId?: string; credentialSetName?: string; description?: string; createdAt: number; updatedAt: number; }>
registry.update
Section titled “registry.update”update: (
orgName,componentName,input) =>Promise<{ id: string; ownerOrgName: string; componentName: string; ref: string; isPrivate: boolean; mintedTokens: boolean; sourceUrl?: string; sourceDefaultRef?: string; setupUrl?: string; uninstallUrl?: string; allowedCallbackDomains: string[]; credentialSetId?: string; credentialSetName?: string; description?: string; createdAt: number; updatedAt: number; }>
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
componentName
Section titled “componentName”string
{ isPrivate?: boolean; mintedTokens?: boolean; sourceUrl?: string; sourceDefaultRef?: string; setupUrl?: string; uninstallUrl?: string; allowedCallbackDomains?: string[]; credentialSetName?: string; description?: string; }
Returns
Section titled “Returns”Promise<{ id: string; ownerOrgName: string; componentName: string; ref: string; isPrivate: boolean; mintedTokens: boolean; sourceUrl?: string; sourceDefaultRef?: string; setupUrl?: string; uninstallUrl?: string; allowedCallbackDomains: string[]; credentialSetId?: string; credentialSetName?: string; description?: string; createdAt: number; updatedAt: number; }>
registry.resolve
Section titled “registry.resolve”resolve: (
orgName,componentName,installRepo) =>Promise<{ sourceUrl: string; sourceDefaultRef?: string; hasSetup: boolean; installId: string; }>
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
componentName
Section titled “componentName”string
installRepo
Section titled “installRepo”string
Returns
Section titled “Returns”Promise<{ sourceUrl: string; sourceDefaultRef?: string; hasSetup: boolean; installId: string; }>
registry.downloadSource
Section titled “registry.downloadSource”downloadSource: (
orgName,componentName,input) =>Promise<{ archive: Uint8Array; sourceUrl: string; sourceRef?: string; resolvedSha?: string; componentRef: string; contentType: string; }>
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
componentName
Section titled “componentName”string
{ installRepo: string; ref?: string; }
Returns
Section titled “Returns”Promise<{ archive: Uint8Array; sourceUrl: string; sourceRef?: string; resolvedSha?: string; componentRef: string; contentType: string; }>
registry.setupCall
Section titled “registry.setupCall”setupCall: (
orgName,componentName,input) =>Promise<{ ok: boolean; status: number; body?: string; warnings: string[]; }>
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
componentName
Section titled “componentName”string
{ installId: string; installRepo: string; ref?: string; resolvedSha?: string; }
Returns
Section titled “Returns”Promise<{ ok: boolean; status: number; body?: string; warnings: string[]; }>
cli:
object
Operator-invoked CLI methods (GH-3193).
cli.call(orgName, componentName, method, { installRepo, args })
dispatches a component-declared method via the backend. The backend
loads the install’s manifest snapshot, verifies the method exists,
authorizes the operator, signs the request with the install-repo
credential set (HMAC over ${timestamp}.${body} by default), and
proxies the component service’s JSON response back as the envelope’s
body.
WarmHub-level failures (component not installed, method not in snapshot,
ComponentConfig.cliBaseUrl missing, credentials missing, operator
lacks requiresPermission) come back as a thrown WarmHubError.
Upstream non-2xx responses do not throw — they arrive inside the
envelope as { ok: false, status, body } so the CLI can pretty-print
the component’s own error payload.
cli.call
Section titled “cli.call”call: (
orgName,componentName,method,input) =>Promise<{ ok: boolean; status: number; body?: string; warnings: string[]; }>
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
componentName
Section titled “componentName”string
method
Section titled “method”string
{ installRepo: string; args?: Record<string, unknown>; }
Returns
Section titled “Returns”Promise<{ ok: boolean; status: number; body?: string; warnings: string[]; }>
commit
Section titled “commit”
readonlycommit:object
High-level write surface for submitting WarmHub operations through the commit pipeline.
apply: (
orgName,repoName,message,operations,opts?) =>Promise<OperationSubmitResult>
Submit one or more operations through WarmHub’s commit pipeline.
This is the primary write path for SDK callers. It streams operations to the backend, preserves server-side per-operation results, supports chunking for large submissions, and can attribute writes to a committer wref or installed component.
Simple first-chunk transport failures are retried by default. Ambiguous failures surface as PartialStreamSubmissionError, including the case where an ambiguous attempt is followed by an all-failed retry; inspect error.cause for the underlying AllStreamOperationsFailedError or backend error. Deterministic all-failed submissions without prior ambiguity throw AllStreamOperationsFailedError directly so callers can inspect per-operation failure rows. Validation, auth, conflict, rate-limit, and other definite backend failures surface as WarmHubError. See Transient Retry for the full retry and partial-submission rules.
Writing to an archived organization or repository fails with an ARCHIVED error before any operations are applied.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
message
Section titled “message”string | undefined
Optional commit message stored with the submitted operations.
operations
Section titled “operations”Add, revise, or retract operations to submit in order.
committer?
Section titled “committer?”string
Optional wref identifying the actor on whose behalf the write is made. Must be a full wref string like "Agent/bot-1" (a thing that already exists), or a cross-repo wref like "wh:other-org/other-repo/Agent/bot-1". Bare names such as "eval-runner" are rejected by the backend with a “Thing wref required” error — there is no implicit shape.
componentId?
Section titled “componentId?”string
Attribute writes to an installed component when the caller is allowed to claim it.
chunkSize?
Section titled “chunkSize?”number
Maximum operations per stream append. Values are clamped by the SDK.
skipExisting?
Section titled “skipExisting?”boolean
Return noop for add operations whose target already exists.
streamId?
Section titled “streamId?”string
Advanced continuation hook for caller-managed streams.
allocatedTokens?
Section titled “allocatedTokens?”object[]
Advanced continuation hook for $N / #N token allocation state.
retry?
Section titled “retry?”false | RetryPolicyOptions
Retry policy for transient first-chunk failures, or false to disable automatic retry.
Returns
Section titled “Returns”Promise<OperationSubmitResult>
https://docs.warmhub.ai/sdk/write-methods/
readonlyorg:object
Organization management surface for namespaces, membership, roles, and scoped member permissions.
get: (
orgName) =>Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
Get an organization by name.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
Returns
Section titled “Returns”Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
getCallerRole
Section titled “getCallerRole”getCallerRole: (
orgName) =>Promise<OrgRole|null>
Return the caller’s role in an organization, or null when the caller is not a member.
Useful for UI gating before showing organization-level controls.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
Returns
Section titled “Returns”Promise<OrgRole | null>
list: (
opts?) =>Promise<Page<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>>
List organizations visible to the caller.
Archived organizations are hidden unless includeArchived is set.
Parameters
Section titled “Parameters”OrgListOptions
Returns
Section titled “Returns”Promise<Page<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>>
create
Section titled “create”create: (
name,displayName?,description?) =>Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
Create a new organization.
The description is trimmed and empty strings are ignored. Organization names must avoid reserved public slugs such as docs, api, login, and warmhub.
Parameters
Section titled “Parameters”string
displayName?
Section titled “displayName?”string
Optional display label. Defaults to the organization name when omitted.
description?
Section titled “description?”string
Returns
Section titled “Returns”Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
setDescription
Section titled “setDescription”setDescription: (
orgName,description?) =>Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
Set or clear an organization description.
Descriptions are trimmed; empty strings clear the stored value.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
description?
Section titled “description?”string
Returns
Section titled “Returns”Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
setDisplayName
Section titled “setDisplayName”setDisplayName: (
orgName,displayName) =>Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
Update an organization’s display name.
Display names are trimmed; empty or whitespace-only values are rejected.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
displayName
Section titled “displayName”string
Returns
Section titled “Returns”Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
rename
Section titled “rename”rename: (
orgName,newName) =>Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
Rename an organization in place.
The new slug must satisfy the same naming and reserved-name rules as organization creation.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
newName
Section titled “newName”string
Returns
Section titled “Returns”Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
update
Section titled “update”update: (
input) =>Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
Atomic combined update of an organization’s display name and/or slug.
Both writes run in a single backend transaction so a slug conflict cannot leave a partial display-name change behind. Pass at least one of displayName or newName.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
displayName?
Section titled “displayName?”string
newName?
Section titled “newName?”string
Returns
Section titled “Returns”Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
addMember
Section titled “addMember”addMember: (
orgName,role) =>Promise<{ email: string; firstName?: string; lastName?: string; role: 'owner' | 'admin' | 'editor' | 'viewer'; status: 'active' | 'pending'; invitedBy?: string; createdAt: number; }>
Add a member to an organization or create a pending invite.
The role defaults to editor. If the email address does not belong to an existing WarmHub user, WarmHub creates a pending invite and attempts to send the invite email asynchronously. Only owners can assign the owner role.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
string
"owner" | "admin" | "editor" | "viewer"
Organization role to assign. Defaults to editor.
Returns
Section titled “Returns”Promise<{ email: string; firstName?: string; lastName?: string; role: 'owner' | 'admin' | 'editor' | 'viewer'; status: 'active' | 'pending'; invitedBy?: string; createdAt: number; }>
removeMember
Section titled “removeMember”removeMember: (
orgName,Promise<void>
Remove an active member or revoke a pending invite by email address.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
string
Returns
Section titled “Returns”Promise<void>
changeMemberRole
Section titled “changeMemberRole”changeMemberRole: (
orgName,role) =>Promise<{ email: string; firstName?: string; lastName?: string; role: 'owner' | 'admin' | 'editor' | 'viewer'; status: 'active' | 'pending'; invitedBy?: string; createdAt: number; }>
Change a member’s organization role.
Only owners can promote another member to owner or demote an existing owner. WarmHub rejects attempts to remove the final owner.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
string
"owner" | "admin" | "editor" | "viewer"
Returns
Section titled “Returns”Promise<{ email: string; firstName?: string; lastName?: string; role: 'owner' | 'admin' | 'editor' | 'viewer'; status: 'active' | 'pending'; invitedBy?: string; createdAt: number; }>
setMemberScopes
Section titled “setMemberScopes”setMemberScopes: (
orgName,scopes) =>Promise<void>
Replace a member’s scoped permission entries.
Each entry targets either the organization (acme) or one repository (acme/world) and carries the full desired permission set for that resource. Matching entries replace the role-derived permission set for that resource; include every permission the member should retain.
Member scope entries share the same wire shape as personal access token scopes, but allowedMatches is enforced for PATs only. Member scopes cannot restrict access by thing-name glob.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
string
scopes
Section titled “scopes”WireScopeEntry[]
Scoped permission entries with resource and permissions fields.
Returns
Section titled “Returns”Promise<void>
clearMemberScopes
Section titled “clearMemberScopes”clearMemberScopes: (
orgName,Promise<void>
Remove all scoped permission entries from a member.
After clearing, the member’s effective access comes from their organization role only.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
string
Returns
Section titled “Returns”Promise<void>
listMembers
Section titled “listMembers”listMembers: (
orgName,opts?) =>Promise<OrgMemberList>
List organization members and pending invites.
The response includes the caller’s current organization role so frontend settings pages can gate owner/admin-only controls without making a second request.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
OrgListMembersOptions
Returns
Section titled “Returns”Promise<OrgMemberList>
archive
Section titled “archive”archive: (
orgName) =>Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
Archive an organization, blocking new repositories and membership changes.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
Returns
Section titled “Returns”Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
unarchive
Section titled “unarchive”unarchive: (
orgName) =>Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
Unarchive an organization.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
Returns
Section titled “Returns”Promise<{ name: string; displayName: string; description?: string; tier: 'free' | 'pro' | 'enterprise'; archivedAt?: number; createdAt: number; repoCount?: number; errorCount?: number; lastActivityAt?: number; }>
readonlyrepo:object
Repository management surface for lifecycle operations, metadata, statistics, and content documents.
get: (
orgName,repoName) =>Promise<RepoInfo>
Get a repository by organization and repository name.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<RepoInfo>
getStats
Section titled “getStats”getStats: (
orgName,repoName) =>Promise<{ total: number; byKind: { shape: number; thing: number; assertion: number; }; byShape: Record<string, number>; }>
Return authoritative active-item totals for a single repository.
The returned total is the sum of active shapes, things, and assertions. Use this when billing, quota checks, health reports, or per-shape breakdowns need single-repo stats.
The per-shape breakdown counts active things and assertions by shape.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<{ total: number; byKind: { shape: number; thing: number; assertion: number; }; byShape: Record<string, number>; }>
getStatsBatch
Section titled “getStatsBatch”getStatsBatch: (
orgName,repoNames) =>Promise<RepoStatsBatchResult>
Return active-item totals for up to 100 repositories in one request.
Use this instead of issuing one getStats request per repository when building organization dashboards. Batch entries include the exact total for visible repositories; call getStats for an individual repository when you need the per-shape map.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoNames
Section titled “repoNames”string[]
Returns
Section titled “Returns”Promise<RepoStatsBatchResult>
getConfigureStats
Section titled “getConfigureStats”getConfigureStats: (
orgName,repoName) =>Promise<{ subscriptionCount: number; }>
Return configuration-surface counts for a repository.
Currently this reports the number of subscriptions attached to the repository, which is useful before delete or visibility-change flows.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<{ subscriptionCount: number; }>
getShapeInstanceCounts
Section titled “getShapeInstanceCounts”getShapeInstanceCounts: (
orgName,repoName) =>Promise<Record<string, { things: number; assertions: number; }>>
Return per-shape thing and assertion counts for a repository.
The server computes the totals directly, so callers do not need to page through repository contents to build shape summary UI.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<Record<string, { things: number; assertions: number; }>>
list: (
orgName,opts?) =>Promise<{ items: Array<{ orgName: string; name: string; displayName: string; description?: string; visibility: 'public' | 'private'; archivedAt?: number; createdAt: number; }>; nextCursor?: string; }>
List repositories in an organization.
Archived repositories are hidden by default. Search and sort options are applied before pagination.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
RepoListOptions
Returns
Section titled “Returns”Promise<{ items: Array<{ orgName: string; name: string; displayName: string; description?: string; visibility: 'public' | 'private'; archivedAt?: number; createdAt: number; }>; nextCursor?: string; }>
create
Section titled “create”create: (
orgName,repoName,description?,visibility?,displayName?) =>Promise<RepoInfo>
Create a repository inside an organization.
Repositories are private by default. Descriptions are trimmed and capped by the backend.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
description?
Section titled “description?”string
visibility?
Section titled “visibility?”'public' | 'private'
public or private; defaults to private.
displayName?
Section titled “displayName?”string
Returns
Section titled “Returns”Promise<RepoInfo>
setDescription
Section titled “setDescription”setDescription: (
orgName,repoName,description?) =>Promise<RepoInfo>
Set or clear a repository description.
Descriptions are trimmed; empty strings clear the stored value.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
description?
Section titled “description?”string
Returns
Section titled “Returns”Promise<RepoInfo>
setDisplayName
Section titled “setDisplayName”setDisplayName: (
orgName,repoName,displayName) =>Promise<RepoInfo>
Set a repository display name.
displayName is required and non-empty (trimmed); slug fallback is a
creation-time behavior only and there is no clear-to-slug flow.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
displayName
Section titled “displayName”string
Returns
Section titled “Returns”Promise<RepoInfo>
setVisibility
Section titled “setVisibility”setVisibility: (
orgName,repoName,visibility) =>Promise<RepoInfo>
Set a repository’s visibility to public or private.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
visibility
Section titled “visibility”'public' | 'private'
Returns
Section titled “Returns”Promise<RepoInfo>
rename
Section titled “rename”rename: (
orgName,repoName,newName) =>Promise<RepoInfo>
Rename a repository within its organization.
The new name must be unused in the organization and follow the same path-segment rules as repository creation.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
newName
Section titled “newName”string
Returns
Section titled “Returns”Promise<RepoInfo>
update
Section titled “update”update: (
input) =>Promise<RepoInfo>
Atomic combined update of a repository’s display name and/or slug.
Both writes run in a single backend transaction so a slug conflict cannot leave a partial display-name change behind. Pass at least one of displayName or newName. displayName is rejected when empty — slug fallback is a creation-time behavior only.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
displayName?
Section titled “displayName?”string
newName?
Section titled “newName?”string
Returns
Section titled “Returns”Promise<RepoInfo>
archive
Section titled “archive”archive: (
orgName,repoName) =>Promise<RepoInfo>
Archive a repository, blocking new writes.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<RepoInfo>
unarchive
Section titled “unarchive”unarchive: (
orgName,repoName) =>Promise<RepoInfo>
Unarchive a repository.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<RepoInfo>
delete
Section titled “delete”delete: (
orgName,repoName) =>Promise<{graceExpiresAt:Date; }>
Soft-delete a repository.
The repository is hidden immediately and scheduled for permanent purge after a 30-day grace window. WarmHub blocks deletion when another repository still has inbound cross-repo references, active subscriptions, or active credential grants that depend on the repository.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<{ graceExpiresAt: Date; }>
hardDelete
Section titled “hardDelete”hardDelete: (
orgName,repoName) =>Promise<void>
Immediately and irreversibly purge a repository.
This owner-only operation has no grace window and uses the same inbound-reference guard as delete.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<void>
listPage
Section titled “listPage”listPage: (
orgName,opts?) =>Promise<RepoListPageResult>
List repositories with dashboard-oriented per-repository metadata.
Each item includes exact active counts, an activity-oriented lastWriteAt, and a hasErrors flag for terminal action failures.
Search and sort are applied before pagination, so cursors remain stable across the filtered and ordered list.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
RepoListPageOptions
Returns
Section titled “Returns”Promise<RepoListPageResult>
getReadme
Section titled “getReadme”getReadme: (
orgName,repoName) =>Promise<ThingDetail|null>
Fetch a repository’s Content/Readme markdown record.
The SDK contract allows null; current backend behavior returns a synthesized empty stub for repositories that have not committed README content yet. Callers should still null-check defensively.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<ThingDetail | null>
generateReadme
Section titled “generateReadme”generateReadme: (
orgName,repoName) =>Promise<{content:string; }>
Generate a README draft from the repository’s current shapes, things, and assertions.
This does not commit the draft. Save returned content with setReadme after review.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<{ content: string; }>
getAgents
Section titled “getAgents”getAgents: (
orgName,repoName) =>Promise<ThingDetail|null>
Fetch a repository’s Content/Agents markdown record.
The SDK contract allows null; current backend behavior mirrors getReadme and returns a synthesized empty stub when no AGENTS.md content has been committed yet.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<ThingDetail | null>
setReadme
Section titled “setReadme”setReadme: (
orgName,repoName,content) =>Promise<{ committer?: string; createdByEmail?: string; message?: string; operationCount: number; operations: Array<{ opIndex?: number; name: string; operation: 'add' | 'revise' | 'retract' | 'noop'; version: number; dataHash: string; status?: 'applied' | 'noop'; warnings?: { undeclaredFields: Array<string>; undeclaredFieldsTruncated?: true; totalUndeclared?: number; }; }>; }>
Commit a new Content/Readme value.
The backend adds or revises the content record through the normal commit pipeline.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
content
Section titled “content”string
Returns
Section titled “Returns”Promise<{ committer?: string; createdByEmail?: string; message?: string; operationCount: number; operations: Array<{ opIndex?: number; name: string; operation: 'add' | 'revise' | 'retract' | 'noop'; version: number; dataHash: string; status?: 'applied' | 'noop'; warnings?: { undeclaredFields: Array<string>; undeclaredFieldsTruncated?: true; totalUndeclared?: number; }; }>; }>
setAgents
Section titled “setAgents”setAgents: (
orgName,repoName,content) =>Promise<{ committer?: string; createdByEmail?: string; message?: string; operationCount: number; operations: Array<{ opIndex?: number; name: string; operation: 'add' | 'revise' | 'retract' | 'noop'; version: number; dataHash: string; status?: 'applied' | 'noop'; warnings?: { undeclaredFields: Array<string>; undeclaredFieldsTruncated?: true; totalUndeclared?: number; }; }>; }>
Commit a new Content/Agents value through the normal commit pipeline.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
content
Section titled “content”string
Returns
Section titled “Returns”Promise<{ committer?: string; createdByEmail?: string; message?: string; operationCount: number; operations: Array<{ opIndex?: number; name: string; operation: 'add' | 'revise' | 'retract' | 'noop'; version: number; dataHash: string; status?: 'applied' | 'noop'; warnings?: { undeclaredFields: Array<string>; undeclaredFieldsTruncated?: true; totalUndeclared?: number; }; }>; }>
generateAgents
Section titled “generateAgents”generateAgents: (
orgName,repoName) =>Promise<{content:string; }>
Generate an AGENTS.md draft from the repository’s current content and schema.
This does not commit the draft. Save returned content with setAgents after review.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<{ content: string; }>
getLlmsTxt
Section titled “getLlmsTxt”getLlmsTxt: (
orgName,repoName) =>Promise<SynthesizedRepoContent>
Fetch the synthesized Content/LlmsTxt sitemap for a repository.
The returned markdown follows the llms.txt convention. Authenticated callers also receive structured reference metadata partitioned by readable outbound and inbound references; cross-org references the caller cannot read are omitted.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<SynthesizedRepoContent>
index:
object
Field-index diagnostics.
index.describe
Section titled “index.describe”describe: (
orgName,repoName) =>Promise<IndexedFieldsReport>
Describe all indexed fields for a repo, grouped by state.
Returns ready, building, failed, and other buckets (read-only diagnostics).
Use wh repo describe --indexed-fields --repo <org/repo>.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<IndexedFieldsReport>
https://docs.warmhub.ai/sdk/repo-stats/
readonlyshape:object
Shape management surface for schema definitions that validate things and assertions.
list: (
orgName,repoName,opts?) =>Promise<{ items: Array<{ name: string; kind: 'shape'; active: boolean; version: { version: number; operation: 'add' | 'revise' | 'retract'; data: unknown; dataHash: string; } | null; componentId?: string; }>; }>
List shape definitions in a repository.
Options can include retracted shapes, filter by component ownership, or hide component-owned shapes.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
ShapeListOptions
Returns
Section titled “Returns”Promise<{ items: Array<{ name: string; kind: 'shape'; active: boolean; version: { version: number; operation: 'add' | 'revise' | 'retract'; data: unknown; dataHash: string; } | null; componentId?: string; }>; }>
get: (
orgName,repoName,shapeName,opts?) =>Promise<{ name: string; kind: 'shape'; active: boolean; version: { version: number; operation: 'add' | 'revise' | 'retract'; data: unknown; dataHash: string; } | null; componentId?: string; }>
Get one shape definition by name.
Returns the full shape thing record, with name,
kind: "shape", active, and a nested version: { version, operation, data, dataHash } | null. This is not the same shape as the
shape returned by create and revise: the change result
is flat (name, operation, version: number, dataHash) and does
not carry data. To read shape fields, call get and read
result.version?.data — the change result alone is not enough.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
shapeName
Section titled “shapeName”string
ShapeGetOptions
Returns
Section titled “Returns”Promise<{ name: string; kind: 'shape'; active: boolean; version: { version: number; operation: 'add' | 'revise' | 'retract'; data: unknown; dataHash: string; } | null; componentId?: string; }>
create
Section titled “create”create: (
orgName,repoName,shapeName,fields,opts?) =>Promise<{ name: string; operation: 'add' | 'revise' | 'retract'; version: number; dataHash: string; }>
Create a shape definition.
Shape data should describe the fields used to validate things and assertions with that shape.
Returns { name, operation, version, dataHash }.
The result confirms the write and exposes the new version number, but it
does not include the shape data — call client.shape.get for the
full shape record (with kind, active, and nested
version.data).
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
shapeName
Section titled “shapeName”string
fields
Section titled “fields”Record<string, unknown>
ShapeCreateOptions
Returns
Section titled “Returns”Promise<{ name: string; operation: 'add' | 'revise' | 'retract'; version: number; dataHash: string; }>
revise
Section titled “revise”revise: (
orgName,repoName,shapeName,newFields,opts?) =>Promise<{ name: string; operation: 'add' | 'revise' | 'retract'; version: number; dataHash: string; }>
Revise a shape definition, creating a new shape version.
Returns { name, operation, version, dataHash },
the same flat shape as create. To read the revised fields back, call
client.shape.get for the full shape record.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
shapeName
Section titled “shapeName”string
newFields
Section titled “newFields”Record<string, unknown>
ShapeReviseOptions
Returns
Section titled “Returns”Promise<{ name: string; operation: 'add' | 'revise' | 'retract'; version: number; dataHash: string; }>
remove
Section titled “remove”remove: (
orgName,repoName,shapeName) =>Promise<ShapeRemove>
Retract a shape definition.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
shapeName
Section titled “shapeName”string
Returns
Section titled “Returns”Promise<ShapeRemove>
rename
Section titled “rename”rename: (
orgName,repoName,oldName,newName) =>Promise<RenameResult>
Rename a shape within a repository.
The rename is applied in place: the existing shape history is preserved and no new version is created.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
oldName
Section titled “oldName”string
newName
Section titled “newName”string
Returns
Section titled “Returns”Promise<RenameResult>
history
Section titled “history”history: (
orgName,repoName,name,opts) =>Promise<HistoryResult>
Return add, revise, retract, and rename history for a shape.
Use pagination options for long-lived shapes with many revisions.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
string
ShapeHistoryOptions = {}
Returns
Section titled “Returns”Promise<HistoryResult>
subscription
Section titled “subscription”
readonlysubscription:object
Webhook and cron subscription management surface scoped to a repository.
create
Section titled “create”create: (
input) =>Promise<SubscriptionInfo>
Create a webhook or cron subscription.
Both subscription kinds require a delivery URL. Webhook subscriptions can also forward events from another repository, allow trace reentry, bind fallback delivery, and opt into success notifications. Component identity is set at creation time and follows the same authority rules as commit writes.
Webhook subscriptions must specify a shape filter via shapeName or filterJson.shape, except shape-lifecycle subscriptions which omit both and rely on a { kind: 'shape', ... } filter.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<SubscriptionInfo>
get: (
orgName,repoName,name) =>Promise<SubscriptionInfo>
Get one subscription by name.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
string
Returns
Section titled “Returns”Promise<SubscriptionInfo>
list: (
orgName,repoName) =>Promise<SubscriptionList>
List subscriptions attached to a repository.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<SubscriptionList>
update
Section titled “update”update: (
input) =>Promise<SubscriptionInfo>
Update an existing webhook or cron subscription.
Use null for nullable fields such as fallback webhook URL when you need to clear an existing value.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<SubscriptionInfo>
pause: (
orgName,repoName,name) =>Promise<{name:string;active:boolean; }>
Pause a subscription.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
string
Returns
Section titled “Returns”Promise<{ name: string; active: boolean; }>
resume
Section titled “resume”resume: (
orgName,repoName,name) =>Promise<{name:string;active:boolean; }>
Resume a paused subscription.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
string
Returns
Section titled “Returns”Promise<{ name: string; active: boolean; }>
remove
Section titled “remove”remove: (
orgName,repoName,name) =>Promise<{ok:true; }>
Delete a subscription.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
string
Returns
Section titled “Returns”Promise<{ ok: true; }>
bindCredentials
Section titled “bindCredentials”bindCredentials: (
orgName,repoName,subscriptionName,credentialSetName) =>Promise<SubscriptionBindCredentialsResult>
Bind a credential set to a subscription for outbound webhook authentication.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
subscriptionName
Section titled “subscriptionName”string
credentialSetName
Section titled “credentialSetName”string
Returns
Section titled “Returns”Promise<SubscriptionBindCredentialsResult>
unbindCredentials
Section titled “unbindCredentials”unbindCredentials: (
orgName,repoName,subscriptionName) =>Promise<SubscriptionUnbindCredentialsResult>
Remove the credential set currently bound to a subscription.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
subscriptionName
Section titled “subscriptionName”string
Returns
Section titled “Returns”Promise<SubscriptionUnbindCredentialsResult>
https://docs.warmhub.ai/sdk/component-identity/#subscriptions
action
Section titled “action”
readonlyaction:object
Low-level action lease, delivery, run, and notification primitives for subscription consumers.
acquireLease
Section titled “acquireLease”acquireLease: (
orgName,repoName,subscriptionName,holderId,holderType,opts?) =>Promise<ActionLeaseAcquire>
Acquire an exclusive processing lease for a subscription consumer.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
subscriptionName
Section titled “subscriptionName”string
holderId
Section titled “holderId”string
Stable identifier for the process claiming the lease.
holderType
Section titled “holderType”"cli" | "sdk"
Kind of consumer claiming the lease.
graceMs?
Section titled “graceMs?”number
ttlMs?
Section titled “ttlMs?”number
Returns
Section titled “Returns”Promise<ActionLeaseAcquire>
heartbeatLease
Section titled “heartbeatLease”heartbeatLease: (
orgName,repoName,subscriptionName,holderId,ttlMs?) =>Promise<ActionLeaseOp>
Extend the TTL for an existing processing lease.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
subscriptionName
Section titled “subscriptionName”string
holderId
Section titled “holderId”string
ttlMs?
Section titled “ttlMs?”number
Returns
Section titled “Returns”Promise<ActionLeaseOp>
releaseLease
Section titled “releaseLease”releaseLease: (
orgName,repoName,subscriptionName,holderId) =>Promise<ActionLeaseOp>
Release an existing processing lease.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
subscriptionName
Section titled “subscriptionName”string
holderId
Section titled “holderId”string
Returns
Section titled “Returns”Promise<ActionLeaseOp>
claimDelivery
Section titled “claimDelivery”claimDelivery: (
orgName,repoName,runId,holderId) =>Promise<ActionLeaseOp>
Claim one action delivery run for processing.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
string
holderId
Section titled “holderId”string
Returns
Section titled “Returns”Promise<ActionLeaseOp>
completeDelivery
Section titled “completeDelivery”completeDelivery: (
orgName,repoName,runId,holderId) =>Promise<ActionLeaseOp>
Mark one claimed action delivery run as complete.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
string
holderId
Section titled “holderId”string
Returns
Section titled “Returns”Promise<ActionLeaseOp>
liveFeed
Section titled “liveFeed”liveFeed: (
orgName,repoName,subscriptionName,opts?) =>Promise<{ items: Array<{ subscriptionName: string; runId?: string; status: string; matchedOperationIndexes: Array<number>; matchedOperations: Array<{ index: number; operation?: unknown; }>; createdAt: number; updatedAt?: number; runStatus?: string; attemptCount?: number; maxAttempts?: number; lastErrorCode?: string; lastErrorMessage?: string; lastResponseSnippet?: string; traceId?: string; causationId?: string; hopCount?: number; originRunId?: string; originRepoId?: string; actionContainer?: string; }>; nextCursor?: string; }>
Query the live delivery feed for a subscription.
Use this for polling or live-log views that need recent delivery status entries.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
subscriptionName
Section titled “subscriptionName”string
ActionLiveFeedOptions
Returns
Section titled “Returns”Promise<{ items: Array<{ subscriptionName: string; runId?: string; status: string; matchedOperationIndexes: Array<number>; matchedOperations: Array<{ index: number; operation?: unknown; }>; createdAt: number; updatedAt?: number; runStatus?: string; attemptCount?: number; maxAttempts?: number; lastErrorCode?: string; lastErrorMessage?: string; lastResponseSnippet?: string; traceId?: string; causationId?: string; hopCount?: number; originRunId?: string; originRepoId?: string; actionContainer?: string; }>; nextCursor?: string; }>
listRuns
Section titled “listRuns”listRuns: (
orgName,repoName,opts?) =>Promise<{ runId: string; subscriptionName?: string; status: string; matchedOperationIndexes: Array<number>; attemptCount: number; maxAttempts: number; lastErrorCode?: string; lastErrorMessage?: string; traceId?: string; causationId?: string; hopCount?: number; originRunId?: string; originRepoId?: string; createdAt: number; updatedAt: number; }[]>
List subscription action runs for a repository.
The result can be filtered by subscription name, status, and start time.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
ActionListRunsOptions
Returns
Section titled “Returns”Promise<{ runId: string; subscriptionName?: string; status: string; matchedOperationIndexes: Array<number>; attemptCount: number; maxAttempts: number; lastErrorCode?: string; lastErrorMessage?: string; traceId?: string; causationId?: string; hopCount?: number; originRunId?: string; originRepoId?: string; createdAt: number; updatedAt: number; }[]>
getRunAttempts
Section titled “getRunAttempts”getRunAttempts: (
orgName,repoName,runId) =>Promise<{ attempt: number; status: string; startedAt: number; finishedAt?: number; httpStatus?: number; errorCode?: string; errorMessage?: string; responseSnippet?: string; }[]>
List delivery attempts for one action run.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
string
Returns
Section titled “Returns”Promise<{ attempt: number; status: string; startedAt: number; finishedAt?: number; httpStatus?: number; errorCode?: string; errorMessage?: string; responseSnippet?: string; }[]>
listNotifications
Section titled “listNotifications”listNotifications: (
orgName,repoName,opts?) =>Promise<{ subscriptionName?: string; attempt: number; channel: string; status: string; eventType?: string; errorCode?: string; errorMessage?: string; createdAt: number; }[]>
List repo-scoped action notifications.
Use since or limit to bound notification-center style reads.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
ActionListNotificationsOptions
Returns
Section titled “Returns”Promise<{ subscriptionName?: string; attempt: number; channel: string; status: string; eventType?: string; errorCode?: string; errorMessage?: string; createdAt: number; }[]>
readonlything:object
Read surface for things, assertions, histories, references, search, and in-place thing renames.
head: (
orgName,repoName,opts?) =>Promise<HeadResult>
Return the current HEAD snapshot for repository contents.
Filter by shape, kind, assertion target, or glob match pattern, and choose the data mode appropriate for the payload size. Component filters can narrow results to component-owned records or hide component infrastructure records.
Tokenless reads of public repositories have stricter page-size and page-count limits than authenticated reads.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
ThingHeadOptions
Returns
Section titled “Returns”Promise<HeadResult>
headIter
Section titled “headIter”headIter: (
orgName,repoName,opts?) =>AsyncIterableIterator<ThingItem>
Iterate every current HEAD row matching the supplied filters.
Prefer this over hand-written cursor loops when scanning all matching records. Pass opts.cursor to resume from a saved cursor; the iterator advances the cursor automatically after the first request. Pass limit to control page size.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
ThingHeadOptions
Returns
Section titled “Returns”AsyncIterableIterator<ThingItem>
headAll
Section titled “headAll”headAll: (
orgName,repoName,opts?) =>Promise<ThingItem[]>
Materialize every current HEAD row matching the supplied filters.
Use max to guard memory usage; throws a WarmHubError with kind VALIDATION_ERROR once more than max items have actually been observed across pages.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
ThingHeadOptions & object
Returns
Section titled “Returns”Promise<ThingItem[]>
get: (
orgName,repoName,wref,version?,opts?) =>Promise<ThingDetail>
Get one thing, assertion, shape, or collection by wref.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string | undefined
repoName
Section titled “repoName”string | undefined
string
version?
Section titled “version?”number
Optional exact version to pin when the wref is not already version-qualified.
ThingGetOptions
Returns
Section titled “Returns”Promise<ThingDetail>
getWithLease
Section titled “getWithLease”getWithLease: (
orgName,repoName,wref,opts?) =>Promise<ThingGetWithLease>
Acquire a short, bounded, exclusive lease on a thing AND read it in one atomic round trip (#3625).
Returns everything WarmHub.thing.get returns plus a lease
block; the holder echoes lease.id back as leaseId on the subsequent
revise/retract (auto-releasing the lease) or calls
WarmHub.thing.releaseLease to return it early. Requires
things:write — never anonymous.
Fail-fast: if another holder already holds an active lease, throws a
WarmHubError with kind === 'LEASE_UNAVAILABLE' and
error.details?.reason === 'lease_held' (read leaseExpiresAt to back
off until expiry). ttlMs out of the backend’s bounds (default 5s /
min 1s / max 30s) is rejected, never clamped.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
string
ttlMs?
Section titled “ttlMs?”number
Returns
Section titled “Returns”Promise<ThingGetWithLease>
releaseLease
Section titled “releaseLease”releaseLease: (
orgName,repoName,wref,leaseId) =>Promise<void>
Release a lease early (#3625), closing the acquire↔release loop without waiting out the TTL.
Idempotent and owner-gated: releasing an absent, already-released,
expired, or non-matching lease is a benign no-op (no error). A
successful revise/retract carrying the leaseId already
auto-releases the lease, so this is only needed when the holder decides
not to mutate. Requires things:write.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
string
leaseId
Section titled “leaseId”string
Returns
Section titled “Returns”Promise<void>
graph: (
orgName,repoName,wref,opts?) =>Promise<ThingGraphResult>
Get one record and its embedded assertion, about, and wref graph.
Depth and limit options bound traversal size. References the caller cannot read remain string wrefs in the returned graph.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string | undefined
repoName
Section titled “repoName”string | undefined
string
ThingGraphOptions
Returns
Section titled “Returns”Promise<ThingGraphResult>
getMany
Section titled “getMany”getMany: (
orgName,repoName,wrefs,version?,opts?) =>Promise<ThingGetManyResult>
Batch-fetch wrefs, auto-chunking above the backend’s 500-wref transport cap.
The result preserves duplicate requested wrefs and reports inaccessible or missing refs in missing rather than throwing per item. A top-level version pins every unqualified wref; per-wref version pins remain intact.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string | undefined
repoName
Section titled “repoName”string | undefined
string[]
version?
Section titled “version?”number
Optional exact version to apply to unqualified wrefs.
includeRetracted?
Section titled “includeRetracted?”boolean
Include retracted records in items instead of reporting them in missing.
chunkSize?
Section titled “chunkSize?”number
Maximum wrefs per backend request. Defaults to 500 and is clamped to the backend cap.
chunkConcurrency?
Section titled “chunkConcurrency?”number
Maximum concurrent chunk requests. Defaults to 1 and is clamped to 8.
Returns
Section titled “Returns”Promise<ThingGetManyResult>
history
Section titled “history”history: (
orgName,repoName,opts) =>Promise<HistoryResult>
Return version history and timeline metadata for repository records.
Provide at least one selector: a concrete wref, a shape filter, or an assertion target. Shape- and target-filtered histories support pagination and optional collection resolution.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string | undefined
repoName
Section titled “repoName”string | undefined
ThingHistoryOptions
Returns
Section titled “Returns”Promise<HistoryResult>
rename
Section titled “rename”rename: (
orgName,repoName,shapeName,oldName,newName) =>Promise<RenameResult>
Rename a thing within its shape namespace.
The rename is applied in place: the thing’s existing history is preserved and no new version is created.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
shapeName
Section titled “shapeName”string
oldName
Section titled “oldName”string
newName
Section titled “newName”string
Returns
Section titled “Returns”Promise<RenameResult>
resolve
Section titled “resolve”resolve: (
orgName,repoName,wref) =>Promise<ThingDetail>
Resolve a wref to its current projected record.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string | undefined
repoName
Section titled “repoName”string | undefined
string
Returns
Section titled “Returns”Promise<ThingDetail>
about: (
orgName,repoName,wref,opts?) =>Promise<AboutResult>
Return assertions about a thing or collection target.
Filter by assertion shape or glob match pattern, optionally resolve collection targets, and page through large assertion sets with limit and cursor.
Returns { target?, assertions, nextCursor? }.
The array is named assertions, not items. This breaks the repo-wide
items convention used by HeadResult, FilterResult, SearchResult,
RefsResult, and LogResult; destructure explicitly to avoid the trap:
const { target, assertions } = await client.thing.about(org, repo, "Location/cave");for (const a of assertions) console.log(a.wref);Any returned subjective-logic opinion tuple (b, d, u, α) is a binomial opinion — well-formed only when the underlying assertion expresses a binary proposition. See Opinions as Separate Assertions.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string | undefined
repoName
Section titled “repoName”string | undefined
string
AboutOptions
Returns
Section titled “Returns”Promise<AboutResult>
aboutIter
Section titled “aboutIter”aboutIter: (
orgName,repoName,wref,opts?) =>AsyncIterableIterator<Assertion>
Iterate every assertion about a thing or collection target.
Prefer this over hand-written cursor loops when scanning all matching assertions. The iterator reads the assertions envelope field and advances the cursor automatically; pass opts.cursor to resume from a saved cursor and limit to control page size.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string | undefined
repoName
Section titled “repoName”string | undefined
string
AboutOptions
Returns
Section titled “Returns”AsyncIterableIterator<Assertion>
aboutAll
Section titled “aboutAll”aboutAll: (
orgName,repoName,wref,opts?) =>Promise<Assertion[]>
Materialize every assertion about a thing or collection target.
Use max to guard memory usage; throws a WarmHubError with kind VALIDATION_ERROR once more than max assertions have actually been observed across pages.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string | undefined
repoName
Section titled “repoName”string | undefined
string
AboutOptions & object
Returns
Section titled “Returns”Promise<Assertion[]>
query: (
orgName,repoName,opts?) =>Promise<HeadResult>
Query repository records by shape, kind, assertion target, text filters, or glob match pattern.
Use this for structured reads where the caller controls filters. For ranked text or vector search, use thing.search. For count-only reads, use thing.count.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<HeadResult>
queryIter
Section titled “queryIter”queryIter: (
orgName,repoName,opts?) =>AsyncIterableIterator<ThingItem>
Iterate every repository record matching the supplied filters.
Prefer this over hand-written cursor loops when scanning all matching records. Pass opts.cursor to resume from a saved cursor; the iterator advances the cursor automatically after the first request. Pass limit to control page size.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”AsyncIterableIterator<ThingItem>
queryAll
Section titled “queryAll”queryAll: (
orgName,repoName,opts?) =>Promise<ThingItem[]>
Materialize every repository record matching the supplied filters.
Use max to guard memory usage; throws a WarmHubError with kind VALIDATION_ERROR once more than max items have actually been observed across pages.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
FilterOptions & object
Returns
Section titled “Returns”Promise<ThingItem[]>
search
Section titled “search”search: (
orgName,repoName,query,opts?) =>Promise<HeadResult>
Search repository records with text, vector, or hybrid mode.
When searching with an assertion target or collection resolution, pages may be sparse; keep paginating until nextCursor is absent.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
string
Returns
Section titled “Returns”Promise<HeadResult>
count: (
orgName,repoName,opts?) =>Promise<CountResult>
Count matching repository records without returning record data.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
Returns
Section titled “Returns”Promise<CountResult>
refs: (
orgName,repoName,wref,opts?) =>Promise<RefsResult>
Query wref-typed field references for a record.
Inbound mode finds records whose wref fields point at the supplied wref. Outbound mode finds records that the supplied record points to. Inbound queries can be narrowed to a field path.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string | undefined
repoName
Section titled “repoName”string | undefined
string
Returns
Section titled “Returns”Promise<RefsResult>
refsIter
Section titled “refsIter”refsIter: (
orgName,repoName,wref,opts?) =>AsyncIterableIterator<{wref:string;kind?:"shape"|"thing"|"assertion"|"collection";shapeName?:string;version?:number;fieldPath?:string; }>
Iterate every wref-typed field reference for a record.
Prefer this over hand-written cursor loops when scanning all matching references. Pass opts.cursor to resume from a saved cursor; the iterator advances the cursor automatically after the first request. Pass limit to control page size.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string | undefined
repoName
Section titled “repoName”string | undefined
string
Returns
Section titled “Returns”AsyncIterableIterator<{ wref: string; kind?: "shape" | "thing" | "assertion" | "collection"; shapeName?: string; version?: number; fieldPath?: string; }>
refsAll
Section titled “refsAll”refsAll: (
orgName,repoName,wref,opts?) =>Promise<object[]>
Materialize every wref-typed field reference for a record.
Use max to guard memory usage; throws a WarmHubError with kind VALIDATION_ERROR once more than max refs have actually been observed across pages.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string | undefined
repoName
Section titled “repoName”string | undefined
string
RefsOptions & object
Returns
Section titled “Returns”Promise<object[]>
readonlylive:object
Live repository update surface backed by server-sent events.
thingHead
Section titled “thingHead”thingHead: (
orgName,repoName,opts,onUpdate) =>Promise<LiveHandle>
Stream refreshed thing.head results whenever the repository changes.
The SDK re-runs the underlying thing.head query after each invalidation and passes the latest snapshot to onUpdate.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
LiveThingHeadOptions | undefined
onUpdate
Section titled “onUpdate”(result) => void | Promise<void>
Returns
Section titled “Returns”Promise<LiveHandle>
thingHistory
Section titled “thingHistory”thingHistory: (
orgName,repoName,opts,onUpdate) =>Promise<LiveHandle>
Stream refreshed history results for a single wref whenever the repository changes.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
LiveThingHistoryOptions
onUpdate
Section titled “onUpdate”(result) => void | Promise<void>
Returns
Section titled “Returns”Promise<LiveHandle>
subscriptionLog
Section titled “subscriptionLog”subscriptionLog: (
orgName,repoName,subscriptionName,opts,onUpdate) =>Promise<LiveHandle>
Stream refreshed action live-feed entries for a subscription.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
subscriptionName
Section titled “subscriptionName”string
LiveSubscriptionLogOptions | undefined
onUpdate
Section titled “onUpdate”(result) => void | Promise<void>
Returns
Section titled “Returns”Promise<LiveHandle>
subscribe
Section titled “subscribe”subscribe: (
orgName,repoName,opts,onEvent) =>Promise<LiveHandle>
Subscribe to raw repository invalidation events.
Unlike the higher-level live helpers, this method does not re-query. It forwards invalidation metadata such as affected shapes, affected things, affected assertion targets, and whether the event corresponds to a new commit.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string
{ signal?: AbortSignal; } | undefined
Type Literal
Section titled “Type Literal”{ signal?: AbortSignal; }
signal?
Section titled “signal?”AbortSignal
Optional abort signal used to close the SSE stream.
undefined
onEvent
Section titled “onEvent”(event) => void | Promise<void>
Callback invoked for each repository invalidation event.
Returns
Section titled “Returns”Promise<LiveHandle>
readonlytoken:object
Personal access token management for the authenticated user.
create
Section titled “create”create: (
input) =>Promise<{ token: string; name: string; scopes?: Array<{ resource?: string; permissions: Array<string>; allowedMatches?: Array<string>; }>; warnings?: Array<string>; expiresAt: number; createdAt: number; }>
Create a personal access token for the authenticated user.
Omit scopes to mint a token with the same authority as the calling principal. PATs cannot create or revoke other PATs — token-management permissions are excluded from the grantable set. Server enforces a maximum lifetime; pass an expiresAt unix-millis value to clamp earlier.
See Personal Access Tokens for scope grammar (resource format, permission strings, allowedMatches), rotation, and CI usage.
Parameters
Section titled “Parameters”{ name: string; scopes?: Array<{ resource?: string; permissions: Array<string>; allowedMatches?: Array<string>; }>; structured?: boolean; description?: string; expiresAt?: number; committerIdentityWref?: string; }
Returns
Section titled “Returns”Promise<{ token: string; name: string; scopes?: Array<{ resource?: string; permissions: Array<string>; allowedMatches?: Array<string>; }>; warnings?: Array<string>; expiresAt: number; createdAt: number; }>
list: () =>
Promise<TokenInfo[]>
List personal access tokens for the authenticated user.
Returns
Section titled “Returns”Promise<TokenInfo[]>
get: (
name) =>Promise<TokenInfo|null>
Get one personal access token by name.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<TokenInfo | null>
revoke
Section titled “revoke”revoke: (
name) =>Promise<{ ok: boolean; }>
Revoke a personal access token by name.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<{ ok: boolean; }>
stream
Section titled “stream”
readonlystream:object
Low-level stream append surface for callers that already have backend stream operations.
append
Section titled “append”append: (
input) =>Promise<StreamAppendResult>
Append one non-empty chunk of stream operations to a repository.
Most callers should prefer commit.apply or OperationBuilder. Use this low-level surface only when you already have stream operations, a stream ID, and any allocated $N / #N token state you need to continue.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<StreamAppendResult>
credential
Section titled “credential”
readonlycredential:object
Credential set management for subscription webhook authentication and component integrations.
Sets are scoped at creation time. Repo-scoped sets are visible only to the owning repo; org-scoped sets can be granted to multiple repositories in the same organization. Methods that operate on a specific set accept repoName: string | undefined — pass the owning repo name for repo-scoped sets or undefined for org-scoped sets.
createSet
Section titled “createSet”createSet: (
orgName,repoName,name,opts?) =>Promise<CredentialInfo>
Create a credential set.
Credential sets are repo-scoped by default. Org-scoped sets can be granted to multiple repositories in the same organization.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string | undefined
string
scope?
Section titled “scope?”"repo" | "org"
description?
Section titled “description?”string
Returns
Section titled “Returns”Promise<CredentialInfo>
listSets
Section titled “listSets”listSets: (
orgName,repoName?) =>Promise<CredentialInfo[]>
List credential sets visible from a repository.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName?
Section titled “repoName?”string
Returns
Section titled “Returns”Promise<CredentialInfo[]>
getSet
Section titled “getSet”getSet: (
orgName,repoName,name) =>Promise<CredentialInfo>
Get credential set metadata without secret values.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string | undefined
string
Returns
Section titled “Returns”Promise<CredentialInfo>
setKey
Section titled “setKey”setKey: (
orgName,repoName,setName,keyName,value) =>Promise<CredentialKeyMutationResult>
Set or replace one secret key in a credential set.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string | undefined
setName
Section titled “setName”string
keyName
Section titled “keyName”string
string
Returns
Section titled “Returns”Promise<CredentialKeyMutationResult>
setKeys
Section titled “setKeys”setKeys: (
orgName,repoName,setName,secrets) =>Promise<CredentialKeyMutationResult>
Set or replace multiple secret keys in one request.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string | undefined
setName
Section titled “setName”string
secrets
Section titled “secrets”Record<string, string>
Returns
Section titled “Returns”Promise<CredentialKeyMutationResult>
unsetKey
Section titled “unsetKey”unsetKey: (
orgName,repoName,setName,keyName) =>Promise<CredentialKeyMutationResult>
Remove one secret key from a credential set.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string | undefined
setName
Section titled “setName”string
keyName
Section titled “keyName”string
Returns
Section titled “Returns”Promise<CredentialKeyMutationResult>
deleteSet
Section titled “deleteSet”deleteSet: (
orgName,repoName,setName) =>Promise<CredentialDeleteResult>
Delete a credential set and its stored secrets.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string | undefined
setName
Section titled “setName”string
Returns
Section titled “Returns”Promise<CredentialDeleteResult>
listAuditLog
Section titled “listAuditLog”listAuditLog: (
orgName,repoName,setName,opts?) =>Promise<CredentialAuditEntry[]>
List audit entries for a credential set.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string | undefined
setName
Section titled “setName”string
limit?
Section titled “limit?”number
Returns
Section titled “Returns”Promise<CredentialAuditEntry[]>
revokeSet
Section titled “revokeSet”revokeSet: (
orgName,repoName,setName,opts?) =>Promise<CredentialRevokeResult>
Revoke a credential set so it can no longer be exported or bound.
Parameters
Section titled “Parameters”orgName
Section titled “orgName”string
repoName
Section titled “repoName”string | undefined
setName
Section titled “setName”string
reason?
Section titled “reason?”string
Returns
Section titled “Returns”Promise<CredentialRevokeResult>
Methods
Section titled “Methods”withAccessToken()
Section titled “withAccessToken()”withAccessToken(
accessToken):WarmHubClient
Return a new client that shares this client’s backend URL and fetch implementation but uses a different access-token provider.
Parameters
Section titled “Parameters”accessToken
Section titled “accessToken”AccessTokenProvider
Returns
Section titled “Returns”WarmHubClient
Hit a problem or have a question? Get in touch.