Skip to content

Commit 70d4af5

Browse files
committed
Enhance Pipedrive updated lead source with data parsing functionality
- Added `parseData` method to process lead data using custom fields. - Updated version from 0.0.1 to 0.1.0 to reflect new functionality.
1 parent fd2ecbf commit 70d4af5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

components/pipedrive/sources/updated-lead-instant/updated-lead-instant.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { parseData } from "../../common/utils.mjs";
12
import common from "../common/base.mjs";
23
import sampleEmit from "./test-event.mjs";
34

@@ -6,7 +7,7 @@ export default {
67
key: "pipedrive-updated-lead-instant",
78
name: "Lead Updated (Instant)",
89
description: "Emit new event when a lead is updated.",
9-
version: "0.0.1",
10+
version: "0.1.0",
1011
type: "source",
1112
dedupe: "unique",
1213
methods: {
@@ -20,6 +21,12 @@ export default {
2021
getSummary(body) {
2122
return `Lead successfully updated: ${body.data.id}`;
2223
},
24+
async parseData(body) {
25+
return await parseData({
26+
fn: this.pipedrive.getDealCustomFields,
27+
body,
28+
});
29+
},
2330
},
2431
sampleEmit,
2532
};

0 commit comments

Comments
 (0)