When it fires
After UpdateVariablesService succeeds. Used by the bulk update endpoint, which applies one identical patch to every selected variable. Values and names are never part of a bulk update, so this event never carries them.
fields lists which columns the patch touched, and changes carries the value each of them was set to.
Payload
ts
{
type: 'variable.bulk_updated',
data: {
environmentId: string
count: number
fields: Array<'type' | 'isSecret' | 'visibility' | 'required'>
changes: {
type?: string
isSecret?: boolean
visibility?: string
required?: boolean
}
variables: Array<{
id: string
name: string
}>
}
}Example
json
{
"type": "variable.bulk_updated",
"data": {
"environmentId": "0192a1b2-c3d4-7000-8000-000000000020",
"count": 2,
"fields": ["visibility"],
"changes": { "visibility": "client" },
"variables": [
{ "id": "...040", "name": "NEXT_PUBLIC_API_URL" },
{ "id": "...041", "name": "NEXT_PUBLIC_SITE_URL" }
]
}
}