import { DOMAINS } from './DomainInfo'; import { IModuleLink, UUID } from './SimpleTypes'; import { IEvent } from './Event'; export declare enum CommandFlag { BULK_UPDATE = "BULK_UPDATE" } export declare type CommandFlags = Record; export declare type TServiceHeaders = { service?: string; service_path?: string[]; root_command?: UUID | null; parent_command?: UUID | null; stream?: UUID | null; }; export interface CommandHeader extends TServiceHeaders { timestamp: number; uuid: UUID | null; flags: CommandFlags; domain: DOMAINS; module: string; organization: IModuleLink; user: IModuleLink; groups: IModuleLink[]; service?: string; service_path?: string[]; root_command?: UUID | null; parent_event?: UUID | null; parent_command?: UUID | null; stream?: UUID | null; } export interface CommandType { subject: T; verb: U; } export interface Command { header: CommandHeader; command_type: CommandType; body: T; } export interface CreateCommand { domain: DOMAINS; module: string; parentCommand: Command; parentEvent: IEvent; organization: IModuleLink; user: IModuleLink; groups: IModuleLink[]; flags?: CommandFlags; subject: U; uuid?: UUID; verb: V; body: T; service?: string; serviceHeaders?: TServiceHeaders; } export declare class CommandFactory { static Create({ domain, module, organization, parentCommand, parentEvent, user, flags, subject, uuid, verb, body, groups, service, }: CreateCommand): Command; }