export type UpdateApiRestGlossaryVersionResetIdArgs = {version: string, id: string}; export type UpdateApiRestGlossaryVersionResetIdOptions = {baseUrl?: string | undefined, apiKeyScheme?: string | undefined, fetch?: typeof fetch | undefined}; /** * Reset a glossary entry * * PUT /rest/glossary/{version}/reset/{id} */ export const updateApiRestGlossaryVersionResetId = async (args: UpdateApiRestGlossaryVersionResetIdArgs, options?: UpdateApiRestGlossaryVersionResetIdOptions) => { 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/glossary/${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 };