authed Caller for the user-scoped endpoints.
auth-less Caller for the public signup endpoints
(create, getSignupChallenge) — a brand-new user has
no credentials yet, so registration must not run
credential resolution.
Register a user. Public route — sent without authentication.
Optionalopts: RequestOptionsDelete a user account.
Optionalopts: RequestOptionsFetch the proof-of-work signup challenge a visitor must solve before calling UsersClient.create. Public route — sent without authentication, since the caller is a pre-signup visitor with no credentials.
The result is discriminated on enabled: when the backend stage has no
challenge secret configured the mechanism is entirely off and the caller
proceeds straight to create with no challenge fields.
Optionalopts: RequestOptionsconst res = await client.users.getSignupChallenge();
if (res.enabled) {
const solution = solve(res.challenge); // caller-side proof of work
await client.users.create({
email, termsAccepted: true,
challengeToken: res.challenge.token,
challengeSolution: solution,
hpWebsite: '',
});
} else {
await client.users.create({ email, termsAccepted: true });
}
List the organizations the user is a member of.
Optionalopts: RequestOptionsUpdate a user; returns the updated row.
Optionalopts: RequestOptions
User account CRUD and the user→organizations read.