export type CreateApiNotificationsNotificationIdSeenArgs = {notificationId: number}; export type CreateApiNotificationsNotificationIdSeenOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Sets the resolved timestamp to the current date * * POST /notifications/{notificationId}/seen */ export const createApiNotificationsNotificationIdSeen = async (args: CreateApiNotificationsNotificationIdSeenArgs, options?: CreateApiNotificationsNotificationIdSeenOptions) => { 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.notificationId))}/seen${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 };