Add support for typed and untyped event payloads