Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
11 changes: 10 additions & 1 deletion components/hubspot/actions/search-crm/search-crm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import {
DEFAULT_LEAD_PROPERTIES,
} from "../../common/constants.mjs";
import common from "../common/common-create.mjs";
import { ConfigurationError } from "@pipedream/platform";

export default {
key: "hubspot-search-crm",
name: "Search CRM",
description: "Search companies, contacts, deals, feedback submissions, products, tickets, line-items, quotes, leads, or custom objects. [See the documentation](https://developers.hubspot.com/docs/api/crm/search)",
version: "0.0.11",
version: "0.0.12",
type: "action",
props: {
hubspot,
Expand Down Expand Up @@ -203,6 +204,14 @@ export default {
...otherProperties
} = this;

const schema = await this.hubspot.getSchema({
objectType,
});

if (!schema.searchableProperties.includes(searchProperty)) {
throw new ConfigurationError(`\`${searchProperty}\` is not a searchable property of object type \`${objectType}\``);
}

const properties = creationProps
? typeof creationProps === "string"
? JSON.parse(creationProps)
Expand Down
2 changes: 1 addition & 1 deletion components/hubspot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/hubspot",
"version": "0.13.1",
"version": "0.13.2",
"description": "Pipedream Hubspot Components",
"main": "hubspot.app.mjs",
"keywords": [
Expand Down
3 changes: 1 addition & 2 deletions pnpm-lock.yaml

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

Loading