Add types for lifecycle events.

TODO'd the structured data.

And yes, I think we should probably log the output of the hook, but it seems part of a general logging solution, rather than lifecycle specific.