{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fwozen-com/json-schema/fwozen-com-exception-request-schema.json",
  "title": "ExceptionRequest",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fwozen-com-openapi.yml#/components/schemas/ExceptionRequest",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^exc_[1-9A-HJ-NP-Za-km-z]{16}$"
    },
    "freezeId": {
      "type": "string",
      "pattern": "^frz_[1-9A-HJ-NP-Za-km-z]{16}$"
    },
    "freezeIds": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^frz_[1-9A-HJ-NP-Za-km-z]{16}$"
      }
    },
    "grantGroupId": {
      "type": "string"
    },
    "repoId": {
      "type": "string",
      "pattern": "^repo_[1-9A-HJ-NP-Za-km-z]{16}$"
    },
    "repoFullName": {
      "type": "string"
    },
    "prNumber": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "prTitle": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "prUrl": {
      "type": "string",
      "format": "uri"
    },
    "prAuthorLogin": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "headSha": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{40}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "policy": {
      "type": "string",
      "enum": [
        "sticky",
        "strict"
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "pending",
        "active",
        "expired",
        "revoked",
        "consumed",
        "denied"
      ]
    },
    "reason": {
      "type": "string"
    },
    "incidentRef": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "grantedBy": {
      "$ref": "#/$defs/Actor"
    },
    "grantedAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
    },
    "expiresAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "revokedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "revokedBy": {
      "anyOf": [
        {
          "$ref": "#/$defs/Actor"
        },
        {
          "type": "null"
        }
      ]
    },
    "revokeReason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "requestedBy": {
      "$ref": "#/$defs/Actor"
    },
    "requestedAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
    },
    "decidedBy": {
      "anyOf": [
        {
          "$ref": "#/$defs/Actor"
        },
        {
          "type": "null"
        }
      ]
    },
    "decidedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "decisionReason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "id",
    "freezeId",
    "freezeIds",
    "grantGroupId",
    "repoId",
    "repoFullName",
    "prNumber",
    "prTitle",
    "prUrl",
    "prAuthorLogin",
    "headSha",
    "policy",
    "state",
    "reason",
    "incidentRef",
    "grantedBy",
    "grantedAt",
    "expiresAt",
    "revokedAt",
    "revokedBy",
    "revokeReason",
    "requestedBy",
    "requestedAt",
    "decidedBy",
    "decidedAt",
    "decisionReason"
  ],
  "additionalProperties": false,
  "$defs": {
    "Actor": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "user",
            "api_key",
            "slack_user",
            "scheduler",
            "system",
            "github_user"
          ]
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "displayName": {
          "type": "string"
        },
        "githubLogin": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "slackUserId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "impersonatorId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "apiKeyKind": {
          "default": null,
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "type",
        "id",
        "displayName",
        "githubLogin",
        "slackUserId",
        "impersonatorId",
        "apiKeyKind"
      ],
      "additionalProperties": false
    }
  }
}