{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "definitions": {
        "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"
                ]
            }
        }
    },
    "properties": {
        "id": {
            "type": "string",
            "pattern": "^[A-Fa-f\\d]{24}$"
        },
        "flowId": {
            "type": "string",
            "pattern": "^[A-Fa-f\\d]{24}$"
        },
        "applicationId": {
            "type": "string",
            "pattern": "^[A-Fa-f\\d]{24}$"
        },
        "creationDate": {
            "type": "string",
            "format": "date-time"
        },
        "lastUpdated": {
            "type": "string",
            "format": "date-time"
        },
        "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
        },
        "description": {
            "type": "string",
            "maxLength": 32767
        },
        "enabled": {
            "$ref": "#/definitions/enabled"
        },
        "triggers": {
            "$ref": "#/definitions/triggers"
        },
        "nodes": {
            "$ref": "#/definitions/nodes"
        },
        "globals": {
            "$ref": "#/definitions/globals"
        }
    }
}