From 95ffe270f8cc868475b00392fca9cc1ba226a952 Mon Sep 17 00:00:00 2001 From: Matthew Runyon Date: Mon, 24 Jun 2024 01:06:36 -0500 Subject: [PATCH] Update json schema --- plugins/ui/src/ui.schema.json | 40 +++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/plugins/ui/src/ui.schema.json b/plugins/ui/src/ui.schema.json index 82cccb99b..e4fa98d86 100644 --- a/plugins/ui/src/ui.schema.json +++ b/plugins/ui/src/ui.schema.json @@ -60,6 +60,16 @@ "type": "array", "prefixItems": [{ "type": "object" }], "items": false + }, + "callCallableParams": { + "type": "array", + "prefixItems": [{ "type": "string" }, { "type": "array" }], + "items": false + }, + "closeCallableParams": { + "type": "array", + "prefixItems": [{ "type": "string" }], + "items": false } }, "type": "object", @@ -67,8 +77,15 @@ "jsonrpc": "2.0", "method": { "anyOf": [ - { "enum": ["documentUpdated", "documentError"] }, - { "pattern": "^cb_(0-9)+_(0-9)+$" } + { + "enum": [ + "documentUpdated", + "documentError", + "setState", + "callCallable", + "closeCallable" + ] + } ] }, "allOf": [ @@ -111,15 +128,24 @@ { "if": { "properties": { - "method": { "pattern": "^cb_(0-9)+_(0-9)+$" } + "method": { "pattern": "callCallable" } } }, "then": { "properties": { - "params": { - "type": "array", - "items": { "type": "any" } - } + "params": { "$ref": "#/defs/callCallableParams" } + } + } + }, + { + "if": { + "properties": { + "method": { "pattern": "closeCallable" } + } + }, + "then": { + "properties": { + "params": { "$ref": "#/defs/closeCallableParams" } } } }