{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
        },
        "description": {
            "type": "string",
            "maxLength": 32767
        },
        "enabled": {
            "type": "boolean"
        },
        "triggers": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "key": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "config": {
                        "type": "object"
                    },
                    "meta": {
                        "type": "object"
                    },
                    "outputIds": {
                        "type": "array",
                        "items": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "type"
                ]
            }
        },
        "nodes": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "config": {
                        "type": "object"
                    },
                    "meta": {
                        "type": "object"
                    },
                    "outputIds": {
                        "type": "array",
                        "items": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    }
                },
                "additionalProperties": false,
                "required": [
                    "id",
                    "type"
                ]
            }
        },
        "globals": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "key": {
                        "type": "string",
                        "pattern": "^[0-9a-zA-Z_-]{1,255}$"
                    },
                    "json": {
                        "type": "string",
                        "minLength": 1
                    }
                },
                "additionalProperties": false,
                "required": [
                    "key",
                    "json"
                ]
            }
        }
    },
    "additionalProperties": false,
    "required": [
        "name"
    ]
}