{
    "$schema": "https://json-schema.org/draft-07/schema#",
    "$id": "https://schemas.boomack.com/client/v0.15/playbook",

    "title": "Boomack Playbook",
    "description": "A collection of API requests for execution.",
    "type": "object",
    "properties": {

        "presets": {
            "title": "Presets",
            "description": "A map with Preset IDs as keys and Display Options as values.",
            "type": "object",
            "patternProperties": {
                "^[a-zA-Z0-9-_]+$": {
                    "anyOf": [
                        { "$ref": "https://schemas.boomack.com/server/v0.15/display-options.json" },
                        {
                            "title": "Display Option Reference",
                            "description": "A URL or relative path to a JSON or YAML file with display options.",
                            "type": "string",
                            "format": "uri"
                        }
                    ]
                }
            },
            "additionalProperties": false
        },

        "types": {
            "title": "Media Type Configurations",
            "description": "A map with MIME types as keys and Media Type Configurations as values.",
            "type": "object",
            "additionalProperties": {
                "anyOf": [
                    { "$ref": "https://schemas.boomack.com/server/v0.15/media-type.json" },
                    {
                        "title": "Media Type Configuration Reference",
                        "description": "A URL or relative path to a JSON or YAML file with a media type configuration.",
                        "type": "string",
                        "format": "uri"
                    }
                ]
            }
        },

        "actions": {
            "title": "Actions",
            "description": "A map with Action IDs as keys and Action Definitions as values.",
            "type": "object",
            "patternProperties": {
                "^[a-zA-Z0-9-_]+$": {
                    "anyOf": [
                        { "$ref": "https://schemas.boomack.com/server/v0.15/action.json" },
                        {
                            "title": "Action Reference",
                            "description": "A URL or relative path to a JSON or YAML file with an action.",
                            "type": "string",
                            "format": "uri"
                        }
                    ]
                }
            },
            "additionalProperties": false
        },

        "panels": {
            "title": "Panels",
            "description": "A map with Panel IDs as keys and Panel Layout Requests as values.",
            "type": "object",
            "patternProperties": {
                "^[a-zA-Z0-9-_]+$": {
                    "anyOf": [
                        { "$ref": "https://schemas.boomack.com/server/v0.15/panel-layout.json" },
                        {
                            "title": "Panel Layout Reference",
                            "description": "A URL or relative path to a JSON or YAML file with a panel layout.",
                            "type": "string",
                            "format": "uri"
                        }
                    ]
                }
            },
            "additionalProperties": false
        },

        "defaultTarget": {
            "title": "Default Target",
            "description": "Provides defaults for target Panel and target Slot in display requests.",
            "type": "object",
            "properties": {
                "panel": {
                    "title": "Default Panel",
                    "description": "Provides a Panel ID for display requests without a target Panel ID.",
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9-_]+$"
                },
                "slot": {
                    "title": "Default Slot",
                    "description": "Provides a Slot ID for display requests without a target Slot ID.",
                    "type": "string",
                    "pattern": "^[a-zA-Z0-9-_]+$"
                }
            }
        },

        "requests": {
            "title": "Display Requests",
            "description": "An array of Display Requests.",
            "type": "array",
            "items": {
                "anyOf": [
                    { "$ref": "https://schemas.boomack.com/server/v0.15/display-request.json" },
                    {
                        "title": "Display Request Reference",
                        "description": "A URL or relative path to a JSON or YAML file with a display request.",
                        "type": "string",
                        "format": "uri"
                    }
                ]
            }
        },

        "steps": {
            "title": "Sequence Steps",
            "description": "An array with Sequence Steps",
            "type": "array",
            "items": {
                "anyOf": [
                    { "$ref": "https://schemas.boomack.com/client/v0.15/sequence-step.json" },
                    {
                        "title": "Sequence Step",
                        "description": "A URL or relative path to a JSON or YAML file with a sequence step.",
                        "type": "string",
                        "format": "uri"
                    }
                ]
            }
        }
    },
    "additionalProperties": false
}