schema fixes

This commit is contained in:
Yuri Kuznetsov
2023-05-29 11:29:31 +03:00
parent f63b7e04d6
commit 0a1cd5cb74
10 changed files with 256 additions and 213 deletions
+4 -1
View File
@@ -21,7 +21,10 @@
"type": "array",
"description": "A list of all available permissions in the system.",
"items": {
"type": "string"
"anyOf": [
{"const": "__APPEND__"},
{"type": "string"}
]
}
},
"valuePermissionHighestLevels": {
+4 -3
View File
@@ -20,9 +20,10 @@
"valuePermissionList": {
"type": "array",
"description": "A list of all available permissions in the system.",
"items": {
"type": "string"
}
"anyOf": [
{"const": "__APPEND__"},
{"type": "string"}
]
},
"valuePermissionHighestLevels": {
"type": "object",
+27 -22
View File
@@ -20,29 +20,34 @@
"type": "array",
"description": "Items.",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "A link URL. You can use an URL like #Admin/{myName}, in this case you also need to define a recordView."
},
"label": {
"type": "string",
"description": "An item (link) label. A translation path: Admin > labels > {label}."
},
"iconClass": {
"type": "string",
"description": "A CSS class for the icon."
},
"description": {
"type": "string",
"description": "A translation key for a description text. A translation page: Admin > descriptions > {description}."
},
"recordView": {
"type": "string",
"description": "A record view. Optional. Needed if you defined the URL like #Admin/{myName}. The record view displays settings fields. https://docs.espocrm.com/development/custom-config-parameters/"
"anyOf": [
{"const": "__APPEND__"},
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "A link URL. You can use an URL like #Admin/{myName}, in this case you also need to define a recordView."
},
"label": {
"type": "string",
"description": "An item (link) label. A translation path: Admin > labels > {label}."
},
"iconClass": {
"type": "string",
"description": "A CSS class for the icon."
},
"description": {
"type": "string",
"description": "A translation key for a description text. A translation page: Admin > descriptions > {description}."
},
"recordView": {
"type": "string",
"description": "A record view. Optional. Needed if you defined the URL like #Admin/{myName}. The record view displays settings fields. https://docs.espocrm.com/development/custom-config-parameters/"
}
}
}
}
]
}
}
}
+191 -115
View File
@@ -94,6 +94,8 @@
"type": "array",
"items": {
"anyOf": [
{"const": "__APPEND__"},
{"type": "string"},
{
"type": "object",
"properties": {
@@ -104,10 +106,12 @@
"style": {
"enum": ["default", "success", "warning", "danger", "info"],
"description": "A style."
},
"accessDataList": {
"$ref": "#/definitions/accessDataList"
}
}
},
{"type": "string"}
}
]
}
},
@@ -115,7 +119,23 @@
"description": "A list of bool filters.",
"type": "array",
"items": {
"type": "string"
"type": "string",
"anyOf": [
{"const": "__APPEND__"},
{"type": "string"},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "A filter name."
},
"accessDataList": {
"$ref": "#/definitions/accessDataList"
}
}
}
]
}
},
"defaultFilterData": {
@@ -210,7 +230,7 @@
"description": "An init function of the handler."
},
"accessDataList": {
"$ref": "./components/accessDataList.json"
"$ref": "#/definitions/accessDataList"
}
}
}
@@ -225,33 +245,61 @@
"additionalProperties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "A name.",
"type": "string"
},
"label": {
"description": "A translatable label.",
"type": "string"
},
"view": {
"description": "A view class.",
"type": "string"
},
"options": {
"description": "Options to be passed to the view.",
"type": "object"
},
"isForm": {
"description": "Whether the panel should display a form.",
"type": "boolean"
},
"notRefreshable": {
"description": "Disable the ability to refresh the panel.",
"type": "boolean"
"anyOf": [
{"const": "__APPEND__"},
{
"type": "object",
"properties": {
"name": {
"description": "A name.",
"type": "string"
},
"label": {
"description": "A translatable label.",
"type": "string"
},
"view": {
"description": "A view class.",
"type": "string"
},
"options": {
"description": "Options to be passed to the view.",
"type": "object"
},
"isForm": {
"description": "Whether the panel should display a form.",
"type": "boolean"
},
"notRefreshable": {
"description": "Disable the ability to refresh the panel.",
"type": "boolean"
},
"style": {
"description": "A style.",
"enum": ["default", "success", "warning", "danger"]
},
"hidden": {
"description": "Hidden by default.",
"type": "boolean"
},
"aclScope": {
"description": "A scope access to which is required for the panel being visible.",
"type": "string"
},
"acl": {
"description": "An ACL action access to which is required for the panel being visible.",
"type": "string",
"enum": [
"create",
"read",
"edit",
"delete",
"stream"
]
}
}
}
}
]
}
}
},
@@ -264,6 +312,7 @@
"type": "object",
"additionalProperties": {
"type": "object",
"description": "A link.",
"properties": {
"view": {
"description": "A view class.",
@@ -357,14 +406,20 @@
"description": "Mass actions.",
"type": "array",
"items": {
"type": "string"
"anyOf": [
{"const": "__APPEND__"},
{"type": "string"}
]
}
},
"checkAllResultMassActionList": {
"description": "Mass actions available when selecting all results.",
"type": "array",
"items": {
"type": "string"
"anyOf": [
{"const": "__APPEND__"},
{"type": "string"}
]
}
},
"massActionDefs": {
@@ -390,7 +445,7 @@
"type": "string"
},
"acl": {
"description": "An acl action access to which is required for the action.",
"description": "An ACL action access to which is required for the action.",
"type": "string",
"enum": [
"create",
@@ -407,96 +462,24 @@
"description": "Detail view actions (available from the dropdown next to the Edit button).",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "A name."
},
"label": {
"type": "string",
"description": "A translatable label."
},
"handler": {
"type": "string",
"description": "A handler class for the action."
},
"initFunction": {
"type": "string",
"description": "An init function of the handler."
},
"checkVisibilityFunction": {
"type": "string",
"description": "The handler function that checks whether the action is available. Should return a boolean value. Called on model sync."
},
"configCheck": {
"description": "A config path (separated by the .) to check whether the action is enabled. The ! prefix reverts.",
"type": "string"
},
"aclScope": {
"description": "A scope access to which is required for the action.",
"type": "string"
},
"acl": {
"description": "An acl action access to which is required for the action.",
"type": "string",
"enum": [
"create",
"read",
"edit",
"delete",
"stream"
]
"anyOf": [
{"const": "__APPEND__"},
{
"$ref": "#/definitions/actionDefs"
}
}
]
}
},
"modalDetailActionList": {
"description": "Modal detail view actions.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "A name."
},
"label": {
"type": "string",
"description": "A translatable label."
},
"handler": {
"type": "string",
"description": "A handler class for the action."
},
"initFunction": {
"type": "string",
"description": "An init function of the handler."
},
"checkVisibilityFunction": {
"type": "string",
"description": "The handler function that checks whether the action is available. Should return a boolean value. Called on model sync."
},
"configCheck": {
"description": "A config path (separated by the .) to check whether the action is enabled. The ! prefix reverts.",
"type": "string"
},
"aclScope": {
"description": "A scope access to which is required for the action.",
"type": "string"
},
"acl": {
"description": "An acl action access to which is required for the action.",
"type": "string",
"enum": [
"create",
"read",
"edit",
"delete",
"stream"
]
"anyOf": [
{"const": "__APPEND__"},
{
"$ref": "#/definitions/actionDefs"
}
}
]
}
},
"iconClass": {
@@ -767,6 +750,99 @@
}
},
"required": ["type"]
},
"actionDefs": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "A name."
},
"label": {
"type": "string",
"description": "A translatable label."
},
"handler": {
"type": "string",
"description": "A handler class for the action."
},
"initFunction": {
"type": "string",
"description": "An init function of the handler."
},
"checkVisibilityFunction": {
"type": "string",
"description": "The handler function that checks whether the action is available. Should return a boolean value. Called on model sync."
},
"configCheck": {
"description": "A config path (separated by the .) to check whether the action is enabled. The ! prefix reverts.",
"type": "string"
},
"aclScope": {
"description": "A scope access to which is required for the action.",
"type": "string"
},
"acl": {
"description": "An acl action access to which is required for the action.",
"type": "string",
"enum": [
"create",
"read",
"edit",
"delete",
"stream"
]
}
}
},
"accessDataList": {
"type": "array",
"description": "Frontend access rules.",
"items": {
"type": "object",
"properties": {
"action": {
"enum": [
"create",
"read",
"edit",
"stream",
"delete"
],
"description": "An ACL action to check."
},
"scope": {
"type": "string",
"description": "A scope to check."
},
"portalIdList": {
"type": "array",
"items": {
"type": "string"
},
"description": "A portal ID list. To check whether a user in one of portals."
},
"teamIdList": {
"type": "array",
"items": {
"type": "string"
},
"description": "A team ID list. To check whether a user in one of teams."
},
"isPortalOnly": {
"type": "boolean",
"description": "Allow for portal users only."
},
"inPortalDisabled": {
"type": "boolean",
"description": "Disable for portal users."
},
"isAdminOnly": {
"type": "boolean",
"description": "Allow for admin users only."
}
}
}
}
}
}
@@ -1,52 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://www.espocrm.com/schema/metadata/components/accessDataList.json",
"title": "components/accessDataList",
"description": "Frontend access rules.",
"type": "array",
"items": {
"type": "object",
"properties": {
"action": {
"enum": [
"create",
"read",
"edit",
"stream",
"delete"
],
"description": "An ACL action to check."
},
"scope": {
"type": "string",
"description": "A scope to check."
},
"portalIdList": {
"type": "array",
"items": {
"type": "string"
},
"description": "A portal ID list. To check whether a user in one of portals."
},
"teamIdList": {
"type": "array",
"items": {
"type": "string"
},
"description": "A team ID list. To check whether a user in one of teams."
},
"isPortalOnly": {
"type": "boolean",
"description": "Allow for portal users only."
},
"inPortalDisabled": {
"type": "boolean",
"description": "Disable for portal users."
},
"isAdminOnly": {
"type": "boolean",
"description": "Allow for admin users only."
}
}
}
}
+1 -2
View File
@@ -14,8 +14,7 @@
"description": "A scope access to which is required to have access to the dashlet.",
},
"accessDataList": {
"$ref": "./components/accessDataList.json",
"description": "Frontend access rules."
"$ref": "./clientDefs.json#/definitions/accessDataList"
},
"options": {
"type": "object",
+17 -12
View File
@@ -33,21 +33,26 @@
"type": "array",
"description": "Field parameters.",
"items": {
"allOf": [
"anyOf": [
{"const": "__APPEND__"},
{
"$ref": "./entityDefs.json#/definitions/fieldDefs"
},
{
"properties": {
"hidden": {
"type": "boolean",
"description": "Do not display the parameter in the field manager."
"allOf": [
{
"$ref": "./entityDefs.json#/definitions/fieldDefs"
},
"name": {
"type": "string",
"description": "A name."
{
"properties": {
"hidden": {
"type": "boolean",
"description": "Do not display the parameter in the field manager."
},
"name": {
"type": "string",
"description": "A name."
}
}
}
}
]
}
]
}
+4 -1
View File
@@ -33,7 +33,10 @@
"externalAccountSecretAttributeList": {
"type": "array",
"items": {
"type": "string"
"anyOf": [
{"const": "__APPEND__"},
{"type": "string"}
]
},
"description": "External account attributes to be hidden from the front-end."
}
+4 -1
View File
@@ -8,7 +8,10 @@
"dataLoaderClassNameList": {
"type": "array",
"items": {
"type": "string"
"anyOf": [
{"const": "__APPEND__"},
{"type": "string"}
]
},
"description": "List of classes that loads additional data for PDF. Classes should implement the interface Espo\\Tools\\Pdf\\DataLoader. Use __APPEND__ for extending."
}
+4 -4
View File
@@ -219,11 +219,11 @@
"type": "boolean"
},
"customizable": {
"description": "Wether the entity can be customized in the Entity Manager tool.",
"description": "Weather the entity can be customized in the Entity Manager tool.",
"type": "boolean"
},
"isCustom": {
"description": "Entities creted in the Entity Manager tool marked as custom.",
"description": "Entities created in the Entity Manager tool marked as custom.",
"type": "boolean"
},
"notifications": {
@@ -260,11 +260,11 @@
}
},
"languageIsGlobal": {
"description": "Languge labels will be available for all users (not restricted by ACL).",
"description": "Language labels will be available for all users (not restricted by ACL).",
"type": "boolean"
},
"languageAclDisabled": {
"description": "Disables access control application for language labels. All labels of the scope will be avaialble in the front-end regardless of user roles.",
"description": "Disables access control application for language labels. All labels of the scope will be available in the front-end regardless of user roles.",
"type": "boolean"
},
"hasPersonalData": {