export type GetApiApiPersonsPersonIdValidationEmailResendArgs = {'accept-language'?: string | undefined, personId: string}; export type GetApiApiPersonsPersonIdValidationEmailResendOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Request a validation email be sent to the person * * GET /api/persons/{personId}/validationEmail/resend */ export const getApiApiPersonsPersonIdValidationEmailResend = async (args: GetApiApiPersonsPersonIdValidationEmailResendArgs, options: GetApiApiPersonsPersonIdValidationEmailResendOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['accept-language'] != null) headers.set("accept-language", String(args['accept-language'])) const url = `${baseUrl.replace(/\/+$/, '')}/api/persons/${encodeURIComponent(String(args.personId))}/validationEmail/resend${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 };