@pipedream/salesforce_rest_api 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/add-contact-to-campaign/add-contact-to-campaign.mjs +1 -1
- package/actions/add-lead-to-campaign/add-lead-to-campaign.mjs +1 -1
- package/actions/create-account/create-account.mjs +1 -1
- package/actions/create-attachment/create-attachment.mjs +1 -1
- package/actions/create-campaign/create-campaign.mjs +1 -1
- package/actions/create-case/create-case.mjs +1 -1
- package/actions/create-casecomment/create-casecomment.mjs +1 -1
- package/actions/create-contact/create-contact.mjs +1 -1
- package/actions/create-event/create-event.mjs +1 -1
- package/actions/create-lead/create-lead.mjs +1 -1
- package/actions/create-note/create-note.mjs +1 -1
- package/actions/create-opportunity/create-opportunity.mjs +1 -1
- package/actions/create-record/create-record.mjs +1 -1
- package/actions/create-task/create-task.mjs +1 -1
- package/actions/delete-opportunity/delete-opportunity.mjs +1 -1
- package/actions/delete-record/delete-record.mjs +1 -1
- package/actions/find-create-record/find-create-record.mjs +1 -1
- package/actions/find-records/find-records.mjs +1 -1
- package/actions/get-sobject-fields-values/get-sobject-fields-values.mjs +1 -1
- package/actions/insert-blob-data/insert-blob-data.mjs +1 -1
- package/actions/post-feed-to-chatter/post-feed-to-chatter.mjs +1 -1
- package/actions/soql-search/soql-search.mjs +1 -1
- package/actions/sosl-search/sosl-search.mjs +1 -1
- package/actions/update-account/update-account.mjs +1 -1
- package/actions/update-contact/update-contact.mjs +1 -1
- package/actions/update-opportunity/update-opportunity.mjs +1 -1
- package/actions/update-record/update-record.mjs +1 -1
- package/package.json +2 -2
- package/salesforce_rest_api.app.mjs +10 -16
- package/sources/common-instant.mjs +6 -16
- package/sources/common.mjs +5 -27
- package/sources/new-object/new-object.mjs +1 -1
- package/sources/new-object-instant/new-object-instant.mjs +1 -1
- package/sources/new-outbound-message/new-outbound-message.mjs +1 -1
- package/sources/object-deleted/object-deleted.mjs +1 -1
- package/sources/object-deleted-instant/object-deleted-instant.mjs +1 -1
- package/sources/object-updated/object-updated.mjs +1 -1
- package/sources/object-updated-instant/object-updated-instant.mjs +1 -1
- package/sources/updated-field-on-record/updated-field-on-record.mjs +2 -2
- package/sources/updated-field-on-record-instant/updated-field-on-record-instant.mjs +1 -1
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
See [Event SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_campaignmember.htm)
|
|
13
13
|
and [Create Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
14
14
|
`),
|
|
15
|
-
version: "0.0.
|
|
15
|
+
version: "0.0.2",
|
|
16
16
|
type: "action",
|
|
17
17
|
props: {
|
|
18
18
|
salesForceRestApi,
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
See [Event SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_campaignmember.htm)
|
|
13
13
|
and [Create Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
14
14
|
`),
|
|
15
|
-
version: "0.0.
|
|
15
|
+
version: "0.0.2",
|
|
16
16
|
type: "action",
|
|
17
17
|
props: {
|
|
18
18
|
salesForceRestApi,
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
See [Account SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_account.htm)
|
|
15
15
|
and [Create Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
16
16
|
`),
|
|
17
|
-
version: "0.2.
|
|
17
|
+
version: "0.2.3",
|
|
18
18
|
type: "action",
|
|
19
19
|
props: {
|
|
20
20
|
salesforce,
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
See [Attachment SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_attachment.htm)
|
|
14
14
|
and [Create Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
15
15
|
`),
|
|
16
|
-
version: "0.3.
|
|
16
|
+
version: "0.3.3",
|
|
17
17
|
type: "action",
|
|
18
18
|
props: {
|
|
19
19
|
salesforce,
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
See [Campaign SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_campaign.htm)
|
|
14
14
|
and [Create Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
15
15
|
`),
|
|
16
|
-
version: "0.2.
|
|
16
|
+
version: "0.2.3",
|
|
17
17
|
type: "action",
|
|
18
18
|
props: {
|
|
19
19
|
salesforce,
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
See [Case SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_case.htm)
|
|
14
14
|
and [Create Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
15
15
|
`),
|
|
16
|
-
version: "0.2.
|
|
16
|
+
version: "0.2.3",
|
|
17
17
|
type: "action",
|
|
18
18
|
props: {
|
|
19
19
|
salesforce,
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
See [CaseComment SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_casecomment.htm)
|
|
14
14
|
and [Create Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
15
15
|
`),
|
|
16
|
-
version: "0.2.
|
|
16
|
+
version: "0.2.3",
|
|
17
17
|
type: "action",
|
|
18
18
|
props: {
|
|
19
19
|
salesforce,
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
See [Contact SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_contact.htm)
|
|
14
14
|
and [Create Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
15
15
|
`),
|
|
16
|
-
version: "0.2.
|
|
16
|
+
version: "0.2.3",
|
|
17
17
|
type: "action",
|
|
18
18
|
props: {
|
|
19
19
|
salesforce,
|
|
@@ -11,7 +11,7 @@ export default {
|
|
|
11
11
|
See [Event SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_event.htm)
|
|
12
12
|
and [Create Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
13
13
|
`),
|
|
14
|
-
version: "0.2.
|
|
14
|
+
version: "0.2.3",
|
|
15
15
|
type: "action",
|
|
16
16
|
props: {
|
|
17
17
|
salesforce,
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
See [Lead SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_lead.htm)
|
|
14
14
|
and [Create Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
15
15
|
`),
|
|
16
|
-
version: "0.2.
|
|
16
|
+
version: "0.2.3",
|
|
17
17
|
type: "action",
|
|
18
18
|
props: {
|
|
19
19
|
salesforce,
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
See [Note SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_note.htm)
|
|
14
14
|
and [Create Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
15
15
|
`),
|
|
16
|
-
version: "0.2.
|
|
16
|
+
version: "0.2.3",
|
|
17
17
|
type: "action",
|
|
18
18
|
props: {
|
|
19
19
|
salesforce,
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
See [Opportunity SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_opportunity.htm)
|
|
14
14
|
and [Create Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
15
15
|
`),
|
|
16
|
-
version: "0.2.
|
|
16
|
+
version: "0.2.3",
|
|
17
17
|
type: "action",
|
|
18
18
|
props: {
|
|
19
19
|
salesforce,
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
Create new records of a given resource.
|
|
9
9
|
See [docs](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
10
10
|
`),
|
|
11
|
-
version: "0.2.
|
|
11
|
+
version: "0.2.3",
|
|
12
12
|
type: "action",
|
|
13
13
|
props: {
|
|
14
14
|
salesforce,
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
See [Task SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_task.htm)
|
|
14
14
|
and [Create Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_create.htm)
|
|
15
15
|
`),
|
|
16
|
-
version: "0.3.
|
|
16
|
+
version: "0.3.3",
|
|
17
17
|
type: "action",
|
|
18
18
|
props: {
|
|
19
19
|
salesforce,
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
See [Opportunity SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_opportunity.htm)
|
|
10
10
|
and [Delete Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_delete_record.htm)
|
|
11
11
|
`),
|
|
12
|
-
version: "0.2.
|
|
12
|
+
version: "0.2.3",
|
|
13
13
|
type: "action",
|
|
14
14
|
props: {
|
|
15
15
|
salesforce,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Delete a Record in an Object",
|
|
6
6
|
description:
|
|
7
7
|
"Deletes an existing record in an object. [API Doc](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm)",
|
|
8
|
-
version: "0.1.
|
|
8
|
+
version: "0.1.1",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
salesForceRestApi,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "Get Field Values from Object Record and optionally create one is none is found. ",
|
|
7
7
|
description:
|
|
8
8
|
"Finds a specified Salesforce record by a field. Optionally, create one if none is found. [API Docs](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_field_values.htm)",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.1",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
salesForceRestApi,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Get Object Records",
|
|
6
6
|
description:
|
|
7
7
|
"Retrieves all records in an object or a record in an object by the given ID or criteria. [API Doc](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_field_values.htm)",
|
|
8
|
-
version: "0.1.
|
|
8
|
+
version: "0.1.1",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
salesForceRestApi,
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
Retrieve field values from a record. You can specify the fields you want to retrieve.
|
|
9
9
|
See [docs](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_get_field_values.htm)
|
|
10
10
|
`),
|
|
11
|
-
version: "0.2.
|
|
11
|
+
version: "0.2.3",
|
|
12
12
|
type: "action",
|
|
13
13
|
props: {
|
|
14
14
|
salesforce,
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
Inserts blob data in Salesforce standard objects.
|
|
9
9
|
See [docs](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm)
|
|
10
10
|
`),
|
|
11
|
-
version: "0.2.
|
|
11
|
+
version: "0.2.3",
|
|
12
12
|
type: "action",
|
|
13
13
|
props: {
|
|
14
14
|
salesforce,
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
Posts a message to the Chatter Feed.
|
|
9
9
|
[See doc](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/quickreference_post_feed_item.htm)
|
|
10
10
|
`),
|
|
11
|
-
version: "0.0.
|
|
11
|
+
version: "0.0.2",
|
|
12
12
|
type: "action",
|
|
13
13
|
props: {
|
|
14
14
|
salesForceRestApi,
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
Executes the specified SOSL search.
|
|
9
9
|
See [docs](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl.htm)
|
|
10
10
|
`),
|
|
11
|
-
version: "0.2.
|
|
11
|
+
version: "0.2.3",
|
|
12
12
|
type: "action",
|
|
13
13
|
props: {
|
|
14
14
|
salesforce,
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
See [Account SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_account.htm)
|
|
15
15
|
and [Update Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_update_fields.htm)
|
|
16
16
|
`),
|
|
17
|
-
version: "0.2.
|
|
17
|
+
version: "0.2.3",
|
|
18
18
|
type: "action",
|
|
19
19
|
props: {
|
|
20
20
|
salesforce,
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
See [Contact SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_contact.htm)
|
|
14
14
|
and [Update Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_update_fields.htm)
|
|
15
15
|
`),
|
|
16
|
-
version: "0.2.
|
|
16
|
+
version: "0.2.3",
|
|
17
17
|
type: "action",
|
|
18
18
|
props: {
|
|
19
19
|
salesforce,
|
|
@@ -13,7 +13,7 @@ export default {
|
|
|
13
13
|
See [Opportunity SObject](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_opportunity.htm)
|
|
14
14
|
and [Update Record](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_update_fields.htm)
|
|
15
15
|
`),
|
|
16
|
-
version: "0.2.
|
|
16
|
+
version: "0.2.3",
|
|
17
17
|
type: "action",
|
|
18
18
|
props: {
|
|
19
19
|
salesforce,
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
Updates a record of a given resource.
|
|
9
9
|
[See docs here](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_update_fields.htm)
|
|
10
10
|
`),
|
|
11
|
-
version: "0.2.
|
|
11
|
+
version: "0.2.3",
|
|
12
12
|
type: "action",
|
|
13
13
|
props: {
|
|
14
14
|
salesforce,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/salesforce_rest_api",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Pipedream Salesforce (REST API) Components",
|
|
5
5
|
"main": "salesforce_rest_api.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@pipedream/platform": "^0.9.0",
|
|
15
15
|
"handlebars": "^4.7.7",
|
|
16
16
|
"lodash": "^4.17.21",
|
|
17
|
-
"salesforce-webhooks": "^1.1.
|
|
17
|
+
"salesforce-webhooks": "^1.1.11",
|
|
18
18
|
"lodash-es": "^4.17.21"
|
|
19
19
|
},
|
|
20
20
|
"gitHead": "e12480b94cc03bed4808ebc6b13e7fdb3a1ba535",
|
|
@@ -23,14 +23,10 @@ export default {
|
|
|
23
23
|
type: "string",
|
|
24
24
|
label: "SObject Type",
|
|
25
25
|
description: "Standard object type of the record to get field values from",
|
|
26
|
-
async options(
|
|
27
|
-
const { page } = context;
|
|
28
|
-
if (page !== 0) {
|
|
29
|
-
return [];
|
|
30
|
-
}
|
|
26
|
+
async options() {
|
|
31
27
|
const { sobjects } = await this.listSObjectTypes();
|
|
32
28
|
return sobjects
|
|
33
|
-
.filter(
|
|
29
|
+
.filter(this.isValidSObject)
|
|
34
30
|
.map((sobject) => ({
|
|
35
31
|
label: sobject.label,
|
|
36
32
|
value: sobject.name,
|
|
@@ -195,29 +191,27 @@ export default {
|
|
|
195
191
|
[prop]: sobject[prop],
|
|
196
192
|
}), {});
|
|
197
193
|
},
|
|
194
|
+
isValidSObject(sobject) {
|
|
195
|
+
// Only the activity of those SObject types that have the `replicateable`
|
|
196
|
+
// flag set is published via the `getUpdated` API.
|
|
197
|
+
//
|
|
198
|
+
// See the API docs here: https://sforce.co/3gDy3uP
|
|
199
|
+
return sobject.replicateable;
|
|
200
|
+
},
|
|
198
201
|
isHistorySObject(sobject) {
|
|
199
202
|
return (
|
|
200
203
|
sobject.associateEntityType === "History" &&
|
|
201
204
|
sobject.name.includes("History")
|
|
202
205
|
);
|
|
203
206
|
},
|
|
204
|
-
listAllowedSObjectTypes(eventType) {
|
|
205
|
-
const verbose = true;
|
|
206
|
-
return SalesforceClient.getAllowedSObjects(eventType, verbose);
|
|
207
|
-
},
|
|
208
207
|
async createWebhook(endpointUrl, sObjectType, event, secretToken, opts) {
|
|
209
|
-
const {
|
|
210
|
-
fieldsToCheck,
|
|
211
|
-
fieldsToCheckMode,
|
|
212
|
-
} = opts;
|
|
213
208
|
const client = this._getSalesforceClient();
|
|
214
209
|
const webhookOpts = {
|
|
215
210
|
endpointUrl,
|
|
216
211
|
sObjectType,
|
|
217
212
|
event,
|
|
218
213
|
secretToken,
|
|
219
|
-
|
|
220
|
-
fieldsToCheckMode,
|
|
214
|
+
...opts,
|
|
221
215
|
};
|
|
222
216
|
return client.createWebhook(webhookOpts);
|
|
223
217
|
},
|
|
@@ -5,31 +5,20 @@ import salesforce from "../salesforce_rest_api.app.mjs";
|
|
|
5
5
|
export default {
|
|
6
6
|
dedupe: "unique",
|
|
7
7
|
props: {
|
|
8
|
+
salesforce,
|
|
8
9
|
db: "$.service.db",
|
|
9
10
|
// eslint-disable-next-line pipedream/props-label,pipedream/props-description
|
|
10
11
|
http: {
|
|
11
12
|
type: "$.interface.http",
|
|
12
13
|
customResponse: true,
|
|
13
14
|
},
|
|
14
|
-
salesforce,
|
|
15
15
|
objectType: {
|
|
16
|
-
type: "string",
|
|
17
16
|
label: "Object Type",
|
|
18
17
|
description: "The type of object for which to monitor events",
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
// provided through a single method call
|
|
24
|
-
return [];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const supportedObjectTypes = this.salesforce.listAllowedSObjectTypes(this.getEventType());
|
|
28
|
-
return supportedObjectTypes.map((i) => ({
|
|
29
|
-
label: i.label,
|
|
30
|
-
value: i.name,
|
|
31
|
-
}));
|
|
32
|
-
},
|
|
18
|
+
propDefinition: [
|
|
19
|
+
salesforce,
|
|
20
|
+
"objectType",
|
|
21
|
+
],
|
|
33
22
|
},
|
|
34
23
|
},
|
|
35
24
|
hooks: {
|
|
@@ -50,6 +39,7 @@ export default {
|
|
|
50
39
|
{
|
|
51
40
|
fieldsToCheck: this.getFieldsToCheck(),
|
|
52
41
|
fieldsToCheckMode: this.getFieldsToCheckMode(),
|
|
42
|
+
skipValidation: true, // neccessary for custom objects
|
|
53
43
|
},
|
|
54
44
|
);
|
|
55
45
|
} catch (err) {
|
package/sources/common.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import salesforce from "../salesforce_rest_api.app.mjs";
|
|
|
3
3
|
export default {
|
|
4
4
|
dedupe: "unique",
|
|
5
5
|
props: {
|
|
6
|
-
db: "$.service.db",
|
|
7
6
|
salesforce,
|
|
7
|
+
db: "$.service.db",
|
|
8
8
|
// eslint-disable-next-line pipedream/props-label,pipedream/props-description
|
|
9
9
|
timer: {
|
|
10
10
|
type: "$.interface.timer",
|
|
@@ -16,25 +16,10 @@ export default {
|
|
|
16
16
|
type: "string",
|
|
17
17
|
label: "Object Type",
|
|
18
18
|
description: "The type of object for which to monitor events",
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
options: [],
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const { sobjects } = await this.salesforce.listSObjectTypes();
|
|
28
|
-
const options = sobjects
|
|
29
|
-
.filter(this.isValidSObject)
|
|
30
|
-
.map((sobject) => ({
|
|
31
|
-
label: sobject.label,
|
|
32
|
-
value: sobject.name,
|
|
33
|
-
}));
|
|
34
|
-
return {
|
|
35
|
-
options,
|
|
36
|
-
};
|
|
37
|
-
},
|
|
19
|
+
propDefinition: [
|
|
20
|
+
salesforce,
|
|
21
|
+
"objectType",
|
|
22
|
+
],
|
|
38
23
|
},
|
|
39
24
|
},
|
|
40
25
|
hooks: {
|
|
@@ -62,13 +47,6 @@ export default {
|
|
|
62
47
|
setNameField(nameField) {
|
|
63
48
|
this.db.set("nameField", nameField);
|
|
64
49
|
},
|
|
65
|
-
isValidSObject(sobject) {
|
|
66
|
-
// Only the activity of those SObject types that have the `replicateable`
|
|
67
|
-
// flag set is published via the `getUpdated` API.
|
|
68
|
-
//
|
|
69
|
-
// See the API docs here: https://sforce.co/3gDy3uP
|
|
70
|
-
return sobject.replicateable;
|
|
71
|
-
},
|
|
72
50
|
processEvent() {
|
|
73
51
|
throw new Error("processEvent is not implemented");
|
|
74
52
|
},
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
name: "New Object (of Selectable Type)",
|
|
9
9
|
key: "salesforce_rest_api-new-object",
|
|
10
10
|
description: "Emit new event (at regular intervals) when an object of arbitrary type (selected as an input parameter by the user) is created. See [the docs](https://sforce.co/3yPSJZy) for more information.",
|
|
11
|
-
version: "0.1.
|
|
11
|
+
version: "0.1.3",
|
|
12
12
|
methods: {
|
|
13
13
|
...common.methods,
|
|
14
14
|
isItemRelevant(item, startTimestamp, endTimestamp) {
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
name: "New Object (Instant, of Selectable Type)",
|
|
9
9
|
key: "salesforce_rest_api-new-object-instant",
|
|
10
10
|
description: "Emit new event immediately after an object of arbitrary type (selected as an input parameter by the user) is created",
|
|
11
|
-
version: "0.1.
|
|
11
|
+
version: "0.1.1",
|
|
12
12
|
methods: {
|
|
13
13
|
...common.methods,
|
|
14
14
|
generateMeta(data) {
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "New Outbound Message (Instant)",
|
|
7
7
|
key: "salesforce_rest_api-new-outbound-message",
|
|
8
8
|
description: "Emit new event when a new outbound message is received in Salesforce. See Salesforce's guide on setting up [Outbound Messaging](https://sforce.co/3JbZJom). Set the Outbound Message's Endpoint URL to the endpoint of the created source. The \"Send Session ID\" option must be enabled for validating outbound messages from Salesforce.",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.1",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
props: {
|
|
12
12
|
db: "$.service.db",
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
name: "New Deleted Object (of Selectable Type)",
|
|
9
9
|
key: "salesforce_rest_api-object-deleted",
|
|
10
10
|
description: "Emit new event (at regular intervals) when an object of arbitrary type (selected as an input parameter by the user) is deleted. [See the docs](https://sforce.co/3msDDEE) for more information.",
|
|
11
|
-
version: "0.1.
|
|
11
|
+
version: "0.1.3",
|
|
12
12
|
methods: {
|
|
13
13
|
...common.methods,
|
|
14
14
|
generateMeta(item) {
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
name: "New Deleted Object (Instant, of Selectable Type)",
|
|
9
9
|
key: "salesforce_rest_api-object-deleted-instant",
|
|
10
10
|
description: "Emit new event immediately after an object of arbitrary type (selected as an input parameter by the user) is deleted",
|
|
11
|
-
version: "0.1.
|
|
11
|
+
version: "0.1.1",
|
|
12
12
|
methods: {
|
|
13
13
|
...common.methods,
|
|
14
14
|
generateMeta(data) {
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
name: "New Updated Object (of Selectable Type)",
|
|
9
9
|
key: "salesforce_rest_api-object-updated",
|
|
10
10
|
description: "Emit new event (at regular intervals) when an object of arbitrary type (selected as an input parameter by the user) is updated. [See the docs](https://sforce.co/3yPSJZy) for more information.",
|
|
11
|
-
version: "0.1.
|
|
11
|
+
version: "0.1.3",
|
|
12
12
|
methods: {
|
|
13
13
|
...common.methods,
|
|
14
14
|
generateMeta(item) {
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
name: "New Updated Object (Instant, of Selectable Type)",
|
|
9
9
|
key: "salesforce_rest_api-object-updated-instant",
|
|
10
10
|
description: "Emit new event immediately after an object of arbitrary type (selected as an input parameter by the user) is updated",
|
|
11
|
-
version: "0.1.
|
|
11
|
+
version: "0.1.1",
|
|
12
12
|
methods: {
|
|
13
13
|
...common.methods,
|
|
14
14
|
generateMeta(data) {
|
|
@@ -15,11 +15,11 @@ export default {
|
|
|
15
15
|
name: "New Updated Field on Record (of Selectable Type)",
|
|
16
16
|
key: "salesforce_rest_api-updated-field-on-record",
|
|
17
17
|
description: "Emit new event (at regular intervals) when a field of your choosing is updated on any record of a specified Salesforce object. Field history tracking must be enabled for the chosen field. See the docs on [field history tracking](https://sforce.co/3mtj0rF) and [history objects](https://sforce.co/3Fn4lWB) for more information.",
|
|
18
|
-
version: "0.1.
|
|
18
|
+
version: "0.1.3",
|
|
19
19
|
props: {
|
|
20
20
|
...common.props,
|
|
21
21
|
objectType: {
|
|
22
|
-
|
|
22
|
+
type: common.props.objectType.type,
|
|
23
23
|
label: common.props.objectType.label,
|
|
24
24
|
description: common.props.objectType.description,
|
|
25
25
|
async options(context) {
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
name: "New Updated Field on Record (Instant, of Selectable Type)",
|
|
10
10
|
key: "salesforce_rest_api-updated-field-on-record-instant",
|
|
11
11
|
description: "Emit new event immediately after a field of your choosing is updated on any record of a specified Salesforce object",
|
|
12
|
-
version: "0.1.
|
|
12
|
+
version: "0.1.1",
|
|
13
13
|
props: {
|
|
14
14
|
...common.props,
|
|
15
15
|
field: {
|