export type UpdateApiAccountsAccountIdArgs = {account_id: string, body: {account?: ({account_setup_completed?: boolean | undefined, configuration?: ({locale?: string | undefined, schedule?: ({fri?: Array | undefined, mon?: Array | undefined, thu?: Array | undefined, tue?: Array | undefined, wed?: Array | undefined, weeks_limit?: ({id?: number | undefined, time?: number | undefined, interval?: string | undefined}) | undefined, consultation_duration?: number | undefined}) | undefined, timezone?: string | undefined, consultation?: ({odontogram?: boolean | undefined, physical_exam?: boolean | undefined, treatment_plan?: boolean | undefined}) | undefined, custom_forms?: ({consultation?: ({vital_signs_elements?: ({height?: boolean | undefined, weight?: boolean | undefined, systole?: boolean | undefined, diastole?: boolean | undefined, body_mass?: boolean | undefined, heart_rate?: boolean | undefined, temperature?: boolean | undefined, respiratory_rate?: boolean | undefined, oxygen_saturation?: boolean | undefined, abdominal_perimeter?: boolean | undefined}) | undefined, lab_test_results_elements?: ({glucose?: boolean | undefined, measurement_type?: boolean | undefined, result_obtained_through?: boolean | undefined, pregnant_without_diabetes?: boolean | undefined}) | undefined}) | undefined, medical_history?: ({diet?: boolean | undefined, perinatal?: boolean | undefined, postnatal?: boolean | undefined, psychiatric?: boolean | undefined, vaccines_mx?: boolean | undefined, pathological?: boolean | undefined, heredo_familial?: boolean | undefined, non_pathological?: boolean | undefined, gineco_obstetrics?: boolean | undefined}) | undefined}) | undefined, custom_roles?: ({all_agendas?: boolean | undefined, administrator?: boolean | undefined, restricted_medic?: boolean | undefined}) | undefined, weekly_email?: boolean | undefined, prescription_copy?: boolean | undefined, interface_language?: string | undefined, prescription_template?: string | undefined, assistant_has_charges_access?: boolean | undefined, assistant_has_clinical_access?: boolean | undefined, print_vital_signs?: boolean | undefined, print_diagnostics?: boolean | undefined}) | undefined, email?: string | undefined, eprescription_enabled?: boolean | undefined, name?: string | undefined, pending_confirmation_email?: string | undefined, physician_institution?: string | undefined, physician_license?: string | undefined, username?: string | undefined, cellphone?: string | undefined, organization_id?: number | undefined, active?: boolean | undefined, bio?: string | undefined, office_state_id?: string | undefined, physician_specialty_id?: string | undefined, cellphone_country_id?: unknown | undefined}) | undefined}}; export type UpdateApiAccountsAccountIdOptions = {baseUrl?: string | undefined, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * PUT /accounts/{account_id} * * PUT /accounts/{account_id} */ export const updateApiAccountsAccountId = async (args: UpdateApiAccountsAccountIdArgs, options?: UpdateApiAccountsAccountIdOptions) => { const {baseUrl = "https://api.example.test", fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (BearerAuth !== undefined) headers.set('authorization', `Bearer ${BearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/accounts/${encodeURIComponent(String(args.account_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", 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 };