{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "profile": {
      "type": "string",
      "const": "owp-eval-local/0.1",
      "description": "Exact supported local evaluation profile."
    },
    "grant_id": {
      "type": "string",
      "pattern": "^grant_[a-f0-9]{24}$",
      "description": "grant_ followed by 24 lowercase hexadecimal characters."
    },
    "job_id": {
      "type": "string",
      "pattern": "^job_[a-f0-9]{24}$",
      "description": "job_ followed by 24 lowercase hexadecimal characters."
    },
    "agent_id": {
      "type": "string",
      "pattern": "^agent_[a-f0-9]{24}$",
      "description": "agent_ followed by 24 lowercase hexadecimal characters."
    },
    "state": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "REVOKED"
      ]
    },
    "scope": {
      "type": "array",
      "prefixItems": [
        {
          "type": "string",
          "const": "fixture.brief"
        }
      ]
    },
    "expires_at": {
      "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(?:Z))$",
      "description": "UTC date-time at second precision, ending in Z."
    },
    "synthetic_consent": {
      "type": "string",
      "const": "fixture-owner-approved"
    }
  },
  "required": [
    "profile",
    "grant_id",
    "job_id",
    "agent_id",
    "state",
    "scope",
    "expires_at",
    "synthetic_consent"
  ],
  "additionalProperties": false,
  "description": "Grant receipt, not a bearer credential. The server checks current ownership, state and deadline every time.",
  "title": "GrantReceipt",
  "$comment": "owp-eval-local/0.1; synthetic loopback evaluation only."
}
