export type PatchApiApiV3NotificationsEventsEventIdDismissArgs = {event_id: number}; export type PatchApiApiV3NotificationsEventsEventIdDismissOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Dismiss Notification * * PATCH /api/v3/notifications/events/{event_id}/dismiss */ export const patchApiApiV3NotificationsEventsEventIdDismiss = async (args: PatchApiApiV3NotificationsEventsEventIdDismissArgs, options?: PatchApiApiV3NotificationsEventsEventIdDismissOptions) => { const {baseUrl = "https://dev-api.genji.pk", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/v3/notifications/events/${encodeURIComponent(String(args.event_id))}/dismiss${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };