Add kamelet definition: dropbox-source

This commit is contained in:
gitea_admin 2026-10-12 02:33:19 +00:00
parent a39dfd0509
commit bb533a2a96

159
kamelet.json Normal file
View File

@ -0,0 +1,159 @@
{
"apiVersion": "camel.apache.org/v1",
"kind": "Kamelet",
"metadata": {
"name": "dropbox-source",
"annotations": {
"camel.apache.org/kamelet.support.level": "Stable",
"camel.apache.org/catalog.version": "4.22.1",
"camel.apache.org/kamelet.icon": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjQzcHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDQzIDQwIiB2ZXJzaW9uPSIxLjEiIGhlaWdodD0iNDBweCI+CiA8cGF0aCBkPSJtMTIuNSAwbC0xMi41IDguMSA4LjcgNyAxMi41LTcuOC04LjctNy4zem0tMTIuNSAyMS45bDEyLjUgOC4yIDguNy03LjMtMTIuNS03LjctOC43IDYuOHptMjEuMiAwLjlsOC44IDcuMyAxMi40LTguMS04LjYtNi45LTEyLjYgNy43em0yMS4yLTE0LjdsLTEyLjQtOC4xLTguOCA3LjMgMTIuNiA3LjggOC42LTd6bS0yMS4xIDE2LjNsLTguOCA3LjMtMy43LTIuNXYyLjhsMTIuNSA3LjUgMTIuNS03LjV2LTIuOGwtMy44IDIuNS04LjctNy4zeiIgZmlsbD0iIzAwN0VFNSIvPgo8L3N2Zz4K",
"camel.apache.org/provider": "Apache Software Foundation",
"camel.apache.org/kamelet.group": "Dropbox",
"camel.apache.org/kamelet.namespace": "Cloud"
},
"labels": {
"camel.apache.org/kamelet.type": "source"
}
},
"spec": {
"definition": {
"title": "Dropbox Source",
"description": "Consume Files from Dropbox.",
"required": [
"period",
"accessToken",
"clientIdentifier",
"remotePath",
"query"
],
"type": "object",
"properties": {
"period": {
"title": "Period between Polls",
"description": "The interval between fetches to the Dropbox remote path in milliseconds",
"type": "integer",
"default": 10000
},
"accessToken": {
"title": "Dropbox Access Token",
"description": "The access Token to use to access Dropbox",
"type": "string",
"format": "password",
"x-descriptors": [
"urn:camel:group:credentials"
]
},
"clientIdentifier": {
"title": "Client Identifier",
"description": "Dropbox App client Identifier",
"type": "string",
"x-descriptors": [
"urn:camel:group:credentials"
]
},
"remotePath": {
"title": "Remote Path",
"description": "Original file or folder to work with",
"type": "string"
},
"query": {
"title": "Queries",
"description": "A space-separated list of sub-strings to search for. A file matches only if it contains all the sub-strings. If this option is not set, all files is matched.",
"type": "string"
}
}
},
"dependencies": [
"camel:dropbox",
"camel:kamelet",
"camel:core",
"camel:jsonpath",
"camel:timer"
],
"template": {
"from": {
"uri": "timer:dropbox-stream",
"parameters": {
"period": "{{period}}"
},
"steps": [
{
"to": {
"uri": "dropbox:search",
"parameters": {
"accessToken": "{{accessToken}}",
"remotePath": "{{remotePath}}",
"clientIdentifier": "{{clientIdentifier}}",
"query": "{{query}}"
}
}
},
{
"split": {
"jsonpath": "$.*",
"steps": [
{
"setProperty": {
"name": "dropboxFileName",
"simple": "${body.metadata.pathDisplay}"
}
},
{
"toD": "dropbox:get?accessToken={{accessToken}}&clientIdentifier={{clientIdentifier}}&remotePath=${exchangeProperty.dropboxFileName}"
},
{
"to": "kamelet:sink"
},
{
"toD": "dropbox:del?accessToken={{accessToken}}&clientIdentifier={{clientIdentifier}}&remotePath=${exchangeProperty.dropboxFileName}"
}
]
}
}
]
}
}
},
"propertiesSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "Dropbox Source",
"description": "Consume Files from Dropbox.",
"required": [
"period",
"accessToken",
"clientIdentifier",
"remotePath",
"query"
],
"properties": {
"period": {
"type": "integer",
"title": "Period between Polls",
"description": "The interval between fetches to the Dropbox remote path in milliseconds",
"default": 10000
},
"accessToken": {
"type": "string",
"title": "Dropbox Access Token",
"description": "The access Token to use to access Dropbox",
"format": "password"
},
"clientIdentifier": {
"type": "string",
"title": "Client Identifier",
"description": "Dropbox App client Identifier"
},
"remotePath": {
"type": "string",
"title": "Remote Path",
"description": "Original file or folder to work with"
},
"query": {
"type": "string",
"title": "Queries",
"description": "A space-separated list of sub-strings to search for. A file matches only if it contains all the sub-strings. If this option is not set, all files is matched."
}
}
}
}