You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/03/30 15:48:58 UTC

[camel-kamelets] branch main updated: Regen for commit 6e77080c8113d4c4979858f55f19b167ab90ff2b

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


The following commit(s) were added to refs/heads/main by this push:
     new 32ef0f3  Regen for commit 6e77080c8113d4c4979858f55f19b167ab90ff2b
32ef0f3 is described below

commit 32ef0f31298182430ce8fbba1b7b66c98c5c5617
Author: oscerd <os...@users.noreply.github.com>
AuthorDate: Wed Mar 30 15:45:50 2022 +0000

    Regen for commit 6e77080c8113d4c4979858f55f19b167ab90ff2b
    
    Signed-off-by: GitHub <no...@github.com>
---
 docs/modules/ROOT/nav.adoc                         |   3 +
 .../kamelets/salesforce-create-sink.kamelet.yaml   | 104 ++++++++++++++++++
 .../kamelets/salesforce-delete-sink.kamelet.yaml   | 119 +++++++++++++++++++++
 .../kamelets/salesforce-update-sink.kamelet.yaml   | 112 +++++++++++++++++++
 4 files changed, 338 insertions(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index c4bfbea..ea00388 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -146,7 +146,10 @@
 * xref:regex-router-action.adoc[]
 * xref:replace-field-action.adoc[]
 * xref:rest-openapi-sink.adoc[]
+* xref:salesforce-create-sink.adoc[]
+* xref:salesforce-delete-sink.adoc[]
 * xref:salesforce-source.adoc[]
+* xref:salesforce-update-sink.adoc[]
 * xref:sftp-sink.adoc[]
 * xref:sftp-source.adoc[]
 * xref:slack-sink.adoc[]
diff --git a/library/camel-kamelets/src/main/resources/kamelets/salesforce-create-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/salesforce-create-sink.kamelet.yaml
new file mode 100644
index 0000000..bafdccd
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/salesforce-create-sink.kamelet.yaml
@@ -0,0 +1,104 @@
+#---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: salesforce-create-sink
+  annotations:
+    camel.apache.org/kamelet.support.level: "Preview"
+    camel.apache.org/catalog.version: "main-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCA0OCA0OCIgdmVyc2lvbj0iMS4xIj48ZyBpZD0ic3VyZmFjZTEiPjxwYXRoIGQ9Ik0zNi41IDEyYy0xLjMyNCAwLTIuNTkuMjU4LTMuNzU4LjcwM0E3Ljk5NCA3Ljk5NCAwIDAgMCAyNiA5Yy0yLjEwNSAwLTQuMDIuODItNS40NDUgMi4xNTJBOS40NjggOS40NjggMCAwIDAgMTMuNSA4QzguMjU0IDggNCAxMi4yNTQgNCAxNy41YzAgLj [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Salesforce"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "Salesforce Create Sink"
+    description: |-
+      Creates an object in Salesforce. The body of the message must contain
+      the JSON of the salesforce object.
+
+      Example body: { "Phone": "555", "Name": "Antonia", "LastName": "Garcia" }
+    required:
+      - clientId
+      - clientSecret
+      - userName
+      - password
+    type: object
+    properties:
+      sObjectName:
+        title: Object Name
+        description: Type of the object
+        type: string
+        example: Contact
+      loginUrl:
+        title: Login URL
+        description: The Salesforce instance login URL
+        type: string
+        default: https://login.salesforce.com
+      clientId:
+        title: Consumer Key
+        description: The Salesforce application consumer key
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      clientSecret:
+        title: Consumer Secret
+        description: The Salesforce application consumer secret
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      userName:
+        title: Username
+        description: The Salesforce username
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      password:
+        title: Password
+        description: The Salesforce user password
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+  types:
+    in:
+      mediaType: application/json
+  dependencies:
+  - "camel:salesforce"
+  - "camel:kamelet"
+  template:
+    beans:
+      - name: local-salesforce
+        type: "#class:org.apache.camel.component.salesforce.SalesforceComponent"
+        properties:
+          clientId: "{{clientId}}"
+          clientSecret: "{{clientSecret}}"
+          userName: "{{userName}}"
+          password: "{{password}}"
+          loginUrl: "{{loginUrl}}"
+    from:
+      uri: kamelet:source
+      steps:
+        - to:
+            uri: "{{local-salesforce}}:createSObject"
+            parameters:
+              sObjectName: "{{sObjectName}}"
diff --git a/library/camel-kamelets/src/main/resources/kamelets/salesforce-delete-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/salesforce-delete-sink.kamelet.yaml
new file mode 100644
index 0000000..fded774
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/salesforce-delete-sink.kamelet.yaml
@@ -0,0 +1,119 @@
+#---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: salesforce-delete-sink
+  annotations:
+    camel.apache.org/kamelet.support.level: "Preview"
+    camel.apache.org/catalog.version: "main-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCA0OCA0OCIgdmVyc2lvbj0iMS4xIj48ZyBpZD0ic3VyZmFjZTEiPjxwYXRoIGQ9Ik0zNi41IDEyYy0xLjMyNCAwLTIuNTkuMjU4LTMuNzU4LjcwM0E3Ljk5NCA3Ljk5NCAwIDAgMCAyNiA5Yy0yLjEwNSAwLTQuMDIuODItNS40NDUgMi4xNTJBOS40NjggOS40NjggMCAwIDAgMTMuNSA4QzguMjU0IDggNCAxMi4yNTQgNCAxNy41YzAgLj [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Salesforce"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "Salesforce Delete Sink"
+    description: |-
+      Removes an object from Salesforce. The body received must be a json
+      containing two keys: sObjectId and sObjectName.
+
+      Example body: { "sObjectId": "XXXXX0", "sObjectName": "Contact" }
+    required:
+      - clientId
+      - clientSecret
+      - userName
+      - password
+    type: object
+    properties:
+      loginUrl:
+        title: Login URL
+        description: The Salesforce instance login URL
+        type: string
+        default: https://login.salesforce.com
+      clientId:
+        title: Consumer Key
+        description: The Salesforce application consumer key
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      clientSecret:
+        title: Consumer Secret
+        description: The Salesforce application consumer secret
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      userName:
+        title: Username
+        description: The Salesforce username
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      password:
+        title: Password
+        description: The Salesforce user password
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+  types:
+    in:
+      mediaType: application/json
+      schema:
+        type: object
+        required: ["sObjectId", "sObjectName"]
+        properties:
+          sObjectId:
+            type: string
+          sObjectName:
+            type: string
+  dependencies:
+  - "camel:salesforce"
+  - "camel:kamelet"
+  - "camel:core"
+  - "camel:jsonpath"
+  template:
+    beans:
+      - name: local-delete-salesforce
+        type: "#class:org.apache.camel.component.salesforce.SalesforceComponent"
+        properties:
+          clientId: "{{clientId}}"
+          clientSecret: "{{clientSecret}}"
+          userName: "{{userName}}"
+          password: "{{password}}"
+          loginUrl: "{{loginUrl}}"
+    from:
+      uri: kamelet:source
+      steps:
+        - set-header:
+            name: sObjectId
+            jsonpath: "$['sObjectId']"
+        - set-header:
+            name: sObjectName
+            jsonpath: "$['sObjectName']"
+        - setBody:
+            simple: "${null}"
+        - to:
+            uri: "{{local-delete-salesforce}}:deleteSObject"
+        - remove-header:
+            name: sObjectId
+        - remove-header:
+            name: sObjectName
diff --git a/library/camel-kamelets/src/main/resources/kamelets/salesforce-update-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/salesforce-update-sink.kamelet.yaml
new file mode 100644
index 0000000..8a0b0ab
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/salesforce-update-sink.kamelet.yaml
@@ -0,0 +1,112 @@
+#---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: salesforce-update-sink
+  annotations:
+    camel.apache.org/kamelet.support.level: "Preview"
+    camel.apache.org/catalog.version: "main-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCA0OCA0OCIgdmVyc2lvbj0iMS4xIj48ZyBpZD0ic3VyZmFjZTEiPjxwYXRoIGQ9Ik0zNi41IDEyYy0xLjMyNCAwLTIuNTkuMjU4LTMuNzU4LjcwM0E3Ljk5NCA3Ljk5NCAwIDAgMCAyNiA5Yy0yLjEwNSAwLTQuMDIuODItNS40NDUgMi4xNTJBOS40NjggOS40NjggMCAwIDAgMTMuNSA4QzguMjU0IDggNCAxMi4yNTQgNCAxNy41YzAgLj [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Salesforce"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "Salesforce Update Sink"
+    description: |-
+      Updates an object in  Salesforce. The body received must contain a
+      JSON key-value pair for each property to update and sObjectName and
+      sObjectId must be provided as parameters.
+
+      Example of key-value pair: { "Phone": "1234567890", "Name": "Antonia" }
+    required:
+      - sObjectName
+      - sObjectId
+      - clientId
+      - clientSecret
+      - userName
+      - password
+    type: object
+    properties:
+      sObjectName:
+        title: Object Name
+        description: Type of the object. Only required if using key-value pair.
+        type: string
+        example: Contact
+      sObjectId:
+        title: Object Id
+        description: Id of the object. Only required if using key-value pair.
+        type: string
+      loginUrl:
+        title: Login URL
+        description: The Salesforce instance login URL
+        type: string
+        default: https://login.salesforce.com
+      clientId:
+        title: Consumer Key
+        description: The Salesforce application consumer key
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      clientSecret:
+        title: Consumer Secret
+        description: The Salesforce application consumer secret
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      userName:
+        title: Username
+        description: The Salesforce username
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      password:
+        title: Password
+        description: The Salesforce user password
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+  types:
+    in:
+      mediaType: application/json
+  dependencies:
+  - "camel:salesforce"
+  - "camel:kamelet"
+  template:
+    beans:
+      - name: local-salesforce
+        type: "#class:org.apache.camel.component.salesforce.SalesforceComponent"
+        properties:
+          clientId: "{{clientId}}"
+          clientSecret: "{{clientSecret}}"
+          userName: "{{userName}}"
+          password: "{{password}}"
+          loginUrl: "{{loginUrl}}"
+    from:
+      uri: kamelet:source
+      steps:
+        - to:
+            uri: "{{local-salesforce}}:updateSObject"
+            parameters:
+              sObjectId: "{{sObjectId}}"
+              sObjectName: "{{sObjectName}}"