export type GetApiPeoplePeopleIdCustomFormResponseArgs = {people_id: string}; export type GetApiPeoplePeopleIdCustomFormResponseOptions = {baseUrl?: string | undefined, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /people/{people_id}/custom_form_response * * GET /people/{people_id}/custom_form_response */ export const getApiPeoplePeopleIdCustomFormResponse = async (args: GetApiPeoplePeopleIdCustomFormResponseArgs, options?: GetApiPeoplePeopleIdCustomFormResponseOptions) => { const {baseUrl = "https://api.example.test", fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (BearerAuth !== undefined) headers.set('authorization', `Bearer ${BearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/people/${encodeURIComponent(String(args.people_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 };