export type CreateApiWaiverFormResendBookingConfirmationEmailArgs = {Authorization: string, SiteId: number, formId: string}; export type CreateApiWaiverFormResendBookingConfirmationEmailOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Request to resend a form to a consumer * * POST /WaiverForm/ResendBookingConfirmationEmail */ export const createApiWaiverFormResendBookingConfirmationEmail = async (args: CreateApiWaiverFormResendBookingConfirmationEmailArgs, options?: CreateApiWaiverFormResendBookingConfirmationEmailOptions) => { const {baseUrl = "https://api.mindbodyonline.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.Authorization != null) headers.set("Authorization", String(args.Authorization)) if (args.SiteId != null) headers.set("SiteId", String(args.SiteId)) if (args.formId != null) query.append("formId", String(args.formId)) const url = `${baseUrl.replace(/\/+$/, '')}/WaiverForm/ResendBookingConfirmationEmail${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 };