import { IModuleLink, SemanticVersion, UNIXTimestamp, UUID } from './SimpleTypes'; export declare enum EventFlag { BULK_UPDATE = "BULK_UPDATE" } export declare type EventFlags = Record; /** * Meta data that expresses the intended audience for an Event */ export interface IEventScope { /** * An OpenID role that is associated with the Event */ role?: any; /** * A list of additional organizations that should recieve this event */ organizations?: UUID[]; } export interface IEvent> { /** * The ID of the Event */ id: UUID; /** * The semantic verison of the Event schema */ version: SemanticVersion; /** * UUID of the Command that was responsible for the event being triggered */ command: UUID; /** * The Unix timestamp of when the Event was emitted */ timestamp: UNIXTimestamp; /** * The Domain associated with the Event */ domain: string; /** * The Module associated with Event */ module: string; /** * A label the identifies the actions and participants assoiated with the Event */ event_type: string; /** * The Organization that the Event belongs too */ organization: IModuleLink; /** * The User that initiated the Event */ user: IModuleLink; /** * The Groups that that the Event belongs too ( From the item ) */ groups: IModuleLink[]; /** * Meta data that expresses the intended audience for an Event */ scope: IEventScope; /** * Meta data used to categorize events */ flags: EventFlags; /** * The body of the Event */ body: T; /** * */ meta?: M; service?: string; service_path?: string[]; root_command?: UUID | null; stream?: UUID | null; }