From 0eaf6923245f54b13adc718e96b853a791381643 Mon Sep 17 00:00:00 2001 From: GTFalcao Date: Thu, 25 Sep 2025 17:03:15 -0300 Subject: [PATCH] Adjust hubspot actions reloadProps Removing reloadProps from the app file for actions for which this is irrelevant --- .../hubspot/actions/common/common-create-object.mjs | 2 ++ .../actions/create-company/create-company.mjs | 2 +- .../create-custom-object/create-custom-object.mjs | 13 ++++++++----- .../hubspot/actions/create-deal/create-deal.mjs | 2 +- .../hubspot/actions/create-lead/create-lead.mjs | 13 ++++++++----- .../create-or-update-contact.mjs | 2 +- .../hubspot/actions/create-ticket/create-ticket.mjs | 2 +- .../actions/update-company/update-company.mjs | 8 ++++---- .../actions/update-contact/update-contact.mjs | 8 ++++---- .../update-custom-object/update-custom-object.mjs | 10 +++++----- .../hubspot/actions/update-deal/update-deal.mjs | 8 ++++---- .../hubspot/actions/update-lead/update-lead.mjs | 8 ++++---- components/hubspot/package.json | 2 +- 13 files changed, 44 insertions(+), 36 deletions(-) diff --git a/components/hubspot/actions/common/common-create-object.mjs b/components/hubspot/actions/common/common-create-object.mjs index a9da818ea6e2d..393f3576e79a9 100644 --- a/components/hubspot/actions/common/common-create-object.mjs +++ b/components/hubspot/actions/common/common-create-object.mjs @@ -1,9 +1,11 @@ import common from "./common-create.mjs"; +import hubspot from "../../hubspot.app.mjs"; export default { ...common, props: { ...common.props, + hubspot, // Re-defining propertyGroups so this.getObjectType() can be called from async options // eslint-disable-next-line pipedream/props-description propertyGroups: { diff --git a/components/hubspot/actions/create-company/create-company.mjs b/components/hubspot/actions/create-company/create-company.mjs index 977f1cae35a51..eece4502d686b 100644 --- a/components/hubspot/actions/create-company/create-company.mjs +++ b/components/hubspot/actions/create-company/create-company.mjs @@ -7,7 +7,7 @@ export default { name: "Create Company", description: "Create a company in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies#endpoint?spec=POST-/crm/v3/objects/companies)", - version: "0.0.29", + version: "0.0.30", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/create-custom-object/create-custom-object.mjs b/components/hubspot/actions/create-custom-object/create-custom-object.mjs index 9dea0893e71bc..cdc9571c8766c 100644 --- a/components/hubspot/actions/create-custom-object/create-custom-object.mjs +++ b/components/hubspot/actions/create-custom-object/create-custom-object.mjs @@ -1,23 +1,26 @@ -import appProp from "../common/common-app-prop.mjs"; import common from "../common/common-create-object.mjs"; +const { + hubspot, ...otherProps +} = common.props; + export default { ...common, key: "hubspot-create-custom-object", name: "Create Custom Object", description: "Create a new custom object in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/custom-objects#create-a-custom-object)", - version: "1.0.11", + version: "1.0.12", type: "action", props: { - ...appProp.props, + hubspot, customObjectType: { propDefinition: [ - appProp.props.hubspot, + hubspot, "customObjectType", ], }, - ...common.props, + ...otherProps, }, methods: { ...common.methods, diff --git a/components/hubspot/actions/create-deal/create-deal.mjs b/components/hubspot/actions/create-deal/create-deal.mjs index 68672257d7c20..cff9af984d559 100644 --- a/components/hubspot/actions/create-deal/create-deal.mjs +++ b/components/hubspot/actions/create-deal/create-deal.mjs @@ -7,7 +7,7 @@ export default { name: "Create Deal", description: "Create a deal in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/deals#endpoint?spec=POST-/crm/v3/objects/deals)", - version: "0.0.29", + version: "0.0.30", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/create-lead/create-lead.mjs b/components/hubspot/actions/create-lead/create-lead.mjs index 7706141053a37..e18d2cfb4c87a 100644 --- a/components/hubspot/actions/create-lead/create-lead.mjs +++ b/components/hubspot/actions/create-lead/create-lead.mjs @@ -1,22 +1,25 @@ import { ASSOCIATION_CATEGORY, OBJECT_TYPE, } from "../../common/constants.mjs"; -import appProp from "../common/common-app-prop.mjs"; import common from "../common/common-create-object.mjs"; +const { + hubspot, ...otherProps +} = common.props; + export default { ...common, key: "hubspot-create-lead", name: "Create Lead", description: "Create a lead in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/leads#create-leads)", - version: "0.0.17", + version: "0.0.18", type: "action", props: { - ...appProp.props, + hubspot, contactId: { propDefinition: [ - appProp.props.hubspot, + hubspot, "objectId", () => ({ objectType: "contact", @@ -25,7 +28,7 @@ export default { label: "Contact ID", description: "The contact to associate with the lead", }, - ...common.props, + ...otherProps, }, methods: { ...common.methods, diff --git a/components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs b/components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs index dd640ee850f0a..f6c0481f660ee 100644 --- a/components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs +++ b/components/hubspot/actions/create-or-update-contact/create-or-update-contact.mjs @@ -7,7 +7,7 @@ export default { name: "Create or Update Contact", description: "Create or update a contact in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts#endpoint?spec=POST-/crm/v3/objects/contacts)", - version: "0.0.27", + version: "0.0.28", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/create-ticket/create-ticket.mjs b/components/hubspot/actions/create-ticket/create-ticket.mjs index 51a654b145df2..ba9e46b894b2a 100644 --- a/components/hubspot/actions/create-ticket/create-ticket.mjs +++ b/components/hubspot/actions/create-ticket/create-ticket.mjs @@ -7,7 +7,7 @@ export default { name: "Create Ticket", description: "Create a ticket in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/tickets)", - version: "0.0.20", + version: "0.0.21", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/update-company/update-company.mjs b/components/hubspot/actions/update-company/update-company.mjs index c4529673f06da..f3806af9b1981 100644 --- a/components/hubspot/actions/update-company/update-company.mjs +++ b/components/hubspot/actions/update-company/update-company.mjs @@ -1,5 +1,5 @@ import { OBJECT_TYPE } from "../../common/constants.mjs"; -import appProp from "../common/common-app-prop.mjs"; +import hubspot from "../../hubspot.app.mjs"; import common from "../common/common-update-object.mjs"; export default { @@ -8,7 +8,7 @@ export default { name: "Update Company", description: "Update a company in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies)", - version: "0.0.25", + version: "0.0.26", type: "action", methods: { ...common.methods, @@ -17,10 +17,10 @@ export default { }, }, props: { - ...appProp.props, + hubspot, objectId: { propDefinition: [ - appProp.props.hubspot, + hubspot, "objectId", () => ({ objectType: "company", diff --git a/components/hubspot/actions/update-contact/update-contact.mjs b/components/hubspot/actions/update-contact/update-contact.mjs index 1b86ff6cfc60d..bccc22f85fdcb 100644 --- a/components/hubspot/actions/update-contact/update-contact.mjs +++ b/components/hubspot/actions/update-contact/update-contact.mjs @@ -1,5 +1,5 @@ import { OBJECT_TYPE } from "../../common/constants.mjs"; -import appProp from "../common/common-app-prop.mjs"; +import hubspot from "../../hubspot.app.mjs"; import common from "../common/common-update-object.mjs"; export default { @@ -8,7 +8,7 @@ export default { name: "Update Contact", description: "Update a contact in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts#endpoint?spec=POST-/crm/v3/objects/contacts)", - version: "0.0.26", + version: "0.0.27", type: "action", methods: { ...common.methods, @@ -17,10 +17,10 @@ export default { }, }, props: { - ...appProp.props, + hubspot, objectId: { propDefinition: [ - appProp.props.hubspot, + hubspot, "objectId", () => ({ objectType: "contact", diff --git a/components/hubspot/actions/update-custom-object/update-custom-object.mjs b/components/hubspot/actions/update-custom-object/update-custom-object.mjs index 7e095640b91f5..471f73f5a914b 100644 --- a/components/hubspot/actions/update-custom-object/update-custom-object.mjs +++ b/components/hubspot/actions/update-custom-object/update-custom-object.mjs @@ -1,4 +1,4 @@ -import appProp from "../common/common-app-prop.mjs"; +import hubspot from "../../hubspot.app.mjs"; import common from "../common/common-update-object.mjs"; export default { @@ -7,7 +7,7 @@ export default { name: "Update Custom Object", description: "Update a custom object in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/custom-objects#update-existing-custom-objects)", - version: "1.0.11", + version: "1.0.12", type: "action", methods: { ...common.methods, @@ -16,16 +16,16 @@ export default { }, }, props: { - ...appProp.props, + hubspot, customObjectType: { propDefinition: [ - appProp.props.hubspot, + hubspot, "customObjectType", ], }, objectId: { propDefinition: [ - appProp.props.hubspot, + hubspot, "objectId", (c) => ({ objectType: c.customObjectType, diff --git a/components/hubspot/actions/update-deal/update-deal.mjs b/components/hubspot/actions/update-deal/update-deal.mjs index 59d42cdcce7a9..2271656000d60 100644 --- a/components/hubspot/actions/update-deal/update-deal.mjs +++ b/components/hubspot/actions/update-deal/update-deal.mjs @@ -1,5 +1,5 @@ import { OBJECT_TYPE } from "../../common/constants.mjs"; -import appProp from "../common/common-app-prop.mjs"; +import hubspot from "../../hubspot.app.mjs"; import common from "../common/common-update-object.mjs"; export default { @@ -8,7 +8,7 @@ export default { name: "Update Deal", description: "Update a deal in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/deals#update-deals)", - version: "0.0.16", + version: "0.0.17", type: "action", methods: { ...common.methods, @@ -17,10 +17,10 @@ export default { }, }, props: { - ...appProp.props, + hubspot, objectId: { propDefinition: [ - appProp.props.hubspot, + hubspot, "objectId", () => ({ objectType: "deal", diff --git a/components/hubspot/actions/update-lead/update-lead.mjs b/components/hubspot/actions/update-lead/update-lead.mjs index 93589c3246b23..4f75536bcbd45 100644 --- a/components/hubspot/actions/update-lead/update-lead.mjs +++ b/components/hubspot/actions/update-lead/update-lead.mjs @@ -1,5 +1,5 @@ import { OBJECT_TYPE } from "../../common/constants.mjs"; -import appProp from "../common/common-app-prop.mjs"; +import hubspot from "../../hubspot.app.mjs"; import common from "../common/common-update-object.mjs"; export default { @@ -8,7 +8,7 @@ export default { name: "Update Lead", description: "Update a lead in Hubspot. [See the documentation](https://developers.hubspot.com/beta-docs/guides/api/crm/objects/leads#update-leads)", - version: "0.0.17", + version: "0.0.18", type: "action", methods: { ...common.methods, @@ -17,10 +17,10 @@ export default { }, }, props: { - ...appProp.props, + hubspot, objectId: { propDefinition: [ - appProp.props.hubspot, + hubspot, "leadId", ], }, diff --git a/components/hubspot/package.json b/components/hubspot/package.json index 3d5b3d9355927..099559c918d64 100644 --- a/components/hubspot/package.json +++ b/components/hubspot/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/hubspot", - "version": "1.7.10", + "version": "1.7.11", "description": "Pipedream Hubspot Components", "main": "hubspot.app.mjs", "keywords": [