export type GetApiConsultationSurveysConsultationSurveyIdCustomFormResponseArgs = {consultation_survey_id: string}; export type GetApiConsultationSurveysConsultationSurveyIdCustomFormResponseOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /consultation_surveys/{consultation_survey_id}/custom_form_response * * GET /consultation_surveys/{consultation_survey_id}/custom_form_response */ export const getApiConsultationSurveysConsultationSurveyIdCustomFormResponse = async (args: GetApiConsultationSurveysConsultationSurveyIdCustomFormResponseArgs, options?: GetApiConsultationSurveysConsultationSurveyIdCustomFormResponseOptions) => { const {baseUrl = "https://api.example.test", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/consultation_surveys/${encodeURIComponent(String(args.consultation_survey_id))}/custom_form_response${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };