inviteUser()
Creates an invitation for a future user account.
Usage
The following example shows a basic usage of the backend client from @wacht/nextjs/server.
import { wachtClient } from '@wacht/nextjs/server';export async function inviteUser(email: string) { const client = await wachtClient(); return client.invitations.inviteUser({ first_name: 'Ada', last_name: 'Lovelace', email_address: email, expiry_days: 7, });}Signature
function inviteUser( request: InviteUserRequest,): Promise<DeploymentInvitation>Parameters
›first_name: string;
first_name: string;Invitee first name.
›last_name: string;
last_name: string;Invitee last name.
›email_address: string;
email_address: string;Invitee email address.
Return value
›result?: DeploymentInvitation | undefined;
result?: DeploymentInvitation | undefined;Operation result payload.
Behavior
- Wraps the corresponding backend endpoint for this capability.
- Use the returned payload as canonical backend state for follow-up operations.