{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "hook": {
            "$ref": "#/definitions/hook"
        },
        "table_name": {
            "type": "string"
        },
        "record": {
            "type": "object"
        },
        "record_uuid": {
            "type": "string"
        },
        "result": {}
    },
    "required": [
        "hook",
        "table_name",
        "record_uuid"
    ],
    "definitions": {
        "hook": {
            "id": "#hook",
            "description": "Async jobs for after callbacks",
            "type": "object",
            "patternProperties": {
                "after_[create|update|destroy]": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "run_at": {
                                "type": "string"
                            },
                            "conditions": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            }
                        },
                        "required": [
                            "name"
                        ]
                    },
                    "minItems": 1,
                    "maxItems": 20
                }
            }
        }
    }
}