Updated specs

2025-08-28 00:34:05 +02:00
parent fea0d098d1
commit 4671cd2fff
4 changed files with 79 additions and 123 deletions

@@ -1,4 +1,4 @@
# Module.json # module.json
The module.json file serves as the central configuration file for each module in Getiyo. It contains essential metadata that informs Getiyo about the module's identity, as well as the module's properties, triggers, and conditions. The [GetiyoModuleTool](./GetiyoModuleTool) can automatically generate this file for you, streamlining the setup process. However, if you want to modify or add properties, triggers, or conditions, you can refer to the documentation provided below. The module.json file serves as the central configuration file for each module in Getiyo. It contains essential metadata that informs Getiyo about the module's identity, as well as the module's properties, triggers, and conditions. The [GetiyoModuleTool](./GetiyoModuleTool) can automatically generate this file for you, streamlining the setup process. However, if you want to modify or add properties, triggers, or conditions, you can refer to the documentation provided below.
@@ -93,7 +93,7 @@ The module.json file serves as the central configuration file for each module in
| Property | Description | Example | | Property | Description | Example |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| name | The property name, used internally for creating an ID. Changing this will break modules using the old name. | | name | The module name, used internally for creating an ID. Changing this will break modules using the old name. |
| author | The module author. | | author | The module author. |
| category | A fitting category for the module. | | category | A fitting category for the module. |
| description | A short module description. | | description | A short module description. |

@@ -1,47 +1,92 @@
# Module.json # module.ts
The module.json file serves as the central configuration file for each module in Getiyo. It contains essential metadata that informs Getiyo about the module's identity, as well as the module's properties, triggers, and conditions. The [GetiyoModuleTool](./GetiyoModuleTool) can automatically generate this file for you, streamlining the setup process. However, if you want to modify or add properties, triggers, or conditions, you can refer to the documentation provided below. For a full example of a module.json file, see the [complete module.json example](./module.json). The module.ts file serves as the central configuration file for each module in Getiyo. Unlike the old `module.json` file it has full type definitions making it easier to configure. It contains essential metadata that informs Getiyo about the module's identity, as well as the module's properties, triggers, and conditions. The [GetiyoModuleTool](./GetiyoModuleTool) can automatically generate this file for you, streamlining the setup process. However, if you want to modify or add properties, triggers, or conditions, you can refer to the module.json section in the documentation.
## Structure ## Structure
```JSON ```typescript
{ ///<reference path="./.gmt/ModuleConfig.d.ts" />
"type": "normal",
"name": "DemoModule",
"author": "Mees van der Wijk",
"category": "Debug",
"description": "A simple demo module!",
"default_reference_properties": { export const Module: ModuleConfig = {
"propertyId": { property } package: 'com.getiyo.demomodule',
}, name: 'DemoModule',
type: 'v2',
"default_module_properties": { author: 'Mees van der Wijk',
"propertyId": { property } category: 'Widget',
}, description: 'Showcase the module!',
"triggers": { default_reference_properties: {
"triggerId": { trigger } text: {
}, type: 'text',
title: 'Text',
description: 'The text for the demo!',
value: 'Hello world!',
},
color: {
type: 'color',
title: 'Color',
description: 'The color of the demo.',
value: '#f44336',
},
style: {
type: 'select',
title: 'Style',
description: 'The style of the demo',
value: 'cool',
allowedValues: [
{
id: 'cool',
text: 'Cool Demo',
},
{
id: 'fast',
text: 'Fast Demo',
},
{
id: 'slow',
text: 'Slow Demo',
},
],
},
},
"conditions": { default_module_properties: {},
"client": {
"conditionId": { condition }
},
"server": {
"conditionId": { condition }
}
},
"defaultsize": { "width": 400, "height": 400 }, triggers: {
"defaultlocation": { "x": 100, "y": 100 } setText: {
} title: 'Set text',
description: 'Set the text of the demo.',
arguments: [
{
type: 'scenes',
title: 'In scenes',
onlyContainingModule: true,
},
{
type: 'text',
title: 'New text',
},
],
},
},
conditions: {
server: {
textStop: {
title: 'Text Stop',
description: 'Will be met when the text stops.',
},
},
client: {},
},
};
``` ```
| Property | Description | Example | | Property | Description | Example |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| name | The property name, used internally for creating an ID. Changing this will break modules using the old name. | | package | The package id, used as an ID. Changing this will break updates with old versions. |
| name | The module name. |
| author | The module author. | | author | The module author. |
| category | A fitting category for the module. | | category | A fitting category for the module. |
| description | A short module description. | | description | A short module description. |
@@ -50,7 +95,3 @@ The module.json file serves as the central configuration file for each module in
| triggers | An object with trigger IDs as keys and trigger data as values. Triggers allow a cue list to call the server-side of a module, controlling module behavior automatically. See [trigger](./ModuleConfigTrigger) for all parameters. | `{ trigger1: { trigger }, trigger1: { trigger } }` | | triggers | An object with trigger IDs as keys and trigger data as values. Triggers allow a cue list to call the server-side of a module, controlling module behavior automatically. See [trigger](./ModuleConfigTrigger) for all parameters. | `{ trigger1: { trigger }, trigger1: { trigger } }` |
| conditions.client | An object with condition IDs as keys and condition data as values. A condition is a way for a cue list to wait till a condition is met. These are client conditions, they can be met via the [ModuleClientAPI](./ModuleClientAPI). Because the ModuleClientAPI runs on the machines of viewers which you can not trust, Getiyo has a system that allows cue list makers to specify a minimum percentage of clients to have met the condition before continuing. The ModuleServerAPI can force a client condition. See [conditions](./ModuleConfigCondition) for all parameters. | `{ condition1: { condition }, condition2: { condition } }` | | conditions.client | An object with condition IDs as keys and condition data as values. A condition is a way for a cue list to wait till a condition is met. These are client conditions, they can be met via the [ModuleClientAPI](./ModuleClientAPI). Because the ModuleClientAPI runs on the machines of viewers which you can not trust, Getiyo has a system that allows cue list makers to specify a minimum percentage of clients to have met the condition before continuing. The ModuleServerAPI can force a client condition. See [conditions](./ModuleConfigCondition) for all parameters. | `{ condition1: { condition }, condition2: { condition } }` |
| conditions.server | An object with condition IDs as keys and condition data as values. These are server conditions, they can be met via the [ModuleServerAPI](./ModuleServerAPI). The object is the same as `conditions.client`. | `{ condition1: { condition }, condition2: { condition } }` | | conditions.server | An object with condition IDs as keys and condition data as values. These are server conditions, they can be met via the [ModuleServerAPI](./ModuleServerAPI). The object is the same as `conditions.client`. | `{ condition1: { condition }, condition2: { condition } }` |
| defaultsize.width | The default width of the module. |
| defaultsize.height | The default height of the module. |
| defaultlocation.x | <span style="color:red">**Probably deprecated soon!**</span> Default x coordinate of the module. |
| defaultlocation.y | <span style="color:red">**Probably deprecated soon!**</span> Default y coordinate of the module. |

@@ -9,9 +9,9 @@
- [Introduction](./ModuleDevelopmentIntroduction) - [Introduction](./ModuleDevelopmentIntroduction)
- [V2 Module Structure](./V2ModuleStructure) - [V2 Module Structure](./V2ModuleStructure)
- [Module.json](./ModuleTS) - [module.ts](./ModuleTS)
- [V1 Module Structure](./V1ModuleStructure) - [V1 Module Structure](./V1ModuleStructure)
- [Module.json](./ModuleJSON) - [module.json](./ModuleJSON)
- [Development environment/Building](./ModuleEnvironment) - [Development environment/Building](./ModuleEnvironment)
- Module Config - Module Config
- [Property](./ModuleConfigProperty) - [Property](./ModuleConfigProperty)

@@ -1,85 +0,0 @@
```JSON
{
"name": "DemoModule",
"author": "Mees van der Wijk",
"category": "Widget",
"description": "Showcase the module!",
"default_reference_properties": {
"text": {
"type": "text",
"title": "Text",
"description": "The text for the demo!",
"value": "Hello world!"
},
"color": {
"type": "color",
"title": "Color",
"description": "The color of the demo.",
"value": "#f44336"
},
"style": {
"type": "select",
"title": "Style",
"description": "The style of the demo",
"value": "cool",
"allowedValues": [
{
"id": "cool",
"text": "Cool Demo"
},
{
"id": "fast",
"text": "Fast Demo"
},
{
"id": "slow",
"text": "Slow Demo"
}
]
}
},
"default_module_properties": {},
"triggers": {
"setText": {
"title": "Set text",
"description": "Set the text of the demo.",
"arguments": [
{
"type": "scenes",
"title": "In scenes",
"onlyContainingModule": true
},
{
"type": "text",
"title": "New text"
}
]
}
},
"conditions": {
"server": {
"textStop": {
"title": "Text Stop",
"description": "Will be met when the text stops."
}
},
"client": {
}
},
"default_size": {
"width": 300,
"height": 300
},
"default_location": {
"x": 100,
"y": 100
}
}
```