export type CreateApiRegisteredUrlForGoogleReviewManualEventsArgs = {body: {event: 'google_review.request_manual', event_time: number, timestamp: number, client_id: string, business_id: string, data: {appointment_id?: string | undefined, doctor_id: string, patient_id: string, clinic_id?: string | undefined, google_review_link: string}}}; export type CreateApiRegisteredUrlForGoogleReviewManualEventsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Google Review Manual Event * * POST /registered_url_for_google_review_manual_events */ export const createApiRegisteredUrlForGoogleReviewManualEvents = async (args: CreateApiRegisteredUrlForGoogleReviewManualEventsArgs, options?: CreateApiRegisteredUrlForGoogleReviewManualEventsOptions) => { 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_google_review_manual_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 };