Implement CAIKnowledge and CDokumente junction functionality; add API routes, metadata, and localization files
This commit is contained in:
@@ -1,31 +1,30 @@
|
||||
{
|
||||
"labels": {
|
||||
"Create CAIKnowledgeCDokumente": "AI Knowledge-Dokument Verknüpfung erstellen",
|
||||
"CAIKnowledgeCDokumente": "AI Knowledge-Dokument Verknüpfung"
|
||||
},
|
||||
"fields": {
|
||||
"cAIKnowledge": "AI Knowledge",
|
||||
"cAIKnowledgeId": "AI Knowledge ID",
|
||||
"cDokumente": "Dokument",
|
||||
"cDokumenteId": "Dokument ID",
|
||||
"aiDocumentId": "AI Dokument-ID",
|
||||
"syncstatus": "Sync-Status",
|
||||
"lastSync": "Letzte Synchronisation",
|
||||
"syncedHash": "Sync-Hash"
|
||||
},
|
||||
"links": {
|
||||
"cAIKnowledge": "AI Knowledge",
|
||||
"cDokumente": "Dokument"
|
||||
},
|
||||
"labels": {
|
||||
"Create CAIKnowledgeCDokumente": "Verknüpfung erstellen"
|
||||
},
|
||||
"options": {
|
||||
"syncstatus": {
|
||||
"new": "Neu",
|
||||
"unclean": "Unklar",
|
||||
"unclean": "Geändert",
|
||||
"synced": "Synchronisiert",
|
||||
"failed": "Fehlgeschlagen",
|
||||
"failed": "Fehler",
|
||||
"unsupported": "Nicht unterstützt"
|
||||
}
|
||||
},
|
||||
"tooltips": {
|
||||
"aiDocumentId": "Externe AI-Dokument-Referenz-ID",
|
||||
"syncstatus": "Status der Synchronisation mit externem AI-System",
|
||||
"lastSync": "Zeitpunkt der letzten erfolgreichen Synchronisation",
|
||||
"syncedHash": "Hash-Wert des zuletzt synchronisierten Dokument-Zustands (zur Änderungserkennung)"
|
||||
"syncedHash": "Hash-Wert des zuletzt synchronisierten Dokument-Zustands"
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"labels": {
|
||||
"Create CAIKnowledgeCDokumente": "Create AI Knowledge-Document Link",
|
||||
"CAIKnowledgeCDokumente": "AI Knowledge-Document Link"
|
||||
},
|
||||
"fields": {
|
||||
"cAIKnowledge": "AI Knowledge",
|
||||
"cAIKnowledgeId": "AI Knowledge ID",
|
||||
"cDokumente": "Document",
|
||||
"cDokumenteId": "Document ID",
|
||||
"aiDocumentId": "AI Document ID",
|
||||
"syncstatus": "Sync Status",
|
||||
"lastSync": "Last Synchronization",
|
||||
"syncedHash": "Sync Hash"
|
||||
},
|
||||
"options": {
|
||||
"syncstatus": {
|
||||
"new": "New",
|
||||
"unclean": "Unclean",
|
||||
"synced": "Synced",
|
||||
"failed": "Failed",
|
||||
"unsupported": "Unsupported"
|
||||
}
|
||||
},
|
||||
"tooltips": {
|
||||
"aiDocumentId": "External AI document reference ID",
|
||||
"syncstatus": "Synchronization status with external AI system",
|
||||
"lastSync": "Timestamp of the last successful synchronization",
|
||||
"syncedHash": "Hash value of the last synchronized document state (for change detection)"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"fields": {
|
||||
"cAIKnowledge": "AI Knowledge",
|
||||
"cDokumente": "Document",
|
||||
"aiDocumentId": "AI Document ID",
|
||||
"syncstatus": "Sync Status",
|
||||
"lastSync": "Last Sync",
|
||||
"syncedHash": "Synced Hash"
|
||||
},
|
||||
"links": {
|
||||
"cAIKnowledge": "AI Knowledge",
|
||||
"cDokumente": "Document"
|
||||
},
|
||||
"labels": {
|
||||
"Create CAIKnowledgeCDokumente": "Create Link"
|
||||
},
|
||||
"options": {
|
||||
"syncstatus": {
|
||||
"new": "New",
|
||||
"unclean": "Changed",
|
||||
"synced": "Synced",
|
||||
"failed": "Failed",
|
||||
"unsupported": "Unsupported"
|
||||
}
|
||||
},
|
||||
"tooltips": {
|
||||
"aiDocumentId": "External AI document reference ID",
|
||||
"syncedHash": "Hash value of last synced document state"
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,21 @@
|
||||
"route": "/CPuls/:id/abschliessen-fuer-team",
|
||||
"method": "post",
|
||||
"actionClassName": "Espo\\Custom\\Api\\CPuls\\AbschliessenFuerTeam"
|
||||
},
|
||||
{
|
||||
"route": "/JunctionData/CAIKnowledge/:knowledgeId/dokumentes",
|
||||
"method": "get",
|
||||
"actionClassName": "Espo\\Custom\\Api\\JunctionData\\GetDokumentes"
|
||||
},
|
||||
{
|
||||
"route": "/JunctionData/CAIKnowledge/:knowledgeId/dokumentes/:documentId",
|
||||
"method": "put",
|
||||
"actionClassName": "Espo\\Custom\\Api\\JunctionData\\UpdateJunction"
|
||||
},
|
||||
{
|
||||
"route": "/JunctionData/CAIKnowledge/:knowledgeId/dokumentes/:documentId",
|
||||
"method": "post",
|
||||
"actionClassName": "Espo\\Custom\\Api\\JunctionData\\LinkDokument"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"table": "c_a_i_knowledge_dokumente",
|
||||
"fields": {
|
||||
"id": {
|
||||
"type": "id",
|
||||
@@ -6,58 +7,58 @@
|
||||
"autoincrement": true
|
||||
},
|
||||
"cAIKnowledge": {
|
||||
"type": "link"
|
||||
"type": "link",
|
||||
"entity": "CAIKnowledge"
|
||||
},
|
||||
"cAIKnowledgeId": {
|
||||
"type": "varchar",
|
||||
"len": 17,
|
||||
"index": true
|
||||
},
|
||||
"cAIKnowledgeName": {
|
||||
"type": "varchar",
|
||||
"notStorable": true,
|
||||
"relation": "cAIKnowledge",
|
||||
"foreign": "name"
|
||||
},
|
||||
"cDokumente": {
|
||||
"type": "link"
|
||||
"type": "link",
|
||||
"entity": "CDokumente"
|
||||
},
|
||||
"cDokumenteId": {
|
||||
"type": "varchar",
|
||||
"len": 17,
|
||||
"index": true
|
||||
},
|
||||
"cDokumenteName": {
|
||||
"type": "varchar",
|
||||
"notStorable": true,
|
||||
"relation": "cDokumente",
|
||||
"foreign": "name"
|
||||
},
|
||||
"aiDocumentId": {
|
||||
"type": "varchar",
|
||||
"len": 255,
|
||||
"isCustom": true,
|
||||
"tooltip": true
|
||||
},
|
||||
"syncstatus": {
|
||||
"type": "enum",
|
||||
"required": false,
|
||||
"options": [
|
||||
"new",
|
||||
"unclean",
|
||||
"synced",
|
||||
"failed",
|
||||
"unsupported"
|
||||
],
|
||||
"options": ["new", "unclean", "synced", "failed", "unsupported"],
|
||||
"default": "new",
|
||||
"style": {
|
||||
"new": "info",
|
||||
"new": "primary",
|
||||
"unclean": "warning",
|
||||
"synced": "success",
|
||||
"failed": "danger",
|
||||
"unsupported": "default"
|
||||
},
|
||||
"default": "new",
|
||||
"isCustom": true,
|
||||
"tooltip": true
|
||||
}
|
||||
},
|
||||
"lastSync": {
|
||||
"type": "datetime",
|
||||
"required": false,
|
||||
"isCustom": true,
|
||||
"tooltip": true
|
||||
"type": "datetime"
|
||||
},
|
||||
"syncedHash": {
|
||||
"type": "varchar",
|
||||
"len": 64,
|
||||
"isCustom": true,
|
||||
"tooltip": true
|
||||
},
|
||||
"deleted": {
|
||||
@@ -68,30 +69,17 @@
|
||||
"links": {
|
||||
"cAIKnowledge": {
|
||||
"type": "belongsTo",
|
||||
"entity": "CAIKnowledge"
|
||||
"entity": "CAIKnowledge",
|
||||
"foreign": "dokumentes"
|
||||
},
|
||||
"cDokumente": {
|
||||
"type": "belongsTo",
|
||||
"entity": "CDokumente"
|
||||
"entity": "CDokumente",
|
||||
"foreign": "aIKnowledges"
|
||||
}
|
||||
},
|
||||
"collection": {
|
||||
"orderBy": "id",
|
||||
"order": "desc"
|
||||
},
|
||||
"indexes": {
|
||||
"cAIKnowledgeId": {
|
||||
"columns": ["cAIKnowledgeId"]
|
||||
},
|
||||
"cDokumenteId": {
|
||||
"columns": ["cDokumenteId"]
|
||||
},
|
||||
"syncstatus": {
|
||||
"columns": ["syncstatus"]
|
||||
},
|
||||
"uniqueRelation": {
|
||||
"type": "unique",
|
||||
"columns": ["cAIKnowledgeId", "cDokumenteId", "deleted"]
|
||||
}
|
||||
"order": "asc"
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"entity": true,
|
||||
"type": "Base",
|
||||
"module": "Custom",
|
||||
"object": true,
|
||||
"isCustom": true,
|
||||
"object": false,
|
||||
"layouts": false,
|
||||
"tab": false,
|
||||
"acl": true,
|
||||
"disabled": false
|
||||
"customizable": false,
|
||||
"type": "Base",
|
||||
"module": "Custom",
|
||||
"isCustom": true
|
||||
}
|
||||
17
custom/Espo/Custom/Resources/routes.json
Normal file
17
custom/Espo/Custom/Resources/routes.json
Normal file
@@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"route": "/JunctionData/CAIKnowledge/:knowledgeId/dokumentes",
|
||||
"method": "get",
|
||||
"actionClassName": "Espo\\Custom\\Api\\JunctionData\\GetDokumentes"
|
||||
},
|
||||
{
|
||||
"route": "/JunctionData/CAIKnowledge/:knowledgeId/dokumentes/:documentId",
|
||||
"method": "put",
|
||||
"actionClassName": "Espo\\Custom\\Api\\JunctionData\\UpdateJunction"
|
||||
},
|
||||
{
|
||||
"route": "/JunctionData/CAIKnowledge/:knowledgeId/dokumentes/:documentId",
|
||||
"method": "post",
|
||||
"actionClassName": "Espo\\Custom\\Api\\JunctionData\\LinkDokument"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user