Texecom Event Schemas

JSON Schema Documentation

Unified Event Model

A standardised schema for all events with detailed device information.

$idhttps://schemas.texecom-prod.com/v2/events/unified-event-model/v1.0.0.json
$schemahttp://json-schema.org/draft-07/schema

Properties

NameType
eventIdString
sourceString
eventTypeString
timestampString
versionString
correlationIdString
metadataObject
payload[object, array, string, number, boolean, null]
sourceDetailsArray [../source-details/v1.0.0.html]
poisonedBoolean
One of:

eventId

Description A unique, immutable identifier for this specific event instance. This should be a UUID.
TypeString
Required Yes
Format uuid

source

Defined in ../event-source/v1.0.0.html

$id https://schemas.texecom-prod.com/v2/events/event-source/v1.0.0.json
Title Event Source Definition
Description Defines valid sources for events generated.
TypeString
Required Yes
Enum
  • third_party.monitor
  • arc.masxml-sia-dc09
  • arc.sentinel-sia
  • arc.sia-dc09
  • arc.sia-mlr2
  • arc.json
  • panel.connect
  • panel.monitor
  • smartcom_v5.monitor
  • smartcom_v4.monitor
  • cloud.internal
  • services.smoke-test
  • service.identity
  • service.device
  • service.notification
  • service.audit

eventType

TypeString
Required Yes

timestamp

Description The UTC timestamp when the event was generated at the source, in ISO 8601 format.
TypeString
Required Yes
Format date-time

version

Description The version of this standardised event schema. Example: '1.0.0'
TypeString
Required Yes
Pattern ^\d+\.\d+\.\d+$

correlationId

Description A unique identifier for a sequence of related events.
TypeString
Required Yes
Format uuid

metadata

Description Additional, non-essential data about the event, like routing information or device details.
TypeObject
Required No

payload

Defined in ../payload-options/v1.0.0.html

$id https://schemas.texecom-prod.com/v2/events/payload-options/v1.0.0.json
Title Payload Options
Description The original, raw event data from the source, wrapped within this unified schema.
Type[object, array, string, number, boolean, null]
Required Yes

sourceDetails

Defined in ../source-details/v1.0.0.html

$id https://schemas.texecom-prod.com/v2/events/source-details/v1.0.0.json
Title Source Details
Description Structured information for physical devices related to an event.
TypeArray [../source-details/v1.0.0.html]
Required Yes

poisoned

Description Indicates if the event is intentionally failed and should be routed to DLQ.
TypeBoolean
Required No

Schema

{
    "$id": "https://schemas.texecom-prod.com/v2/events/unified-event-model/v1.0.0.json",
    "$schema": "http://json-schema.org/draft-07/schema",
    "title": "Unified Event Model",
    "description": "A standardised schema for all events with detailed device information.",
    "type": "object",
    "properties": {
        "eventId": {
            "description": "A unique, immutable identifier for this specific event instance. This should be a UUID.",
            "type": "string",
            "format": "uuid"
        },
        "source": {
            "$ref": "../event-source/v1.0.0.json"
        },
        "eventType": {
            "type": "string"
        },
        "timestamp": {
            "description": "The UTC timestamp when the event was generated at the source, in ISO 8601 format.",
            "type": "string",
            "format": "date-time"
        },
        "version": {
            "description": "The version of this standardised event schema. Example: '1.0.0'",
            "type": "string",
            "pattern": "^\\d+\\.\\d+\\.\\d+$"
        },
        "correlationId": {
            "description": "A unique identifier for a sequence of related events.",
            "type": "string",
            "format": "uuid"
        },
        "metadata": {
            "description": "Additional, non-essential data about the event, like routing information or device details.",
            "type": "object",
            "additionalProperties": true
        },
        "payload": {
            "description": "The original, raw event data from the source, wrapped within this unified schema.",
            "$ref": "../payload-options/v1.0.0.json"
        },
        "sourceDetails": {
            "$ref": "../source-details/v1.0.0.json"
        },
        "poisoned": {
            "description": "Indicates if the event is intentionally failed and should be routed to DLQ.",
            "type": "boolean"
        }
    },
    "required": [
        "eventId",
        "source",
        "eventType",
        "timestamp",
        "version",
        "correlationId",
        "payload",
        "sourceDetails"
    ],
    "oneOf": [
        {
            "properties": {
                "source": {
                    "const": "cloud.internal"
                },
                "eventType": {
                    "$ref": "../event-type/cloud/internal/v1.0.0.json"
                }
            },
            "allOf": [
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "power_monitoring.mains.status_read"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/cloud/internal/power_monitoring/mains/status_read/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "power_monitoring.battery.load_test.initiated"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/cloud/internal/power_monitoring/battery/load_test/initiated/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "power_monitoring.battery.load_test.completed"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/cloud/internal/power_monitoring/battery/load_test/completed/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "access_key.write"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/cloud/internal/access_key/write/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "access_key.delete"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/cloud/internal/access_key/delete/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "access_key.learn_status"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/cloud/internal/access_key/learn_status/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "power_monitoring.mains.settings_read"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/cloud/internal/power_monitoring/mains/settings_read/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "power_monitoring.mains.settings_write"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/cloud/internal/power_monitoring/mains/settings_write/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "power_monitoring.battery.status_read"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/cloud/internal/power_monitoring/battery/status_read/v1.0.0.json"
                            }
                        }
                    }
                }
            ]
        },
        {
            "properties": {
                "source": {
                    "const": "service.identity"
                },
                "eventType": {
                    "$ref": "../event-type/service/identity/v1.0.0.json"
                }
            },
            "allOf": [
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "installer.created"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/service/identity/installer/created/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "installer.updated"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/service/identity/installer/updated/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "installer.deleted"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/service/identity/installer/deleted/v1.0.0.json"
                            }
                        }
                    }
                }
            ]
        },
        {
            "properties": {
                "source": {
                    "const": "panel.connect"
                },
                "eventType": {
                    "$ref": "../event-type/panel/connect/v1.0.0.json"
                }
            }
        },
        {
            "properties": {
                "source": {
                    "const": "panel.monitor"
                },
                "eventType": {
                    "$ref": "../event-type/panel/monitor/v1.0.0.json"
                }
            }
        },
        {
            "properties": {
                "source": {
                    "const": "smartcom_v5.monitor"
                },
                "eventType": {
                    "$ref": "../event-type/smartcom_v5/monitor/v1.0.0.json"
                }
            }
        },
        {
            "properties": {
                "source": {
                    "const": "smartcom_v4.monitor"
                },
                "eventType": {
                    "$ref": "../event-type/smartcom_v4/monitor/v1.0.0.json"
                }
            }
        },
        {
            "properties": {
                "source": {
                    "const": "third_party.monitor"
                },
                "eventType": {
                    "$ref": "../event-type/third_party/monitor/v1.0.0.json"
                }
            }
        },
        {
            "properties": {
                "source": {
                    "const": "arc.masxml-sia-dc09"
                },
                "metadata": {},
                "eventType": {
                    "$ref": "../event-type/arc/masxml-sia-dc09/received/v1.0.0.json"
                }
            }
        },
        {
            "properties": {
                "source": {
                    "const": "arc.sentinel-sia"
                },
                "metadata": {},
                "eventType": {
                    "$ref": "../event-type/arc/sentinel-sia/received/v1.0.0.json"
                }
            }
        },
        {
            "properties": {
                "source": {
                    "const": "arc.sia-dc09"
                },
                "metadata": {},
                "eventType": {
                    "$ref": "../event-type/arc/sia-dc09/received/v1.0.0.json"
                }
            }
        },
        {
            "properties": {
                "source": {
                    "const": "arc.sia-mlr2"
                },
                "metadata": {},
                "eventType": {
                    "$ref": "../event-type/arc/sia-mlr2/received/v1.0.0.json"
                }
            }
        },
        {
            "properties": {
                "source": {
                    "const": "arc.json"
                },
                "metadata": {},
                "eventType": {
                    "$ref": "../event-type/arc/json/received/v1.0.0.json"
                }
            }
        },
        {
            "properties": {
                "source": {
                    "const": "walk_test"
                },
                "eventType": {
                    "$ref": "../event-type/walk_test/v1.0.0.json"
                }
            },
            "allOf": [
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "walk_test.start.initiated"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/walk_test/start/initiated/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "walk_test.start.zone_triggered"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/walk_test/start/zone_triggered/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "walk_test.start.terminal"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/walk_test/start/terminal/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "walk_test.stop"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/walk_test/stop/v1.0.0.json"
                            }
                        }
                    }
                },
                {
                    "if": {
                        "properties": {
                            "eventType": {
                                "const": "walk_test.status.read"
                            }
                        },
                        "required": [
                            "eventType"
                        ]
                    },
                    "then": {
                        "properties": {
                            "payload": {
                                "$ref": "../payload/walk_test/status/read/v1.0.0.json"
                            }
                        }
                    }
                }
            ]
        }
    ],
    "additionalProperties": false
}