import { Agent , Attributes } from '../models/types' ; export interface Trigger { param agent enable ( agent ) : void ; /** Method to disable the trigger */ disable ( ) : void ; } export enum TriggerState { START = 1 , END = 0 } export type TriggerOptions = { [ key ] : any ; } ; export type TriggerEventOptions = { source : Trigger ; name ? : string ; attributes ? : Attributes ; } ; /** Called when a trigger fires a change in the state */ export interface TriggerEventListener { onTrigger ( state , options ) : void ; }