export type DeleteApiSchedulerNotificationNotificationIdArgs = {notificationId: number}; export type DeleteApiSchedulerNotificationNotificationIdOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes a notification for a scheduler by provided scheduler ID and notification ID. * * DELETE /scheduler/notification/{notificationId} */ export const deleteApiSchedulerNotificationNotificationId = async (args: DeleteApiSchedulerNotificationNotificationIdArgs, options?: DeleteApiSchedulerNotificationNotificationIdOptions) => { const {baseUrl = "http://localhost:9090", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/scheduler/notification/${encodeURIComponent(String(args.notificationId))}${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 };