{
  "type": "object",
  "properties": {
    "schemaVersion": {
      "const": "0.1"
    },
    "receiptId": {
      "type": "string",
      "minLength": 1
    },
    "installationId": {
      "type": "string",
      "minLength": 1
    },
    "subjectId": {
      "type": "string",
      "minLength": 1
    },
    "checkId": {
      "type": "string",
      "minLength": 1
    },
    "operationId": {
      "type": "string",
      "minLength": 1
    },
    "vantage": {
      "type": "object",
      "properties": {
        "kind": {
          "enum": [
            "application-network",
            "edge",
            "node",
            "restore-sandbox",
            "external"
          ]
        },
        "ref": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "kind",
        "ref"
      ],
      "additionalProperties": false
    },
    "startedAt": {
      "type": "string",
      "format": "date-time"
    },
    "finishedAt": {
      "type": "string",
      "format": "date-time"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    },
    "coverage": {
      "type": "object",
      "properties": {
        "expected": {
          "type": "integer",
          "minimum": 0
        },
        "observed": {
          "type": "integer",
          "minimum": 0
        },
        "emptyAllowed": {
          "type": "boolean"
        }
      },
      "required": [
        "expected",
        "observed",
        "emptyAllowed"
      ],
      "additionalProperties": false
    },
    "assertions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "result": {
            "enum": [
              "pass",
              "fail",
              "unknown",
              "not-applicable"
            ]
          }
        },
        "required": [
          "name",
          "result"
        ],
        "additionalProperties": false
      },
      "minItems": 1
    },
    "attesterRef": {
      "type": "string",
      "minLength": 1
    },
    "result": {
      "enum": [
        "verified",
        "degraded",
        "failed",
        "unknown",
        "stale"
      ]
    },
    "reason": {
      "type": "string",
      "minLength": 1
    },
    "evidenceRef": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "schemaVersion",
    "receiptId",
    "installationId",
    "subjectId",
    "checkId",
    "vantage",
    "startedAt",
    "finishedAt",
    "expiresAt",
    "coverage",
    "assertions",
    "attesterRef",
    "result",
    "reason"
  ],
  "additionalProperties": false,
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Proposed operational receipt",
  "description": "Structural validation only; verifier must enforce coverage, freshness, temporal order, provenance and required assertions."
}
