diff --git a/docs/generated/protocol.json b/docs/generated/protocol.json index d8030c09..1598fd7b 100644 --- a/docs/generated/protocol.json +++ b/docs/generated/protocol.json @@ -5670,6 +5670,23 @@ "valueDescription": "Vendor-provided event data. {} if event does not provide any data" } ] + }, + { + "description": "Custom event emitted by `BroadcastCustomEvent`.", + "eventType": "CustomEvent", + "eventSubscription": "General", + "complexity": 1, + "rpcVersion": "1", + "deprecated": false, + "initialVersion": "5.0.0", + "category": "general", + "dataFields": [ + { + "valueName": "eventData", + "valueType": "Object", + "valueDescription": "Custom event data" + } + ] } ] } \ No newline at end of file diff --git a/docs/generated/protocol.md b/docs/generated/protocol.md index 164fb97f..1028131c 100644 --- a/docs/generated/protocol.md +++ b/docs/generated/protocol.md @@ -1304,6 +1304,7 @@ Subscription value to receive the `SceneItemTransformChanged` high-volume event. - [General Events](#general-events) - [ExitStarted](#exitstarted) - [VendorEvent](#vendorevent) + - [CustomEvent](#customevent) - [Config Events](#config-events) - [CurrentSceneCollectionChanging](#currentscenecollectionchanging) - [CurrentSceneCollectionChanged](#currentscenecollectionchanged) @@ -1395,6 +1396,22 @@ If a plugin or script implements vendor requests or events, documentation is exp | eventType | String | Vendor-provided event typedef | | eventData | Object | Vendor-provided event data. {} if event does not provide any data | +--- + +### CustomEvent + +Custom event emitted by `BroadcastCustomEvent`. + +- Complexity Rating: `1/5` +- Latest Supported RPC Version: `1` +- Added in v5.0.0 + +**Data Fields:** + +| Name | Type | Description | +| ---- | :---: | ----------- | +| eventData | Object | Custom event data | + ## Config Events ### CurrentSceneCollectionChanging diff --git a/src/requesthandler/RequestHandler_General.cpp b/src/requesthandler/RequestHandler_General.cpp index 20d47742..436ca7af 100644 --- a/src/requesthandler/RequestHandler_General.cpp +++ b/src/requesthandler/RequestHandler_General.cpp @@ -102,6 +102,20 @@ RequestResult RequestHandler::GetStats(const Request &) return RequestResult::Success(responseData); } +/** + * Custom event emitted by `BroadcastCustomEvent`. + * + * @dataField eventData | Object | Custom event data + * + * @eventType CustomEvent + * @eventSubscription General + * @complexity 1 + * @rpcVersion -1 + * @initialVersion 5.0.0 + * @category general + * @api events + */ + /** * Broadcasts a `CustomEvent` to all WebSocket clients. Receivers are clients which are identified and subscribed. *