diff --git a/components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs b/components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs index 0a87f81eed8ad..68aefdf2d4d85 100644 --- a/components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs +++ b/components/hubspot/actions/add-contact-to-list/add-contact-to-list.mjs @@ -4,7 +4,7 @@ export default { key: "hubspot-add-contact-to-list", name: "Add Contact to List", description: "Adds a contact to a specific static list. [See the documentation](https://legacydocs.hubspot.com/docs/methods/lists/add_contact_to_list)", - version: "0.0.11", + version: "0.0.12", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs b/components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs index 2382e348fe110..b4a8d8b676b6b 100644 --- a/components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs +++ b/components/hubspot/actions/batch-create-or-update-contact/batch-create-or-update-contact.mjs @@ -4,7 +4,7 @@ export default { key: "hubspot-batch-create-or-update-contact", name: "Batch Create or Update Contact", description: "Create or update a batch of contacts by its ID or email. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts)", - version: "0.0.8", + version: "0.0.9", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/create-associations/create-associations.mjs b/components/hubspot/actions/create-associations/create-associations.mjs index 4ada7ea584aff..37d0a3ab5f18b 100644 --- a/components/hubspot/actions/create-associations/create-associations.mjs +++ b/components/hubspot/actions/create-associations/create-associations.mjs @@ -5,7 +5,7 @@ export default { key: "hubspot-create-associations", name: "Create Associations", description: "Create associations between objects. [See the documentation](https://developers.hubspot.com/docs/api/crm/associations#endpoint?spec=POST-/crm/v3/associations/{fromObjectType}/{toObjectType}/batch/create)", - version: "0.0.11", + version: "0.0.12", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/create-communication/create-communication.mjs b/components/hubspot/actions/create-communication/create-communication.mjs index d8e864efe6be1..4a416cc2be0a0 100644 --- a/components/hubspot/actions/create-communication/create-communication.mjs +++ b/components/hubspot/actions/create-communication/create-communication.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-create-communication", name: "Create Communication", description: "Create a WhatsApp, LinkedIn, or SMS message. [See the documentation](https://developers.hubspot.com/beta-docs/reference/api/crm/engagements/communications/v3#post-%2Fcrm%2Fv3%2Fobjects%2Fcommunications)", - version: "0.0.4", + version: "0.0.5", type: "action", props: { ...appProp.props, diff --git a/components/hubspot/actions/create-company/create-company.mjs b/components/hubspot/actions/create-company/create-company.mjs index 7fe103507df35..f73f82180886b 100644 --- a/components/hubspot/actions/create-company/create-company.mjs +++ b/components/hubspot/actions/create-company/create-company.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-create-company", 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.15", + version: "0.0.16", 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 262b14eb63655..1e0fba03dfa30 100644 --- a/components/hubspot/actions/create-custom-object/create-custom-object.mjs +++ b/components/hubspot/actions/create-custom-object/create-custom-object.mjs @@ -6,7 +6,7 @@ export default { 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: "0.0.3", + version: "0.0.4", type: "action", props: { ...appProp.props, diff --git a/components/hubspot/actions/create-deal/create-deal.mjs b/components/hubspot/actions/create-deal/create-deal.mjs index 90b1cf15ac544..2416761c4d0ae 100644 --- a/components/hubspot/actions/create-deal/create-deal.mjs +++ b/components/hubspot/actions/create-deal/create-deal.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-create-deal", 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.15", + version: "0.0.16", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/create-engagement/create-engagement.mjs b/components/hubspot/actions/create-engagement/create-engagement.mjs index 9fed4bdde4b55..9bf2a18161028 100644 --- a/components/hubspot/actions/create-engagement/create-engagement.mjs +++ b/components/hubspot/actions/create-engagement/create-engagement.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-create-engagement", name: "Create Engagement", description: "Create a new engagement for a contact. [See the documentation](https://developers.hubspot.com/docs/api/crm/engagements)", - version: "0.0.14", + version: "0.0.15", 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 9a63593063ab8..1c4dc480f4feb 100644 --- a/components/hubspot/actions/create-lead/create-lead.mjs +++ b/components/hubspot/actions/create-lead/create-lead.mjs @@ -9,7 +9,7 @@ export default { 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.3", + version: "0.0.4", type: "action", props: { ...appProp.props, 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 4dffaf160f72c..d7841b6f2c1f6 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 @@ -6,7 +6,7 @@ export default { key: "hubspot-create-or-update-contact", 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.13", + version: "0.0.14", 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 e9d31be442549..a93bf52678ace 100644 --- a/components/hubspot/actions/create-ticket/create-ticket.mjs +++ b/components/hubspot/actions/create-ticket/create-ticket.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-create-ticket", name: "Create Ticket", description: "Create a ticket in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/tickets)", - version: "0.0.6", + version: "0.0.7", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs b/components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs index 9332f8105bd7b..086867263e6d4 100644 --- a/components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs +++ b/components/hubspot/actions/enroll-contact-into-workflow/enroll-contact-into-workflow.mjs @@ -4,7 +4,7 @@ export default { key: "hubspot-enroll-contact-into-workflow", name: "Enroll Contact Into Workflow", description: "Add a contact to a workflow. Note: The Workflows API currently only supports contact-based workflows and is only available for Marketing Hub Enterprise accounts. [See the documentation](https://legacydocs.hubspot.com/docs/methods/workflows/add_contact)", - version: "0.0.11", + version: "0.0.12", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/get-company/get-company.mjs b/components/hubspot/actions/get-company/get-company.mjs index 1f24aff35916e..c8a0ef6625d46 100644 --- a/components/hubspot/actions/get-company/get-company.mjs +++ b/components/hubspot/actions/get-company/get-company.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-get-company", name: "Get Company", description: "Gets a company. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies#endpoint?spec=GET-/crm/v3/objects/companies/{companyId})", - version: "0.0.11", + version: "0.0.12", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/get-contact/get-contact.mjs b/components/hubspot/actions/get-contact/get-contact.mjs index 7fdb9b370beb8..0c509ed6687bb 100644 --- a/components/hubspot/actions/get-contact/get-contact.mjs +++ b/components/hubspot/actions/get-contact/get-contact.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-get-contact", name: "Get Contact", description: "Gets a contact. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts#endpoint?spec=GET-/crm/v3/objects/contacts/{contactId})", - version: "0.0.11", + version: "0.0.12", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/get-deal/get-deal.mjs b/components/hubspot/actions/get-deal/get-deal.mjs index f24be64ec8839..4a258be9001e8 100644 --- a/components/hubspot/actions/get-deal/get-deal.mjs +++ b/components/hubspot/actions/get-deal/get-deal.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-get-deal", name: "Get Deal", description: "Gets a deal. [See the documentation](https://developers.hubspot.com/docs/api/crm/deals#endpoint?spec=GET-/crm/v3/objects/deals/{dealId})", - version: "0.0.11", + version: "0.0.12", type: "action", props: { ...common.props, diff --git a/components/hubspot/actions/get-file-public-url/get-file-public-url.mjs b/components/hubspot/actions/get-file-public-url/get-file-public-url.mjs index 4bb41c42b9cad..65f147f001979 100644 --- a/components/hubspot/actions/get-file-public-url/get-file-public-url.mjs +++ b/components/hubspot/actions/get-file-public-url/get-file-public-url.mjs @@ -4,7 +4,7 @@ export default { key: "hubspot-get-file-public-url", name: "Get File Public URL", description: "Get a publicly available URL for a file that was uploaded using a Hubspot form. [See the documentation](https://developers.hubspot.com/docs/api/files/files#endpoint?spec=GET-/files/v3/files/{fileId}/signed-url)", - version: "0.0.11", + version: "0.0.12", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/search-crm/search-crm.mjs b/components/hubspot/actions/search-crm/search-crm.mjs index d9aabfd18226b..03b1c8f0b6eab 100644 --- a/components/hubspot/actions/search-crm/search-crm.mjs +++ b/components/hubspot/actions/search-crm/search-crm.mjs @@ -15,7 +15,7 @@ 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.10", + version: "0.0.11", type: "action", props: { hubspot, diff --git a/components/hubspot/actions/update-company/update-company.mjs b/components/hubspot/actions/update-company/update-company.mjs index d35b31458945d..9037fada4cd00 100644 --- a/components/hubspot/actions/update-company/update-company.mjs +++ b/components/hubspot/actions/update-company/update-company.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-update-company", name: "Update Company", description: "Update a company in Hubspot. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies)", - version: "0.0.11", + version: "0.0.12", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/update-contact/update-contact.mjs b/components/hubspot/actions/update-contact/update-contact.mjs index 5c6d37da7adcf..7c79d13a933f7 100644 --- a/components/hubspot/actions/update-contact/update-contact.mjs +++ b/components/hubspot/actions/update-contact/update-contact.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-update-contact", 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.12", + version: "0.0.13", type: "action", methods: { ...common.methods, 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 aa5ca20e563ea..5691bbfab3732 100644 --- a/components/hubspot/actions/update-custom-object/update-custom-object.mjs +++ b/components/hubspot/actions/update-custom-object/update-custom-object.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-update-custom-object", 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: "0.0.3", + version: "0.0.4", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/update-deal/update-deal.mjs b/components/hubspot/actions/update-deal/update-deal.mjs index d6036e136d634..ed63282da7475 100644 --- a/components/hubspot/actions/update-deal/update-deal.mjs +++ b/components/hubspot/actions/update-deal/update-deal.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-update-deal", 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.2", + version: "0.0.3", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/actions/update-lead/update-lead.mjs b/components/hubspot/actions/update-lead/update-lead.mjs index 40846ef2ee509..c85ff532a194f 100644 --- a/components/hubspot/actions/update-lead/update-lead.mjs +++ b/components/hubspot/actions/update-lead/update-lead.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-update-lead", 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.3", + version: "0.0.4", type: "action", methods: { ...common.methods, diff --git a/components/hubspot/hubspot.app.mjs b/components/hubspot/hubspot.app.mjs index 754f5ba171098..c3ed0275f5f3a 100644 --- a/components/hubspot/hubspot.app.mjs +++ b/components/hubspot/hubspot.app.mjs @@ -1008,5 +1008,19 @@ export default { ...opts, }); }, + listNotes(opts = {}) { + return this.makeRequest({ + api: API_PATH.CRMV3, + endpoint: "/objects/notes", + ...opts, + }); + }, + listTasks(opts = {}) { + return this.makeRequest({ + api: API_PATH.CRMV3, + endpoint: "/objects/tasks", + ...opts, + }); + }, }, }; diff --git a/components/hubspot/package.json b/components/hubspot/package.json index 24bd42f552771..81d054228afbc 100644 --- a/components/hubspot/package.json +++ b/components/hubspot/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/hubspot", - "version": "0.12.1", + "version": "0.13.0", "description": "Pipedream Hubspot Components", "main": "hubspot.app.mjs", "keywords": [ diff --git a/components/hubspot/sources/common/common.mjs b/components/hubspot/sources/common/common.mjs index 3ebd53cb68362..e3683c4976d61 100644 --- a/components/hubspot/sources/common/common.mjs +++ b/components/hubspot/sources/common/common.mjs @@ -181,7 +181,7 @@ export default { }, async run() { const after = this._getAfter(); - const params = this.getParams(after); + const params = await this.getParams(after); await this.processResults(after, params); }, }; diff --git a/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs b/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs index 0c78dfff9e3ae..47b0662db55bd 100644 --- a/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs +++ b/components/hubspot/sources/delete-blog-article/delete-blog-article.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-delete-blog-article", name: "Deleted Blog Posts", description: "Emit new event for each deleted blog post.", - version: "0.0.16", + version: "0.0.17", dedupe: "unique", type: "source", methods: { diff --git a/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs b/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs index 37343d8ba1f3f..869a91c89ee68 100644 --- a/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs +++ b/components/hubspot/sources/new-company-property-change/new-company-property-change.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-company-property-change", name: "New Company Property Change", description: "Emit new event when a specified property is provided or updated on a company. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies)", - version: "0.0.9", + version: "0.0.10", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs b/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs index 2ac4f3afcc470..b9b995c95735e 100644 --- a/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs +++ b/components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-contact-property-change", name: "New Contact Property Change", description: "Emit new event when a specified property is provided or updated on a contact. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts)", - version: "0.0.11", + version: "0.0.12", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs b/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs index c0ba63fd6ee0a..47ab268ffa573 100644 --- a/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs +++ b/components/hubspot/sources/new-custom-object-property-change/new-custom-object-property-change.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-new-custom-object-property-change", name: "New Custom Object Property Change", description: "Emit new event when a specified property is provided or updated on a custom object.", - version: "0.0.1", + version: "0.0.2", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs b/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs index bea585f72d8e4..fba8cf340f4dc 100644 --- a/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs +++ b/components/hubspot/sources/new-deal-in-stage/new-deal-in-stage.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-deal-in-stage", name: "New Deal In Stage", description: "Emit new event for each new deal in a stage.", - version: "0.0.20", + version: "0.0.21", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs b/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs index 24fa60c7267b9..c9860070149dd 100644 --- a/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs +++ b/components/hubspot/sources/new-deal-property-change/new-deal-property-change.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-deal-property-change", name: "New Deal Property Change", description: "Emit new event when a specified property is provided or updated on a deal. [See the documentation](https://developers.hubspot.com/docs/api/crm/deals)", - version: "0.0.10", + version: "0.0.11", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-email-event/new-email-event.mjs b/components/hubspot/sources/new-email-event/new-email-event.mjs index 84083a8159cc9..1d54947b8b083 100644 --- a/components/hubspot/sources/new-email-event/new-email-event.mjs +++ b/components/hubspot/sources/new-email-event/new-email-event.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-new-email-event", name: "New Email Event", description: "Emit new event for each new Hubspot email event.", - version: "0.0.19", + version: "0.0.20", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs b/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs index d5b464fa0e865..200bf9f4766fb 100644 --- a/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs +++ b/components/hubspot/sources/new-email-subscriptions-timeline/new-email-subscriptions-timeline.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-new-email-subscriptions-timeline", name: "New Email Subscriptions Timeline", description: "Emit new event when a new email timeline subscription is added for the portal.", - version: "0.0.16", + version: "0.0.17", dedupe: "unique", type: "source", methods: { diff --git a/components/hubspot/sources/new-engagement/new-engagement.mjs b/components/hubspot/sources/new-engagement/new-engagement.mjs index 0afce8cb56e27..9f9666f514cdc 100644 --- a/components/hubspot/sources/new-engagement/new-engagement.mjs +++ b/components/hubspot/sources/new-engagement/new-engagement.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-new-engagement", name: "New Engagement", description: "Emit new event for each new engagement created. This action returns a maximum of 5000 records at a time, make sure you set a correct time range so you don't miss any events", - version: "0.0.21", + version: "0.0.22", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-event/new-event.mjs b/components/hubspot/sources/new-event/new-event.mjs index 5dd8c5e535e18..14683142435ba 100644 --- a/components/hubspot/sources/new-event/new-event.mjs +++ b/components/hubspot/sources/new-event/new-event.mjs @@ -8,7 +8,7 @@ export default { key: "hubspot-new-event", name: "New Events", 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.20", + version: "0.0.21", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-form-submission/new-form-submission.mjs b/components/hubspot/sources/new-form-submission/new-form-submission.mjs index c9b6c6664f8e4..63cffa531cf3d 100644 --- a/components/hubspot/sources/new-form-submission/new-form-submission.mjs +++ b/components/hubspot/sources/new-form-submission/new-form-submission.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-new-form-submission", name: "New Form Submission", description: "Emit new event for each new submission of a form.", - version: "0.0.21", + version: "0.0.22", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-note/new-note.mjs b/components/hubspot/sources/new-note/new-note.mjs new file mode 100644 index 0000000000000..2ea4098e3c4f1 --- /dev/null +++ b/components/hubspot/sources/new-note/new-note.mjs @@ -0,0 +1,56 @@ +import common from "../common/common.mjs"; +import { + DEFAULT_LIMIT, OBJECT_TYPES, +} from "../../common/constants.mjs"; + +export default { + ...common, + key: "hubspot-new-note", + name: "New Note Created", + description: "Emit new event for each new note created. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/engagements/notes#get-%2Fcrm%2Fv3%2Fobjects%2Fnotes)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getTs(note) { + return Date.parse(note.createdAt); + }, + generateMeta(note) { + return { + id: note.id, + summary: `New Note: ${note.properties.hs_body_preview || note.id}`, + ts: this.getTs(note), + }; + }, + isRelevant(note, createdAfter) { + return this.getTs(note) > createdAfter; + }, + async getParams() { + const { results: allProperties } = await this.hubspot.getProperties({ + objectType: "notes", + }); + const properties = allProperties.map(({ name }) => name); + + const objectTypes = OBJECT_TYPES.map(({ value }) => value); + const { results: custom } = await this.hubspot.listSchemas(); + const customObjects = custom?.map(({ name }) => name); + const associations = [ + ...objectTypes, + ...customObjects, + ]; + + return { + params: { + limit: DEFAULT_LIMIT, + properties: properties.join(","), + associations: associations.join(","), + }, + }; + }, + async processResults(after, params) { + const notes = await this.getPaginatedItems(this.hubspot.listNotes.bind(this), params); + await this.processEvents(notes, after); + }, + }, +}; diff --git a/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs b/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs index da5f0128b819f..8fe4ab797c8f9 100644 --- a/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs +++ b/components/hubspot/sources/new-or-updated-blog-article/new-or-updated-blog-article.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-or-updated-blog-article", name: "New or Updated Blog Post", description: "Emit new event for each new or updated blog post in Hubspot.", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs b/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs index 1441447f10fef..eb38b8f743429 100644 --- a/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs +++ b/components/hubspot/sources/new-or-updated-company/new-or-updated-company.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-new-or-updated-company", name: "New or Updated Company", description: "Emit new event for each new or updated company in Hubspot.", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs b/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs index a2f424b44082b..f4dbcfaa7da68 100644 --- a/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs +++ b/components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-new-or-updated-contact", name: "New or Updated Contact", description: "Emit new event for each new or updated contact in Hubspot.", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs b/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs index ff16543c67c2d..21c2fe93619f5 100644 --- a/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs +++ b/components/hubspot/sources/new-or-updated-crm-object/new-or-updated-crm-object.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-or-updated-crm-object", name: "New or Updated CRM Object", description: "Emit new event each time a CRM Object of the specified object type is updated.", - version: "0.0.16", + version: "0.0.17", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs b/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs index e6b2f101a6ea6..3771abe2020fa 100644 --- a/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs +++ b/components/hubspot/sources/new-or-updated-custom-object/new-or-updated-custom-object.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-or-updated-custom-object", name: "New or Updated Custom Object", description: "Emit new event each time a Custom Object of the specified schema is updated.", - version: "0.0.5", + version: "0.0.6", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs b/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs index 66b551061dc2a..aa91585e59633 100644 --- a/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs +++ b/components/hubspot/sources/new-or-updated-deal/new-or-updated-deal.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-new-or-updated-deal", name: "New or Updated Deal", description: "Emit new event for each new or updated deal in Hubspot", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs b/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs index 418c367bb66e0..46037f5893efb 100644 --- a/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs +++ b/components/hubspot/sources/new-or-updated-line-item/new-or-updated-line-item.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-new-or-updated-line-item", name: "New or Updated Line Item", description: "Emit new event for each new line item added or updated in Hubspot.", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs b/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs index b08e45457026d..49942e5cc358a 100644 --- a/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs +++ b/components/hubspot/sources/new-or-updated-product/new-or-updated-product.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-new-or-updated-product", name: "New or Updated Product", description: "Emit new event for each new or updated product in Hubspot.", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs b/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs index 310f319ff8ce1..e2ddba129b8dc 100644 --- a/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs +++ b/components/hubspot/sources/new-social-media-message/new-social-media-message.mjs @@ -6,7 +6,7 @@ export default { key: "hubspot-new-social-media-message", name: "New Social Media Message", description: "Emit new event when a message is posted from HubSpot to the specified social media channel. Note: Only available for Marketing Hub Enterprise accounts", - version: "0.0.16", + version: "0.0.17", type: "source", dedupe: "unique", props: { diff --git a/components/hubspot/sources/new-task/new-task.mjs b/components/hubspot/sources/new-task/new-task.mjs new file mode 100644 index 0000000000000..6f77dce83431f --- /dev/null +++ b/components/hubspot/sources/new-task/new-task.mjs @@ -0,0 +1,56 @@ +import common from "../common/common.mjs"; +import { + DEFAULT_LIMIT, OBJECT_TYPES, +} from "../../common/constants.mjs"; + +export default { + ...common, + key: "hubspot-new-task", + name: "New Task Created", + description: "Emit new event for each new task created. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/engagements/tasks#get-%2Fcrm%2Fv3%2Fobjects%2Ftasks)", + version: "0.0.1", + type: "source", + dedupe: "unique", + methods: { + ...common.methods, + getTs(task) { + return Date.parse(task.createdAt); + }, + generateMeta(task) { + return { + id: task.id, + summary: `New Task: ${task.properties.hs_task_subject || task.id}`, + ts: this.getTs(task), + }; + }, + isRelevant(task, createdAfter) { + return this.getTs(task) > createdAfter; + }, + async getParams() { + const { results: allProperties } = await this.hubspot.getProperties({ + objectType: "tasks", + }); + const properties = allProperties.map(({ name }) => name); + + const objectTypes = OBJECT_TYPES.map(({ value }) => value); + const { results: custom } = await this.hubspot.listSchemas(); + const customObjects = custom?.map(({ name }) => name); + const associations = [ + ...objectTypes, + ...customObjects, + ]; + + return { + params: { + limit: DEFAULT_LIMIT, + properties: properties.join(","), + associations: associations.join(","), + }, + }; + }, + async processResults(after, params) { + const tasks = await this.getPaginatedItems(this.hubspot.listTasks.bind(this), params); + await this.processEvents(tasks, after); + }, + }, +}; diff --git a/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs b/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs index 72c783f20e91a..b3293f9d0b31e 100644 --- a/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs +++ b/components/hubspot/sources/new-ticket-property-change/new-ticket-property-change.mjs @@ -7,7 +7,7 @@ export default { key: "hubspot-new-ticket-property-change", name: "New Ticket Property Change", description: "Emit new event when a specified property is provided or updated on a ticket. [See the documentation](https://developers.hubspot.com/docs/api/crm/tickets)", - version: "0.0.10", + version: "0.0.11", dedupe: "unique", type: "source", props: { diff --git a/components/hubspot/sources/new-ticket/new-ticket.mjs b/components/hubspot/sources/new-ticket/new-ticket.mjs index da786ecc39498..12e9e91e49927 100644 --- a/components/hubspot/sources/new-ticket/new-ticket.mjs +++ b/components/hubspot/sources/new-ticket/new-ticket.mjs @@ -9,7 +9,7 @@ export default { key: "hubspot-new-ticket", name: "New Ticket", description: "Emit new event for each new ticket created.", - version: "0.0.16", + version: "0.0.17", dedupe: "unique", type: "source", props: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c921d2c19df8d..3a2fc073d8db6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1005,8 +1005,7 @@ importers: specifier: ^9.0.1 version: 9.0.1 - components/azure_storage: - specifiers: {} + components/azure_storage: {} components/backblaze: {} @@ -3104,8 +3103,7 @@ importers: components/easypost: {} - components/easypromos: - specifiers: {} + components/easypromos: {} components/easysendy: dependencies: @@ -3159,8 +3157,7 @@ importers: specifier: ^4.0.0 version: 4.0.1 - components/elevio: - specifiers: {} + components/elevio: {} components/elmah_io: dependencies: @@ -4823,8 +4820,7 @@ importers: specifier: ^1.6.0 version: 1.6.6 - components/homerun: - specifiers: {} + components/homerun: {} components/hookdeck: dependencies: @@ -8319,8 +8315,7 @@ importers: specifier: ^1.1.1 version: 1.6.6 - components/ragie: - specifiers: {} + components/ragie: {} components/railsr: {} @@ -8513,8 +8508,7 @@ importers: specifier: ^1.3.0 version: 1.6.6 - components/refiner: - specifiers: {} + components/refiner: {} components/reflect: dependencies: @@ -10545,8 +10539,7 @@ importers: specifier: ^1.1.0 version: 1.6.6 - components/textline: - specifiers: {} + components/textline: {} components/textlocal: dependencies: @@ -11052,8 +11045,7 @@ importers: specifier: ^6.2.13 version: 6.2.13 - components/typefully: - specifiers: {} + components/typefully: {} components/typless: {} @@ -11578,8 +11570,7 @@ importers: components/weworkbook: {} - components/what_are_those: - specifiers: {} + components/what_are_those: {} components/whatconverts: {} @@ -24691,22 +24682,22 @@ packages: superagent@3.8.1: resolution: {integrity: sha512-VMBFLYgFuRdfeNQSMLbxGSLfmXL/xc+OO+BZp41Za/NRDBet/BNbkRJrYzCUu0u4GU0i/ml2dtT8b9qgkw9z6Q==} engines: {node: '>= 4.0'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . superagent@4.1.0: resolution: {integrity: sha512-FT3QLMasz0YyCd4uIi5HNe+3t/onxMyEho7C3PSqmti3Twgy2rXT4fmkTz6wRL6bTF4uzPcfkUCa8u4JWHw8Ag==} engines: {node: '>= 6.0'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . superagent@5.3.1: resolution: {integrity: sha512-wjJ/MoTid2/RuGCOFtlacyGNxN9QLMgcpYLDQlWFIhhdJ93kNscFonGvrpAHSCVjRVj++DGCglocF7Aej1KHvQ==} engines: {node: '>= 7.0.0'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . superagent@7.1.6: resolution: {integrity: sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==} engines: {node: '>=6.4.0 <13 || >=14'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net + deprecated: Please downgrade to v7.1.5 if you need IE/ActiveXObject support OR upgrade to v8.0.0 as we no longer support IE and published an incorrect patch version (see https://github.com/visionmedia/superagent/issues/1731) supports-color@2.0.0: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==}