export type CreateApiRegisteredUrlForAppointmentReminderInstantWebhookEventsArgs = {body: {business_id?: string | undefined, event?: string | undefined, event_time?: number | undefined, partition_id?: string | undefined, transaction_id?: string | undefined, data?: ({appointment_id?: string | undefined, doctor_id?: string | undefined, patient_id?: string | undefined, clinic_id?: string | undefined}) | undefined}}; export type CreateApiRegisteredUrlForAppointmentReminderInstantWebhookEventsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Appointment Reminder (Instant) * * POST /registered_url_for_appointment_reminder_instant_webhook_events */ export const createApiRegisteredUrlForAppointmentReminderInstantWebhookEvents = async (args: CreateApiRegisteredUrlForAppointmentReminderInstantWebhookEventsArgs, options?: CreateApiRegisteredUrlForAppointmentReminderInstantWebhookEventsOptions) => { const {baseUrl = "https://api.eka.care", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/registered_url_for_appointment_reminder_instant_webhook_events${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };