From 966ff8240ea6bdb08c591d676e5d9dc7b9573e99 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Sun, 30 Aug 2026 19:06:09 -0500 Subject: [PATCH] remove SIP documentation and update schemas --- astro.config.mjs | 50 - src/content/docs/examples/dial-a-cue.mdx | 41 - src/content/docs/modules/sip/call/server.mdx | 24 - src/content/docs/modules/sip/dtmf/server.mdx | 25 - .../processors/sip/response/audio/create.mdx | 24 - .../processors/sip/response/dtmf/create.mdx | 24 - src/content/docs/showbridge/overview.mdx | 3 - src/data/modules.schema.json | 831 ++++---- src/data/processors.schema.json | 1806 +++++++++++------ 9 files changed, 1630 insertions(+), 1198 deletions(-) delete mode 100644 src/content/docs/examples/dial-a-cue.mdx delete mode 100644 src/content/docs/modules/sip/call/server.mdx delete mode 100644 src/content/docs/modules/sip/dtmf/server.mdx delete mode 100644 src/content/docs/processors/sip/response/audio/create.mdx delete mode 100644 src/content/docs/processors/sip/response/dtmf/create.mdx diff --git a/astro.config.mjs b/astro.config.mjs index fba4773..dc1e3d8 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -96,22 +96,6 @@ export default defineConfig({ collapsed: true, items: [{ autogenerate: { directory: "modules/serial" } }], }, - { - label: "SIP", - collapsed: true, - items: [ - { - label: "Call", - collapsed: true, - items: [{ autogenerate: { directory: "modules/sip/call" } }], - }, - { - label: "DTMF", - collapsed: true, - items: [{ autogenerate: { directory: "modules/sip/dtmf" } }], - }, - ], - }, { label: "WebSocket", collapsed: true, @@ -264,40 +248,6 @@ export default defineConfig({ collapsed: true, items: [{ autogenerate: { directory: "processors/script" } }], }, - { - label: "SIP", - collapsed: true, - items: [ - { - label: "Response", - collapsed: true, - items: [ - { - label: "Audio", - collapsed: true, - items: [ - { - autogenerate: { - directory: "processors/sip/response/audio", - }, - }, - ], - }, - { - label: "DTMF", - collapsed: true, - items: [ - { - autogenerate: { - directory: "processors/sip/response/dtmf", - }, - }, - ], - }, - ], - }, - ], - }, { label: "String", collapsed: true, diff --git a/src/content/docs/examples/dial-a-cue.mdx b/src/content/docs/examples/dial-a-cue.mdx deleted file mode 100644 index 9b952aa..0000000 --- a/src/content/docs/examples/dial-a-cue.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: SIP > OSC -sidebar: - order: 2 ---- - -import { Code } from "@astrojs/starlight/components"; - -This config starts an SIP server listening on port `5060`. Any incoming call will result in a OSC message being sent to `127.0.0.1:53000` with the address set to [fire a QLab cue](https://qlab.app/docs/v5/scripting/osc-dictionary-v5/#/cue/{cue_number}/go) with the dialed number as the cue number. This was tested with a cheap SIP gateway like [this one](https://www.grandstream.com/products/gateways-and-atas/analog-telephone-adaptors/product/ht802). - -export const example = ` -api: - enabled: true - port: 8080 -modules: - - id: sip - type: sip.call.server - params: - port: 5060 - - id: udp - type: net.udp.client - params: - host: 127.0.0.1 - port: 53000 -routes: - - id: sip-to-osc - input: sip - processors: - - id: create-osc-message - type: osc.message.create - params: - address: "/cue/{{.Payload.To}}/go" - - id: encode-osc-message - type: osc.message.encode - - id: send-osc - type: module.output - params: - module: udp -`; - - diff --git a/src/content/docs/modules/sip/call/server.mdx b/src/content/docs/modules/sip/call/server.mdx deleted file mode 100644 index 31ad8bd..0000000 --- a/src/content/docs/modules/sip/call/server.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: SIP Call Server -sidebar: - label: Server - order: 1 ---- -import SchemaInfo from '../../../../../components/SchemaInfo.astro'; - -This module starts a [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Protocol) server that listens for incoming connections and emits call events when a new call is received. This can be used with cheap SIP gateway devices to connect an analog phone line and do interesting things like [firing QLab cues with phone calls](/examples/dial-a-cue). - - - -### Example - -Start a UDP SIP server listening on port 5060 - -```yaml -- id: sipCallServer - type: sip.call.server - params: - ip: 127.0.0.1 - port: 5060 - transport: udp -``` diff --git a/src/content/docs/modules/sip/dtmf/server.mdx b/src/content/docs/modules/sip/dtmf/server.mdx deleted file mode 100644 index 91da4fe..0000000 --- a/src/content/docs/modules/sip/dtmf/server.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: SIP DTMF Server -sidebar: - label: Server - order: 1 ---- -import SchemaInfo from '../../../../../components/SchemaInfo.astro'; - -This module starts a [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Protocol) server that listens for incoming connections. When a call is received this module will emit events based on the touch tones (DTMF) received during the call. The event is sent out whenever the use presses the separator key defined in the params. - - - -### Example - -Start a UDP SIP server listening on port 5060 that will emit events whenever the user presses the `#` key on their phone during a call - -```yaml -- id: sipDTMFServer - type: sip.dtmf.server - params: - ip: 127.0.0.1 - port: 5060 - transport: udp - separator: "#" -``` diff --git a/src/content/docs/processors/sip/response/audio/create.mdx b/src/content/docs/processors/sip/response/audio/create.mdx deleted file mode 100644 index 1036df7..0000000 --- a/src/content/docs/processors/sip/response/audio/create.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Create SIP Audio Response -sidebar: - label: Create - order: 1 ---- -import SchemaInfo from '../../../../../../components/SchemaInfo.astro'; - -This processor will create a SIP response message with an audio file as the payload. If this message is output to a SIP module using the [module.output](/processors/module/output) processor, then the SIP module will send the response to the caller and play the audio file included in the response. - - - -### Example - -This example will create a SIP response that will wait 1 second then play `response.wav` then wait another second before completing the response. - -```yaml -- id: create-audio-response - type: sip.response.audio.create - params: - preWait: 1000 - audioFile: "response.wav" - postWait: 1000 -``` diff --git a/src/content/docs/processors/sip/response/dtmf/create.mdx b/src/content/docs/processors/sip/response/dtmf/create.mdx deleted file mode 100644 index 2038e48..0000000 --- a/src/content/docs/processors/sip/response/dtmf/create.mdx +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: Create SIP DTMF Response -sidebar: - label: Create - order: 1 ---- -import SchemaInfo from '../../../../../../components/SchemaInfo.astro'; - -This processor will create a SIP DTMF response from the provided parameters. If this message is output to a SIP module using the [module.output](/processors/module/output) processor, then the SIP module will send the response to the caller and play the DTMF tones specified. - - - -### Example - -This example will create a SIP response that will wait 1 second then play the DTMF digits "1234" then wait another second before completing the response. - -```yaml -- id: create-dtmf-response - type: sip.response.dtmf.create - params: - preWait: 1000 - digits: "1234" - postWait: 1000 -``` diff --git a/src/content/docs/showbridge/overview.mdx b/src/content/docs/showbridge/overview.mdx index aca755f..fa9cfbe 100644 --- a/src/content/docs/showbridge/overview.mdx +++ b/src/content/docs/showbridge/overview.mdx @@ -25,9 +25,6 @@ showbridge is a kind of re-imagining of [OSCulator](https://osculator.net/) take - server - [PosiStageNet](https://posistage.net/) - client -- [SIP](https://datatracker.ietf.org/doc/html/rfc3261) - - call server - - [DTMF](https://en.wikipedia.org/wiki/DTMF_signaling) server - MIDI - input (not included in pre-built binaries yet) - output (not included in pre-built binaries yet) diff --git a/src/data/modules.schema.json b/src/data/modules.schema.json index 55e0e7e..a075c2e 100644 --- a/src/data/modules.schema.json +++ b/src/data/modules.schema.json @@ -5,30 +5,147 @@ { "type": "object", "properties": { - "id": { "type": "string", "minLength": 1 }, + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "duration": { + "type": "integer", + "title": "Duration", + "description": "time in milliseconds between emitted events" + } + }, + "required": [ + "duration" + ], + "additionalProperties": false + }, + "type": { + "const": "time.interval" + } + }, + "$id": "time.interval", + "title": "Interval", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "url": { + "type": "string", + "title": "URL", + "description": "the URL of the WebSocket server to connect" + } + }, + "required": [ + "url" + ], + "additionalProperties": false + }, + "type": { + "const": "websocket.client" + } + }, + "$id": "websocket.client", + "title": "WebSocket Client", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "dsn": { + "type": "string", + "title": "Data Source Name", + "description": "the data source name (DSN) for the SQLite database", + "minLength": 1 + } + }, + "required": [ + "dsn" + ], + "additionalProperties": false + }, + "type": { + "const": "db.sqlite" + } + }, + "$id": "db.sqlite", + "title": "SQLite Database", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { "port": { "type": "string", "title": "Port", - "description": "the name of the MIDI port to send messages to" + "description": "the name of the MIDI port to listen to" } }, - "required": ["port"], + "required": [ + "port" + ], "additionalProperties": false }, - "type": { "const": "midi.output" } + "type": { + "const": "midi.input" + } }, - "$id": "midi.output", - "title": "MIDI Output", - "required": ["id", "type", "params"], + "$id": "midi.input", + "title": "MIDI Input", + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { - "id": { "type": "string", "minLength": 1 }, + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { @@ -62,20 +179,73 @@ "description": "an MQTT topic to subscribe to" } }, - "required": ["broker", "topic", "clientId"], + "required": [ + "broker", + "topic", + "clientId" + ], "additionalProperties": false }, - "type": { "const": "mqtt.client" } + "type": { + "const": "mqtt.client" + } }, "$id": "mqtt.client", "title": "MQTT Client", - "required": ["id", "type", "params"], + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { - "id": { "type": "string", "minLength": 1 }, + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "subject": { + "type": "string", + "title": "Subject", + "description": "the subject to subscribe to" + }, + "url": { + "type": "string", + "title": "NATS Server URL", + "description": "the URL of the NATS server to connect to" + } + }, + "required": [ + "url", + "subject" + ], + "additionalProperties": false + }, + "type": { + "const": "nats.client" + } + }, + "$id": "nats.client", + "title": "NATS Client", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { @@ -96,17 +266,25 @@ }, "additionalProperties": false }, - "type": { "const": "nats.server" } + "type": { + "const": "nats.server" + } }, "$id": "nats.server", "title": "NATS Server", - "required": ["id", "type"], + "required": [ + "id", + "type" + ], "additionalProperties": false }, { "type": "object", "properties": { - "id": { "type": "string", "minLength": 1 }, + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { @@ -114,58 +292,54 @@ "type": "string", "title": "Framing Method", "description": "the method used to frame messages over the TCP connection", - "enum": ["LF", "CR", "CRLF", "SLIP", "RAW"] + "enum": [ + "LF", + "CR", + "CRLF", + "SLIP", + "RAW" + ] }, - "host": { + "ip": { "type": "string", - "title": "Host", - "description": "the hostname or IP address of the TCP server to connect to" + "title": "IP", + "description": "the IP address to bind the TCP server to", + "default": "0.0.0.0" }, "port": { "type": "integer", "title": "Port", - "description": "the port of the TCP server to connect to", - "minimum": 1, + "description": "the port for the TCP server to listen on", + "minimum": 1024, "maximum": 65535 } }, - "required": ["host", "port", "framing"], + "required": [ + "port", + "framing" + ], "additionalProperties": false }, - "type": { "const": "net.tcp.client" } + "type": { + "const": "net.tcp.server" + } }, - "$id": "net.tcp.client", - "title": "TCP Client", - "required": ["id", "type", "params"], + "$id": "net.tcp.server", + "title": "TCP Server", + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { - "id": { "type": "string", "minLength": 1 }, - "params": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "title": "Duration", - "description": "time in milliseconds between emitted events" - } - }, - "required": ["duration"], - "additionalProperties": false + "id": { + "type": "string", + "minLength": 1 }, - "type": { "const": "time.interval" } - }, - "$id": "time.interval", - "title": "Interval", - "required": ["id", "type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { "type": "string", "minLength": 1 }, "params": { "type": "object", "properties": { @@ -182,20 +356,182 @@ "maximum": 65535 } }, - "required": ["host", "port"], + "required": [ + "host", + "port" + ], "additionalProperties": false }, - "type": { "const": "net.udp.client" } + "type": { + "const": "net.udp.client" + } }, "$id": "net.udp.client", "title": "UDP Client", - "required": ["id", "type", "params"], + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { - "id": { "type": "string", "minLength": 1 }, + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "port": { + "type": "string", + "title": "Port", + "description": "the name of the MIDI port to send messages to" + } + }, + "required": [ + "port" + ], + "additionalProperties": false + }, + "type": { + "const": "midi.output" + } + }, + "$id": "midi.output", + "title": "MIDI Output", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "psn.client" + } + }, + "$id": "psn.client", + "title": "PosiStageNet Client", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "framing": { + "type": "string", + "title": "Framing Method", + "description": "the method used to frame messages over the TCP connection", + "enum": [ + "LF", + "CR", + "CRLF", + "SLIP", + "RAW" + ] + }, + "host": { + "type": "string", + "title": "Host", + "description": "the hostname or IP address of the TCP server to connect to" + }, + "port": { + "type": "integer", + "title": "Port", + "description": "the port of the TCP server to connect to", + "minimum": 1, + "maximum": 65535 + } + }, + "required": [ + "host", + "port", + "framing" + ], + "additionalProperties": false + }, + "type": { + "const": "net.tcp.client" + } + }, + "$id": "net.tcp.client", + "title": "TCP Client", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "ip": { + "type": "string", + "title": "IP", + "description": "the multicast address to listen on" + }, + "port": { + "type": "integer", + "title": "Port", + "description": "the port to listen on", + "minimum": 1024, + "maximum": 65535 + } + }, + "required": [ + "ip", + "port" + ], + "additionalProperties": false + }, + "type": { + "const": "net.udp.multicast" + } + }, + "$id": "net.udp.multicast", + "title": "UDP Multicast", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { @@ -221,48 +557,67 @@ "maximum": 65535 } }, - "required": ["port"], + "required": [ + "port" + ], "additionalProperties": false }, - "type": { "const": "net.udp.server" } + "type": { + "const": "net.udp.server" + } }, "$id": "net.udp.server", "title": "UDP Server", - "required": ["id", "type", "params"], + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { - "id": { "type": "string", "minLength": 1 }, + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { - "subject": { - "type": "string", - "title": "Subject", - "description": "the subject to subscribe to" - }, - "url": { - "type": "string", - "title": "NATS Server URL", - "description": "the URL of the NATS server to connect to" + "port": { + "type": "integer", + "title": "Port", + "description": "the port for the HTTP server to listen on", + "minimum": 1024, + "maximum": 65535 } }, - "required": ["url", "subject"], + "required": [ + "port" + ], "additionalProperties": false }, - "type": { "const": "nats.client" } + "type": { + "const": "http.server" + } }, - "$id": "nats.client", - "title": "NATS Client", - "required": ["id", "type", "params"], + "$id": "http.server", + "title": "HTTP Server", + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { - "id": { "type": "string", "minLength": 1 }, + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { @@ -279,158 +634,32 @@ "maximum": 65535 } }, - "required": ["host", "port"], + "required": [ + "host", + "port" + ], "additionalProperties": false }, - "type": { "const": "redis.client" } + "type": { + "const": "redis.client" + } }, "$id": "redis.client", "title": "Redis Client", - "required": ["id", "type", "params"], + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { - "id": { "type": "string", "minLength": 1 }, - "params": { - "type": "object", - "properties": { - "ip": { - "type": "string", - "title": "IP", - "description": "the IP address to bind the SIP server to", - "default": "0.0.0.0" - }, - "port": { - "type": "integer", - "title": "Port", - "description": "the port for the SIP server to listen on", - "default": 5060, - "minimum": 1024, - "maximum": 65535 - }, - "transport": { - "type": "string", - "title": "Transport", - "description": "the transport protocol to use for the SIP server", - "default": "udp", - "enum": ["udp", "tcp", "ws", "udp4", "tcp4"] - }, - "userAgent": { - "type": "string", - "title": "User Agent", - "description": "the user agent string to use", - "default": "showbridge" - } - }, - "additionalProperties": false + "id": { + "type": "string", + "minLength": 1 }, - "type": { "const": "sip.call.server" } - }, - "$id": "sip.call.server", - "title": "SIP Call Server", - "required": ["id", "type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { "type": "string", "minLength": 1 }, - "params": { - "type": "object", - "properties": { - "framing": { - "type": "string", - "title": "Framing Method", - "description": "the method used to frame messages over the TCP connection", - "enum": ["LF", "CR", "CRLF", "SLIP", "RAW"] - }, - "ip": { - "type": "string", - "title": "IP", - "description": "the IP address to bind the TCP server to", - "default": "0.0.0.0" - }, - "port": { - "type": "integer", - "title": "Port", - "description": "the port for the TCP server to listen on", - "minimum": 1024, - "maximum": 65535 - } - }, - "required": ["port", "framing"], - "additionalProperties": false - }, - "type": { "const": "net.tcp.server" } - }, - "$id": "net.tcp.server", - "title": "TCP Server", - "required": ["id", "type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { "type": "string", "minLength": 1 }, - "params": { - "type": "object", - "properties": { - "url": { - "type": "string", - "title": "URL", - "description": "the URL of the WebSocket server to connect" - } - }, - "required": ["url"], - "additionalProperties": false - }, - "type": { "const": "websocket.client" } - }, - "$id": "websocket.client", - "title": "WebSocket Client", - "required": ["id", "type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { "type": "string", "minLength": 1 }, - "params": { - "type": "object", - "properties": { - "port": { - "type": "string", - "title": "Port", - "description": "the name of the MIDI port to listen to" - } - }, - "required": ["port"], - "additionalProperties": false - }, - "type": { "const": "midi.input" } - }, - "$id": "midi.input", - "title": "MIDI Input", - "required": ["id", "type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { "type": "string", "minLength": 1 }, - "type": { "const": "psn.client" } - }, - "$id": "psn.client", - "title": "PosiStageNet Client", - "required": ["id", "type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { "type": "string", "minLength": 1 }, "params": { "type": "object", "properties": { @@ -443,7 +672,13 @@ "type": "string", "title": "Framing Method", "description": "the method to use for framing messages on the serial port", - "enum": ["LF", "CR", "CRLF", "SLIP", "RAW"] + "enum": [ + "LF", + "CR", + "CRLF", + "SLIP", + "RAW" + ] }, "port": { "type": "string", @@ -451,20 +686,33 @@ "description": "the name of the serial port to connect to" } }, - "required": ["port", "baudRate", "framing"], + "required": [ + "port", + "baudRate", + "framing" + ], "additionalProperties": false }, - "type": { "const": "serial.client" } + "type": { + "const": "serial.client" + } }, "$id": "serial.client", "title": "Serial Client", - "required": ["id", "type", "params"], + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { - "id": { "type": "string", "minLength": 1 }, + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { @@ -474,145 +722,22 @@ "description": "time in milliseconds before the timer fires" } }, - "required": ["duration"], + "required": [ + "duration" + ], "additionalProperties": false }, - "type": { "const": "time.timer" } + "type": { + "const": "time.timer" + } }, "$id": "time.timer", "title": "Timer", - "required": ["id", "type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { "type": "string", "minLength": 1 }, - "params": { - "type": "object", - "properties": { - "port": { - "type": "integer", - "title": "Port", - "description": "the port for the HTTP server to listen on", - "minimum": 1024, - "maximum": 65535 - } - }, - "required": ["port"], - "additionalProperties": false - }, - "type": { "const": "http.server" } - }, - "$id": "http.server", - "title": "HTTP Server", - "required": ["id", "type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { "type": "string", "minLength": 1 }, - "params": { - "type": "object", - "properties": { - "ip": { - "type": "string", - "title": "IP", - "description": "the IP address to bind the SIP server to", - "default": "0.0.0.0" - }, - "port": { - "type": "integer", - "title": "Port", - "description": "the port for the SIP server to listen on", - "default": 5060, - "minimum": 1024, - "maximum": 65535 - }, - "separator": { - "type": "string", - "title": "DTMF Separator", - "description": "the DTMF character to use as a separator between DTMF digit groups", - "minLength": 1, - "maxLength": 1 - }, - "transport": { - "type": "string", - "title": "Transport", - "description": "the transport protocol to use for the SIP server", - "default": "udp", - "enum": ["udp", "tcp", "ws", "udp4", "tcp4"] - }, - "userAgent": { - "type": "string", - "title": "User Agent", - "description": "the user agent string to use", - "default": "showbridge" - } - }, - "required": ["separator"], - "additionalProperties": false - }, - "type": { "const": "sip.dtmf.server" } - }, - "$id": "sip.dtmf.server", - "title": "SIP DTMF Server", - "required": ["id", "type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { "type": "string", "minLength": 1 }, - "params": { - "type": "object", - "properties": { - "ip": { - "type": "string", - "title": "IP", - "description": "the multicast address to listen on" - }, - "port": { - "type": "integer", - "title": "Port", - "description": "the port to listen on", - "minimum": 1024, - "maximum": 65535 - } - }, - "required": ["ip", "port"], - "additionalProperties": false - }, - "type": { "const": "net.udp.multicast" } - }, - "$id": "net.udp.multicast", - "title": "UDP Multicast", - "required": ["id", "type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "id": { "type": "string", "minLength": 1 }, - "params": { - "type": "object", - "properties": { - "dsn": { - "type": "string", - "title": "Data Source Name", - "description": "the data source name (DSN) for the SQLite database", - "minLength": 1 - } - }, - "required": ["dsn"], - "additionalProperties": false - }, - "type": { "const": "db.sqlite" } - }, - "$id": "db.sqlite", - "title": "SQLite Database", - "required": ["id", "type", "params"], + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false } ] @@ -622,4 +747,4 @@ "title": "Modules", "description": "module configurations", "default": [] -} +} \ No newline at end of file diff --git a/src/data/processors.schema.json b/src/data/processors.schema.json index d9d16a5..8e1f045 100644 --- a/src/data/processors.schema.json +++ b/src/data/processors.schema.json @@ -5,376 +5,300 @@ { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "debug.log" + } + }, + "$id": "debug.log", + "title": "Debug Log", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { - "digits": { - "type": "string", - "title": "Digits", - "description": "DTMF digits to send" - }, - "postWait": { + "base": { "type": "integer", - "title": "Post Wait (ms)", - "description": "number of milliseconds to wait after sending the DTMF tones" + "title": "Base", + "description": "numerical base to use for parsing the integer", + "default": 10, + "enum": [ + 0, + 2, + 8, + 10, + 16 + ] }, - "preWait": { + "bitSize": { "type": "integer", - "title": "Pre Wait (ms)", - "description": "number of milliseconds to wait before sending the DTMF tones" + "title": "Bit Size", + "description": "bit size of the resulting integer", + "default": 64, + "enum": [ + 0, + 8, + 16, + 32, + 64 + ] } }, - "required": ["preWait", "postWait", "digits"], "additionalProperties": false }, - "type": { "const": "sip.response.dtmf.create" } + "type": { + "const": "int.parse" + } }, - "$id": "sip.response.dtmf.create", - "title": "Create SIP DTMF Response", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "json.encode" } }, - "$id": "json.encode", - "title": "Encode JSON", - "required": ["type"], + "$id": "int.parse", + "title": "Parse Int", + "required": [ + "id", + "type" + ], "additionalProperties": false }, { "type": "object", "properties": { - "params": { - "type": "object", - "properties": { - "channel": { - "type": "string", - "title": "Channel", - "description": "channel number for the program change message" - }, - "program": { - "type": "string", - "title": "Program", - "description": "program number for the program change message" - } - }, - "required": ["type", "channel", "program"], - "additionalProperties": false + "id": { + "type": "string", + "minLength": 1 }, - "type": { "const": "midi.program_change.create" } - }, - "$id": "midi.program_change.create", - "title": "Create MIDI Prgoram Change Message", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "params": { "type": "object", "properties": { - "audioFile": { - "type": "string", - "title": "Audio File", - "description": "path to the audio file to play" - }, - "postWait": { + "max": { "type": "integer", - "title": "Post Wait (ms)", - "description": "number of milliseconds to wait after playing the audio" + "title": "Maximum", + "description": "inclusive maximum value of the random integer" }, - "preWait": { + "min": { "type": "integer", - "title": "Pre Wait (ms)", - "description": "number of milliseconds to wait before playing the audio" + "title": "Minimum", + "description": "inclusive minimum value of the random integer" } }, - "required": ["preWait", "postWait", "audioFile"], + "required": [ + "min", + "max" + ], "additionalProperties": false }, - "type": { "const": "sip.response.audio.create" } + "type": { + "const": "int.random" + } }, - "$id": "sip.response.audio.create", - "title": "Create SIP Audio Response", - "required": ["type", "params"], + "$id": "int.random", + "title": "Random Int", + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "json.decode" + } + }, + "$id": "json.decode", + "title": "Decode JSON", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { - "name": { + "key": { "type": "string", - "title": "Field Name", - "description": "name of the struct field to extract" - } - }, - "required": ["name"], - "additionalProperties": false - }, - "type": { "const": "struct.field.get" } - }, - "$id": "struct.field.get", - "title": "Get Struct Field", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "params": { - "type": "object", - "properties": { - "duration": { - "type": "integer", - "title": "Duration", - "description": "time to sleep in milliseconds" - } - }, - "required": ["duration"], - "additionalProperties": false - }, - "type": { "const": "time.sleep" } - }, - "$id": "time.sleep", - "title": "Sleep", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "params": { - "type": "object", - "properties": { - "channel": { - "type": "string", - "title": "Channel", - "description": "channel number for the note off message" + "title": "Key", + "description": "key to retrieve from the key-value module" }, - "note": { - "type": "string", - "title": "Note", - "description": "note number for the note off message" - }, - "velocity": { - "type": "string", - "title": "Velocity", - "description": "velocity for the note off message" - } - }, - "required": ["channel", "note", "velocity"], - "additionalProperties": false - }, - "type": { "const": "midi.note_off.create" } - }, - "$id": "midi.note_off.create", - "title": "Create MIDI Note Off Message", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "params": { - "type": "object", - "properties": { - "channel": { - "type": "string", - "title": "Channel", - "description": "channel number for the note on message" - }, - "note": { - "type": "string", - "title": "Note", - "description": "note number for the note on message" - }, - "velocity": { - "type": "string", - "title": "Velocity", - "description": "velocity for the note on message" - } - }, - "required": ["channel", "note", "velocity"], - "additionalProperties": false - }, - "type": { "const": "midi.note_on.create" } - }, - "$id": "midi.note_on.create", - "title": "Create MIDI Note On Message", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "string.encode" } }, - "$id": "string.encode", - "title": "Encode String", - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "artnet.packet.decode" } }, - "$id": "artnet.packet.decode", - "title": "Decode ArtNet Packet", - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "params": { - "type": "object", - "properties": { "module": { "type": "string", "title": "Module ID", - "description": "ID of the database module to query" - }, - "query": { - "type": "string", - "title": "Query", - "description": "SQL query to execute" + "description": "ID of the key-value module to get the value from" } }, - "required": ["module", "query"], + "required": [ + "module", + "key" + ], "additionalProperties": false }, - "type": { "const": "db.query" } + "type": { + "const": "kv.get" + } }, - "$id": "db.query", - "title": "Query Database", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "filter.change" } }, - "$id": "filter.change", - "title": "Filter On Change", - "required": ["type"], + "$id": "kv.get", + "title": "Get Key", + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "midi.message.decode" + } + }, + "$id": "midi.message.decode", + "title": "Decode MIDI Message", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { - "bitSize": { - "type": "integer", - "title": "Bit Size", - "description": "bit size of the resulting float", - "default": 64, - "enum": [32, 64] + "program": { + "type": "string", + "title": "Program", + "description": "JavaScript program to run" } }, + "required": [ + "program" + ], "additionalProperties": false }, - "type": { "const": "float.parse" } + "type": { + "const": "script.js" + } }, - "$id": "float.parse", - "title": "Parse Float", - "required": ["type"], + "$id": "script.js", + "title": "Run JavaScript", + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { - "bitSize": { - "type": "integer", - "title": "Bit Size", - "description": "bit size of the resulting float", - "default": 32, - "enum": [32, 64] - }, - "max": { - "type": "number", - "title": "Maximum", - "description": "exclusive maximum value of the random float" - }, - "min": { - "type": "number", - "title": "Minimum", - "description": "inclusive minimum value of the random float" + "pattern": { + "type": "string", + "title": "Pattern", + "description": "regex pattern to match against" } }, - "required": ["min", "max"], + "required": [ + "pattern" + ], "additionalProperties": false }, - "type": { "const": "float.random" } + "type": { + "const": "filter.regex" + } }, - "$id": "float.random", - "title": "Random Float", - "required": ["type", "params"], + "$id": "filter.regex", + "title": "Filter by Regex", + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { - "method": { + "template": { "type": "string", - "title": "HTTP Method", - "description": "method to use for the HTTP request", - "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"] - }, - "url": { - "type": "string", - "title": "URL", - "description": "URL to send the HTTP request to" + "title": "Template", + "description": "template to evaluate" } }, - "required": ["method", "url"], + "required": [ + "template" + ], "additionalProperties": false }, - "type": { "const": "http.request.do" } + "type": { + "const": "string.create" + } }, - "$id": "http.request.do", - "title": "Do HTTP Request", - "required": ["type", "params"], + "$id": "string.create", + "title": "Create String", + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { - "params": { - "type": "object", - "properties": { - "bodyTemplate": { - "type": "string", - "title": "Body Template", - "description": "template for the response body" - }, - "status": { - "type": "integer", - "title": "Status Code", - "description": "status code to set on the response" - } - }, - "required": ["status", "bodyTemplate"], - "additionalProperties": false + "id": { + "type": "string", + "minLength": 1 }, - "type": { "const": "http.response.create" } - }, - "$id": "http.response.create", - "title": "Create HTTP Response", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "params": { "type": "object", "properties": { @@ -399,62 +323,174 @@ "description": "minimum value of the output integer" } }, - "required": ["inMin", "inMax", "outMin", "outMax"], + "required": [ + "inMin", + "inMax", + "outMin", + "outMax" + ], "additionalProperties": false }, - "type": { "const": "int.scale" } + "type": { + "const": "int.scale" + } }, "$id": "int.scale", "title": "Scale Int", - "required": ["type", "params"], + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { - "expression": { + "key": { "type": "string", - "title": "Expression", - "description": "Expr expression to evaluate, must return a boolean" + "title": "Key", + "description": "key to set in the key-value module" + }, + "module": { + "type": "string", + "title": "Module ID", + "description": "ID of the key-value module to set the value in" } }, - "required": ["expression"], + "required": [ + "module", + "key" + ], "additionalProperties": false }, - "type": { "const": "filter.expr" } + "type": { + "const": "kv.set" + } }, - "$id": "filter.expr", - "title": "Filter by Expr expression", - "required": ["type", "params"], + "$id": "kv.set", + "title": "Set Key", + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { - "rate": { - "type": "integer", - "title": "Rate", - "description": "number of events to allow per second" + "address": { + "type": "string", + "title": "Address", + "description": "OSC address for the message" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Arguments", + "description": "arguments for the OSC message" + }, + "types": { + "type": "string", + "title": "Argument Types", + "description": "string of OSC types corresponding to the arguments in args" } }, - "required": ["rate"] + "required": [ + "address" + ], + "additionalProperties": false }, - "type": { "const": "filter.rate" } + "type": { + "const": "osc.message.create" + } }, - "$id": "filter.rate", - "title": "Filter by Rate", - "required": ["type", "params"], + "$id": "osc.message.create", + "title": "Create OSC Message", + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Field Name", + "description": "name of the struct field to extract" + } + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "type": { + "const": "struct.field.get" + } + }, + "$id": "struct.field.get", + "title": "Get Struct Field", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "midi.message.encode" + } + }, + "$id": "midi.message.encode", + "title": "Encode MIDI Message", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { @@ -517,67 +553,662 @@ ], "additionalProperties": false }, - "type": { "const": "freed.create" } + "type": { + "const": "freed.create" + } }, "$id": "freed.create", "title": "Create FreeD", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "freed.encode" } }, - "$id": "freed.encode", - "title": "Encode FreeD", - "required": ["type"], + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "freed.decode" + } + }, + "$id": "freed.decode", + "title": "Decode FreeD", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "artnet.packet.decode" + } + }, + "$id": "artnet.packet.decode", + "title": "Decode ArtNet Packet", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "filter.change" + } + }, + "$id": "filter.change", + "title": "Filter On Change", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { - "key": { - "type": "string", - "title": "Key", - "description": "key to retrieve from the key-value module" - }, - "module": { - "type": "string", - "title": "Module ID", - "description": "ID of the key-value module to get the value from" + "rate": { + "type": "integer", + "title": "Rate", + "description": "number of events to allow per second" } }, - "required": ["module", "key"], - "additionalProperties": false + "required": [ + "rate" + ] }, - "type": { "const": "kv.get" } + "type": { + "const": "filter.rate" + } }, - "$id": "kv.get", - "title": "Get Key", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "osc.message.decode" } }, - "$id": "osc.message.decode", - "title": "Decode OSC Message", - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "osc.message.encode" } }, - "$id": "osc.message.encode", - "title": "Encode OSC Message", - "required": ["type"], + "$id": "filter.rate", + "title": "Filter by Rate", + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "bodyTemplate": { + "type": "string", + "title": "Body Template", + "description": "template for the response body" + }, + "status": { + "type": "integer", + "title": "Status Code", + "description": "status code to set on the response" + } + }, + "required": [ + "status", + "bodyTemplate" + ], + "additionalProperties": false + }, + "type": { + "const": "http.response.create" + } + }, + "$id": "http.response.create", + "title": "Create HTTP Response", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "json.encode" + } + }, + "$id": "json.encode", + "title": "Encode JSON", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "module": { + "type": "string", + "title": "Module ID", + "description": "ID of the database module to query" + }, + "query": { + "type": "string", + "title": "Query", + "description": "SQL query to execute" + } + }, + "required": [ + "module", + "query" + ], + "additionalProperties": false + }, + "type": { + "const": "db.query" + } + }, + "$id": "db.query", + "title": "Query Database", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "method": { + "type": "string", + "title": "HTTP Method", + "description": "method to use for the HTTP request", + "enum": [ + "GET", + "POST", + "PUT", + "PATCH", + "DELETE" + ] + }, + "url": { + "type": "string", + "title": "URL", + "description": "URL to send the HTTP request to" + } + }, + "required": [ + "method", + "url" + ], + "additionalProperties": false + }, + "type": { + "const": "http.request.do" + } + }, + "$id": "http.request.do", + "title": "Do HTTP Request", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "channel": { + "type": "string", + "title": "Channel", + "description": "channel number for the note off message" + }, + "note": { + "type": "string", + "title": "Note", + "description": "note number for the note off message" + }, + "velocity": { + "type": "string", + "title": "Velocity", + "description": "velocity for the note off message" + } + }, + "required": [ + "channel", + "note", + "velocity" + ], + "additionalProperties": false + }, + "type": { + "const": "midi.note_off.create" + } + }, + "$id": "midi.note_off.create", + "title": "Create MIDI Note Off Message", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "channel": { + "type": "string", + "title": "Channel", + "description": "channel number for the program change message" + }, + "program": { + "type": "string", + "title": "Program", + "description": "program number for the program change message" + } + }, + "required": [ + "type", + "channel", + "program" + ], + "additionalProperties": false + }, + "type": { + "const": "midi.program_change.create" + } + }, + "$id": "midi.program_change.create", + "title": "Create MIDI Prgoram Change Message", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "osc.message.decode" + } + }, + "$id": "osc.message.decode", + "title": "Decode OSC Message", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "osc.message.encode" + } + }, + "$id": "osc.message.encode", + "title": "Encode OSC Message", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "source": { + "type": "string", + "title": "Source", + "description": "source to report as to the router" + } + }, + "required": [ + "source" + ], + "additionalProperties": false + }, + "type": { + "const": "router.input" + } + }, + "$id": "router.input", + "title": "Router Input", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "expression": { + "type": "string", + "title": "Expression", + "description": "Expr expression to evaluate" + } + }, + "required": [ + "expression" + ], + "additionalProperties": false + }, + "type": { + "const": "script.expr" + } + }, + "$id": "script.expr", + "title": "Evaluate Expr Expression", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "freed.encode" + } + }, + "$id": "freed.encode", + "title": "Encode FreeD", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "artnet.packet.encode" + } + }, + "$id": "artnet.packet.encode", + "title": "Encode ArtNet Packet", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "bitSize": { + "type": "integer", + "title": "Bit Size", + "description": "bit size of the resulting float", + "default": 64, + "enum": [ + 32, + 64 + ] + } + }, + "additionalProperties": false + }, + "type": { + "const": "float.parse" + } + }, + "$id": "float.parse", + "title": "Parse Float", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "bitSize": { + "type": "integer", + "title": "Bit Size", + "description": "bit size of the resulting float", + "default": 32, + "enum": [ + 32, + 64 + ] + }, + "max": { + "type": "number", + "title": "Maximum", + "description": "exclusive maximum value of the random float" + }, + "min": { + "type": "number", + "title": "Minimum", + "description": "inclusive minimum value of the random float" + } + }, + "required": [ + "min", + "max" + ], + "additionalProperties": false + }, + "type": { + "const": "float.random" + } + }, + "$id": "float.random", + "title": "Random Float", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "string.encode" + } + }, + "$id": "string.encode", + "title": "Encode String", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "midi.message.unpack" + } + }, + "$id": "midi.message.unpack", + "title": "Unpack MIDI Message", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "channel": { + "type": "string", + "title": "Channel", + "description": "channel number for the note on message" + }, + "note": { + "type": "string", + "title": "Note", + "description": "note number for the note on message" + }, + "velocity": { + "type": "string", + "title": "Velocity", + "description": "velocity for the note on message" + } + }, + "required": [ + "channel", + "note", + "velocity" + ], + "additionalProperties": false + }, + "type": { + "const": "midi.note_on.create" + } + }, + "$id": "midi.note_on.create", + "title": "Create MIDI Note On Message", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { @@ -592,267 +1223,32 @@ "description": "topic to publish to" } }, - "required": ["module", "topic"], + "required": [ + "module", + "topic" + ], "additionalProperties": false }, - "type": { "const": "pubsub.publish" } + "type": { + "const": "pubsub.publish" + } }, "$id": "pubsub.publish", "title": "Publish to Pub/Sub Topic", - "required": ["type", "params"], + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { - "params": { - "type": "object", - "properties": { - "pattern": { - "type": "string", - "title": "Pattern", - "description": "regex pattern to match against" - } - }, - "required": ["pattern"], - "additionalProperties": false + "id": { + "type": "string", + "minLength": 1 }, - "type": { "const": "filter.regex" } - }, - "$id": "filter.regex", - "title": "Filter by Regex", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "freed.decode" } }, - "$id": "freed.decode", - "title": "Decode FreeD", - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "json.decode" } }, - "$id": "json.decode", - "title": "Decode JSON", - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "midi.message.decode" } }, - "$id": "midi.message.decode", - "title": "Decode MIDI Message", - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "params": { - "type": "object", - "properties": { - "program": { - "type": "string", - "title": "Program", - "description": "JavaScript program to run" - } - }, - "required": ["program"], - "additionalProperties": false - }, - "type": { "const": "script.js" } - }, - "$id": "script.js", - "title": "Run JavaScript", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "params": { - "type": "object", - "properties": { - "template": { - "type": "string", - "title": "Template", - "description": "template to evaluate" - } - }, - "required": ["template"], - "additionalProperties": false - }, - "type": { "const": "string.create" } - }, - "$id": "string.create", - "title": "Create String", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "string.decode" } }, - "$id": "string.decode", - "title": "Decode String", - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "params": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "Method Name", - "description": "name of the struct method to extract and call (with no arguments)" - } - }, - "required": ["name"], - "additionalProperties": false - }, - "type": { "const": "struct.method.get" } - }, - "$id": "struct.method.get", - "title": "Get Struct Method", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "artnet.packet.encode" } }, - "$id": "artnet.packet.encode", - "title": "Encode ArtNet Packet", - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "params": { - "type": "object", - "properties": { - "base": { - "type": "integer", - "title": "Base", - "description": "numerical base to use for parsing the integer", - "default": 10, - "enum": [0, 2, 8, 10, 16] - }, - "bitSize": { - "type": "integer", - "title": "Bit Size", - "description": "bit size of the resulting integer", - "default": 64, - "enum": [0, 8, 16, 32, 64] - } - }, - "additionalProperties": false - }, - "type": { "const": "int.parse" } - }, - "$id": "int.parse", - "title": "Parse Int", - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "params": { - "type": "object", - "properties": { - "key": { - "type": "string", - "title": "Key", - "description": "key to set in the key-value module" - }, - "module": { - "type": "string", - "title": "Module ID", - "description": "ID of the key-value module to set the value in" - } - }, - "required": ["module", "key"], - "additionalProperties": false - }, - "type": { "const": "kv.set" } - }, - "$id": "kv.set", - "title": "Set Key", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "midi.message.encode" } }, - "$id": "midi.message.encode", - "title": "Encode MIDI Message", - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "params": { - "type": "object", - "properties": { - "address": { - "type": "string", - "title": "Address", - "description": "OSC address for the message" - }, - "args": { - "type": "array", - "items": { "type": "string" }, - "title": "Arguments", - "description": "arguments for the OSC message" - }, - "types": { - "type": "string", - "title": "Argument Types", - "description": "string of OSC types corresponding to the arguments in args" - } - }, - "required": ["address"], - "additionalProperties": false - }, - "type": { "const": "osc.message.create" } - }, - "$id": "osc.message.create", - "title": "Create OSC Message", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "params": { - "type": "object", - "properties": { - "expression": { - "type": "string", - "title": "Expression", - "description": "Expr expression to evaluate" - } - }, - "required": ["expression"], - "additionalProperties": false - }, - "type": { "const": "script.expr" } - }, - "$id": "script.expr", - "title": "Evaluate Expr Expression", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "params": { "type": "object", "properties": { @@ -874,19 +1270,50 @@ "description": "path to the WASM plugin to load" } }, - "required": ["path"], + "required": [ + "path" + ], "additionalProperties": false }, - "type": { "const": "script.wasm" } + "type": { + "const": "script.wasm" + } }, "$id": "script.wasm", "title": "Run WASM Plugin", - "required": ["type", "params"], + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "string.decode" + } + }, + "$id": "string.decode", + "title": "Decode String", + "required": [ + "id", + "type" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { @@ -896,54 +1323,99 @@ "description": "separator to split the string on" } }, - "required": ["separator"], + "required": [ + "separator" + ], "additionalProperties": false }, - "type": { "const": "string.split" } + "type": { + "const": "string.split" + } }, "$id": "string.split", "title": "Split String", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "midi.message.unpack" } }, - "$id": "midi.message.unpack", - "title": "Unpack MIDI Message", - "required": ["type"], + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { - "max": { - "type": "integer", - "title": "Maximum", - "description": "inclusive maximum value of the random integer" - }, - "min": { - "type": "integer", - "title": "Minimum", - "description": "inclusive minimum value of the random integer" + "name": { + "type": "string", + "title": "Method Name", + "description": "name of the struct method to extract and call (with no arguments)" } }, - "required": ["min", "max"], + "required": [ + "name" + ], "additionalProperties": false }, - "type": { "const": "int.random" } + "type": { + "const": "struct.method.get" + } }, - "$id": "int.random", - "title": "Random Int", - "required": ["type", "params"], + "$id": "struct.method.get", + "title": "Get Struct Method", + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "duration": { + "type": "integer", + "title": "Duration", + "description": "time to sleep in milliseconds" + } + }, + "required": [ + "duration" + ], + "additionalProperties": false + }, + "type": { + "const": "time.sleep" + } + }, + "$id": "time.sleep", + "title": "Sleep", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { @@ -963,19 +1435,67 @@ "description": "value for the control change message" } }, - "required": ["channel", "control", "value"], + "required": [ + "channel", + "control", + "value" + ], "additionalProperties": false }, - "type": { "const": "midi.control_change.create" } + "type": { + "const": "midi.control_change.create" + } }, "$id": "midi.control_change.create", "title": "Create MIDI Control Change Message", - "required": ["type", "params"], + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false }, { "type": "object", "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "params": { + "type": "object", + "properties": { + "expression": { + "type": "string", + "title": "Expression", + "description": "Expr expression to evaluate, must return a boolean" + } + }, + "required": [ + "expression" + ], + "additionalProperties": false + }, + "type": { + "const": "filter.expr" + } + }, + "$id": "filter.expr", + "title": "Filter by Expr expression", + "required": [ + "id", + "type", + "params" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, "params": { "type": "object", "properties": { @@ -985,44 +1505,22 @@ "description": "ID of module to send output to" } }, - "required": ["module"], + "required": [ + "module" + ], "additionalProperties": false }, - "type": { "const": "module.output" } + "type": { + "const": "module.output" + } }, "$id": "module.output", "title": "Module Output", - "required": ["type", "params"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { "type": { "const": "debug.log" } }, - "$id": "debug.log", - "title": "Debug Log", - "required": ["type"], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "params": { - "type": "object", - "properties": { - "source": { - "type": "string", - "title": "Source", - "description": "source to report as to the router" - } - }, - "required": ["source"], - "additionalProperties": false - }, - "type": { "const": "router.input" } - }, - "$id": "router.input", - "title": "Router Input", - "required": ["type", "params"], + "required": [ + "id", + "type", + "params" + ], "additionalProperties": false } ] @@ -1032,4 +1530,4 @@ "title": "Processors", "description": "processor configurations", "default": [] -} +} \ No newline at end of file