Schema: receipt

{
  "$id": "https://htmx-ui-template-scaffold.local/schemas/receipt.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Before/after state and verified outcome for one apply operation.",
  "properties": {
    "after_state": {
      "type": "string"
    },
    "before_state": {
      "type": "string"
    },
    "created_at_utc": {
      "format": "date-time",
      "type": "string"
    },
    "dry_run": {
      "type": "boolean"
    },
    "operation_id": {
      "minLength": 1,
      "type": "string"
    },
    "operation_kind": {
      "enum": [
        "ANALYZE",
        "PLAN",
        "RECONCILE",
        "ASSETS_SYNC",
        "REPLACE",
        "RESTORE",
        "BACKUP"
      ],
      "type": "string"
    },
    "operations": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "operation_id": {
            "type": "string"
          },
          "path": {
            "minLength": 1,
            "type": "string"
          },
          "status": {
            "enum": [
              "CREATE",
              "UPDATE",
              "PRESERVED_EXISTING",
              "IDENTICAL",
              "NOOP",
              "FAILED",
              "SKIPPED"
            ],
            "type": "string"
          }
        },
        "required": [
          "path",
          "status"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "plan_digest": {
      "pattern": "^[a-f0-9]{64}$",
      "type": "string"
    },
    "scaffold_release": {
      "minLength": 1,
      "type": "string"
    },
    "schema_version": {
      "pattern": "^\\d+\\.\\d+\\.\\d+$",
      "type": "string"
    },
    "target_id": {
      "minLength": 1,
      "type": "string"
    },
    "validated": {
      "type": "boolean"
    }
  },
  "required": [
    "schema_version",
    "target_id",
    "scaffold_release",
    "operation_id",
    "created_at_utc",
    "operation_kind",
    "plan_digest",
    "validated",
    "operations"
  ],
  "title": "Apply Receipt",
  "type": "object"
}