TimeSeriesStatsConfig<I, O>: {
    aggregate: ((args: TimeSeriesAggregatorFnArgs<I, O>) => O);
    getInputStream: ((args: InputStreamFactoryFnArgs) => Promise<StorageValueStream<I>>);
    reverse?: boolean;
    startDate: number;
    timeFrames: TimeFrame[];
    type: string;
}

Configuration for a time series stats aggregator.

Type Parameters

  • I

    The type of the events in the input stream.

  • O

    The type of the time series entities in the output stream.

Type declaration

  • aggregate: ((args: TimeSeriesAggregatorFnArgs<I, O>) => O)
  • getInputStream: ((args: InputStreamFactoryFnArgs) => Promise<StorageValueStream<I>>)
      • (args: InputStreamFactoryFnArgs): Promise<StorageValueStream<I>>
      • The function representing the event input stream for the given time frame.

        Returns

        The event stream.

        Parameters

        Returns Promise<StorageValueStream<I>>

  • Optional reverse?: boolean

    Whether to process the time series in reverse order (from first to last). If false, then the latest events will be processed first.

  • startDate: number

    The start date in milliseconds at which to start aggregating the time series.

  • timeFrames: TimeFrame[]

    The time frame sizes to aggregate.

  • type: string

    The user defined type of the time series. Must be unique.

Generated using TypeDoc