import type { IAuthSession } from '@declaro/auth';
import { type IEvent, type IActionDescriptor, ActionDescriptor, type IActionDescriptorInput } from '@declaro/core';
export interface IDomainEvent<T, M = any> extends IEvent {
    eventId: string;
    data?: T;
    meta?: M;
    timestamp: Date;
    descriptor: IActionDescriptor;
    session?: IAuthSession;
}
export interface IDomainEventOptions<TData, TMeta = any> {
    type?: string;
    eventId?: string;
    data?: TData;
    timestamp?: Date;
    descriptor?: IActionDescriptorInput;
    session?: IAuthSession;
    meta?: TMeta;
}
export interface IDomainEventJSON<T, M = any> {
    eventId: string;
    data?: T;
    meta?: M;
    timestamp: string;
    type: string;
    session?: {
        id: string;
    };
}
export declare class DomainEvent<T, M = any> implements IDomainEvent<T, M> {
    readonly eventId: string;
    data?: T;
    timestamp: Date;
    type: string;
    descriptor: ActionDescriptor;
    session?: IAuthSession;
    meta: M;
    constructor(options?: IDomainEventOptions<T, M>);
    toJSON(): IDomainEventJSON<T, M>;
}
