import { TimelineEvent } from "../matrix/storage/types"; export declare const TIMELINE_START_TOKEN = "timeline_start"; export declare function eventId(i: number): string; /** `from` is included, `to` is excluded */ export declare function eventIds(from: number, to: number): string[]; export declare class TimelineMock { private _counter; private _dagOrder; private _syncOrder; private _defaultSender; constructor(defaultSender: string); _defaultEvent(id: string): TimelineEvent; _createEvent(func?: (eventId: string) => TimelineEvent): TimelineEvent; _createEvents(n: number, func?: (eventId: string) => TimelineEvent): TimelineEvent[]; insertAfter(token: string, n: number, func?: (eventId: string) => TimelineEvent): string; append(n: number, func?: (eventId: string) => TimelineEvent): string; _getStep(direction: "f" | "b"): 1 | -1; _findIndex(token: string, direction: "f" | "b", eventOrdering: TimelineEvent[]): number; messages(begin: string, end: string | undefined, direction: "f" | "b", limit?: number): { start: string; end: string; chunk: TimelineEvent[]; state: never[]; }; context(eventId: string, limit?: number): { start: string; end: string; event: TimelineEvent; events_before: TimelineEvent[]; events_after: TimelineEvent[]; state: never[]; }; sync(since?: string, limit?: number): { next_batch: string; timeline: { prev_batch: string; events: TimelineEvent[]; limited: boolean; }; }; } export declare function tests(): { "Append events are returned via sync": (assert: any) => void; "Limiting a sync properly limits the returned events": (assert: any) => void; "The context endpoint returns messages in DAG order around an event": (assert: any) => void; "The context endpoint returns the proper number of messages": (assert: any) => void; "The previous batch from a sync returns the previous events": (assert: any) => void; "Two consecutive message fetches are continuous if no new events are inserted": (assert: any) => void; "Two consecutive message fetches detect newly inserted event": (assert: any) => void; "A sync that receives no events has the same next batch as it started with": (assert: any) => void; "An event inserted at the staart still shows up in a sync": (assert: any) => void; "An event inserted at the start does not show up in a non-overlapping message fetch": (assert: any) => void; };