Add kamelet definition: ms-exchange-online-imap-oauth-source
This commit is contained in:
parent
7a1fc7a184
commit
4953e16612
176
kamelet.json
Normal file
176
kamelet.json
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
{
|
||||||
|
"apiVersion": "camel.apache.org/v1",
|
||||||
|
"kind": "Kamelet",
|
||||||
|
"metadata": {
|
||||||
|
"name": "ms-exchange-online-imap-oauth-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,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjQgOCA1NSA0OCI+PHRpdGxlPkV4Y2hhbmdlXzY0eDwvdGl0bGU+PHBhdGggZD0iTTU1LjUwOTc3LDhoLTEyLjIwN0EzLjQ4ODM1LDMuNDg4MzUsMCwwLDAsNDAuODM1LDkuMDIyNDZMMTIuMDIyNDYsMzcuODM1QTMuNDg4MzUsMy40ODgzNSwwLDAsMCwxMSw0MC4zMDI3M3YxMi4yMDdBMy40OTAwNiwzLjQ5MDA2LDAsMCwwLDE0LjQ5MDIzLDU2aDEyLjIwN0EzLjQ4ODM1LDMuNDg4MzUsMCwwLDAsMjkuMTY1LDU0Ljk3NzU0TDU3Ljk3OCwyNi4xNjVBMy40ODk5NCwzLjQ4OTk0LDAsMCwwLDU5LDIzLjY5NzI3di0xMi4yMDdBMy40OTAwNywzLjQ5MDA3LDAsMCwwLDU1LjUwOTc3LDhaIiBmaWxsPSIjMjhhOGVhIi8+PHBhdGggZD0iTTU1LjUxLDU2SDQzLjMwMjc1YTMuNDksMy40OSwwLDAsMS0yLjQ2NzgtMS4wMjIyTDM1LDQ5LjE0Mjg2VjM4LjI0QTYuMjQsNi4yNCwwLDAsMSw0MS4yNCwzMkg1Mi4xNDI4Nkw1Ny45Nzc4LDM3LjgzNUEzLjQ5LD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sMCwxLDMyLDIwLjMzMDA4WiIgb3BhY2l0eT0iMC4xIi8+PHJlY3QgeD0iNC4wMDAyMiIgeT0iMTgiIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgcng9IjIuMzMzMzMiIGZpbGw9IiMwMDc4ZDQiLz48cGF0aCBkPSJNMjIuNTg1MzMsMjYuODgxMjFoLTYuNTQ3MlYzMC43MDk4aDYuMTQ1MzV2Mi40NTM3NUgxNi4wMzgxM1YzNy4xNDAxaDYuODk2MDl2Mi40NDM0aC05Ljg2OFYyNC40MTY1aDkuNTE5MVoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=",
|
||||||
|
"camel.apache.org/provider": "Apache Software Foundation",
|
||||||
|
"camel.apache.org/kamelet.group": "Mail",
|
||||||
|
"camel.apache.org/kamelet.namespace": "Mail"
|
||||||
|
},
|
||||||
|
"labels": {
|
||||||
|
"camel.apache.org/kamelet.type": "source"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"spec": {
|
||||||
|
"definition": {
|
||||||
|
"title": "Microsoft Exchange IMAP OAuth2 Source",
|
||||||
|
"description": "Receive unread emails from an IMAP Microsoft Exchange mail server, marking them as read once they are received.",
|
||||||
|
"required": [
|
||||||
|
"tenantId",
|
||||||
|
"clientId",
|
||||||
|
"clientSecret",
|
||||||
|
"username"
|
||||||
|
],
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"connectionHost": {
|
||||||
|
"title": "Connection Host",
|
||||||
|
"description": "The IMAP server host.",
|
||||||
|
"type": "string",
|
||||||
|
"default": "outlook.office365.com"
|
||||||
|
},
|
||||||
|
"connectionPort": {
|
||||||
|
"title": "Connection Port",
|
||||||
|
"description": "The IMAP server port.",
|
||||||
|
"type": "string",
|
||||||
|
"default": 993
|
||||||
|
},
|
||||||
|
"tenantId": {
|
||||||
|
"title": "Tenant ID",
|
||||||
|
"description": "Azure Active Directory Tenant ID.",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"clientId": {
|
||||||
|
"title": "Client ID",
|
||||||
|
"description": "Azure Active Directory Application Client ID.",
|
||||||
|
"type": "string",
|
||||||
|
"x-descriptors": [
|
||||||
|
"urn:camel:group:credentials"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"clientSecret": {
|
||||||
|
"title": "Client Secret",
|
||||||
|
"description": "The Azure Active Directory Application Client Secret.",
|
||||||
|
"type": "string",
|
||||||
|
"format": "password",
|
||||||
|
"x-descriptors": [
|
||||||
|
"urn:camel:group:credentials"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"title": "Username",
|
||||||
|
"description": "The username to access the mail box.",
|
||||||
|
"type": "string",
|
||||||
|
"example": "arthur@mycompany.com",
|
||||||
|
"x-descriptors": [
|
||||||
|
"urn:camel:group:credentials"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"fetchSize": {
|
||||||
|
"title": "Fetch Size",
|
||||||
|
"description": "The number of messages fetched for each poll (-1 for no limits).",
|
||||||
|
"type": "integer",
|
||||||
|
"default": 10
|
||||||
|
},
|
||||||
|
"delay": {
|
||||||
|
"title": "Delay",
|
||||||
|
"description": "The delay between fetches in milliseconds.",
|
||||||
|
"type": "integer",
|
||||||
|
"default": 60000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dependencies": [
|
||||||
|
"camel:core",
|
||||||
|
"camel:kamelet",
|
||||||
|
"camel:mail-microsoft-oauth",
|
||||||
|
"camel:mail"
|
||||||
|
],
|
||||||
|
"template": {
|
||||||
|
"beans": [
|
||||||
|
{
|
||||||
|
"name": "exchangeAuthenticator",
|
||||||
|
"type": "#class:org.apache.camel.component.mail.microsoft.authenticator.MicrosoftExchangeOnlineOAuth2MailAuthenticator({{tenantId}}, {{clientId}}, {{clientSecret}}, {{username}})"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"from": {
|
||||||
|
"uri": "imaps:{{connectionHost}}:{{connectionPort}}",
|
||||||
|
"parameters": {
|
||||||
|
"mail.imaps.auth.mechanisms": "XOAUTH2",
|
||||||
|
"username": "{{username}}",
|
||||||
|
"fetchSize": "{{fetchSize}}",
|
||||||
|
"delay": "{{delay}}",
|
||||||
|
"authenticator": "#bean:{{exchangeAuthenticator}}"
|
||||||
|
},
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"to": "kamelet:sink"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"propertiesSchema": {
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"type": "object",
|
||||||
|
"title": "Microsoft Exchange IMAP OAuth2 Source",
|
||||||
|
"description": "Receive unread emails from an IMAP Microsoft Exchange mail server, marking them as read once they are received.",
|
||||||
|
"required": [
|
||||||
|
"tenantId",
|
||||||
|
"clientId",
|
||||||
|
"clientSecret",
|
||||||
|
"username"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"connectionHost": {
|
||||||
|
"type": "string",
|
||||||
|
"title": "Connection Host",
|
||||||
|
"description": "The IMAP server host.",
|
||||||
|
"default": "outlook.office365.com"
|
||||||
|
},
|
||||||
|
"connectionPort": {
|
||||||
|
"type": "string",
|
||||||
|
"title": "Connection Port",
|
||||||
|
"description": "The IMAP server port.",
|
||||||
|
"default": 993
|
||||||
|
},
|
||||||
|
"tenantId": {
|
||||||
|
"type": "string",
|
||||||
|
"title": "Tenant ID",
|
||||||
|
"description": "Azure Active Directory Tenant ID."
|
||||||
|
},
|
||||||
|
"clientId": {
|
||||||
|
"type": "string",
|
||||||
|
"title": "Client ID",
|
||||||
|
"description": "Azure Active Directory Application Client ID."
|
||||||
|
},
|
||||||
|
"clientSecret": {
|
||||||
|
"type": "string",
|
||||||
|
"title": "Client Secret",
|
||||||
|
"description": "The Azure Active Directory Application Client Secret.",
|
||||||
|
"format": "password"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"type": "string",
|
||||||
|
"title": "Username",
|
||||||
|
"description": "The username to access the mail box."
|
||||||
|
},
|
||||||
|
"fetchSize": {
|
||||||
|
"type": "integer",
|
||||||
|
"title": "Fetch Size",
|
||||||
|
"description": "The number of messages fetched for each poll (-1 for no limits).",
|
||||||
|
"default": 10
|
||||||
|
},
|
||||||
|
"delay": {
|
||||||
|
"type": "integer",
|
||||||
|
"title": "Delay",
|
||||||
|
"description": "The delay between fetches in milliseconds.",
|
||||||
|
"default": 60000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user