{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "projectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "project ID from create/list."
    },
    "requestId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "description": "Caller-generated retry key. Reuse the same key and inputs to retry; use a new key for a new operation."
    },
    "action": {
      "type": "string",
      "enum": [
        "select",
        "dismiss",
        "published",
        "reopen"
      ],
      "description": "select plans an edit; dismiss records why not; published records that you made it; reopen undoes a dismissal."
    },
    "scanId": {
      "description": "select, or dismiss by subject: the scan the subject came from.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "subjectId": {
      "description": "select, or dismiss by subject: an opportunity, finding or action id from query_internal_link_scan.",
      "type": "string",
      "minLength": 1,
      "maxLength": 9000
    },
    "changeId": {
      "description": "dismiss, published or reopen: the saved change.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "revision": {
      "description": "The change revision you read; a different one conflicts.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "anchor": {
      "description": "select: link words other than the suggested ones. They must appear in the passage.",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "passage": {
      "description": "select: the page text that holds the anchor, when the scan has none.",
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "anchorBy": {
      "description": "Who chose the anchor words. Defaults to the caller.",
      "type": "string",
      "enum": [
        "customer",
        "agent"
      ]
    },
    "anchorRef": {
      "description": "The agent or client that chose them.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "reason": {
      "description": "dismiss: intended, not_useful, wrong or other.",
      "type": "string",
      "enum": [
        "intended",
        "not_useful",
        "wrong",
        "other"
      ]
    },
    "note": {
      "type": "string",
      "maxLength": 500
    },
    "externalRef": {
      "description": "published: your own edit link, commit or ticket. It is never fetched.",
      "type": "string",
      "maxLength": 300
    }
  },
  "required": [
    "projectId",
    "requestId",
    "action"
  ],
  "additionalProperties": false
}
