{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://localendpoints.com/schemas/localendpoint.consent-action-plan.schema.json",
  "title": "LocalEndpoint Consent Desktop Action Plan",
  "type": "object",
  "required": [
    "planVersion",
    "workspaceLabel",
    "approvalMode",
    "approvedByOperator",
    "createdUtc",
    "actions",
    "nonClaims"
  ],
  "additionalProperties": false,
  "properties": {
    "planVersion": {
      "type": "string"
    },
    "workspaceLabel": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "approvalMode": {
      "enum": [
        "review-each-action",
        "session-approved",
        "dry-run"
      ]
    },
    "approvedByOperator": {
      "type": "boolean"
    },
    "createdUtc": {
      "type": "string",
      "pattern": "Z$"
    },
    "actions": {
      "type": "array",
      "minItems": 1,
      "maxItems": 25,
      "items": {
        "type": "object",
        "required": [
          "actionId",
          "actionType",
          "reason",
          "approvedByOperator"
        ],
        "additionalProperties": true,
        "properties": {
          "actionId": {
            "type": "string"
          },
          "actionType": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "approvedByOperator": {
            "type": "boolean"
          },
          "target": {
            "type": "string"
          },
          "text": {
            "type": "string",
            "maxLength": 4000
          },
          "hotkey": {
            "type": "string"
          },
          "x": {
            "type": "integer",
            "minimum": 0
          },
          "y": {
            "type": "integer",
            "minimum": 0
          },
          "seconds": {
            "type": "number",
            "minimum": 0,
            "maximum": 30
          }
        }
      }
    },
    "nonClaims": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}