From 6bd184d6603fb1a170790b8223eb24f530849a1c Mon Sep 17 00:00:00 2001 From: Luan Cazarine Date: Tue, 15 Apr 2025 12:49:55 -0300 Subject: [PATCH 1/4] [FEATURE] Update Pipedrive to use Webhooks v2 #16246 Sources - New Deal (Instant) - New Person (Instant) - New Deal Updated (Instant) - New Person Updated (Instant) --- components/pipedrive/package.json | 2 +- components/pipedrive/sources/common/base.mjs | 9 +- .../new-deal-instant/new-deal-instant.mjs | 6 +- .../sources/new-deal-instant/test-event.mjs | 146 ++++-------- .../new-person-instant/new-person-instant.mjs | 6 +- .../sources/new-person-instant/test-event.mjs | 134 +++-------- .../updated-deal-instant/test-event.mjs | 219 ++++-------------- .../updated-deal-instant.mjs | 6 +- .../updated-person-instant/test-event.mjs | 213 +++-------------- .../updated-person-instant.mjs | 6 +- 10 files changed, 170 insertions(+), 577 deletions(-) diff --git a/components/pipedrive/package.json b/components/pipedrive/package.json index 1404ff6822d32..70b9227a03442 100644 --- a/components/pipedrive/package.json +++ b/components/pipedrive/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/pipedrive", - "version": "0.3.12", + "version": "0.3.13", "description": "Pipedream Pipedrive Components", "main": "pipedrive.app.mjs", "keywords": [ diff --git a/components/pipedrive/sources/common/base.mjs b/components/pipedrive/sources/common/base.mjs index b464ea0f73a98..5338961c87293 100644 --- a/components/pipedrive/sources/common/base.mjs +++ b/components/pipedrive/sources/common/base.mjs @@ -20,13 +20,10 @@ export default { hooks: { async activate() { const response = await this.pipedrive.addWebhook({ - // Specifying v1 because webhooks v2 became the default on March 17, 2025: - // https://developers.pipedrive.com/changelog/post/breaking-change-webhooks-v2-will-become-the-new-default-version - version: "1.0", + version: "2.0", subscription_url: this.http.endpoint, ...this.getExtraData(), }); - console.log("response: ", response); this._setHookId(response.data.id); }, @@ -36,10 +33,10 @@ export default { }, }, async run({ body }) { - const ts = Date.parse(body.current.update_time); + const ts = Date.parse(body.meta.timestamp); this.$emit(body, { - id: `${body.current.id}-${ts}`, + id: `${body.data.id}-${ts}`, summary: this.getSummary(body), ts, }); diff --git a/components/pipedrive/sources/new-deal-instant/new-deal-instant.mjs b/components/pipedrive/sources/new-deal-instant/new-deal-instant.mjs index f8badaa0e5133..c9b209e44eaf3 100644 --- a/components/pipedrive/sources/new-deal-instant/new-deal-instant.mjs +++ b/components/pipedrive/sources/new-deal-instant/new-deal-instant.mjs @@ -6,19 +6,19 @@ export default { key: "pipedrive-new-deal-instant", name: "New Deal (Instant)", description: "Emit new event when a new deal is created.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", methods: { ...common.methods, getExtraData() { return { - event_action: "added", + event_action: "create", event_object: "deal", }; }, getSummary(body) { - return `New Deal successfully created: ${body.current.id}`; + return `New Deal successfully created: ${body.data.id}`; }, }, sampleEmit, diff --git a/components/pipedrive/sources/new-deal-instant/test-event.mjs b/components/pipedrive/sources/new-deal-instant/test-event.mjs index b6459df9c5370..d4927dc7a2c85 100644 --- a/components/pipedrive/sources/new-deal-instant/test-event.mjs +++ b/components/pipedrive/sources/new-deal-instant/test-event.mjs @@ -1,106 +1,52 @@ export default { - "v": 1, - "matches_filters": { - "current": [] - }, "meta": { - "action": "added", - "change_source": "api", - "company_id": 1234567890, - "host": "subdomain.pipedrive.com", - "id": 10, - "is_bulk_update": false, - "matches_filters": { - "current": [] - }, - "object": "deal", - "permitted_user_ids": [ - 1234567890 - ], - "pipedrive_service_name": false, - "timestamp": 1739826584, - "timestamp_micro": 1739826584443168, - "prepublish_timestamp": 1739826584525, - "trans_pending": false, - "user_id": 1234567890, - "v": 1, - "webhook_id": "1234567890" + "action": "create", + "entity": "deal", + "company_id": 123123, + "correlation_id": "123456789-1234-1234-1234-123456789012", + "entity_id": 123, + "id": "123456789-1234-1234-1234-123456789012", + "is_bulk_edit": false, + "timestamp": "2023-01-01T00:00:00.000Z", + "type": "general", + "user_id": 123123, + "version": "2.0", + "webhook_id": 123, + "webhook_owner_id": 123123, + "attempt": 1, + "host": "company.pipedrive.com" }, - "current": { - "email_messages_count": 0, - "cc_email": "subomain+deal11@pipedrivemail.com", - "channel": 8, - "products_count": 0, - "archive_time": null, - "acv_currency": null, - "next_activity_date": null, - "acv": null, - "next_activity_type": null, - "local_close_date": null, - "next_activity_duration": null, - "id": 11, - "person_id": null, - "creator_user_id": 1234567890, - "expected_close_date": null, - "owner_name": "Owner Name", - "arr_currency": null, - "participants_count": 0, - "stage_id": 1, - "probability": null, - "undone_activities_count": 0, - "active": true, - "local_lost_date": null, - "person_name": null, - "last_activity_date": null, - "close_time": null, - "org_hidden": false, - "next_activity_id": null, - "weighted_value_currency": "USD", - "local_won_date": null, - "stage_order_nr": 0, - "next_activity_subject": null, - "rotten_time": null, - "is_archived": false, - "user_id": 1234567890, - "visible_to": "3", - "org_id": null, - "notes_count": 0, - "next_activity_time": null, - "channel_id": "Pipedream", - "formatted_value": "$ 0", - "status": "open", - "formatted_weighted_value": "$ 0", - "mrr_currency": null, - "first_won_time": null, - "origin": "Marketplace", - "last_outgoing_mail_time": null, - "origin_id": "5d80274eae050b58", - "title": "Deal Title", - "last_activity_id": null, - "update_time": "2025-02-17 21:09:44", - "activities_count": 0, - "pipeline_id": 1, - "lost_time": null, - "currency": "USD", - "weighted_value": 0, - "org_name": null, - "value": 0, - "person_hidden": false, - "next_activity_note": null, - "arr": null, - "files_count": 0, - "last_incoming_mail_time": null, - "label": null, - "mrr": null, - "lost_reason": null, - "deleted": false, - "won_time": null, - "followers_count": 0, - "stage_change_time": null, - "add_time": "2025-02-17 21:09:44", - "done_activities_count": 0 + "data": { + "add_time":"2025-04-15T15:31:17Z", + "channel":null, + "channel_id":null, + "close_time":null, + "creator_user_id":123123, + "currency":"BRL", + "custom_fields":{}, + "expected_close_date":null, + "first_won_time":null, + "id":1, + "label_ids":[], + "lost_reason":null, + "lost_time":null, + "org_id":2, + "origin":"ManuallyCreated", + "origin_id":null, + "owner_id":123123, + "person_id":3, + "pipeline_id":1, + "probability":null, + "stage_change_time":null, + "stage_id":1, + "status":"open", + "title":"Title", + "update_time":null, + "value":2, + "visible_to":"3", + "won_time":null, + "is_archived":false, + "archive_time":null }, "previous": null, - "retry": 0, - "event": "added.deal" } \ No newline at end of file diff --git a/components/pipedrive/sources/new-person-instant/new-person-instant.mjs b/components/pipedrive/sources/new-person-instant/new-person-instant.mjs index 130ec7d0b00f5..e266beb0a92e2 100644 --- a/components/pipedrive/sources/new-person-instant/new-person-instant.mjs +++ b/components/pipedrive/sources/new-person-instant/new-person-instant.mjs @@ -6,19 +6,19 @@ export default { key: "pipedrive-new-person-instant", name: "New Person (Instant)", description: "Emit new event when a new person is created.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", methods: { ...common.methods, getExtraData() { return { - event_action: "added", + event_action: "create", event_object: "person", }; }, getSummary(body) { - return `New Person successfully created: ${body.current.id}`; + return `New Person successfully created: ${body.data.id}`; }, }, sampleEmit, diff --git a/components/pipedrive/sources/new-person-instant/test-event.mjs b/components/pipedrive/sources/new-person-instant/test-event.mjs index 8f56cc935301b..96bb78d223690 100644 --- a/components/pipedrive/sources/new-person-instant/test-event.mjs +++ b/components/pipedrive/sources/new-person-instant/test-event.mjs @@ -1,110 +1,36 @@ export default { - "v": 1, - "matches_filters": { - "current": [] - }, "meta": { - "action": "added", - "change_source": "api", - "company_id": 1234567890, - "host": "subdomain.pipedrive.com", - "id": 10, - "is_bulk_update": false, - "matches_filters": { - "current": [] - }, - "object": "person", - "permitted_user_ids": [ - 1234567890 - ], - "pipedrive_service_name": false, - "timestamp": 1739826941, - "timestamp_micro": 1739826941509060, - "prepublish_timestamp": 1739826941605, - "trans_pending": false, - "user_id": 1234567890, - "v": 1, - "webhook_id": "1234567890" + "action": "create", + "entity": "deal", + "company_id": 123123, + "correlation_id": "123456789-1234-1234-1234-123456789012", + "entity_id": 123, + "id": "123456789-1234-1234-1234-123456789012", + "is_bulk_edit": false, + "timestamp": "2023-01-01T00:00:00.000Z", + "type": "general", + "user_id": 123123, + "version": "2.0", + "webhook_id": 123, + "webhook_owner_id": 123123, + "attempt": 1, + "host": "company.pipedrive.com" }, - "current": { - "related_closed_deals_count": 0, - "notes": null, - "email_messages_count": 0, - "cc_email": "subdomain@pipedrivemail.com", - "owner_id": 1234567890, - "open_deals_count": 0, - "postal_address_subpremise": null, - "next_activity_date": null, - "participant_open_deals_count": 0, - "postal_address_locality": null, - "id": 10, - "job_title": null, - "postal_address": null, - "owner_name": "Owner Name", - "im": [ - { - "value": "", - "primary": true - } - ], - "related_won_deals_count": 0, - "label_ids": [], - "undone_activities_count": 0, - "last_activity_date": null, - "next_activity_id": null, - "postal_address_country": null, - "phone": [ - { - "value": "", - "primary": true - } - ], - "visible_to": "3", - "org_id": null, - "notes_count": 0, - "name": "Person Name", - "participant_closed_deals_count": 0, - "lost_deals_count": 0, - "next_activity_time": null, - "birthday": null, - "delete_time": null, - "postal_address_postal_code": null, - "last_outgoing_mail_time": null, - "active_flag": true, - "picture_id": null, - "last_activity_id": null, - "update_time": "2025-02-17 21:15:41", - "activities_count": 0, - "postal_address_route": null, - "org_name": null, - "first_name": "Person Name", - "email": [ - { - "value": "", - "primary": true - } - ], - "postal_address_street_number": null, - "won_deals_count": 0, - "files_count": 0, - "company_id": 1234567890, - "last_incoming_mail_time": null, - "first_char": "p", - "closed_deals_count": 0, - "last_name": "02", - "label": null, - "related_lost_deals_count": 0, - "related_open_deals_count": 0, - "postal_address_formatted_address": null, - "postal_address_sublocality": null, - "postal_address_admin_area_level_2": null, - "postal_address_admin_area_level_1": null, - "followers_count": 0, - "primary_email": null, - "add_time": "2025-02-17 21:15:41", - "done_activities_count": 0 + "data": { + "add_time":"2025-04-15T15:35:54Z", + "custom_fields":{}, + "emails":[], + "first_name":"First Name", + "id":1, + "label":null, + "label_ids":[], + "last_name":null, + "name":"Person Name", + "org_id":null, + "owner_id":123123, + "phones":[], + "update_time":"2025-04-15T15:35:54Z", + "visible_to":"3" }, "previous": null, - "retry": 0, - "event": "added.person" } \ No newline at end of file diff --git a/components/pipedrive/sources/updated-deal-instant/test-event.mjs b/components/pipedrive/sources/updated-deal-instant/test-event.mjs index 5ec55c7f65796..710f169854cb1 100644 --- a/components/pipedrive/sources/updated-deal-instant/test-event.mjs +++ b/components/pipedrive/sources/updated-deal-instant/test-event.mjs @@ -1,179 +1,54 @@ export default { - "v": 1, - "matches_filters": { - "current": [] - }, "meta": { - "action": "updated", - "change_source": "api", - "company_id": 1234567890, - "host": "subdomain.pipedrive.com", - "id": 9, - "is_bulk_update": false, - "matches_filters": { - "current": [] - }, - "object": "deal", - "permitted_user_ids": [ - 1234567890 - ], - "pipedrive_service_name": false, - "timestamp": 1739827361, - "timestamp_micro": 1739827361322662, - "prepublish_timestamp": 1739827361337, - "trans_pending": false, - "user_id": 1234567890, - "v": 1, - "webhook_id": "1234567890" + "action": "create", + "entity": "deal", + "company_id": 123123, + "correlation_id": "123456789-1234-1234-1234-123456789012", + "entity_id": 123, + "id": "123456789-1234-1234-1234-123456789012", + "is_bulk_edit": false, + "timestamp": "2023-01-01T00:00:00.000Z", + "type": "general", + "user_id": 123123, + "version": "2.0", + "webhook_id": 123, + "webhook_owner_id": 123123, + "attempt": 1, + "host": "company.pipedrive.com" }, - "current": { - "email_messages_count": 0, - "cc_email": "subdomain+deal9@pipedrivemail.com", - "channel": 8, - "products_count": 0, - "archive_time": null, - "acv_currency": null, - "next_activity_date": null, - "acv": null, - "next_activity_type": null, - "local_close_date": null, - "next_activity_duration": null, - "id": 9, - "person_id": null, - "creator_user_id": 1234567890, - "expected_close_date": null, - "owner_name": "Owner Name", - "arr_currency": null, - "participants_count": 0, - "stage_id": 1, - "probability": null, - "undone_activities_count": 0, - "active": true, - "local_lost_date": null, - "person_name": null, - "last_activity_date": null, - "close_time": null, - "org_hidden": false, - "next_activity_id": null, - "weighted_value_currency": "USD", - "local_won_date": null, - "stage_order_nr": 0, - "next_activity_subject": null, - "rotten_time": null, - "is_archived": false, - "user_id": 1234567890, - "visible_to": "3", - "org_id": null, - "notes_count": 0, - "next_activity_time": null, - "channel_id": "Channel", - "formatted_value": "$0", - "status": "open", - "formatted_weighted_value": "$0", - "mrr_currency": null, - "first_won_time": null, - "origin": "Marketplace", - "last_outgoing_mail_time": null, - "origin_id": "5d80274eae050b58", - "title": "Updated Deal Title", - "last_activity_id": null, - "update_time": "2025-02-17 21:22:41", - "activities_count": 0, - "pipeline_id": 1, - "lost_time": null, - "currency": "USD", - "weighted_value": 0, - "org_name": null, - "value": 0, - "person_hidden": false, - "next_activity_note": null, - "arr": null, - "files_count": 0, - "last_incoming_mail_time": null, - "label": null, - "mrr": null, - "lost_reason": null, - "deleted": false, - "won_time": null, - "followers_count": 1, - "stage_change_time": null, - "add_time": "2025-02-17 18:06:03", - "done_activities_count": 0 + "data": { + "add_time":"2025-04-15T14:57:34Z", + "channel":null, + "channel_id":null, + "close_time":null, + "creator_user_id":123123, + "currency":"BRL", + "custom_fields":{}, + "expected_close_date":null, + "first_won_time":null, + "id":1, + "label_ids":[], + "lost_reason":null, + "lost_time":null, + "org_id":1, + "origin":"ManuallyCreated", + "origin_id":null, + "owner_id":123123, + "person_id":1, + "pipeline_id":1, + "probability":null, + "stage_change_time":"2025-04-15T15:39:01Z", + "stage_id":2, + "status":"open", + "title":"Deal 01", + "update_time":"2025-04-15T15:39:01Z", + "value":1, + "visible_to":"3", + "won_time":null, + "is_archived":false, + "archive_time":null }, "previous": { - "email_messages_count": 0, - "cc_email": "subdomain+deal9@pipedrivemail.com", - "channel": 8, - "products_count": 0, - "archive_time": null, - "acv_currency": null, - "next_activity_date": null, - "acv": null, - "next_activity_type": null, - "local_close_date": null, - "next_activity_duration": null, - "id": 9, - "person_id": null, - "creator_user_id": 1234567890, - "expected_close_date": null, - "owner_name": "Owner Name", - "arr_currency": null, - "participants_count": 0, - "stage_id": 1, - "probability": null, - "undone_activities_count": 0, - "active": true, - "local_lost_date": null, - "person_name": null, - "last_activity_date": null, - "close_time": null, - "org_hidden": false, - "next_activity_id": null, - "weighted_value_currency": "USD", - "local_won_date": null, - "stage_order_nr": 0, - "next_activity_subject": null, - "rotten_time": null, - "is_archived": false, - "user_id": 1234567890, - "visible_to": "3", - "org_id": null, - "notes_count": 0, - "next_activity_time": null, - "channel_id": "Channel", - "formatted_value": "$0", - "status": "open", - "formatted_weighted_value": "$0", - "mrr_currency": null, - "first_won_time": null, - "origin": "Marketplace", - "last_outgoing_mail_time": null, - "origin_id": "5d80274eae050b58", - "title": "Updated Deal Title", - "last_activity_id": null, - "update_time": "2025-02-17 19:46:52", - "activities_count": 0, - "pipeline_id": 1, - "lost_time": null, - "currency": "USD", - "weighted_value": 0, - "org_name": null, - "value": 0, - "person_hidden": false, - "next_activity_note": null, - "arr": null, - "files_count": 0, - "last_incoming_mail_time": null, - "label": null, - "mrr": null, - "lost_reason": null, - "deleted": false, - "won_time": null, - "followers_count": 1, - "stage_change_time": null, - "add_time": "2025-02-17 18:06:03", - "done_activities_count": 0 + "stage_id": 1 }, - "retry": 0, - "event": "updated.deal" } \ No newline at end of file diff --git a/components/pipedrive/sources/updated-deal-instant/updated-deal-instant.mjs b/components/pipedrive/sources/updated-deal-instant/updated-deal-instant.mjs index 18f520670acb8..f0a2b0ec993c6 100644 --- a/components/pipedrive/sources/updated-deal-instant/updated-deal-instant.mjs +++ b/components/pipedrive/sources/updated-deal-instant/updated-deal-instant.mjs @@ -6,19 +6,19 @@ export default { key: "pipedrive-updated-deal-instant", name: "New Deal Update (Instant)", description: "Emit new event when a deal is updated.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", methods: { ...common.methods, getExtraData() { return { - event_action: "updated", + event_action: "change", event_object: "deal", }; }, getSummary(body) { - return `Deal successfully updated: ${body.current.id}`; + return `Deal successfully updated: ${body.data.id}`; }, }, sampleEmit, diff --git a/components/pipedrive/sources/updated-person-instant/test-event.mjs b/components/pipedrive/sources/updated-person-instant/test-event.mjs index 98912c6596d7e..6ce8b1fb94a4e 100644 --- a/components/pipedrive/sources/updated-person-instant/test-event.mjs +++ b/components/pipedrive/sources/updated-person-instant/test-event.mjs @@ -1,189 +1,38 @@ export default { - "v": 1, - "matches_filters": { - "current": [] - }, "meta": { - "action": "updated", - "change_source": "app", - "company_id": 1234567890, - "host": "subdomain.pipedrive.com", - "id": 11, - "is_bulk_update": false, - "matches_filters": { - "current": [] - }, - "object": "person", - "permitted_user_ids": [ - 1234567890 - ], - "pipedrive_service_name": false, - "timestamp": 1739827618, - "timestamp_micro": 1739827618595189, - "prepublish_timestamp": 1739827618608, - "trans_pending": false, - "user_id": 1234567890, - "v": 1, - "webhook_id": "1234567890" + "action": "create", + "entity": "deal", + "company_id": 123123, + "correlation_id": "123456789-1234-1234-1234-123456789012", + "entity_id": 123, + "id": "123456789-1234-1234-1234-123456789012", + "is_bulk_edit": false, + "timestamp": "2023-01-01T00:00:00.000Z", + "type": "general", + "user_id": 123123, + "version": "2.0", + "webhook_id": 123, + "webhook_owner_id": 123123, + "attempt": 1, + "host": "company.pipedrive.com" }, - "current": { - "related_closed_deals_count": 0, - "notes": null, - "email_messages_count": 0, - "cc_email": "subdomain@pipedrivemail.com", - "owner_id": 1234567890, - "open_deals_count": 0, - "postal_address_subpremise": null, - "next_activity_date": null, - "participant_open_deals_count": 0, - "postal_address_locality": null, - "id": 11, - "job_title": null, - "postal_address": null, - "owner_name": "Owner Name", - "im": [ - { - "value": "", - "primary": true - } - ], - "related_won_deals_count": 0, - "label_ids": [ - 14 - ], - "undone_activities_count": 0, - "picture_128_url": null, - "last_activity_date": null, - "next_activity_id": null, - "postal_address_country": null, - "phone": [ - { - "value": "", - "primary": true - } - ], - "visible_to": "3", - "org_id": null, - "notes_count": 0, - "name": "Person Name", - "participant_closed_deals_count": 0, - "lost_deals_count": 0, - "next_activity_time": null, - "birthday": null, - "delete_time": null, - "postal_address_postal_code": null, - "last_outgoing_mail_time": null, - "active_flag": true, - "picture_id": null, - "last_activity_id": null, - "update_time": "2025-02-17 21:26:58", - "activities_count": 0, - "postal_address_route": null, - "org_name": null, - "first_name": "Person Name", - "email": [ - { - "value": "", - "primary": true - } - ], - "postal_address_street_number": null, - "won_deals_count": 0, - "files_count": 0, - "company_id": 1234567890, - "last_incoming_mail_time": null, - "first_char": "p", - "closed_deals_count": 0, - "last_name": "Surname", - "label": 14, - "related_lost_deals_count": 0, - "related_open_deals_count": 0, - "postal_address_formatted_address": null, - "postal_address_sublocality": null, - "postal_address_admin_area_level_2": null, - "postal_address_admin_area_level_1": null, - "followers_count": 1, - "add_time": "2025-02-17 21:15:41", - "done_activities_count": 0 + "data": { + "add_time":"2025-04-15T15:35:54Z", + "custom_fields":{}, + "emails":[], + "first_name":"Person Name", + "id":1, + "label":null, + "label_ids":[], + "last_name":null, + "name":"Person Name", + "org_id":1, + "owner_id":23865811, + "phones":[], + "update_time":"2025-04-15T15:41:43Z", + "visible_to":"3" }, "previous": { - "related_closed_deals_count": 0, - "notes": null, - "email_messages_count": 0, - "cc_email": "subdomain@pipedrivemail.com", - "owner_id": 1234567890, - "open_deals_count": 0, - "postal_address_subpremise": null, - "next_activity_date": null, - "participant_open_deals_count": 0, - "postal_address_locality": null, - "id": 11, - "job_title": null, - "postal_address": null, - "owner_name": "Owner Name", - "im": [ - { - "value": "", - "primary": true - } - ], - "related_won_deals_count": 0, - "label_ids": [], - "undone_activities_count": 0, - "picture_128_url": null, - "last_activity_date": null, - "next_activity_id": null, - "postal_address_country": null, - "phone": [ - { - "value": "", - "primary": true - } - ], - "visible_to": "3", - "org_id": null, - "notes_count": 0, - "name": "Person Name", - "participant_closed_deals_count": 0, - "lost_deals_count": 0, - "next_activity_time": null, - "birthday": null, - "delete_time": null, - "postal_address_postal_code": null, - "last_outgoing_mail_time": null, - "active_flag": true, - "picture_id": null, - "last_activity_id": null, - "update_time": "2025-02-17 21:15:41", - "activities_count": 0, - "postal_address_route": null, - "org_name": null, - "first_name": "Person Name", - "email": [ - { - "value": "", - "primary": true - } - ], - "postal_address_street_number": null, - "won_deals_count": 0, - "files_count": 0, - "company_id": 1234567890, - "last_incoming_mail_time": null, - "first_char": "p", - "closed_deals_count": 0, - "last_name": "Surname", - "label": null, - "related_lost_deals_count": 0, - "related_open_deals_count": 0, - "postal_address_formatted_address": null, - "postal_address_sublocality": null, - "postal_address_admin_area_level_2": null, - "postal_address_admin_area_level_1": null, - "followers_count": 1, - "add_time": "2025-02-17 21:15:41", - "done_activities_count": 0 + "org_id:": null }, - "retry": 0, - "event": "updated.person" } \ No newline at end of file diff --git a/components/pipedrive/sources/updated-person-instant/updated-person-instant.mjs b/components/pipedrive/sources/updated-person-instant/updated-person-instant.mjs index ae7aadb8b5f2d..3fca5a035d170 100644 --- a/components/pipedrive/sources/updated-person-instant/updated-person-instant.mjs +++ b/components/pipedrive/sources/updated-person-instant/updated-person-instant.mjs @@ -6,19 +6,19 @@ export default { key: "pipedrive-updated-person-instant", name: "New Person Update (Instant)", description: "Emit new event when a person is updated.", - version: "0.0.2", + version: "0.0.3", type: "source", dedupe: "unique", methods: { ...common.methods, getExtraData() { return { - event_action: "updated", + event_action: "change", event_object: "person", }; }, getSummary(body) { - return `Person successfully updated: ${body.current.id}`; + return `Person successfully updated: ${body.data.id}`; }, }, sampleEmit, From 611109578647e44110cc80ae0d0120f95a66d21b Mon Sep 17 00:00:00 2001 From: Luan Cazarine Date: Tue, 15 Apr 2025 12:51:23 -0300 Subject: [PATCH 2/4] pnpm update --- pnpm-lock.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e235e590b15b2..2c92a59f8f47d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2715,8 +2715,7 @@ importers: specifier: ^1.5.1 version: 1.6.6 - components/cogmento: - specifiers: {} + components/cogmento: {} components/cohere_platform: dependencies: @@ -8079,8 +8078,7 @@ importers: components/microsoft_viva_goals: {} - components/microsoft_word: - specifiers: {} + components/microsoft_word: {} components/microsofttodo: dependencies: @@ -14848,8 +14846,7 @@ importers: specifier: ^1.5.1 version: 1.6.6 - components/zoho_fms: - specifiers: {} + components/zoho_fms: {} components/zoho_forms: dependencies: @@ -34545,6 +34542,8 @@ snapshots: '@putout/operator-filesystem': 5.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3)) '@putout/operator-json': 2.2.0 putout: 36.13.1(eslint@8.57.1)(typescript@5.6.3) + transitivePeerDependencies: + - supports-color '@putout/operator-regexp@1.0.0(putout@36.13.1(eslint@8.57.1)(typescript@5.6.3))': dependencies: From 3074664176b73ce1e5353c8a0c943707e401a283 Mon Sep 17 00:00:00 2001 From: Luan Cazarine Date: Mon, 21 Apr 2025 19:17:52 -0300 Subject: [PATCH 3/4] change source name --- .../sources/updated-person-instant/updated-person-instant.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/pipedrive/sources/updated-person-instant/updated-person-instant.mjs b/components/pipedrive/sources/updated-person-instant/updated-person-instant.mjs index 3fca5a035d170..14346822f2fc5 100644 --- a/components/pipedrive/sources/updated-person-instant/updated-person-instant.mjs +++ b/components/pipedrive/sources/updated-person-instant/updated-person-instant.mjs @@ -4,7 +4,7 @@ import sampleEmit from "./test-event.mjs"; export default { ...common, key: "pipedrive-updated-person-instant", - name: "New Person Update (Instant)", + name: "Updated Person (Instant)", description: "Emit new event when a person is updated.", version: "0.0.3", type: "source", From 6e841c137908f4c3edc64c1d7aa3526f57c64e66 Mon Sep 17 00:00:00 2001 From: Luan Cazarine Date: Mon, 21 Apr 2025 19:25:26 -0300 Subject: [PATCH 4/4] pnpm update --- pnpm-lock.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 62546fca4143e..48ae732b1ee7d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6300,8 +6300,7 @@ importers: components/if_else: {} - components/ifthenpay: - specifiers: {} + components/ifthenpay: {} components/ifttt: dependencies: