In the spirit of the revision visibility set event, I propose the following strawman schema for generating events pertaining to user blocks:
title: MediaWiki User Block description: Represents a MW User Block event $schema: http://json-schema.org/draft-04/schema# type: object # standard meta sub-object elided meta: type: object properties: ... # event specific fields user_blocked: type: string description: the user name or IP address being blocked # not required; results in an indefinite block if omitted expiry: type: string description: the timestamp the block expires blocks: type: object properties: name: type: boolean description: whether the name or IP should be suppressed (hidden) email: type: boolean description: whether email sending should be blocked user_talk: type: boolean description: whether the user should be prevented from editing their own talk page account_create: type: boolean description: whether to block account creation from the user or IP reason: type: string description: the reason for creating the block user_id: type: integer description: the user that performed the block user_text: type: string description: the text representation of the user performing the block required: - user_blocked - blocks
This event would be sent for newly added blocks, updates to existing blocks, and block removals; Similar to the the revision visibility set event, the boolean attributes of blocks would describe the desired total block state at the time of the event.
Commence bikeshedding!
See: