Files
tibi-types/schemas/config/collection-meta.schema.json
T
2026-09-30 20:37:08 +00:00

445 lines
11 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "collection-meta.schema.json",
"title": "Tibi collection meta config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"muiIcon": {
"type": "string"
},
"group": {
"type": "string"
},
"exports": {
"description": "Custom scripted exports (tibi-admin-nova ExportDialog). The script loads data itself via db.find/loadAll.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"file": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"filename": {
"type": "string"
}
},
"required": [
"name",
"file"
]
}
},
"designGuide": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"imageUrl": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"hide": {
"type": "boolean"
},
"singleton": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"key": {
"type": "string"
}
},
"required": [
"enabled"
]
},
"subNavigation": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"muiIcon": {
"type": "string"
},
"filter": {
"type": "object",
"additionalProperties": true
},
"defaultSort": {
"type": "object",
"additionalProperties": false,
"properties": {
"field": {
"$ref": "defs.schema.json#/definitions/sortField"
},
"order": {
"type": "string",
"enum": [
"ASC",
"DESC"
]
}
},
"required": [
"field"
]
},
"setDefault": {
"type": "object",
"additionalProperties": false,
"description": "Pre-fill a field with a default value when creating a new entry while this subNav tab is active.",
"properties": {
"field": {
"type": "string"
},
"value": {}
},
"required": [
"field",
"value"
]
}
},
"required": [
"name"
]
}
},
"preview": {
"$ref": "defs.schema.json#/definitions/previewConfig"
},
"i18n": {
"oneOf": [
{
"type": "boolean",
"enum": [
false
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"defaultLanguage": {
"type": "string"
},
"languages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
}
},
"required": [
"code"
]
}
},
"entry": {
"type": "object",
"additionalProperties": false,
"properties": {
"languageField": {
"type": "string"
},
"groupField": {
"type": "string"
},
"clearFields": {
"type": "array",
"items": {
"type": "string"
}
},
"copyFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"languageField",
"groupField"
]
}
}
}
]
},
"defaultSort": {
"type": "object",
"additionalProperties": false,
"properties": {
"field": {
"$ref": "defs.schema.json#/definitions/sortField"
},
"order": {
"type": "string",
"enum": [
"ASC",
"DESC",
"MANUALLY"
]
}
},
"required": [
"field"
]
},
"viewHint": {
"oneOf": [
{
"type": "string",
"enum": [
"table",
"cards"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"media": {
"type": "object",
"additionalProperties": false,
"properties": {
"upload": {
"type": "object",
"additionalProperties": false,
"properties": {
"autoFill": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"ai": {
"type": "object",
"additionalProperties": false,
"properties": {
"targetField": {
"type": "string"
},
"prompt": {
"type": "string"
},
"image": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxWidth": {
"type": "number",
"exclusiveMinimum": 0
},
"maxHeight": {
"type": "number",
"exclusiveMinimum": 0
},
"quality": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1
}
}
}
}
}
}
},
"navigation": {
"type": "object",
"additionalProperties": false,
"properties": {
"nodesField": {
"type": "string"
},
"preview": {
"$ref": "defs.schema.json#/definitions/previewConfig"
},
"declaredTrees": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"singleton": {
"type": "object",
"additionalProperties": true
},
"maxLevel": {
"type": "number"
}
},
"required": [
"singleton"
]
}
}
}
},
"blockStudio": {
"type": "object",
"additionalProperties": false,
"properties": {
"previewField": {
"type": "string"
},
"lint": {
"type": "boolean"
},
"renderer": {
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"type": "string"
}
},
"required": [
"file"
]
}
}
}
},
"oneOf": [
{
"required": [
"media"
]
},
{
"required": [
"navigation"
]
},
{
"required": [
"blockStudio"
]
}
]
}
]
},
"pagebuilder": {
"type": "object",
"additionalProperties": false,
"properties": {
"defaultViewport": {
"$ref": "defs.schema.json#/definitions/pagebuilderViewport"
},
"blockTypeField": {
"type": "string"
},
"blockRegistry": {
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"type": "string"
}
},
"required": [
"file"
]
},
"screenshot": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"field": {
"$ref": "defs.schema.json#/definitions/fieldPath"
},
"fileField": {
"$ref": "defs.schema.json#/definitions/fieldPath"
},
"screenWidth": {
"type": "integer",
"minimum": 1
},
"imageWidth": {
"type": "integer",
"minimum": 1
}
},
"required": [
"field",
"fileField"
]
}
}
}
},
"sidebar": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"group": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
}
},
"required": [
"group"
]
}
},
"openapi": {
"$ref": "openapi.schema.json"
}
}
}