{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/fulibworkflows/_shared/latest--page.schema.json",
  "title": "JSON schema for pages used in fulibWorkflows ",
  "description": "Page Schema for the generation file of fulibWorkflows",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/fujaba/fulibWorkflows/main/schemas/page.schema.json",
    "sourceSha256": "5a5360224ab06ca2a05f456b153ebc3d5b92b1e4c2df63b40ee5584b32162838"
  },
  "type": "array",
  "additionalItems": false,
  "items": {
    "oneOf": [
      {
        "$ref": "#/$defs/nameItem"
      },
      {
        "$ref": "#/$defs/textItem"
      },
      {
        "$ref": "#/$defs/buttonItem"
      },
      {
        "$ref": "#/$defs/inputItem"
      },
      {
        "$ref": "#/$defs/passwordItem"
      },
      {
        "$ref": "#/$defs/divItem"
      }
    ]
  },
  "$defs": {
    "nameItem": {
      "description": "Defines the name of the page",
      "type": "object",
      "properties": {
        "pageName": {
          "type": "string"
        }
      },
      "required": [
        "pageName"
      ],
      "additionalProperties": false
    },
    "textItem": {
      "description": "Defines a text",
      "type": "object",
      "properties": {
        "text": {
          "type": "string"
        }
      },
      "required": [
        "text"
      ],
      "additionalProperties": false
    },
    "buttonItem": {
      "description": "Defines a button with optional command",
      "type": "object",
      "properties": {
        "button": {
          "type": "string"
        },
        "targetPage": {
          "type": "string"
        }
      },
      "required": [
        "button"
      ],
      "additionalProperties": false
    },
    "inputItem": {
      "description": "Defines an input with optional value",
      "type": "object",
      "properties": {
        "input": {
          "type": "string"
        },
        "value": {
          "type": [
            "string",
            "integer"
          ]
        }
      },
      "required": [
        "input"
      ],
      "additionalProperties": false
    },
    "passwordItem": {
      "description": "Defines a password input with optional value",
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        },
        "value": {
          "type": [
            "string",
            "integer"
          ]
        }
      },
      "required": [
        "password"
      ],
      "additionalProperties": false
    },
    "divItem": {
      "description": "Defines a text",
      "type": "object",
      "properties": {
        "div": {
          "type": [
            "string",
            "array"
          ]
        }
      },
      "required": [
        "div"
      ],
      "additionalProperties": false
    }
  }
}
