Message payloads and state metadata
These small interfaces compose command, event and snapshot envelopes. They carry metadata supplied by the service; importing or assigning a type never loads history, executes a processor or creates timestamps.
| Field family | Meaning and constraint |
|---|---|
BodyCapable<T>.body / StateCapable<S>.state | Required payload of the selected generic type; no JSON validation, cloning or initialization. A message body is not automatically a complete aggregate state. |
CreateTimeCapable.createTime | Creation time, milliseconds since Unix epoch. |
EventTimeCapable.eventTime / FirstEventTimeCapable.firstEventTime | Last / first event time, milliseconds since Unix epoch. |
SnapshotTimeCapable.snapshotTime | Snapshot timestamp, milliseconds since Unix epoch; does not prove the snapshot contains a particular command. |
EventIdCapable.eventId | String event identifier; distinct from an aggregate identifier. |
OperatorCapable.operator / FirstOperatorCapable.firstOperator | Last / first operator identity string. |
DeletedCapable.deleted | Required boolean deletion marker. This type does not filter deleted records by itself. |
FunctionInfo | Required contextName, name, functionKind, processorName. FunctionInfoCapable.function nests it. |
FunctionKind | COMMAND, ERROR, EVENT, SOURCING or STATE_EVENT classification; not a JavaScript callable function. |
MessageHeaderSqlType | MAP or STRING storage representation label; no SQL serialization is performed by the enum. |
All metadata interfaces have no runtime defaults. For full envelopes and their required inherited fields continue to events/history or snapshot queries.
Exact contracts
FunctionKind
export enum FunctionKind {
COMMAND = 'COMMAND',
ERROR = 'ERROR',
EVENT = 'EVENT',
SOURCING = 'SOURCING',
STATE_EVENT = 'STATE_EVENT',
}2
3
4
5
6
7
packages/wow/src/types/function.ts:21
FunctionInfo
export interface FunctionInfo extends NamedBoundedContext, Named {
functionKind: FunctionKind;
processorName: string;
}2
3
4
packages/wow/src/types/function.ts:51
FunctionInfoCapable
export interface FunctionInfoCapable {
function: FunctionInfo;
}2
3
packages/wow/src/types/function.ts:59
BodyCapable
export interface BodyCapable<T> {
body: T;
}2
3
packages/wow/src/types/messaging.ts:14
CreateTimeCapable
export interface CreateTimeCapable {
createTime: number;
}2
3
packages/wow/src/types/modeling.ts:19
DeletedCapable
export interface DeletedCapable {
deleted: boolean;
}2
3
packages/wow/src/types/modeling.ts:29
EventIdCapable
export interface EventIdCapable {
eventId: string;
}2
3
packages/wow/src/types/modeling.ts:39
EventTimeCapable
export interface EventTimeCapable {
eventTime: number;
}2
3
packages/wow/src/types/modeling.ts:49
FirstEventTimeCapable
export interface FirstEventTimeCapable {
firstEventTime: number;
}2
3
packages/wow/src/types/modeling.ts:59
FirstOperatorCapable
export interface FirstOperatorCapable {
firstOperator: string;
}2
3
packages/wow/src/types/modeling.ts:69
OperatorCapable
export interface OperatorCapable {
operator: string;
}2
3
packages/wow/src/types/modeling.ts:122
SnapshotTimeCapable
export interface SnapshotTimeCapable {
snapshotTime: number;
}2
3
packages/wow/src/types/modeling.ts:148
StateCapable
export interface StateCapable<S> {
state: S;
}2
3
packages/wow/src/types/modeling.ts:165
MessageHeaderSqlType
export enum MessageHeaderSqlType {
MAP = 'MAP',
STRING = 'STRING',
}2
3
4
