{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/verifiedhandles-org/json-schema/verifiedhandles-org-account-data-schema.json",
  "title": "AccountData",
  "description": "Everything the site holds about one account.",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/verifiedhandles-org-openapi.json#/components/schemas/AccountData",
  "type": "object",
  "properties": {
    "format": {
      "type": "string",
      "const": "verifiedhandles-account-data"
    },
    "version": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Bumped when a field changes meaning or goes; a new field does not bump it."
    },
    "exported_at": {
      "type": "string",
      "format": "date-time"
    },
    "account": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Your account’s id (its OIDC `sub`)."
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        },
        "display_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "role": {
          "type": "string",
          "enum": [
            "registered",
            "trusted_editor",
            "admin"
          ]
        },
        "blocked": {
          "type": "boolean"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "last_sign_in": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "role_granted_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "capability_overrides": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "boolean"
          },
          "description": "Capabilities granted (true) or taken away (false) beyond your role’s."
        },
        "preferences": {
          "type": "object",
          "properties": {
            "copy_handle_only": {
              "type": "boolean"
            },
            "email_notifications": {
              "type": "boolean"
            },
            "save_recent_searches": {
              "type": "boolean"
            },
            "name_visibility": {
              "type": "string",
              "enum": [
                "public",
                "trusted",
                "admins"
              ]
            }
          },
          "required": [
            "copy_handle_only",
            "email_notifications",
            "save_recent_searches",
            "name_visibility"
          ],
          "additionalProperties": false
        },
        "terms_accepted": {
          "type": "object",
          "properties": {
            "version": {
              "type": [
                "string",
                "null"
              ]
            },
            "accepted_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "version",
            "accepted_at"
          ],
          "additionalProperties": false,
          "description": "The Terms of Service version you last accepted in the app, and when; nulls when never."
        }
      },
      "required": [
        "id",
        "email",
        "display_name",
        "role",
        "blocked",
        "created_at",
        "last_sign_in",
        "role_granted_at",
        "capability_overrides",
        "preferences",
        "terms_accepted"
      ],
      "additionalProperties": false
    },
    "submissions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "new_entity",
              "correction",
              "claim",
              "report",
              "application"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "needs_info",
              "approved",
              "rejected",
              "merged",
              "spam",
              "superseded",
              "retracted",
              "resolved"
            ]
          },
          "entry_vhid": {
            "type": [
              "string",
              "null"
            ]
          },
          "entry_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "qid": {
            "type": [
              "string",
              "null"
            ]
          },
          "payload": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "description": "What it asks for, in its kind’s shape: for `correction`, `new_entity` and `application`, an `EditPayload` (the fields to set, and for a revert or an approval the server’s own); for `report`, `{reason, note?, media_id?, link?}`; for `claim`, `{method}`."
          },
          "evidence": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "The case it carries, in its kind’s shape: an application’s eligibility case, a claim’s proof; null for the rest."
          },
          "review_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "ip": {
            "description": "The address you sent it from; erased after a year.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "decided_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "entry_vhid",
          "entry_title",
          "qid",
          "payload",
          "evidence",
          "review_notes",
          "ip",
          "created_at",
          "decided_at"
        ],
        "additionalProperties": false
      }
    },
    "comments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "submission_id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "on_your_submission": {
            "type": "boolean"
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "author": {
            "type": "string",
            "description": "`you`, or the writer as a signed-out visitor would see them."
          }
        },
        "required": [
          "id",
          "submission_id",
          "on_your_submission",
          "body",
          "created_at",
          "author"
        ],
        "additionalProperties": false
      },
      "description": "Every comment on your submissions, and those you wrote on anyone else’s."
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "entry_vhid": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "entry_vhid",
          "body",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "description": "The internal notes you wrote."
    },
    "api_keys": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "role_ceiling": {
            "type": "string",
            "enum": [
              "registered",
              "trusted_editor",
              "admin"
            ]
          },
          "read_only": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name",
          "prefix",
          "role_ceiling",
          "read_only",
          "created_at",
          "expires_at",
          "last_used_at",
          "revoked_at"
        ],
        "additionalProperties": false
      },
      "description": "Your keys, never a secret. Not your connected apps’ keys: they are under `connected_apps`."
    },
    "connected_apps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string"
          },
          "client_name": {
            "type": "string"
          },
          "redirect_uri": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          },
          "role_ceiling": {
            "type": "string",
            "enum": [
              "registered",
              "trusted_editor",
              "admin"
            ]
          },
          "read_only": {
            "type": "boolean"
          },
          "days": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "connected_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_refreshed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "key_prefix": {
            "type": [
              "string",
              "null"
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "client_id",
          "client_name",
          "redirect_uri",
          "resource",
          "role_ceiling",
          "read_only",
          "days",
          "created_at",
          "connected_at",
          "last_refreshed_at",
          "key_prefix",
          "expires_at",
          "revoked_at"
        ],
        "additionalProperties": false
      },
      "description": "The apps you connected with OAuth (and consents not yet completed), never a token."
    },
    "wikimedia_account": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "wiki": {
              "type": "string",
              "enum": [
                "wikidata",
                "testwikidata"
              ]
            },
            "username": {
              "type": "string"
            },
            "grants": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "linked_at": {
              "type": "string",
              "format": "date-time"
            },
            "checked_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "wiki",
            "username",
            "grants",
            "linked_at",
            "checked_at"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "The Wikimedia account linked to yours (never its token), or null."
    },
    "drafts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "entry_vhid": {
            "type": "string"
          },
          "entry_title": {
            "type": "string"
          },
          "base_revision_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "draft": {
            "$ref": "#/$defs/EntryDraft"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "entry_vhid",
          "entry_title",
          "base_revision_id",
          "draft",
          "created_at",
          "updated_at",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "description": "Your unsaved entry drafts, each whole, as kept."
    },
    "saved": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "vhid": {
            "type": "string"
          },
          "saved_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "vhid",
          "saved_at"
        ],
        "additionalProperties": false
      },
      "description": "Your saved entries (the app’s Saved list), newest first."
    },
    "audit": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "ts": {
            "type": "string",
            "format": "date-time"
          },
          "action": {
            "type": "string"
          },
          "target_type": {
            "type": "string"
          },
          "target_id": {
            "type": "string"
          },
          "detail": {
            "anyOf": [
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ],
            "description": "What changed, in the action’s own shape (lib/audit.ts names each action’s): it varies by action, and a row keeps the shape it was written with. A row written with an API key also carries `key` (its id), `via: \"api_key\"` where the writer named no surface, and `mcp_tool` when an MCP tool made the request."
          },
          "by": {
            "type": "string",
            "description": "`you`, `Verified Handles (automatic)`, or the actor as a signed-out visitor would see them."
          },
          "ip": {
            "description": "On your own rows only: the address it came from, until it is erased after a year.",
            "type": [
              "string",
              "null"
            ]
          },
          "surface": {
            "description": "On your own rows only: what it came through (see the audit log).",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "editor",
                  "console",
                  "api",
                  "mcp",
                  "site",
                  "worker",
                  "migration"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "api_key_id": {
            "description": "On your own rows only: your API key it was made with, if any.",
            "anyOf": [
              {
                "type": "string",
                "pattern": "^\\d+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "mcp_tool": {
            "description": "On your own rows only: the MCP tool that made it, if one did.",
            "type": [
              "string",
              "null"
            ]
          },
          "user_agent": {
            "description": "On your own rows only: your browser or client, cut to 200 characters.",
            "type": [
              "string",
              "null"
            ]
          },
          "request_id": {
            "description": "On your own rows only: the request’s id.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "ts",
          "action",
          "target_type",
          "target_id",
          "detail",
          "by"
        ],
        "additionalProperties": false
      },
      "description": "The audit rows by you or about you."
    },
    "edits": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "entry_vhid": {
            "type": "string"
          },
          "entry_title": {
            "type": "string"
          },
          "ts": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string"
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "made_by_you": {
            "type": "boolean"
          },
          "proposed_by_you": {
            "type": "boolean"
          },
          "hidden": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "entry_vhid",
          "entry_title",
          "ts",
          "source",
          "summary",
          "made_by_you",
          "proposed_by_you",
          "hidden"
        ],
        "additionalProperties": false
      },
      "description": "Every revision you made or proposed: its summary (the change itself is on the entry’s history)."
    },
    "hidden_revisions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "revision",
              "legacy_revision"
            ]
          },
          "id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "entry_vhid": {
            "type": [
              "string",
              "null"
            ]
          },
          "hidden_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "hidden_reason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "kind",
          "id",
          "entry_vhid",
          "hidden_at",
          "hidden_reason"
        ],
        "additionalProperties": false
      },
      "description": "The revisions you hid."
    },
    "reviews": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "new_entity",
              "correction",
              "claim",
              "report",
              "application"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "needs_info",
              "approved",
              "rejected",
              "merged",
              "spam",
              "superseded",
              "retracted",
              "resolved"
            ]
          },
          "entry_vhid": {
            "type": [
              "string",
              "null"
            ]
          },
          "decided_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "entry_vhid",
          "decided_at"
        ],
        "additionalProperties": false
      },
      "description": "The submissions you reviewed (never who sent them)."
    },
    "claimed_entries": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "entry_vhid": {
            "type": "string"
          },
          "entry_title": {
            "type": "string"
          }
        },
        "required": [
          "entry_vhid",
          "entry_title"
        ],
        "additionalProperties": false
      },
      "description": "The entries you have claimed."
    },
    "uploads": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "mime": {
            "type": [
              "string",
              "null"
            ]
          },
          "width": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "height": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "license": {
            "type": [
              "string",
              "null"
            ]
          },
          "attribution": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "withdrawn_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "mime",
          "width",
          "height",
          "license",
          "attribution",
          "source_url",
          "created_at",
          "withdrawn_at"
        ],
        "additionalProperties": false
      },
      "description": "The images you uploaded."
    },
    "permission_history": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "ts": {
            "type": "string",
            "format": "date-time"
          },
          "change": {
            "type": "string"
          },
          "about": {
            "type": [
              "string",
              "null"
            ]
          },
          "by": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "ts",
          "change",
          "about",
          "by"
        ],
        "additionalProperties": {}
      },
      "description": "Changes to your permissions, and the permission changes you made."
    },
    "wikidata_changes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "state": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "state"
        ],
        "additionalProperties": {}
      },
      "description": "The Wikidata changes you proposed, approved or snoozed."
    },
    "wikipedia_link_reviews": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status"
        ],
        "additionalProperties": {}
      },
      "description": "The proposed Wikipedia links you took or left."
    },
    "sync_requests": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "qid": {
            "type": "string"
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "qid",
          "requested_at"
        ],
        "additionalProperties": {}
      },
      "description": "The Wikidata syncs you asked for (forgotten after a year)."
    },
    "emails": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^\\d+$"
          },
          "kind": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "body_text": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "sent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "subject",
          "body_text",
          "created_at",
          "sent_at"
        ],
        "additionalProperties": false
      },
      "description": "The emails queued to your address in the last 30 days, sent or not."
    },
    "email_suppression": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "enum": [
                "bounce",
                "complaint"
              ]
            },
            "detail": {
              "type": [
                "string",
                "null"
              ]
            },
            "reports": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "first_at": {
              "type": "string",
              "format": "date-time"
            },
            "last_at": {
              "type": "string",
              "format": "date-time"
            }
          },
          "required": [
            "reason",
            "detail",
            "reports",
            "first_at",
            "last_at"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Why we stopped emailing your address, or null."
    },
    "sessions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "started_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "started_at"
        ],
        "additionalProperties": false
      },
      "description": "When each of your live sign-in sessions began."
    },
    "app_devices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "device_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "platform": {
            "type": "string",
            "enum": [
              "ios",
              "android",
              "other"
            ]
          },
          "app_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "signed_in_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "ended_because": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "device_name",
          "platform",
          "app_version",
          "signed_in_at",
          "last_used_at",
          "ended_at",
          "ended_because"
        ],
        "additionalProperties": false
      },
      "description": "Your sign-ins to the Verified Handles app, live or ended (never a token)."
    }
  },
  "required": [
    "format",
    "version",
    "exported_at",
    "account",
    "submissions",
    "comments",
    "notes",
    "api_keys",
    "connected_apps",
    "wikimedia_account",
    "drafts",
    "saved",
    "audit",
    "edits",
    "hidden_revisions",
    "reviews",
    "claimed_entries",
    "uploads",
    "permission_history",
    "wikidata_changes",
    "wikipedia_link_reviews",
    "sync_requests",
    "emails",
    "email_suppression",
    "sessions",
    "app_devices"
  ],
  "additionalProperties": false,
  "$defs": {
    "EntryDraft": {
      "type": "object",
      "properties": {
        "vhid": {
          "description": "The entry’s VHID. Optional when sending; it must be this entry’s.",
          "type": "string"
        },
        "savedAt": {
          "description": "When the draft was last changed, in milliseconds since 1970. Ignored when sending: the server keeps its own time.",
          "type": "number"
        },
        "fields": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "subtitle": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "short": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "description": "The entry’s fields as edited. The description is HTML, kept through the same allowlist as a saved description."
        },
        "handles": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "platform_id": {
                "type": "string"
              },
              "value": {
                "type": "string"
              },
              "display": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "kept": {
                "description": "A masked email kept as stored.",
                "type": "boolean",
                "const": true
              },
              "ref": {
                "description": "Which stored email a kept one is.",
                "type": "string"
              }
            },
            "required": [
              "platform_id",
              "value"
            ],
            "additionalProperties": false
          }
        },
        "customOrder": {
          "description": "The handles are in the entry’s own order.",
          "type": "boolean"
        },
        "linkNames": {
          "description": "VHID → name, for the entries the description links to.",
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string"
          }
        },
        "image": {
          "description": "The lead image as picked: null when removed, absent when untouched.",
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^\\d{1,19}$",
                  "description": "The image’s id."
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "commons",
                    "local"
                  ]
                },
                "commons_filename": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "commons_filename"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "gallery": {
          "description": "The images after the lead, when changed.",
          "maxItems": 5,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^\\d{1,19}$",
                "description": "The image’s id."
              },
              "kind": {
                "type": "string",
                "enum": [
                  "commons",
                  "local"
                ]
              },
              "commons_filename": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "kind",
              "commons_filename"
            ],
            "additionalProperties": false
          }
        },
        "imageLinks": {
          "description": "Image id → link as typed, when changed.",
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string"
          }
        },
        "relinquish": {
          "description": "Fields to hand to Wikidata on save.",
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "title",
              "subtitle",
              "description",
              "image"
            ]
          }
        },
        "takeover": {
          "description": "Fields to take back from Wikidata on save.",
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "title",
              "subtitle",
              "description",
              "image"
            ]
          }
        },
        "dropCredit": {
          "description": "Remove the Wikipedia credit on save.",
          "type": "boolean",
          "const": true
        },
        "creditPage": {
          "description": "A Wikipedia page named for the credit, as typed.",
          "type": "string"
        },
        "creditManage": {
          "description": "With `creditPage`: the description is not to go to the sync.",
          "type": "boolean",
          "const": false
        },
        "handleTakeover": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "handleRelinquish": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "handleRelease": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "fields"
      ],
      "additionalProperties": false,
      "description": "An unsaved edit to an entry, in the editor’s own shape."
    }
  }
}