Wire-side envelope — what a consumer receives off the SNS topic, and the
type counterpart of customerEventSchemas. The customer-bus analogue
of InternalEventEnvelope (../internal), differing from the publish-side
CustomerEvent the same two ways: id is present here (the publisher
mints it; consumers dedupe on it) and createdAt is the ISO string the
publisher's Date serialised to.
Spelled out rather than intersected with CustomerEvent:
CustomerEventBase types createdAt as an optional Date, and an
intersection would collapse Date & string to never. Omit is out for
the same reason it is on CustomerEventBase — it flattens the EntityRefs
union arm.
Wire-side envelope — what a consumer receives off the SNS topic, and the type counterpart of customerEventSchemas. The customer-bus analogue of
InternalEventEnvelope(../internal), differing from the publish-side CustomerEvent the same two ways:idis present here (the publisher mints it; consumers dedupe on it) andcreatedAtis the ISO string the publisher'sDateserialised to.Spelled out rather than intersected with CustomerEvent:
CustomerEventBasetypescreatedAtas an optionalDate, and an intersection would collapseDate & stringtonever.Omitis out for the same reason it is onCustomerEventBase— it flattens theEntityRefsunion arm.