Skip to content

Commit

Permalink
iobroker io-package: added common.messages (SchemaStore#2033)
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Jan 20, 2022
1 parent 92c6eae commit df02a33
Showing 1 changed file with 105 additions and 20 deletions.
125 changes: 105 additions & 20 deletions src/schemas/json/io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@
}
},
"additionalProperties": false
},
"iobrokerObject": {
"type": "object",
"required": [
"_id"
],
"properties": {
"_id": {
"type": "string"
},
"type": {
"type": "string"
},
"common": {
"type": "object"
}
}
}
},
"type": "object",
Expand Down Expand Up @@ -1100,37 +1117,94 @@
"minimum": 1,
"maximum": 3,
"default": 3
},
"messages": {
"description": "Messages can be shown on adapter installation, update and instance creation",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"title",
"text",
"buttons"
],
"properties": {
"condition": {
"description": "Message will only be shown if condition matches",
"additionalProperties": false,
"type": "object",
"properties": {
"operand": {
"description": "Operand to connect multiple rules",
"enum": [
"or",
"and"
],
"default": "and"
},
"rules": {
"description": "Rules which need to be true, e.g. [\"oldVersion<2.0.0\", \"newVersion>=2.0.0\"]",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"title": {
"description": "Title of the shown message",
"$ref": "#/definitions/multilingual"
},
"text": {
"description": "Text of the shown message",
"$ref": "#/definitions/multilingual"
},
"link": {
"description": "You can define a hyperlink, which will be shown, define its text with `linkText`",
"type": "string"
},
"level": {
"description": "The importance of the message",
"enum": [
"info",
"warn",
"error"
],
"default": "warn"
},
"linkText": {
"description": "If a link is defined and should be embedded in text, you can define the text here",
"$ref": "#/definitions/multilingual"
},
"buttons": {
"description": "Predefined buttons of the message window",
"type": "array",
"items": {
"enum": [
"ok",
"agree",
"cancel"
]
}
}
}
}
}
}
},
"objects": {
"description": "Objects which will be created for the adapter",
"type": "array",
"items": {
"type": "object",
"required": [
"_id"
],
"properties": {
"_id": {
"type": "string"
}
}
"$ref": "#/definitions/iobrokerObject"
}
},
"instanceObjects": {
"description": "Objects which will be created for each instance",
"type": "array",
"items": {
"type": "object",
"required": [
"_id"
],
"properties": {
"_id": {
"type": "string"
}
}
"$ref": "#/definitions/iobrokerObject"
}
},
"notifications": {
Expand Down Expand Up @@ -1162,7 +1236,14 @@
"items": {
"type": "object",
"additionalProperties": false,
"required": ["category", "name", "severity", "description", "regex", "limit"],
"required": [
"category",
"name",
"severity",
"description",
"regex",
"limit"
],
"properties": {
"category": {
"type": "string"
Expand All @@ -1172,7 +1253,11 @@
},
"severity": {
"type": "string",
"enum": ["info", "notify", "alert"],
"enum": [
"info",
"notify",
"alert"
],
"description": "`info` will only be shown by admin, while `notify` might also be used by messaging adapters, `alert` ensures both"
},
"description": {
Expand Down

0 comments on commit df02a33

Please sign in to comment.