export type CreateApiV3NotificationsNotificationIdClickArgs = {notificationId: string}; export type CreateApiV3NotificationsNotificationIdClickOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * POST /v3/notifications/{notificationId}/click */ export const createApiV3NotificationsNotificationIdClick = async (args: CreateApiV3NotificationsNotificationIdClickArgs, options: CreateApiV3NotificationsNotificationIdClickOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v3/notifications/${encodeURIComponent(String(args.notificationId))}/click${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 };