Namespaces
invite
Methods and types of the `invite` namespace (`client.invite` / `bot.invite`).
Interfaces
GetInvitesToResourceParams
Properties
| Property | Type |
|---|---|
status? | InviteStatus | InviteStatus[] |
GetUsersInvitesParams
Properties
| Property | Type |
|---|---|
inviteType? | "all" | "inviter" | "invitee" |
status? | InviteStatus | InviteStatus[] |
InviteUserToResourceData
Properties
Type Aliases
AcceptInviteResponse
type AcceptInviteResponse = {
invite: Invite;
membership: Membership;
};Properties
InviteResponse
type InviteResponse = Invite;InviteStatus
type InviteStatus = "active" | "canceled" | "accepted";PaginatedInvitesResponse
type PaginatedInvitesResponse =
| PaginatedResponse<Invite>
| {
invitee: Invite[];
inviter: Invite[];
}
| Invite[];PaginatedResponse
type PaginatedResponse<T> = PaginatedResult | CursorPaginatedResult & {
results?: T[];
};Type Declaration
| Name | Type |
|---|---|
results? | T[] |
Type Parameters
| Type Parameter |
|---|
T |
Functions
default()
function default(client): {
acceptInvite: Promise<AcceptInviteResponse>;
cancelInvite: Promise<Invite>;
getInviteById: Promise<Invite>;
getInvites: Promise<PaginatedInvitesResponse>;
getInvitesForResource: Promise<Invite[]>;
inviteUser: Promise<Invite>;
resendInvite: Promise<Invite>;
};Defines invite-related methods for the NuramaClient.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | default | The NuramaClient instance. |
Returns
An object containing the invite-related methods.
| Name | Type | Description |
|---|---|---|
acceptInvite() | (inviteId) => Promise<AcceptInviteResponse> | Accept an invite for the authenticated user. Creates the membership. |
cancelInvite() | (inviteId) => Promise<Invite> | Revoke a pending invite. |
getInviteById() | (inviteId) => Promise<Invite> | Look up an invite by id. Public — no auth — so the recipient can preview the invite (target resource, role, inviter) before signing up or logging in. |
getInvites() | (params?) => Promise<PaginatedInvitesResponse> | List invites the current user has issued (pending, accepted, expired). |
getInvitesForResource() | (resourceId, params?) => Promise<Invite[]> | List pending invites attached to a workspace or project resource. |
inviteUser() | (data) => Promise<Invite> | Invite a user (by email) to a workspace or project at a given role. Triggers an invitation email; the recipient accepts via the link. |
resendInvite() | (inviteId) => Promise<Invite> | Re-send a pending invite email (does not extend or reissue the token). |