import { IAddOrInviteContext , IAddOrInviteResponse } from "../types" ; import { handleNoUsers } from "./handle-no-users" ; import { processAutoAddUsers } from "./process-auto-add-users" ; import { processInviteUsers } from "./process-invite-users" ; private export param { IAddOrInviteContext } context return { IAddOrInviteResponse } export async function addOrInviteOrgUsers ( context ) { if ( ! context . org || context . org . length === 0 ) { return handleNoUsers ( ) ; } return context . canAutoAddUser ? processAutoAddUsers ( context , "org" ) : processInviteUsers ( context , "org" ) ; }