Commons Events

Base event structures and common event types used across the platform.

Event Schemas

EVENT BaseEventContent

Base event content structure containing common fields for all events.

Namespace: com.matera.dtw.event.base.common

Fields

source
string
Identifies the system (module) where the event was originated from (ie.: checking-account-system)
eventId
uuid
Event Id on the originating system
createdAtUtc
timestamp-millis
Timestamp with milliseconds when the event was generated in UTC
kind
string
The kind (type) of the underlying event. It description should (preferably) include which aggregate the event is associated with (ie.: account-change-type)
EVENT BaseEvent

Base event structure that wraps event content and provides parent event tracking.

Namespace: com.matera.dtw.event.base.common

Fields

content
BaseEventContent
Event data
parents
array[BaseEventContent]
The events that originated the underlying event. These events are disposed in an order on which the oldest event come first. The first event is the originating event (default: [])
EVENT Currency

Includes ISO 4217 currency codes plus custom stablecoins and cryptocurrencies.

Namespace: com.matera.dtw.event.common.financial

Type

type
enum
Currency enumeration (default: BRL)
symbols
array
BRL, USD, EUR, BTC, USC, UST, SOL, XRP and all ISO 4217 codes
EVENT FinancialAmount

Monetary amount representation.

Namespace: com.matera.dtw.event.common.financial

Fields

currency
Currency
Currency type (default: BRL)
amount
decimal
Amount as an unscaled value. For values with decimal parts, multiply by the scale. E.g.: $14.85 becomes 1485
EVENT FeatureValue

Transport generic data of different types.

Namespace: com.matera.dtw.event.common.feature

Fields

type
FeatureType
Feature type: BOOLEAN, STRING, DECIMAL, DATE, DATE_RANGE (default: STRING)
booleanValue
boolean | null
Boolean value (default: null)
stringValue
string | null
String value (default: null)
decimalValue
decimal | null
Decimal value with 19 precision (default: null)
dateValue
date | null
Date value (default: null)
dateRangeValue
DateRange | null
Date range value (default: null)
EVENT Limit

Represents a limit in the system.

Namespace: com.matera.dtw.event.common.financial

Fields

limitType
string
Type of limit
amountRange
FinancialAmountRange
The limit amount range. For example, for an overdraft limit of 100 it would be minimum -100 and maximum 0
feature
map[FeatureValue]
Additional limit features/information (default: {})