import { apiCall } from './util'

export interface RuleAnswer {
    type: string
    value: string
}

export interface Rule {
    id: number
    weight: number
    enabled: boolean
    created: string
    name: string
    value: string
    answer: RuleAnswer
    ttl: number
}

export const getRules = () => apiCall<Rule>('rules');
