import ObjectCollection from "object-collection";
import type { DollarSign } from "xpresser/types";
import { EventDetails } from "./Types";
export declare type PendingEvent = {
    event: string;
    args: any[];
    added: Date;
};
export declare type FailedEvent = {
    event: string;
    args: any[];
    added: Date;
    retries: Array<{
        date: Date;
        error: {
            message: string;
            stack: string;
        };
    }>;
};
declare class EventsServerDb {
    data: ObjectCollection;
    private readonly $;
    private saveTimeout;
    constructor($: DollarSign, isCommunicator?: boolean);
    serverDbPath(): any;
    communicatorDbPath(): any;
    private setupDb;
    recordPendingEvent(eventDetails: EventDetails, instantly?: boolean): this;
    recordFailedEvent(eventDetails: EventDetails, e: Error): this;
    markAsSuccessful(id: string): this;
    failedEvents(): ObjectCollection<import("object-collection/types").OC_TObject>;
    pendingEvents(): ObjectCollection<import("object-collection/types").OC_TObject>;
    save(isCommunicator?: boolean, instantly?: boolean): this;
}
export default EventsServerDb;
