export type CreateApiApiV1FeedbackSuggestionsIdReopenArgs = {id: string}; export type CreateApiApiV1FeedbackSuggestionsIdReopenOptions = {baseUrl?: string | undefined, cookieAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Re-submit one of your withdrawn suggestions * * POST /api/v1/feedback/suggestions/{id}/reopen */ export const createApiApiV1FeedbackSuggestionsIdReopen = async (args: CreateApiApiV1FeedbackSuggestionsIdReopenArgs, options?: CreateApiApiV1FeedbackSuggestionsIdReopenOptions) => { const {baseUrl = "https://glossary.ethereum.org", fetch: fetchFn = fetch, cookieAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (cookieAuth !== undefined) cookies.push("ethglossary-session=" + encodeURIComponent(cookieAuth)) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/feedback/suggestions/${encodeURIComponent(String(args.id))}/reopen${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 };