{
    "id": "http://schemas.triniti.io/json-schema/triniti/notify/notifier-result/1-0-0.json#",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "_schema": {
            "type": "string",
            "pattern": "^pbj:([a-z0-9-]+):([a-z0-9\\.-]+):([a-z0-9-]+)?:([a-z0-9-]+):([0-9]+-[0-9]+-[0-9]+)$",
            "default": "pbj:triniti:notify::notifier-result:1-0-0"
        },
        "tags": {
            "type": "object",
            "patternProperties": {
                "^[a-zA-Z_]{1}[\\w\\.:-]+$": {
                    "type": "string",
                    "pattern": "^[\\w\\/\\.:-]+$"
                }
            },
            "additionalProperties": false,
            "description": "Tags is a map that categorizes data or tracks references in external systems. The tags names should be consistent and descriptive, e.g. fb_user_id:123, salesforce_customer_id:456.",
            "pbj": {
                "type": "string",
                "rule": "map"
            }
        },
        "ok": {
            "type": "boolean",
            "default": true,
            "pbj": {
                "type": "boolean",
                "rule": "single"
            }
        },
        "code": {
            "type": "integer",
            "default": 0,
            "minimum": 0,
            "maximum": 65535,
            "pbj": {
                "type": "small-int",
                "rule": "single"
            }
        },
        "error_name": {
            "type": "string",
            "pattern": "^[\\w\\/\\.:-]+$",
            "pbj": {
                "type": "string",
                "rule": "single"
            }
        },
        "error_message": {
            "type": "string",
            "minLength": 0,
            "maxLength": 65535,
            "pbj": {
                "type": "text",
                "rule": "single"
            }
        },
        "raw_response": {
            "type": "string",
            "minLength": 0,
            "maxLength": 65535,
            "description": "When a notification is sent the platform/vendor often responds with a payload that describes the result. This field should contain a (de)serializable string, JSON is preferred.",
            "pbj": {
                "type": "text",
                "rule": "single"
            }
        }
    },
    "required": [
        "_schema"
    ],
    "additionalProperties": false
}