export type CreateApiRegisteredUrlForVaccinationReminderWebhookEventsArgs = {body: {event?: string | undefined, service?: string | undefined, event_time?: number | undefined, partition_id?: string | undefined, transaction_id?: string | undefined, data?: ({doctor_id?: string | undefined, patient_id?: string | undefined, patient_name?: string | undefined, doctor_name?: string | undefined, booking_link?: string | undefined, due_date?: string | undefined, vaccines?: string | undefined}) | undefined}}; export type CreateApiRegisteredUrlForVaccinationReminderWebhookEventsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Vaccination Reminder * * POST /registered_url_for_vaccination_reminder_webhook_events */ export const createApiRegisteredUrlForVaccinationReminderWebhookEvents = async (args: CreateApiRegisteredUrlForVaccinationReminderWebhookEventsArgs, options?: CreateApiRegisteredUrlForVaccinationReminderWebhookEventsOptions) => { 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_vaccination_reminder_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 };