Texecom Event Schemas

JSON Schema Documentation

Event Payload Options

Schema defining the possible payload structures for different event sources

$idhttps://schemas.texecom-prod.com/events/v1/payload-options.json
$schemahttp://json-schema.org/draft-07/schema#

$id https://schemas.texecom-prod.com/events/v1/payload-options.json
Title Event Payload Options
Description Schema defining the possible payload structures for different event sources
TypeOne of:Object
Object
Object
Object

0

Description Payload from panel devices (V4/V5)
TypeObject

Properties

NameType
sourceTypeString
dataObject

0.sourceType

Description The type of panel generating the event
TypeString
Enum
  • PANEL_V4
  • PANEL_V5

0.data

Description Raw panel event data
TypeObject

0.data.eventCode

Description Panel event code
TypeString

0.data.area

Description Area number
TypeInteger

0.data.zone

Description Zone number
TypeInteger

0.data.user

Description User number
TypeInteger

1

Description Payload from Smartcom/SmartcomPro devices
TypeObject

Properties

NameType
sourceTypeString
dataObject

1.sourceType

Description The type of Smartcom device
TypeString
Enum
  • SMARTCOM
  • SMARTCOMPRO

1.data

Description Smartcom event data
TypeObject

2

Description Payload from cloud services
TypeObject

Properties

NameType
sourceTypeString=CLOUD
serviceString
dataObject

2.sourceType

Description Cloud-generated event
TypeString
Const CLOUD

2.service

Description Name of the cloud service generating the event
TypeString

2.data

Description Service-specific event data
TypeObject

3

Description Generic payload structure for other event sources
TypeObject

Properties

NameType
sourceTypeString
dataObject

3.sourceType

Description The type of source generating the event
TypeString

3.data

Description Event-specific data
TypeObject

Schema

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://schemas.texecom-prod.com/events/v1/payload-options.json",
    "title": "Event Payload Options",
    "description": "Schema defining the possible payload structures for different event sources",
    "oneOf": [
        {
            "$ref": "#/definitions/PanelPayload"
        },
        {
            "$ref": "#/definitions/SmartcomPayload"
        },
        {
            "$ref": "#/definitions/CloudPayload"
        },
        {
            "$ref": "#/definitions/GenericPayload"
        }
    ],
    "definitions": {
        "PanelPayload": {
            "type": "object",
            "description": "Payload from panel devices (V4/V5)",
            "required": [
                "sourceType",
                "data"
            ],
            "properties": {
                "sourceType": {
                    "type": "string",
                    "enum": [
                        "PANEL_V4",
                        "PANEL_V5"
                    ],
                    "description": "The type of panel generating the event"
                },
                "data": {
                    "type": "object",
                    "description": "Raw panel event data",
                    "properties": {
                        "eventCode": {
                            "type": "string",
                            "description": "Panel event code"
                        },
                        "area": {
                            "type": "integer",
                            "description": "Area number"
                        },
                        "zone": {
                            "type": "integer",
                            "description": "Zone number"
                        },
                        "user": {
                            "type": "integer",
                            "description": "User number"
                        }
                    }
                }
            }
        },
        "SmartcomPayload": {
            "type": "object",
            "description": "Payload from Smartcom/SmartcomPro devices",
            "required": [
                "sourceType",
                "data"
            ],
            "properties": {
                "sourceType": {
                    "type": "string",
                    "enum": [
                        "SMARTCOM",
                        "SMARTCOMPRO"
                    ],
                    "description": "The type of Smartcom device"
                },
                "data": {
                    "type": "object",
                    "description": "Smartcom event data"
                }
            }
        },
        "CloudPayload": {
            "type": "object",
            "description": "Payload from cloud services",
            "required": [
                "sourceType",
                "service",
                "data"
            ],
            "properties": {
                "sourceType": {
                    "type": "string",
                    "const": "CLOUD",
                    "description": "Cloud-generated event"
                },
                "service": {
                    "type": "string",
                    "description": "Name of the cloud service generating the event"
                },
                "data": {
                    "type": "object",
                    "description": "Service-specific event data"
                }
            }
        },
        "GenericPayload": {
            "type": "object",
            "description": "Generic payload structure for other event sources",
            "required": [
                "sourceType"
            ],
            "properties": {
                "sourceType": {
                    "type": "string",
                    "description": "The type of source generating the event"
                },
                "data": {
                    "type": "object",
                    "description": "Event-specific data"
                }
            }
        }
    }
}