export type CreateApiTelehealthWaitingRoomsArgs = {body: {telehealth_waiting_room?: ({person?: ({waiting_room?: boolean | undefined, telephone2?: string | undefined, born_at?: string | undefined, first_name?: string | undefined, last_name?: string | undefined, gender?: string | undefined, email?: string | undefined, phone_country_id?: unknown | undefined, person_attributes?: ({is_under_age?: boolean | undefined}) | undefined}) | undefined, organization_id?: number | undefined, cause?: string | undefined, waiting_room_id?: number | undefined, custom_form_response?: ({respondable_type?: string | undefined, organization_id?: number | undefined, responses?: ({cf_98_070e8aae224f?: ({id?: number | undefined, key?: string | undefined, default_component?: string | undefined, default_options?: ({label?: string | undefined}) | undefined, name?: string | undefined, section_name?: string | undefined, custom_form_id?: number | undefined, custom_field_id?: number | undefined, applicable_model?: string | undefined, value?: unknown | undefined}) | undefined, cf_98_fe56b688854b?: ({id?: number | undefined, key?: string | undefined, default_component?: string | undefined, default_options?: ({label?: string | undefined, options?: (Array<{label?: string | undefined, value?: string | undefined}>) | undefined}) | undefined, name?: string | undefined, section_name?: string | undefined, custom_form_id?: number | undefined, custom_field_id?: number | undefined, applicable_model?: string | undefined, value?: string | undefined}) | undefined, cf_98_508008f65942?: ({id?: number | undefined, key?: string | undefined, default_component?: string | undefined, default_options?: ({label?: string | undefined}) | undefined, name?: string | undefined, section_name?: string | undefined, custom_form_id?: number | undefined, custom_field_id?: number | undefined, applicable_model?: string | undefined, value?: string | undefined}) | undefined}) | undefined}) | undefined}) | undefined}}; export type CreateApiTelehealthWaitingRoomsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * POST /telehealth_waiting_rooms * * POST /telehealth_waiting_rooms */ export const createApiTelehealthWaitingRooms = async (args: CreateApiTelehealthWaitingRoomsArgs, options?: CreateApiTelehealthWaitingRoomsOptions) => { const {baseUrl = "https://api.example.test", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/telehealth_waiting_rooms${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 };