{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "change": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource identifier returned by the operation."
        },
        "projectId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "state": {
          "type": "string",
          "enum": [
            "selected",
            "published",
            "verified",
            "not_found",
            "dismissed",
            "resolved",
            "stale"
          ],
          "description": "Saved lifecycle or evidence state, as enumerated for this record."
        },
        "revision": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991,
          "description": "Optimistic concurrency revision; supply it as expectedRevision on the next write."
        },
        "subject": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "suggestion",
                "finding",
                "action"
              ]
            },
            "id": {
              "type": "string",
              "description": "Resource identifier returned by the operation."
            },
            "findingKind": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "sourceUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "targetUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "pageUrl": {
              "type": "string"
            },
            "message": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 1000
                },
                {
                  "type": "null"
                }
              ],
              "description": "The suggestion or finding message, captured when it was selected."
            },
            "goal": {
              "type": "string",
              "enum": [
                "link",
                "repair",
                "unlink",
                "page"
              ]
            }
          },
          "required": [
            "kind",
            "id",
            "findingKind",
            "sourceUrl",
            "targetUrl",
            "pageUrl",
            "message",
            "goal"
          ],
          "additionalProperties": false
        },
        "edit": {
          "type": "object",
          "properties": {
            "anchor": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "passage": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "matchStart": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "matchEnd": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "phraseSource": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "search_query",
                    "title",
                    "address"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "anchorBy": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "product",
                    "customer",
                    "agent"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "anchorRef": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "anchor",
            "passage",
            "matchStart",
            "matchEnd",
            "phraseSource",
            "anchorBy",
            "anchorRef"
          ],
          "additionalProperties": false
        },
        "origin": {
          "type": "object",
          "properties": {
            "scanId": {
              "type": "string"
            },
            "sourceCheckedAt": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "sourceCaptureSha256": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "scanId",
            "sourceCheckedAt",
            "sourceCaptureSha256"
          ],
          "additionalProperties": false
        },
        "dismissReason": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "intended",
                "not_useful",
                "wrong",
                "other"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "externalRef": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "selectedBy": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "member",
                "agent"
              ]
            },
            "id": {
              "type": "string",
              "description": "Resource identifier returned by the operation."
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        "updatedBy": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "member",
                "agent"
              ]
            },
            "id": {
              "type": "string",
              "description": "Resource identifier returned by the operation."
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        "verification": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "checkedAt": {
                  "type": "string"
                },
                "method": {
                  "type": "string",
                  "enum": [
                    "page_check",
                    "scan"
                  ]
                },
                "scanId": {
                  "type": "string"
                },
                "requestId": {
                  "type": "string"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "present",
                    "absent",
                    "unknown"
                  ],
                  "description": "Saved lifecycle or evidence state, as enumerated for this record."
                },
                "reason": {
                  "description": "Recorded explanation; null when no explanation applies.",
                  "type": "string"
                },
                "anchorFound": {
                  "type": "string"
                },
                "anchorMatches": {
                  "type": "boolean"
                },
                "finalUrl": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "captureSha256": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "targetHttpStatus": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "targetWorks": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "checkedAt",
                "method",
                "state"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "verifiedAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "lastCheckedAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "nextCheckAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "projectId",
        "state",
        "revision",
        "subject",
        "edit",
        "origin",
        "dismissReason",
        "note",
        "externalRef",
        "selectedBy",
        "updatedBy",
        "verification",
        "verifiedAt",
        "lastCheckedAt",
        "nextCheckAt",
        "createdAt",
        "updatedAt"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "change"
  ],
  "additionalProperties": false
}
