One schema per registered event, in registry order.
This declares id and createdAt on the wire, as envelopeSchemaFor on
the customer bus (../registry.ts) now does too. Both are present at every
publish (SnsEventPublisher mints id and defaults createdAt), and
§8.20.6 requires every internal consumer to dedupe on the envelope's ULID
id. Omitting them from the schema — as the customer bus originally did —
forces a consumer to cast to read its own dedupe key, the
cast-to-escape-a-type pattern step A removed. Do not "fix" either bus back
toward that shape.
One schema per registered event, in registry order.
This declares
idandcreatedAton the wire, asenvelopeSchemaForon the customer bus (../registry.ts) now does too. Both are present at every publish (SnsEventPublishermintsidand defaultscreatedAt), and §8.20.6 requires every internal consumer to dedupe on the envelope's ULIDid. Omitting them from the schema — as the customer bus originally did — forces a consumer to cast to read its own dedupe key, the cast-to-escape-a-type pattern step A removed. Do not "fix" either bus back toward that shape.