export type GetApiApiPersonsSendReregistrationEmailArgs = {email: string}; export type GetApiApiPersonsSendReregistrationEmailOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Send a re-registration email for an existing user * * GET /api/persons/sendReregistrationEmail */ export const getApiApiPersonsSendReregistrationEmail = async (args: GetApiApiPersonsSendReregistrationEmailArgs, options: GetApiApiPersonsSendReregistrationEmailOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.email != null) query.append("email", String(args.email)) const url = `${baseUrl.replace(/\/+$/, '')}/api/persons/sendReregistrationEmail${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };