Skip to content

Message payloads and state metadata ​

5.x only

This page applies to the 5.x line only (npm 5.1.x, branch 5.x). From 6.0, @ahoo-wang/fetcher-wow lives in the Wow repository (typescript/) and is documented at wow.ahoo.me; its successor @ahoo-wang/wow-client is on npm from Wow 9.2.0 (9.2.1 or later accepts fetcher 6).

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 familyMeaning and constraint
BodyCapable<T>.body / StateCapable<S>.stateRequired payload of the selected generic type; no JSON validation, cloning or initialization. A message body is not automatically a complete aggregate state.
CreateTimeCapable.createTimeCreation time, milliseconds since Unix epoch.
EventTimeCapable.eventTime / FirstEventTimeCapable.firstEventTimeLast / first event time, milliseconds since Unix epoch.
SnapshotTimeCapable.snapshotTimeSnapshot timestamp, milliseconds since Unix epoch; does not prove the snapshot contains a particular command.
EventIdCapable.eventIdString event identifier; distinct from an aggregate identifier.
OperatorCapable.operator / FirstOperatorCapable.firstOperatorLast / first operator identity string.
DeletedCapable.deletedRequired boolean deletion marker. This type does not filter deleted records by itself.
FunctionInfoRequired contextName, name, functionKind, processorName. FunctionInfoCapable.function nests it.
FunctionKindCOMMAND, ERROR, EVENT, SOURCING or STATE_EVENT classification; not a JavaScript callable function.
MessageHeaderSqlTypeMAP 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 ​

ts
export enum FunctionKind {
  COMMAND = 'COMMAND',
  ERROR = 'ERROR',
  EVENT = 'EVENT',
  SOURCING = 'SOURCING',
  STATE_EVENT = 'STATE_EVENT',
}

packages/wow/src/types/function.ts:21

FunctionInfo ​

ts
export interface FunctionInfo extends NamedBoundedContext, Named {
  functionKind: FunctionKind;
  processorName: string;
}

packages/wow/src/types/function.ts:51

FunctionInfoCapable ​

ts
export interface FunctionInfoCapable {
  function: FunctionInfo;
}

packages/wow/src/types/function.ts:59

BodyCapable ​

ts
export interface BodyCapable<T> {
  body: T;
}

packages/wow/src/types/messaging.ts:14

CreateTimeCapable ​

ts
export interface CreateTimeCapable {
  createTime: number;
}

packages/wow/src/types/modeling.ts:19

DeletedCapable ​

ts
export interface DeletedCapable {
  deleted: boolean;
}

packages/wow/src/types/modeling.ts:29

EventIdCapable ​

ts
export interface EventIdCapable {
  eventId: string;
}

packages/wow/src/types/modeling.ts:39

EventTimeCapable ​

ts
export interface EventTimeCapable {
  eventTime: number;
}

packages/wow/src/types/modeling.ts:49

FirstEventTimeCapable ​

ts
export interface FirstEventTimeCapable {
  firstEventTime: number;
}

packages/wow/src/types/modeling.ts:59

FirstOperatorCapable ​

ts
export interface FirstOperatorCapable {
  firstOperator: string;
}

packages/wow/src/types/modeling.ts:69

OperatorCapable ​

ts
export interface OperatorCapable {
  operator: string;
}

packages/wow/src/types/modeling.ts:122

SnapshotTimeCapable ​

ts
export interface SnapshotTimeCapable {
  snapshotTime: number;
}

packages/wow/src/types/modeling.ts:148

StateCapable ​

ts
export interface StateCapable<S> {
  state: S;
}

packages/wow/src/types/modeling.ts:165

MessageHeaderSqlType ​

ts
export enum MessageHeaderSqlType {
  MAP = 'MAP',
  STRING = 'STRING',
}

packages/wow/src/types/bi.ts:14

Complete symbol index

Released under the Apache License 2.0.