import { Event } from './event.js'; import { Range } from './range.js'; import { SearchEvent } from './scanners/searchstate.js'; export declare class Aggregation { id: string; state: State; close: ((lastEvent: Event, states: any) => boolean); type: Aggregator; constructor(id: string, state: State, close: ((lastEvent: Event, states: any) => boolean), type: Aggregator); } export type AggregationOptions = { initialize?: (firstEvent: Event, states: any) => State; reduce?: (state: State, nextEvent: SearchEvent, states: any) => State; start?: (firstEvent: Event, states: any) => ((lastEvent: SearchEvent, states: any) => boolean) | undefined; getId?: (firstEvent: Event, states: any) => string; close?: (state: State, states: any, lastEvent?: SearchEvent) => Output; }; export declare class Aggregator { type: string; getId: (firstEvent: Event, states: any) => string; start: (firstEvent: Event, states: any) => ((lastEvent: Event, states: any) => boolean) | undefined; initialize: (firstEvent: Event, states: any) => State; reduce: (state: State, nextEvent: SearchEvent, states: any) => State; close: (state: State, states: any, lastEvent?: SearchEvent) => Output; cancel?: (state: Output) => boolean; constructor(type: string, getId: (firstEvent: Event, states: any) => string, start: (firstEvent: Event, states: any) => ((lastEvent: Event, states: any) => boolean) | undefined, initialize: (firstEvent: Event, states: any) => State, reduce: (state: State, nextEvent: SearchEvent, states: any) => State, close: (state: State, states: any, lastEvent?: SearchEvent) => Output, cancel?: (state: Output) => boolean); apply(firstEvent: Event): Aggregation | undefined; static create: (type: string, appliesTo: (Event: Event, states: any) => boolean, options: AggregationOptions) => Aggregator; } export declare namespace Aggregator { const Label: (name: any) => Aggregator; const Only: (name: any, aspects: any, extract: (next: SearchEvent) => State) => Aggregator; const All: (name: any, aspects: any, extract: (next: SearchEvent) => Item) => Aggregator<[Range, Item][], [Range, Item][]>; } //# sourceMappingURL=aggregation.d.ts.map