Skip to content

Commit e20c322

Browse files
committed
[FIX] Inconsistent event format between deploy-time and real-time events
1 parent aebf7b0 commit e20c322

File tree

6 files changed

+10
-15
lines changed

6 files changed

+10
-15
lines changed

components/salesforce_rest_api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/salesforce_rest_api",
3-
"version": "1.10.0",
3+
"version": "1.10.1",
44
"description": "Pipedream Salesforce (REST API) Components",
55
"main": "salesforce_rest_api.app.mjs",
66
"keywords": [

components/salesforce_rest_api/sources/common/common-new-record.mjs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@ export default {
1515
const { recentItems } = await this.salesforce.listSObjectTypeIds(objectType);
1616
const ids = recentItems.map((item) => item.Id);
1717
for (const id of ids.slice(-25)) {
18-
const object = await this.salesforce.getSObject(objectType, id);
19-
const event = {
20-
body: {
21-
"New": object,
22-
"UserId": id,
23-
},
24-
};
25-
this.processWebhookEvent(event);
18+
const body = await this.salesforce.getSObject(objectType, id);
19+
this.processWebhookEvent({
20+
body,
21+
});
2622
}
2723
},
2824
async activate() {
@@ -80,12 +76,11 @@ export default {
8076
},
8177
generateWebhookMeta(data) {
8278
const nameField = this.getNameField();
83-
const { New: newObject } = data.body;
8479
const {
8580
CreatedDate: createdDate,
8681
Id: id,
8782
[nameField]: name,
88-
} = newObject;
83+
} = data.body;
8984
const summary = `New ${this.getObjectType()} created: ${name ?? id}`;
9085
const ts = Date.parse(createdDate);
9186
return {

components/salesforce_rest_api/sources/new-case-instant/new-case-instant.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
name: "New Case (Instant, of Selectable Type)",
88
key: "salesforce_rest_api-new-case-instant",
99
description: "Emit new event when a case is created. [See the documentation](https://sforce.co/3yPSJZy)",
10-
version: "0.0.5",
10+
version: "0.0.6",
1111
props: {
1212
salesforce: common.props.salesforce,
1313
db: "$.service.db",

components/salesforce_rest_api/sources/new-email-template-instant/new-email-template-instant.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
name: "New Email Template (Instant, of Selectable Type)",
88
key: "salesforce_rest_api-new-email-template-instant",
99
description: "Emit new event when an email template is created. [See the documentation](https://sforce.co/3yPSJZy)",
10-
version: "0.0.5",
10+
version: "0.0.6",
1111
props: {
1212
salesforce: common.props.salesforce,
1313
db: "$.service.db",

components/salesforce_rest_api/sources/new-knowledge-article-instant/new-knowledge-article-instant.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
name: "New Knowledge Article (Instant, of Selectable Type)",
88
key: "salesforce_rest_api-new-knowledge-article-instant",
99
description: "Emit new event when a knowledge article is created. [See the documentation](https://sforce.co/3yPSJZy)",
10-
version: "0.0.5",
10+
version: "0.0.6",
1111
props: {
1212
salesforce: common.props.salesforce,
1313
db: "$.service.db",

components/salesforce_rest_api/sources/new-record-instant/new-record-instant.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
name: "New Record (Instant, of Selectable Type)",
77
key: "salesforce_rest_api-new-record-instant",
88
description: "Emit new event when a record of the selected object type is created. [See the documentation](https://sforce.co/3yPSJZy)",
9-
version: "0.2.5",
9+
version: "0.2.6",
1010
props: {
1111
...common.props,
1212
fieldsToObtain: {

0 commit comments

Comments
 (0)