interface IScenario {
    announceToLAPI?: boolean;
    check?: ((ip: AddressObject, req: IncomingMessage) => undefined | APITypes.Alert | APITypes.Alert[]);
    enrich?: ((alert: APITypes.Alert, req: IncomingMessage) => undefined | APITypes.Alert);
    extractIp?: ((req: IncomingMessage) => undefined | IIpExtractionResult);
    load?: (() => Promise<void>);
    loaded?: boolean;
    name: string;
}

Implemented by

Properties

announceToLAPI?: boolean

announce current scenario to LAPI

check?: ((ip: AddressObject, req: IncomingMessage) => undefined | APITypes.Alert | APITypes.Alert[])
enrich?: ((alert: APITypes.Alert, req: IncomingMessage) => undefined | APITypes.Alert)
extractIp?: ((req: IncomingMessage) => undefined | IIpExtractionResult)

allow some scenario to extract ip from the request

load?: (() => Promise<void>)

promise to load the scenario

loaded?: boolean

is the scenario loaded ?

name: string

name of the scenario