interface CommandIntent

Represents a request to execute a command with typed payload data.

CommandIntent provides a standardized way to request command execution in Eventicle’s CQRS architecture. It decouples command requests from their implementations, enabling features like remote command execution, load balancing, and message-based architectures.

T - The type of the command payload data

Properties

data

Strongly-typed payload data passed to the command handler.

Contains all information needed to execute the command business logic.

Signature
data: T;

type

Unique identifier for the command type (e.g., 'CreateUser', 'ProcessPayment').

Must match a registered command’s type for successful dispatch.

Signature
type: string;