From 094daf648bd859b7b3370e2d4943e0ab4b04b88b Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Wed, 8 May 2024 14:18:30 -0400 Subject: [PATCH 1/2] update description --- components/hubspot/package.json | 2 +- components/hubspot/sources/new-event/new-event.mjs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/hubspot/package.json b/components/hubspot/package.json index adbe476f4fe84..0e553d5017fa1 100644 --- a/components/hubspot/package.json +++ b/components/hubspot/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/hubspot", - "version": "0.8.3", + "version": "0.8.4", "description": "Pipedream Hubspot Components", "main": "hubspot.app.mjs", "keywords": [ diff --git a/components/hubspot/sources/new-event/new-event.mjs b/components/hubspot/sources/new-event/new-event.mjs index b97704c4d21cf..ba89d40d0dafd 100644 --- a/components/hubspot/sources/new-event/new-event.mjs +++ b/components/hubspot/sources/new-event/new-event.mjs @@ -4,8 +4,8 @@ export default { ...common, key: "hubspot-new-event", name: "New Events", - description: "Emit new event for each new Hubspot event.", - version: "0.0.16", + description: "Emit new event for each new Hubspot event. Note: Only available for Marketing Hub Enterprise, Sales Hub Enterprise, Service Hub Enterprise, or CMS Hub Enterprise accounts", + version: "0.0.17", dedupe: "unique", type: "source", props: { From c2301becd9b9539f56eafaff9f3f0694910b4967 Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Thu, 9 May 2024 10:26:46 -0400 Subject: [PATCH 2/2] add configuration error --- .../hubspot/sources/new-event/new-event.mjs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/components/hubspot/sources/new-event/new-event.mjs b/components/hubspot/sources/new-event/new-event.mjs index ba89d40d0dafd..5acb677087654 100644 --- a/components/hubspot/sources/new-event/new-event.mjs +++ b/components/hubspot/sources/new-event/new-event.mjs @@ -1,4 +1,5 @@ import common from "../common/common.mjs"; +import { ConfigurationError } from "@pipedream/platform"; export default { ...common, @@ -26,7 +27,19 @@ export default { ], }, }, - hooks: {}, + hooks: { + async deploy() { + try { + await this.hubspot.getEvents({ + objectType: this.objectType, + objectId: this.objectIds[0], + }); + } + catch { + throw new ConfigurationError("Error occurred. Please verify that your Hubspot account is one of: Marketing Hub Enterprise, Sales Hub Enterprise, Service Hub Enterprise, or CMS Hub Enterprise"); + } + }, + }, methods: { ...common.methods, getTs() {