export type CreateApiAdminUsersUserIdResendConfirmationOptions = {baseUrl: string, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Resends email confirmation for a specific user (Admin only) * * POST /admin/users/{user_id}/resend-confirmation * * Also accepts auth: API-Key */ export const createApiAdminUsersUserIdResendConfirmation = async (options: CreateApiAdminUsersUserIdResendConfirmationOptions) => { const {baseUrl, fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (Bearer !== undefined) headers.set("Authorization", Bearer) const url = `${baseUrl.replace(/\/+$/, '')}/admin/users/${encodeURIComponent(String(args.user_id))}/resend-confirmation${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 };