diff --git a/components/lusha/actions/company-enrich/company-enrich.mjs b/components/lusha/actions/company-enrich/company-enrich.mjs index 9f3c4850708d1..fccd291216710 100644 --- a/components/lusha/actions/company-enrich/company-enrich.mjs +++ b/components/lusha/actions/company-enrich/company-enrich.mjs @@ -4,7 +4,7 @@ export default { key: "lusha-company-enrich", name: "Enrich Companies", description: "Enriches company information based on provided company IDs. [See the documentation](https://docs.lusha.com/apis/openapi/company-search-and-enrich/enrichprospectingcompanies)", - version: "0.0.5", + version: "0.0.6", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/lusha/actions/company-search/company-search.mjs b/components/lusha/actions/company-search/company-search.mjs index e0c24d25a4f0b..61578115e3ada 100644 --- a/components/lusha/actions/company-search/company-search.mjs +++ b/components/lusha/actions/company-search/company-search.mjs @@ -5,7 +5,7 @@ export default { key: "lusha-company-search", name: "Search Companies", description: "Search for companies using various filters. [See the documentation](https://docs.lusha.com/apis/openapi/company-search-and-enrich/searchprospectingcompanies)", - version: "0.0.4", + version: "0.0.5", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/lusha/actions/contact-enrich/contact-enrich.mjs b/components/lusha/actions/contact-enrich/contact-enrich.mjs index 7c2828559e934..b053c13a4ef94 100644 --- a/components/lusha/actions/contact-enrich/contact-enrich.mjs +++ b/components/lusha/actions/contact-enrich/contact-enrich.mjs @@ -4,7 +4,7 @@ export default { key: "lusha-contact-enrich", name: "Enrich Contacts", description: "Enriches contacts based on provided IDs. [See the documentation](https://docs.lusha.com/apis/openapi/contact-search-and-enrich/enrichprospectingcontacts)", - version: "0.0.4", + version: "0.0.5", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/lusha/actions/contact-search/contact-search.mjs b/components/lusha/actions/contact-search/contact-search.mjs index 0ab223a6dc16d..2c2e7ede306ae 100644 --- a/components/lusha/actions/contact-search/contact-search.mjs +++ b/components/lusha/actions/contact-search/contact-search.mjs @@ -5,7 +5,7 @@ export default { key: "lusha-contact-search", name: "Search Contacts", description: "Search for contacts using various filters. [See the documentation](https://docs.lusha.com/apis/openapi/contact-search-and-enrich/searchprospectingcontacts)", - version: "0.0.4", + version: "0.0.5", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/lusha/actions/get-company-recommendations/get-company-recommendations.mjs b/components/lusha/actions/get-company-recommendations/get-company-recommendations.mjs new file mode 100644 index 0000000000000..8c7a3ff3151d6 --- /dev/null +++ b/components/lusha/actions/get-company-recommendations/get-company-recommendations.mjs @@ -0,0 +1,61 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { parseObject } from "../../common/utils.mjs"; +import lusha from "../../lusha.app.mjs"; + +export default { + key: "lusha-get-company-recommendations", + name: "Get Company Recommendations", + description: "Get company recommendations based on other companies. Use requestId to get more results from a previous search. [See the documentation](https://docs.lusha.com/apis/openapi/company-recommendations/getcompanyrecommendations)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + lusha, + requestId: { + type: "string", + label: "Request ID", + description: "Request ID for getting more results", + optional: true, + }, + companies: { + type: "string[]", + label: "Companies", + description: "List of company objects to retrieve recommendations for. Example: [{ \"companyId\": \"123321\" }]. [See the documentation](https://docs.lusha.com/apis/openapi/company-recommendations/getcompanyrecommendations) for more information.", + }, + exclude: { + type: "string[]", + label: "Exclude", + description: "List of company objects to exclude from the recommendations. Example: [{ \"companyId\": \"123321\" }]. [See the documentation](https://docs.lusha.com/apis/openapi/company-recommendations/getcompanyrecommendations) for more information.", + }, + limit: { + type: "integer", + label: "Limit", + description: "The maximum number of results to return.", + min: 5, + max: 25, + default: 25, + }, + }, + async run({ $ }) { + try { + const response = await this.lusha.getCompanyRecommendations({ + $, + params: { + companies: parseObject(this.companies), + exclude: parseObject(this.exclude), + limit: this.limit, + requestId: this.requestId, + }, + }); + $.export("$summary", `Successfully retrieved ${response.count} company recommendations`); + + return response; + } catch ({ response }) { + throw new ConfigurationError(response?.data?.message); + } + }, +}; diff --git a/components/lusha/actions/get-company-signals/get-company-signals.mjs b/components/lusha/actions/get-company-signals/get-company-signals.mjs new file mode 100644 index 0000000000000..d76d1f8909614 --- /dev/null +++ b/components/lusha/actions/get-company-signals/get-company-signals.mjs @@ -0,0 +1,61 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { parseObject } from "../../common/utils.mjs"; +import lusha from "../../lusha.app.mjs"; + +export default { + key: "lusha-get-company-signals", + name: "Get Company Signals By IDs", + description: "Retrieve signals data for a list of company IDs. This endpoint allows you to get recent activities and signals for up to 100 companies per request. [See the documentation](https://docs.lusha.com/apis/openapi/signals/getcompanysignalsbyid)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + lusha, + info: { + type: "alert", + alertType: "info", + content: "* Returns signals from the last 6 months by default\ + \n* Use `startDate` to customize the timeframe", + }, + companyIds: { + propDefinition: [ + lusha, + "companyIds", + ], + description: "List of company IDs to retrieve signals for", + }, + signals: { + propDefinition: [ + lusha, + "companySignals", + ], + }, + startDate: { + propDefinition: [ + lusha, + "startDate", + ], + }, + }, + async run({ $ }) { + try { + const response = await this.lusha.getCompanySignalsById({ + $, + params: { + companyIds: parseObject(this.companyIds), + signals: this.signals, + startDate: this.startDate, + }, + }); + $.export("$summary", `Successfully retrieved ${Object.keys(response.companies).length} company signals`); + + return response; + } catch ({ response }) { + throw new ConfigurationError(response?.data?.message); + } + }, +}; diff --git a/components/lusha/actions/get-contact-recommendations/get-contact-recommendations.mjs b/components/lusha/actions/get-contact-recommendations/get-contact-recommendations.mjs new file mode 100644 index 0000000000000..d5e49cd5428e0 --- /dev/null +++ b/components/lusha/actions/get-contact-recommendations/get-contact-recommendations.mjs @@ -0,0 +1,61 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { parseObject } from "../../common/utils.mjs"; +import lusha from "../../lusha.app.mjs"; + +export default { + key: "lusha-get-contact-recommendations", + name: "Get Contact Recommendations", + description: "Fetch recommended contacts by supplying the contact's IDs, enabling Lusha to return similar profiles aligned by job title, seniority, and company context. Use requestId to get more results from a previous search. [See the documentation](https://docs.lusha.com/apis/openapi/contact-recommendations/getcontactrecommendations)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + lusha, + requestId: { + type: "string", + label: "Request ID", + description: "Request ID for getting more results", + optional: true, + }, + contacts: { + type: "string[]", + label: "Contacts", + description: "List of contact objects to retrieve recommendations for. Example: [{ \"personId\": \"123321\", \"companyId\": \"456789\" }]. [See the documentation](https://docs.lusha.com/apis/openapi/contact-recommendations/getcontactrecommendations) for more information.", + }, + exclude: { + type: "string[]", + label: "Exclude", + description: "List of contact objects to exclude from the recommendations. Example: [{ \"personId\": \"123321\", \"companyId\": \"456789\" }]. [See the documentation](https://docs.lusha.com/apis/openapi/contact-recommendations/getcontactrecommendations) for more information.", + }, + limit: { + type: "integer", + label: "Limit", + description: "The maximum number of results to return.", + min: 5, + max: 25, + default: 25, + }, + }, + async run({ $ }) { + try { + const response = await this.lusha.getContactRecommendations({ + $, + params: { + contacts: parseObject(this.contacts), + exclude: parseObject(this.exclude), + limit: this.limit, + requestId: this.requestId, + }, + }); + $.export("$summary", `Successfully retrieved ${response.count} contact recommendations`); + + return response; + } catch ({ response }) { + throw new ConfigurationError(response?.data?.message); + } + }, +}; diff --git a/components/lusha/actions/get-contact-signals/get-contact-signals.mjs b/components/lusha/actions/get-contact-signals/get-contact-signals.mjs new file mode 100644 index 0000000000000..27ad6e559b180 --- /dev/null +++ b/components/lusha/actions/get-contact-signals/get-contact-signals.mjs @@ -0,0 +1,63 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { parseObject } from "../../common/utils.mjs"; +import lusha from "../../lusha.app.mjs"; + +export default { + key: "lusha-get-contact-signals", + name: "Get Contact Signals By IDs", + description: "Retrieve signals data for a list of contact IDs. This endpoint allows you to get recent activities and signals for up to 100 contacts per request. [See the documentation](https://docs.lusha.com/apis/openapi/signals/getcontactsignalsbyid)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + lusha, + info: { + type: "alert", + alertType: "info", + content: `* Returns signals from the last 6 months by default\ + \n* Use \`startDate\` to customize the timeframe\ + \n* Each signal type requested counts towards credit usage + `, + }, + contactIds: { + propDefinition: [ + lusha, + "contactIds", + ], + description: "List of contact IDs to retrieve signals for", + }, + signals: { + propDefinition: [ + lusha, + "signals", + ], + }, + startDate: { + propDefinition: [ + lusha, + "startDate", + ], + }, + }, + async run({ $ }) { + try { + const response = await this.lusha.getContactSignalsById({ + $, + params: { + contactIds: parseObject(this.contactIds), + signals: this.signals, + startDate: this.startDate, + }, + }); + $.export("$summary", `Successfully retrieved ${Object.keys(response.contacts).length} contact signals`); + + return response; + } catch ({ response }) { + throw new ConfigurationError(response?.data?.message); + } + }, +}; diff --git a/components/lusha/actions/get-signal-options/get-signal-options.mjs b/components/lusha/actions/get-signal-options/get-signal-options.mjs new file mode 100644 index 0000000000000..a9e7c77dce3ce --- /dev/null +++ b/components/lusha/actions/get-signal-options/get-signal-options.mjs @@ -0,0 +1,40 @@ +import { ConfigurationError } from "@pipedream/platform"; +import lusha from "../../lusha.app.mjs"; + +export default { + key: "lusha-get-signal-options", + name: "Get Signal Options", + description: "Retrieve available signal options for a specific entity type (contact or company). This endpoint returns the list of signal types you can filter by when enriching contacts or companies. [See the documentation](https://docs.lusha.com/apis/openapi/signal-filters/getsignaloptions)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + lusha, + objectType: { + type: "string", + label: "Object Type", + description: "The type of object to get signal options for.", + options: [ + "contact", + "company", + ], + }, + }, + async run({ $ }) { + try { + const response = await this.lusha.getSignalOptions({ + $, + objectType: this.objectType, + }); + $.export("$summary", `Successfully retrieved signal options for ${this.objectType}`); + + return response; + } catch ({ response }) { + throw new ConfigurationError(response?.data?.message); + } + }, +}; diff --git a/components/lusha/actions/search-and-enrich-companies/search-and-enrich-companies.mjs b/components/lusha/actions/search-and-enrich-companies/search-and-enrich-companies.mjs index 8eb8e440755c8..a3f1a9e37679f 100644 --- a/components/lusha/actions/search-and-enrich-companies/search-and-enrich-companies.mjs +++ b/components/lusha/actions/search-and-enrich-companies/search-and-enrich-companies.mjs @@ -1,11 +1,11 @@ -import lusha from "../../lusha.app.mjs"; import { parseObject } from "../../common/utils.mjs"; +import lusha from "../../lusha.app.mjs"; export default { key: "lusha-search-and-enrich-companies", name: "Search and Enrich Companies", description: "Search for companies and enrich them. [See the documentation](https://docs.lusha.com/apis/openapi/company-search-and-enrich)", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/lusha/actions/search-and-enrich-contacts/search-and-enrich-contacts.mjs b/components/lusha/actions/search-and-enrich-contacts/search-and-enrich-contacts.mjs index bea0c4c17ee82..9b2253eeef32f 100644 --- a/components/lusha/actions/search-and-enrich-contacts/search-and-enrich-contacts.mjs +++ b/components/lusha/actions/search-and-enrich-contacts/search-and-enrich-contacts.mjs @@ -1,11 +1,11 @@ -import lusha from "../../lusha.app.mjs"; import { parseObject } from "../../common/utils.mjs"; +import lusha from "../../lusha.app.mjs"; export default { key: "lusha-search-and-enrich-contacts", name: "Search and Enrich Contacts", description: "Search for contacts and enrich them. [See the documentation](https://docs.lusha.com/apis/openapi/contact-search-and-enrich)", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/lusha/actions/search-company-signals/search-company-signals.mjs b/components/lusha/actions/search-company-signals/search-company-signals.mjs new file mode 100644 index 0000000000000..6def1a1749974 --- /dev/null +++ b/components/lusha/actions/search-company-signals/search-company-signals.mjs @@ -0,0 +1,69 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { parseObject } from "../../common/utils.mjs"; +import lusha from "../../lusha.app.mjs"; + +export default { + key: "lusha-search-company-signals", + name: "Search Company Signals", + description: "Search for company signals using identifiers like domain name or company name. This endpoint combines search and signal enrichment in a single request. [See the documentation](https://docs.lusha.com/apis/openapi/signals/searchcompanysignals)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + lusha, + info: { + type: "alert", + alertType: "info", + content: `Each company must have at least one identifier:\ + \n* Company ID\ + \n* Domain Name\ + \n* Company Domain + `, + }, + info2: { + type: "alert", + alertType: "info", + content: `* Use \`startDate\` to customize the timeframe\ + \n* Companies are matched based on provided identifiers + `, + }, + companies: { + type: "string[]", + label: "Companies", + description: "List of company objects to search for. Example: [{ \"id\": \"123321\", \"domain\": \"lusha.com\", \"name\": \"Lusha\" }]. [See the documentation](https://docs.lusha.com/apis/openapi/signals/searchcompanysignals) for more information.", + }, + signals: { + propDefinition: [ + lusha, + "companySignals", + ], + }, + startDate: { + propDefinition: [ + lusha, + "startDate", + ], + }, + }, + async run({ $ }) { + try { + const response = await this.lusha.searchCompanySignals({ + $, + params: { + companies: parseObject(this.companies), + signals: this.signals, + startDate: this.startDate, + }, + }); + $.export("$summary", `Successfully searched for ${Object.keys(response.companies).length} company signals`); + + return response; + } catch ({ response }) { + throw new ConfigurationError(response?.data?.message); + } + }, +}; diff --git a/components/lusha/actions/search-contact-signals/search-contact-signals.mjs b/components/lusha/actions/search-contact-signals/search-contact-signals.mjs new file mode 100644 index 0000000000000..523815f6e3fbf --- /dev/null +++ b/components/lusha/actions/search-contact-signals/search-contact-signals.mjs @@ -0,0 +1,61 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { parseObject } from "../../common/utils.mjs"; +import lusha from "../../lusha.app.mjs"; + +export default { + key: "lusha-search-contact-signals", + name: "Search Contact Signals", + description: "Search for contact signals using identifiers like LinkedIn URL, email, or name + company. This endpoint combines search and signal enrichment in a single request. [See the documentation](https://docs.lusha.com/apis/openapi/signals/searchcontactsignals)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + lusha, + info: { + type: "alert", + alertType: "info", + content: `* Returns signals from the last 6 months by default\ + \n* Contacts are matched based on provided identifiers\ + \n* Returns both contact data and associated signals + `, + }, + contacts: { + type: "string[]", + label: "Contacts", + description: "List of contact objects to search for. Example: [{ \"id\": \"123321\", \"social_links\": [\"https://www.linkedin.com/in/ron-nabet\"], \"full_name\": \"Ron Nabet\", \"email\": \"dustin@lusha.com\", \"companies\": [\"name\": \"Lusha\", \"domain\": \"lusha.com\", \"is_current\": true] }]. [See the documentation](https://docs.lusha.com/apis/openapi/signals/searchcontactsignals) for more information.", + }, + signals: { + propDefinition: [ + lusha, + "signals", + ], + }, + startDate: { + propDefinition: [ + lusha, + "startDate", + ], + }, + }, + async run({ $ }) { + try { + const response = await this.lusha.searchContactSignals({ + $, + params: { + contacts: parseObject(this.contacts), + signals: this.signals, + startDate: this.startDate, + }, + }); + $.export("$summary", `Successfully searched for ${Object.keys(response.contacts).length} contact signals`); + + return response; + } catch ({ response }) { + throw new ConfigurationError(response?.data?.message); + } + }, +}; diff --git a/components/lusha/actions/single-company-search/single-company-search.mjs b/components/lusha/actions/single-company-search/single-company-search.mjs new file mode 100644 index 0000000000000..8abf9080fceb3 --- /dev/null +++ b/components/lusha/actions/single-company-search/single-company-search.mjs @@ -0,0 +1,49 @@ +import { ConfigurationError } from "@pipedream/platform"; +import lusha from "../../lusha.app.mjs"; + +export default { + key: "lusha-single-company-search", + name: "Search Single Company", + description: "Search for companies using various filters. [See the documentation](https://docs.lusha.com/apis/index2/company/companycontroller_searchsinglecompany)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + lusha, + domain: { + type: "string", + label: "Company Domain", + description: "The domain name associated with the company", + optional: true, + }, + company: { + type: "string", + label: "Company Name", + description: "The name of the company", + optional: true, + }, + }, + async run({ $ }) { + if (!this.domain && !this.company) { + throw new ConfigurationError("You must provide either a **Domain** or **Company** name"); + } + const response = await this.lusha.searchSingleCompany({ + $, + params: { + domain: this.domain, + company: this.company, + }, + }); + + if (response.errors) { + throw new Error(response.errors.message); + } + $.export("$summary", `Successfully found a company with ID: ${response.data.id}`); + + return response; + }, +}; diff --git a/components/lusha/actions/single-contact-search/single-contact-search.mjs b/components/lusha/actions/single-contact-search/single-contact-search.mjs new file mode 100644 index 0000000000000..dd15a74ee1abd --- /dev/null +++ b/components/lusha/actions/single-contact-search/single-contact-search.mjs @@ -0,0 +1,116 @@ +import { ConfigurationError } from "@pipedream/platform"; +import { FILTER_BY_OPTIONS } from "../../common/constants.mjs"; +import lusha from "../../lusha.app.mjs"; + +export default { + key: "lusha-single-contact-search", + name: "Search Single Contact", + description: "Search for a single contact using various filters. [See the documentation](https://docs.lusha.com/apis/index2/person/personcontroller_searchsinglecontact)", + version: "0.0.1", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + type: "action", + props: { + lusha, + firstName: { + type: "string", + label: "First Name", + description: "First name of the person", + optional: true, + }, + lastName: { + type: "string", + label: "Last Name", + description: "Last name of the person", + optional: true, + }, + companyName: { + type: "string", + label: "Company Name", + description: "The name of the company the person works at", + optional: true, + }, + companyDomain: { + type: "string", + label: "Company Domain", + description: "The domain name of the company", + optional: true, + }, + email: { + type: "string", + label: "Email", + description: "The email address of the person", + optional: true, + }, + linkedinUrl: { + type: "string", + label: "LinkedIn URL", + description: "The LinkedIn URL of the person", + optional: true, + }, + refreshJobInfo: { + type: "boolean", + label: "Refresh Job Info", + description: "Set to true to refresh and update the job details for the person. This ensures that outdated job information is replaced with the most recent data", + optional: true, + }, + filterBy: { + type: "string", + label: "Filter By", + description: "Filters results based on specific contact details. By default, results will include contacts with at least one contact detail", + optional: true, + options: FILTER_BY_OPTIONS, + }, + revealEmails: { + type: "boolean", + label: "Reveal Emails", + description: "Whether to reveal email addresses in the response", + optional: true, + }, + revealPhones: { + type: "boolean", + label: "Reveal Phones", + description: "Whether to reveal phone numbers in the response", + optional: true, + }, + }, + async run({ $ }) { + try { + const response = await this.lusha.searchSingleContact({ + $, + params: { + firstName: this.firstName, + lastName: this.lastName, + companyName: this.companyName, + companyDomain: this.companyDomain, + email: this.email, + linkedinUrl: this.linkedinUrl, + refreshJobInfo: this.refreshJobInfo, + filterBy: this.filterBy, + revealEmails: this.revealEmails, + revealPhones: this.revealPhones, + }, + }); + let summary = ""; + if (response.contact?.error?.name) { + + if (response.contact.error.name !== "EMPTY_DATA") { + throw new Error(response.contact.error.message || response.contact.error.name); + } + summary = "No contact found"; + } + + if (response.contact.data?.personId) { + summary = `Successfully found a contact with ID: ${response.contact.data.personId}`; + } + $.export("$summary", summary); + + return response.contact.data; + } catch ({ response }) { + throw new ConfigurationError(response?.data?.message); + } + }, +}; diff --git a/components/lusha/common/constants.mjs b/components/lusha/common/constants.mjs new file mode 100644 index 0000000000000..9b8269c9dd157 --- /dev/null +++ b/components/lusha/common/constants.mjs @@ -0,0 +1,44 @@ +export const SIGNALS_OPTIONS = [ + { + label: "All Signals", + value: "allSignals", + }, + { + label: "Promotion", + value: "promotion", + }, + { + label: "Company Changes", + value: "companyChange", + }, +]; + +export const COMPANY_SIGNALS_OPTIONS = [ + { + label: "All Signals", + value: "allSignals", + }, + { + label: "Headcount Growth", + value: "headcountGrowth", + }, + { + label: "New Jobs Open", + value: "newJobsOpen", + }, + { + label: "News Event", + value: "newsEvent", + }, +]; + +export const FILTER_BY_OPTIONS = [ + { + label: "Only return contacts with phone numbers", + value: "phoneNumbers", + }, + { + label: "Only return contacts with email addresses", + value: "emailAddresses", + }, +]; diff --git a/components/lusha/lusha.app.mjs b/components/lusha/lusha.app.mjs index c13cc35859503..4525edc284c2a 100644 --- a/components/lusha/lusha.app.mjs +++ b/components/lusha/lusha.app.mjs @@ -1,4 +1,8 @@ import { axios } from "@pipedream/platform"; +import { + COMPANY_SIGNALS_OPTIONS, + SIGNALS_OPTIONS, +} from "./common/constants.mjs"; export default { type: "app", @@ -184,6 +188,24 @@ export default { description: "The maximum number of results to return. **This feature is used to avoid timeouts due to very long returns.**", default: 50, }, + signals: { + type: "string[]", + label: "Signals", + description: "Types of signals to retrieve", + options: SIGNALS_OPTIONS, + }, + companySignals: { + type: "string[]", + label: "Company Signals", + description: "Types of company signals to retrieve", + options: COMPANY_SIGNALS_OPTIONS, + }, + startDate: { + type: "string", + label: "Start Date", + description: "Start date for signal retrieval **Format: YYYY-MM-DD**", + optional: true, + }, }, methods: { _baseUrl() { @@ -203,6 +225,12 @@ export default { ...opts, }); }, + searchSingleContact(opts = {}) { + return this._makeRequest({ + path: "/v2/person", + ...opts, + }); + }, searchContacts(opts = {}) { return this._makeRequest({ method: "POST", @@ -210,6 +238,12 @@ export default { ...opts, }); }, + searchSingleCompany(opts = {}) { + return this._makeRequest({ + path: "/v2/company", + ...opts, + }); + }, searchCompanies(opts = {}) { return this._makeRequest({ method: "POST", @@ -279,6 +313,49 @@ export default { ...opts, }); }, + getContactSignalsById(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/api/signals/contacts", + ...opts, + }); + }, + searchContactSignals(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/api/signals/contacts/search", + ...opts, + }); + }, + searchCompanySignals(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/api/signals/companies/search", + ...opts, + }); + }, + getContactRecommendations(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/api/recommendations/contacts", + ...opts, + }); + }, + getCompanyRecommendations(opts = {}) { + return this._makeRequest({ + method: "POST", + path: "/api/recommendations/companies", + ...opts, + }); + }, + getSignalOptions({ + objectType, ...opts + }) { + return this._makeRequest({ + path: `/api/signals/filters/${objectType}`, + ...opts, + }); + }, async *paginate({ fn, data = {}, maxResults = null, ...opts }) { diff --git a/components/lusha/package.json b/components/lusha/package.json index 288d89c6053cf..04eb7e4dcfe0a 100644 --- a/components/lusha/package.json +++ b/components/lusha/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/lusha", - "version": "0.2.1", + "version": "0.3.0", "description": "Pipedream Lusha Components", "main": "lusha.app.mjs", "keywords": [