Hooks
Catalog of every @capxul/sdk-react hook — TanStack Query under the hood, one reference page per hook.
@capxul/sdk-react exposes the Capxul platform as React hooks. Every data
hook is TanStack Query under the hood: queries return
UseQueryResult<Data, CapxulError>, mutations return
UseMutationResult<Data, CapxulError, Input>, and each hook exports its
concrete UseCapxul*Return alias. (A few hooks expose a richer shape —
their pages state it exactly.) All hooks must render beneath a
CapxulProvider; until its bootstrap
resolves, queries simply sit in isPending.
This catalog shrank in alpha.23. The hook surface is being rebuilt domain by domain against the new SDK core, and every hook that had no working backend path behind it was removed rather than left as a shell. The rule going forward is no hook without a working backend path — a hook appears here when its domain ships, not before.
Provider & bootstrap
CapxulProvider— the root provider; owns the client bootstrap and the TanStack Query cache.useCapxul— bootstrapstatus/error/retry, for opt-in splash and error UI.useCapxulClientOrNull— advanced escape hatch: the Core SDKCapxulClient, ornullwhile bootstrapping.
Auth & session
useCapxulIdentity— the complete canonical identity, Account, and active Organization state union.useCapxulAuth— the stable six-verb facade for OTP, sign-out, onboarding, and retry.useCapxulDestination— the canonical app-owned routing descriptor.useCapxulTransitions— subscribe to applied/refused identity transition records.CapxulAuthenticationController— renderer-neutral auth slot selection.useCapxulProfile— the signed-in user'sProfile, ornull.
Account
useCapxulIdentity— post-sign-in Account progress and readiness; retry throughuseCapxulAuth.useCapxulAccountBalance— the personal Account's balance and available balance.useCapxulAccountFund— fund the personal Account with an amount ofMoney.
Payments
useCapxulPay— pay a validated recipient; returns the recordedPayment.useCapxulPayments— list the Payments ledger.useCapxulPayment— a singlePaymentby id, ornull.
Organizations
useCapxulOrgs— list the organizations you belong to.useCapxulIdentity— active Organization setup nested under the claimed personal Account.useCapxulOrgMembers— an organization's members.useCapxulOrgRoles— an organization's roles.useCapxulOrgTreasury— an organization's treasury Account: balance and available balance.useCapxulCreateOrg— create an organization.useCapxulInviteMember— invite a member to an organization.
Permissions
useCapxulPermissions— list an Organization's Permissions and assignments.useCapxulPermission— read one Permission by id.useCapxulPermissionCreate— create a Budget ormanagePeoplePermission.useCapxulPermissionChange— change an existing Permission.useCapxulPermissionAssign— assign a Permission to an Account.useCapxulPermissionRevoke— revoke a Permission assignment.useCapxulPermissionReplace— replace the Organization's Permission module generation.
Onboarding
useCapxulAuth— complete a personal profile and start Account setup.CapxulOnboardingController— renderer-neutral personal/Organization onboarding slots and recovery.useCapxulUsernameAvailability— debounced availability check for the username being typed.
Media
useCapxulImageUpload— upload an image and bind it as the profile image or an organization logo.
Removed in alpha.23
The following hooks are gone. Nothing consumed them, and each was either a duplicate of a hook that binds directly to a real SDK method, a documented no-op, or a shell with no working backend path behind it.
| Removed | Use instead |
|---|---|
useCapxulOrg | useCapxulOrgs, then select by id — that is all the hook ever did |
useCapxulOrganizationAccount | useCapxulOrgTreasury (the real Account, with branded Money) |
useCapxulCurrentUser | useCapxulProfile + useCapxulAccountBalance + useCapxulOrgs |
useCapxulSwitchActingEntity | nothing — it was a documented no-op with no SDK side effect |
useCapxulOfframpQuote, useCapxulOfframpStatus, useCapxulOrganizationAuditLog | nothing yet — these return with their rebuilt domains |
The old headless money slot components are also removed. The product owns its screen composition.