title: mediawiki/user/blocks-change description: Represents a MW User Blocks Change event $id: /mediawiki/user/blocks-change/1.1.0 $schema: 'https://json-schema.org/draft-07/schema#' type: object required: - $schema - blocks - database - meta - user_text properties: $schema: description: > A URI identifying the JSONSchema for this event. This should match an schema's $id in a schema repository. E.g. /schema/title/1.0.0 type: string blocks: description: | The current state of blocks for the target user of this user change event. type: object required: - name - email - user_talk - account_create properties: account_create: description: Whether the user/IP is blocked from creating accounts. type: boolean email: description: Whether sending email is blocked. type: boolean expiry_dt: description: > The timestamp the block expires in ISO8601 format. If missing, the blocks do not expire. type: string format: date-time maxLength: 128 name: description: Whether the name or IP should be suppressed (hidden). type: boolean restrictions: description: Array of individual restrictions in the block. type: array items: type: object required: - type - value properties: type: description: Type of the restriction type: string enum: - page - ns value: description: > Namespace ID for namespace restrictions, page ID for page restrictions. type: integer maximum: 9007199254740991 minimum: -9007199254740991 sitewide: description: Whether the block is sitewide or partial. type: boolean user_talk: description: Whether the user is blocked from editing their own talk page. type: boolean comment: description: The comment left by the user that performed this change. type: string database: description: The name of the wiki database this event entity belongs to. type: string minLength: 1 meta: type: object required: - dt - stream properties: domain: description: Domain the event or entity pertains to type: string minLength: 1 dt: description: 'UTC event datetime, in ISO-8601 format' type: string format: date-time maxLength: 128 id: description: Unique ID of this event type: string request_id: description: Unique ID of the request that caused the event type: string stream: description: Name of the stream/queue/dataset that this event belongs in type: string minLength: 1 uri: description: Unique URI identifying the event or entity type: string format: uri-reference maxLength: 8192 performer: description: Represents the user that performed this change. type: object required: - user_text - user_groups - user_is_bot properties: user_edit_count: description: > The number of edits this user has made at the time of this event. Not present for anonymous users. type: integer maximum: 9007199254740991 minimum: 0 user_groups: description: 'A list of the groups this user belongs to. E.g. bot, sysop etc.' type: array items: type: string minLength: 1 user_id: description: > The user id that performed this change. This is optional, and will not be present for anonymous users. type: integer maximum: 9007199254740991 minimum: -9007199254740991 user_is_bot: description: > True if this user is considered to be a bot at the time of this event. This is checked via the $user->isBot() method, which considers both user_groups and user permissions. type: boolean user_registration_dt: description: > The datetime of the user account registration. Not present for anonymous users or if missing in the MW database. type: string format: date-time maxLength: 128 user_text: description: The text representation of the user that performed this change. type: string minLength: 1 prior_state: description: > The prior state of the entity before this event. If a top level entity field is not present in this object, then its value has not changed since the prior event. For user blocks changes, if prior_state is not present, then the User or IP did not have any existing blocks in place at the time this event was emitted. This does not mean this User or IP never had any blocks. It is possible that the User's block had automatically expired and were no longer in place when this event was emitted. type: object properties: blocks: description: > The current state of blocks for the target user of this user change event. type: object required: - name - email - user_talk - account_create properties: account_create: description: Whether the user/IP is blocked from creating accounts. type: boolean email: description: Whether sending email is blocked. type: boolean expiry_dt: description: > The timestamp the block expires in ISO8601 format. If missing, the blocks do not expire. type: string format: date-time maxLength: 128 name: description: Whether the name or IP should be suppressed (hidden). type: boolean restrictions: description: Array of individual restrictions in the block. type: array items: type: object required: - type - value properties: type: description: Type of the restriction type: string enum: - page - ns value: description: > Namespace ID for namespace restrictions, page ID for page restrictions. type: integer maximum: 9007199254740991 minimum: -9007199254740991 sitewide: description: Whether the block is sitewide or partial. type: boolean user_talk: description: Whether the user is blocked from editing their own talk page. type: boolean user_groups: description: | A list of the groups the target user belongs to. E.g. bot, sysop etc. type: array items: type: string minLength: 1 user_id: description: > The user id for the target user. This is optional, and will not be present for anonymous users. type: integer maximum: 9007199254740991 minimum: -9007199254740991 user_text: description: The text representation of the target user. type: string minLength: 1 examples: - $schema: /mediawiki/user/blocks-change/1.1.0 blocks: account_create: true email: false expiry_dt: '2040-01-01T00:00:01Z' name: false restrictions: - type: page value: 1 user_talk: false comment: blocking comment database: examplewiki meta: domain: en.wikipedia.org dt: '2020-01-01T00:00:01Z' request_id: 12345678-1234-5678-1234-567812345678 stream: mediawiki.user-blocks-change uri: 'https://en.wikipedia.org/wiki/User:ExampleUser' performer: user_edit_count: 0 user_groups: - user - bot user_id: 1234567 user_is_bot: true user_registration_dt: '2019-01-01T00:00:01Z' user_text: PermormerUser prior_state: blocks: account_create: true email: false expiry_dt: '2040-01-01T00:00:01Z' name: false restrictions: - type: page value: 2 user_talk: false user_groups: - '*' user_text: 1.2.3.4