export type CreateApiQuestionnairesIdHandoutReviewArgs = {id: string}; export type CreateApiQuestionnairesIdHandoutReviewOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * "Mark reviewed" (ITE-1481): restarts a handout's review clock without a new version. * * POST /Questionnaires/{id}/handout/review */ export const createApiQuestionnairesIdHandoutReview = async (args: CreateApiQuestionnairesIdHandoutReviewArgs, options?: CreateApiQuestionnairesIdHandoutReviewOptions) => { const {baseUrl = "https://api.clinicos.vet/backend/business", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/Questionnaires/${encodeURIComponent(String(args.id))}/handout/review${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };