Add plugin lifecycle contracts
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://trixie.local/contracts/v1/plugin-install-request.json",
|
||||
"title": "Plugin install request",
|
||||
"type": "object",
|
||||
"required": ["manifest", "wasm_base64"],
|
||||
"properties": {
|
||||
"manifest": { "$ref": "plugin-manifest.json" },
|
||||
"wasm_base64": { "type": "string", "minLength": 1, "maxLength": 5592406 }
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://trixie.local/contracts/v1/plugin-installed-response.json",
|
||||
"title": "Installed plugin response",
|
||||
"type": "object",
|
||||
"required": ["id", "plugin_id", "name", "version", "manifest", "enabled", "installed_at", "updated_at"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "format": "uuid" },
|
||||
"plugin_id": { "type": "string" },
|
||||
"name": { "type": "string" },
|
||||
"version": { "type": "string" },
|
||||
"manifest": { "$ref": "plugin-manifest.json" },
|
||||
"enabled": { "type": "boolean" },
|
||||
"installed_at": { "type": "string" },
|
||||
"updated_at": { "type": "string" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://trixie.local/contracts/v1/plugin-manifest.json",
|
||||
"title": "Trixie WebAssembly plugin manifest",
|
||||
"type": "object",
|
||||
"required": ["id", "name", "version", "api_version", "permissions", "entrypoint"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "pattern": "^[a-z0-9.-]+$", "maxLength": 64 },
|
||||
"name": { "type": "string", "minLength": 1, "maxLength": 128 },
|
||||
"version": { "type": "string", "minLength": 1, "maxLength": 64 },
|
||||
"api_version": { "type": "string", "maxLength": 32 },
|
||||
"permissions": { "type": "array", "maxItems": 16, "items": { "enum": ["chat.read", "chat.send", "overlay.emit", "twitch.read", "twitch.manage"] } },
|
||||
"entrypoint": { "type": "string", "minLength": 1, "maxLength": 64 }
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in New Issue
Block a user