{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:ausca:schema:invocation-envelope:v1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "offer_id",
    "offer_revision",
    "offer_revision_digest",
    "input_schema_digest",
    "output_schema_digest",
    "canonicalizer_version",
    "input",
    "idempotency_key"
  ],
  "properties": {
    "offer_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
    },
    "offer_revision": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
    },
    "offer_revision_digest": {
      "$ref": "urn:ausca:schema:sha256-digest:v1"
    },
    "input_schema_digest": {
      "$ref": "urn:ausca:schema:sha256-digest:v1"
    },
    "output_schema_digest": {
      "$ref": "urn:ausca:schema:sha256-digest:v1"
    },
    "canonicalizer_version": {
      "const": "runx.receipt.c14n.v1"
    },
    "input": {},
    "idempotency_key": {
      "type": "string",
      "minLength": 16,
      "maxLength": 128
    },
    "parent_binding": {
      "type": "object",
      "additionalProperties": false,
      "required": ["invocation_id", "execution_digest"],
      "properties": {
        "invocation_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
        },
        "execution_digest": {
          "$ref": "urn:ausca:schema:sha256-digest:v1"
        }
      }
    }
  }
}
