The union every consumer validates against. Replaces the hand-maintained
union in backoffice-api/src/controllers/CustomerEventConsumer.ts.
A plain T.Union, not the DiscriminatedUnion helper from
@cfxlabsinc/controllers: that helper returns a T.Unsafe carrying raw
JSON-Schema oneOf, which AJV understands but TypeBox's own Value.Check
does not — and this package must validate without a Fastify AJV instance.
Importing controllers would also pull Fastify into a library every Lambda
loads. The Fastify route keeps its oneOf wrapper by building it from
customerEventSchemas.
The union every consumer validates against. Replaces the hand-maintained union in
backoffice-api/src/controllers/CustomerEventConsumer.ts.A plain
T.Union, not theDiscriminatedUnionhelper from@cfxlabsinc/controllers: that helper returns aT.Unsafecarrying raw JSON-SchemaoneOf, which AJV understands but TypeBox's ownValue.Checkdoes not — and this package must validate without a Fastify AJV instance. Importingcontrollerswould also pull Fastify into a library every Lambda loads. The Fastify route keeps itsoneOfwrapper by building it fromcustomerEventSchemas.