mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
refactor: simplify Watchlist triggers
This commit is contained in:
@@ -16,8 +16,6 @@ export type EventAction =
|
||||
| 'enum validation expiration'
|
||||
| string
|
||||
|
||||
export type TriggerAction = 'email' | 'chat'
|
||||
|
||||
export interface Event {
|
||||
action: EventAction
|
||||
date: string
|
||||
@@ -79,16 +77,10 @@ export interface User {
|
||||
roles: string[]
|
||||
}
|
||||
|
||||
export interface WatchlistTrigger {
|
||||
event: EventAction
|
||||
action: TriggerAction
|
||||
watchList?: string
|
||||
}
|
||||
|
||||
export interface WatchlistRequest {
|
||||
name?: string
|
||||
domains: string[]
|
||||
triggers?: Array<WatchlistTrigger>
|
||||
trackedEvents?: string[]
|
||||
connector?: string
|
||||
dsn?: string[]
|
||||
}
|
||||
@@ -98,7 +90,7 @@ export interface Watchlist {
|
||||
name?: string
|
||||
token: string
|
||||
domains: Domain[]
|
||||
triggers?: Array<WatchlistTrigger>
|
||||
trackedEvents?: string[]
|
||||
dsn?: string[]
|
||||
connector?: {
|
||||
id: string
|
||||
|
||||
Reference in New Issue
Block a user