{
  "type": "object",
  "properties": {
    "note": {
      "type": "string",
      "maxLength": 280,
      "minLength": 1,
      "pattern": "\\S"
    },
    "step_ref": {
      "type": "string"
    },
    "document": {
      "type": "object",
      "properties": {
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "blocks": {
          "type": "array",
          "minItems": 1,
          "maxItems": 40,
          "items": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "const": "heading"
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 1000,
                    "minLength": 1,
                    "pattern": "\\S"
                  }
                },
                "required": [
                  "type",
                  "text"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "const": "paragraph"
                  },
                  "text": {
                    "type": "string",
                    "maxLength": 1000,
                    "minLength": 1,
                    "pattern": "\\S"
                  }
                },
                "required": [
                  "type",
                  "text"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "const": "bullets"
                  },
                  "items": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 12,
                    "items": {
                      "type": "string",
                      "maxLength": 200
                    }
                  }
                },
                "required": [
                  "type",
                  "items"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "const": "image"
                  },
                  "file_id": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                  },
                  "alt": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "file_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "const": "video"
                  },
                  "youtube_id": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_-]{11}$"
                  },
                  "title": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "youtube_id"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "const": "day"
                  },
                  "ordinal": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 366
                  },
                  "date": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "title": {
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "ordinal"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "const": "cards"
                  },
                  "title": {
                    "type": "string"
                  },
                  "items": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 60,
                    "items": {
                      "type": "object",
                      "maxProperties": 12,
                      "propertyNames": {
                        "minLength": 1,
                        "maxLength": 40
                      },
                      "additionalProperties": {
                        "type": "string",
                        "maxLength": 300
                      }
                    }
                  }
                },
                "required": [
                  "type",
                  "items"
                ]
              }
            ]
          },
          "contains": {
            "type": "object",
            "properties": {
              "type": {
                "const": "image"
              }
            },
            "required": [
              "type"
            ]
          },
          "minContains": 0,
          "maxContains": 6
        }
      },
      "required": [
        "blocks"
      ]
    },
    "text": {
      "type": "string"
    },
    "har_options": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "minItems": 2,
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "pattern": "\\S"
            },
            "label": {
              "type": "string",
              "minLength": 1,
              "pattern": "\\S"
            }
          },
          "required": [
            "id",
            "label"
          ]
        }
      }
    },
    "url": {
      "type": "string"
    },
    "file_url": {
      "type": "string"
    },
    "claim_url": {
      "type": "string"
    },
    "filename": {
      "type": "string"
    },
    "blocks": {
      "type": "array"
    },
    "choose_config": {
      "type": "object"
    }
  },
  "required": [
    "note"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Step outcome submission",
  "description": "Use current-step.submission for the state-specific template and prerequisites. Structural validity does not bypass turn, approval, deliverable, or content gates."
}
