export type GetApiApiPersonsPersonIdEmbeddedValidationEmailResendArgs = {'accept-language'?: string | undefined, personId: string}; export type GetApiApiPersonsPersonIdEmbeddedValidationEmailResendOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Request a validation email be sent to the embedded person * * GET /api/persons/{personId}/embeddedValidationEmail/resend */ export const getApiApiPersonsPersonIdEmbeddedValidationEmailResend = async (args: GetApiApiPersonsPersonIdEmbeddedValidationEmailResendArgs, options: GetApiApiPersonsPersonIdEmbeddedValidationEmailResendOptions) => { 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))}/embeddedValidationEmail/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 };