Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/pipedrive/actions/add-activity/add-activity.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "pipedrive-add-activity",
name: "Add Activity",
description: "Adds a new activity. Includes `more_activities_scheduled_in_context` property in response's `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). See the Pipedrive API docs for Activities [here](https://developers.pipedrive.com/docs/api/v1/#!/Activities). For info on [adding an activity in Pipedrive](https://developers.pipedrive.com/docs/api/v1/Activities#addActivity)",
version: "0.1.12",
version: "0.1.13",
type: "action",
props: {
pipedriveApp,
Expand Down
2 changes: 1 addition & 1 deletion components/pipedrive/actions/add-deal/add-deal.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "pipedrive-add-deal",
name: "Add Deal",
description: "Adds a new deal. See the Pipedrive API docs for Deals [here](https://developers.pipedrive.com/docs/api/v1/Deals#addDeal)",
version: "0.1.12",
version: "0.1.13",
type: "action",
props: {
pipedriveApp,
Expand Down
2 changes: 1 addition & 1 deletion components/pipedrive/actions/add-lead/add-lead.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "pipedrive-add-lead",
name: "Add Lead",
description: "Create a new lead in Pipedrive. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Leads#addLead)",
version: "0.0.6",
version: "0.0.7",
type: "action",
props: {
pipedrive,
Expand Down
2 changes: 1 addition & 1 deletion components/pipedrive/actions/add-note/add-note.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "pipedrive-add-note",
name: "Add Note",
description: "Adds a new note. For info on [adding an note in Pipedrive](https://developers.pipedrive.com/docs/api/v1/Notes#addNote)",
version: "0.0.10",
version: "0.0.11",
type: "action",
props: {
pipedriveApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "pipedrive-add-organization",
name: "Add Organization",
description: "Adds a new organization. See the Pipedrive API docs for Organizations [here](https://developers.pipedrive.com/docs/api/v1/Organizations#addOrganization)",
version: "0.1.12",
version: "0.1.13",
type: "action",
props: {
pipedriveApp,
Expand Down
2 changes: 1 addition & 1 deletion components/pipedrive/actions/add-person/add-person.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "pipedrive-add-person",
name: "Add Person",
description: "Adds a new person. See the Pipedrive API docs for People [here](https://developers.pipedrive.com/docs/api/v1/Persons#addPerson)",
version: "0.1.12",
version: "0.1.13",
type: "action",
props: {
pipedriveApp,
Expand Down
25 changes: 25 additions & 0 deletions components/pipedrive/actions/get-lead-by-id/get-lead-by-id.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import pipedriveApp from "../../pipedrive.app.mjs";

export default {
key: "pipedrive-get-lead-by-id",
name: "Get Lead by ID",
description: "Get a lead by its ID. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Leads#getLead)",
version: "0.0.1",
type: "action",
props: {
pipedriveApp,
leadId: {
propDefinition: [
pipedriveApp,
"leadId",
],
description: "The ID of the lead to get",
optional: false,
},
},
async run({ $ }) {
const { data } = await this.pipedriveApp.getLead(this.leadId);
$.export("$summary", `Successfully retrieved lead with ID: ${this.leadId}`);
return data;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "pipedrive-get-person-details",
name: "Get person details",
description: "Get details of a person by their ID. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Persons#getPerson)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
pipedriveApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "pipedrive-remove-duplicate-notes",
name: "Remove Duplicate Notes",
description: "Remove duplicate notes from an object in Pipedrive. See the documentation for [getting notes](https://developers.pipedrive.com/docs/api/v1/Notes#getNotes) and [deleting notes](https://developers.pipedrive.com/docs/api/v1/Notes#deleteNote)",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
pipedriveApp,
Expand Down
68 changes: 68 additions & 0 deletions components/pipedrive/actions/search-leads/search-leads.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import pipedriveApp from "../../pipedrive.app.mjs";
import constants from "../../common/constants.mjs";

export default {
key: "pipedrive-search-leads",
name: "Search Leads",
description: "Search for leads by name or email. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Leads#searchLeads)",
version: "0.0.1",
type: "action",
props: {
pipedriveApp,
term: {
type: "string",
label: "Search Term",
description: "The search term to look for. Minimum 2 characters (or 1 if using exact_match).",
},
exactMatch: {
type: "boolean",
label: "Exact Match",
description: "When enabled, only full exact matches against the given term are returned. It is not case sensitive.",
optional: true,
},
fields: {
type: "string[]",
label: "Search Fields",
description: "An array containing fields to perform the search from. Defaults to all of them.",
optional: true,
options: constants.LEAD_FIELD_OPTIONS,
},
personId: {
propDefinition: [
pipedriveApp,
"personId",
],
description: "Will filter leads by the provided Person ID",
},
organizationId: {
propDefinition: [
pipedriveApp,
"organizationId",
],
description: "Will filter leads by the provided Organization ID",
},
includeFields: {
type: "string",
label: "Include fields",
description: "Supports including optional fields in the results which are not provided by default.",
optional: true,
options: [
"lead.was_seen",
],
},
},
async run({ $ }) {
const { data: { items = [] } } = await this.pipedriveApp.searchLeads({
term: this.term,
exact_match: this.exactMatch,
fields: this.fields,
person_id: this.personId,
organization_id: this.organizationId,
include_fields: this.includeFields,
});
$.export("$summary", `Successfully found ${items.length} lead${items.length === 1
? ""
: "s"}`);
return items;
},
};
2 changes: 1 addition & 1 deletion components/pipedrive/actions/search-notes/search-notes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "pipedrive-search-notes",
name: "Search Notes",
description: "Search for notes in Pipedrive. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Notes#getNotes)",
version: "0.0.3",
version: "0.0.4",
type: "action",
props: {
pipedriveApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default {
key: "pipedrive-search-persons",
name: "Search persons",
description: "Searches all Persons by `name`, `email`, `phone`, `notes` and/or custom fields. This endpoint is a wrapper of `/v1/itemSearch` with a narrower OAuth scope. Found Persons can be filtered by Organization ID. See the Pipedrive API docs [here](https://developers.pipedrive.com/docs/api/v1/Persons#searchPersons)",
version: "0.1.12",
version: "0.1.13",
type: "action",
props: {
pipedriveApp,
Expand Down
2 changes: 1 addition & 1 deletion components/pipedrive/actions/update-deal/update-deal.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "pipedrive-update-deal",
name: "Update Deal",
description: "Updates the properties of a deal. See the Pipedrive API docs for Deals [here](https://developers.pipedrive.com/docs/api/v1/Deals#updateDeal)",
version: "0.1.14",
version: "0.1.15",
type: "action",
props: {
pipedriveApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "pipedrive-update-person",
name: "Update Person",
description: "Updates an existing person in Pipedrive. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Persons#updatePerson)",
version: "0.0.4",
version: "0.0.5",
type: "action",
props: {
pipedriveApp,
Expand Down
7 changes: 7 additions & 0 deletions components/pipedrive/common/constants.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,18 @@ const FIELD = {
UPDATE_TIME: "update_time",
};

const LEAD_FIELD_OPTIONS = [
"custom_fields",
"notes",
"title",
];

export default {
STATUS_OPTIONS,
FIELD_OPTIONS,
VISIBLE_TO_OPTIONS,
INCLUDE_FIELDS_OPTIONS,
DEFAULT_PAGE_LIMIT,
FIELD,
LEAD_FIELD_OPTIONS,
};
2 changes: 1 addition & 1 deletion components/pipedrive/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/pipedrive",
"version": "0.8.0",
"version": "0.9.0",
"description": "Pipedream Pipedrive Components",
"main": "pipedrive.app.mjs",
"keywords": [
Expand Down
10 changes: 10 additions & 0 deletions components/pipedrive/pipedrive.app.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,16 @@ export default {
id: personId,
});
},
getLead(leadId) {
const leadApi = this.api("LeadsApi");
return leadApi.getLead({
id: leadId,
});
},
searchLeads(opts = {}) {
const leadApi = this.api("LeadsApi", "v2");
return leadApi.searchLeads(opts);
},
async *paginate({
fn, params, max,
}) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "pipedrive-new-deal-instant",
name: "New Deal (Instant)",
description: "Emit new event when a new deal is created.",
version: "0.0.8",
version: "0.0.9",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
key: "pipedrive-new-person-instant",
name: "New Person (Instant)",
description: "Emit new event when a new person is created.",
version: "0.0.8",
version: "0.0.9",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
export default {
...common,
key: "pipedrive-updated-deal-instant",
name: "Deal Updated (Instant)",

Check warning on line 8 in components/pipedrive/sources/updated-deal-instant/updated-deal-instant.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Source names should start with "New". See https://pipedream.com/docs/components/guidelines/#source-name
description: "Emit new event when a deal is updated.",
version: "0.1.1",
version: "0.1.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
export default {
...common,
key: "pipedrive-updated-lead-instant",
name: "Lead Updated (Instant)",

Check warning on line 8 in components/pipedrive/sources/updated-lead-instant/updated-lead-instant.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Source names should start with "New". See https://pipedream.com/docs/components/guidelines/#source-name
description: "Emit new event when a lead is updated.",
version: "0.1.1",
version: "0.1.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
export default {
...common,
key: "pipedrive-updated-person-instant",
name: "Person Updated (Instant)",

Check warning on line 8 in components/pipedrive/sources/updated-person-instant/updated-person-instant.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Source names should start with "New". See https://pipedream.com/docs/components/guidelines/#source-name
description: "Emit new event when a person is updated.",
version: "0.1.1",
version: "0.1.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading