inviteUserToOrganization
@svenvw/fdm-source / fdm-core/src / inviteUserToOrganization
Function: inviteUserToOrganization()
inviteUserToOrganization(
fdm
,inviter_id
,role
,organization_id
):Promise
<string
>
Defined in: fdm-core/src/organization.ts:361
Invites a user to an organization.
Parameters
fdm
any
The FDM instance providing the connection to the database.
inviter_id
string
The ID of the user initiating the invitation (must be owner or admin).
email
string
The email address of the user being invited.
role
The role to assign to the invited user in the organization.
"owner"
| "admin"
| "member"
organization_id
string
The ID of the organization to which the user is being invited.
Returns
Promise
<string
>
A promise that resolves with the ID of the newly created invitation.
Throws
Throws an error if any database operation fails, if the user does not have permissions, or if input data is invalid.