export type DeleteApiNotificationsHashArgs = {hash: string}; export type DeleteApiNotificationsHashOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Sets the resolved timestamp to null * * DELETE /notifications/{hash} */ export const deleteApiNotificationsHash = async (args: DeleteApiNotificationsHashArgs, options?: DeleteApiNotificationsHashOptions) => { const {baseUrl = "https://api.quivo.co", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/notifications/${encodeURIComponent(String(args.hash))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };