export type CreateApiV1PeopleIdResendPortalInviteArgs = {id: string}; export type CreateApiV1PeopleIdResendPortalInviteOptions = {baseUrl?: string | undefined, apikey?: string | undefined, fetch?: typeof fetch | undefined}; /** * Resend portal invite email to a member * * POST /v1/people/{id}/resend-portal-invite */ export const createApiV1PeopleIdResendPortalInvite = async (args: CreateApiV1PeopleIdResendPortalInviteArgs, options?: CreateApiV1PeopleIdResendPortalInviteOptions) => { const {baseUrl = "https://api.trycomp.ai", fetch: fetchFn = fetch, apikey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (apikey !== undefined) headers.set("X-API-Key", apikey) const url = `${baseUrl.replace(/\/+$/, '')}/v1/people/${encodeURIComponent(String(args.id))}/resend-portal-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 };