Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

742 B
Raw Blame
import { QUERY_METRIC, QUERY_CONDITION, QUERY_TIME } from '../constants'
import type { NotificationChannel } from './NotificationChannel'

export interface Alerts {
  id: string
  pid: string
  name: string
  queryMetric: (typeof QUERY_METRIC)[keyof typeof QUERY_METRIC]
  queryCondition: (typeof QUERY_CONDITION)[keyof typeof QUERY_CONDITION] | null
  queryValue: number | null
  queryTime: (typeof QUERY_TIME)[keyof typeof QUERY_TIME] | null
  queryCustomEvent?: string
  active: boolean
  lastTriggered: string | null
  alertOnNewErrorsOnly?: boolean
  alertOnEveryCustomEvent?: boolean
  created: string
  channels?: NotificationChannel[]
  channelIds?: string[]
  messageTemplate?: string | null
  emailSubjectTemplate?: string | null
}