factor out the event type schemas/constructors/tests into a library (on npm?) that lambdas can `import` from.