export type CreateApiV4UsersUserIdResendInviteArgs = {user_id: string | string}; export type CreateApiV4UsersUserIdResendInviteOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Resend invite email to a pending team member * * POST /v4/users/{user_id}/resend-invite */ export const createApiV4UsersUserIdResendInvite = async (args: CreateApiV4UsersUserIdResendInviteArgs, options: CreateApiV4UsersUserIdResendInviteOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v4/users/${encodeURIComponent(String(args.user_id))}/resend-invite${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };