Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion packages/types-dev/objects.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,16 @@ declare global {
/** If the widget was written with TypeScript */
bundlerType?: 'module';
/** The vis widget does not support the listed major versions of vis */
ignoreInVersions: number[];
ignoreInVersions?: number[];
}

interface VisIconSet {
name?: ioBroker.StringOrTranslated;
url: string;
/** If set, this is not a widget set, but icon set. url, name and icon are required */
icon?: string; // base 64 string for iconSet (not used for widgetSets)
/** The vis icon set does not support the listed major versions of vis */
ignoreInVersions?: number[];
}

type PaidLicenseType = 'paid' | 'commercial' | 'limited';
Expand Down Expand Up @@ -776,6 +785,8 @@ declare global {
version: string;
/** Definition of the vis-2 widgets */
visWidgets?: Record<string, VisWidget>;
/** Definition of the vis-2 icon sets */
visIconSets?: Record<string, VisIconSet>;
/** Include the adapter version in the URL of the web adapter, e.g. `http://ip:port/1.2.3/material` instead of `http://ip:port/material` */
webByVersion?: boolean;
/** Whether the web server in this adapter can be extended with plugin/extensions */
Expand Down
48 changes: 48 additions & 0 deletions schemas/io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,7 @@
".+": {
"description": "The key represents the name of a provided widget set",
"required": [
"name",
"url",
"components",
"i18n"
Expand Down Expand Up @@ -1526,6 +1527,10 @@
}
]
},
"name": {
"description": "Name of the widget set",
"type": "string"
},
"url": {
"description": "Relative path ('http://ip:port/vis/widgets/' + url) or full url to load component from",
"type": "string"
Expand Down Expand Up @@ -1557,6 +1562,49 @@
}
}
},
"visIconSets": {
"description": "Overview of vis 2 SVG icon sets provided by the adapter, define the name of the provided sets as keys",
"minProperties": 1,
"type": "object",
"patternProperties": {
".+": {
"description": "The key represents the name of a provided icon set",
"required": [
"url"
],
"type": "object",
"properties": {
"url": {
"description": "Relative path ('http://ip:port/vis/widgets/' + url) or full url to load JSON file from",
"type": "string"
},
"ignoreInVersions": {
"description": "The vis icon set does not support the listed major versions of vis",
"type": "array",
"items": {
"type": "number",
"multipleOf": 1
}
},
"name": {
"description": "Name of the icon set",
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/definitions/multilingual"
}
]
},
"icon": {
"description": "Base 64 icon of the widget set, data:image/svg+xml;base64,...",
"type": "string"
}
}
}
}
},
"webByVersion": {
"description": "Show version as prefix in web adapter (usually - ip:port/material, webByVersion - ip:port/1.2.3/material)",
"type": "boolean"
Expand Down
Loading