export type UpdateApiRestDiseaseVersionResetIdArgs = {version: string, id: string}; export type UpdateApiRestDiseaseVersionResetIdOptions = {baseUrl?: string | undefined, apiKeyScheme?: string | undefined, fetch?: typeof fetch | undefined}; /** * Reset a disease entry * * PUT /rest/disease/{version}/reset/{id} */ export const updateApiRestDiseaseVersionResetId = async (args: UpdateApiRestDiseaseVersionResetIdArgs, options?: UpdateApiRestDiseaseVersionResetIdOptions) => { const {baseUrl = "https://api.seer.cancer.gov", fetch: fetchFn = fetch, apiKeyScheme} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (apiKeyScheme !== undefined) headers.set("X-SEERAPI-Key", apiKeyScheme) const url = `${baseUrl.replace(/\/+$/, '')}/rest/disease/${encodeURIComponent(String(args.version))}/reset/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };