Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/hubspot integration #1123

Merged
merged 75 commits into from
Jul 26, 2023
Merged

Feature/hubspot integration #1123

merged 75 commits into from
Jul 26, 2023

Conversation

epipav
Copy link
Collaborator

@epipav epipav commented Jul 14, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at bb69b00

This pull request adds support for Hubspot integration to the Crowd application. It implements the backend and frontend logic for connecting to Hubspot, onboarding the integration, updating the properties, and getting the mappable fields. It also updates the data sink worker service to handle new data types and new fields for the organization and member data. It modifies several files in the backend, frontend, and services folders, and adds new files for the Hubspot helper functions and components.

🤖 Generated by Copilot at bb69b00

Sing, O Muse, of the skillful hackers who devised
The wondrous integration of Hubspot and Crowd,
And how they added routes and helpers to the API,
And how they made the Nango service their ally.

Why

How

🤖 Generated by Copilot at bb69b00

  • Add Hubspot integration feature to the Crowd application (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Enable the Hubspot integration feature flag by removing the enabled: false property from the config.js file (link)
  • Add hubspot to the list of integrations supported by the CROWD_NANGO_INTEGRATIONS environment variable in the .env.dist.local file (link)
  • Map the environment variables for the Hubspot integration settings to the configuration object in the custom-environment-variables.json file (link)
  • Implement the business logic for the Hubspot integration in the IntegrationService class in the integrationService.ts file (link, link, link)
    • Add new methods for connecting to Hubspot, getting the mappable fields, onboarding the integration, and updating the properties (link)
    • Add new imports for the hubspot module, the hubspotConfig object, and the HubspotService class (link, link)
  • Implement the HTTP handlers for the Hubspot integration in the helpers folder under the integration API (link, link, link, link)
    • Add new files for each endpoint: hubspotConnect.ts, hubspotGetMappableFields.ts, hubspotOnboard.ts, and hubspotUpdateProperties.ts (link, link, link, link)
    • Export default functions that validate the user permissions, call the corresponding methods of the IntegrationService, and send success responses with the payloads (link, link, link, link)
  • Add new routes to the integration API index file using the safeWrap and require functions (link)
  • Modify the hubspot-book-call.vue component to replace the static link to Calendly with a dynamic slot that receives a connect function as a prop (link)
    • Add a new component app-hacker-news-connect-drawer that renders a drawer with the instructions and status of the Hubspot connection (link)
    • Bind the drawerVisible data property to the visibility of the drawer using a v-model directive (link)
    • Handle the events and logic for the Hubspot connection process using the hubspotConnect API endpoint (link)
  • Add new properties to the config.js file for the Hubspot integration, such as the name, the icon, the description, the steps, and the fields (link)
  • Add a new method to the IntegrationService class in the integration-service.js file that calls the hubspotGetMappableFields API endpoint and returns the response data (link)
  • Add a new action to the integration store module in the integration-store.js file that dispatches the hubspotGetMappableFields method of the IntegrationService and commits the result to the hubspotMappableFields state property (link)
  • Add a new method to the MemberRepository class in the member.repo.ts file that updates the Hubspot properties of a member in the database (link)
  • Modify the imports, the interfaces, and the column names in the organization.data.ts file to reflect the Hubspot integration data (link, link, link, link, link, link, link)
    • Add a missing return statement to the getInsertCacheOrganizationColumnSet function (link)
  • Modify the member.repo.ts file to import the OrganizationRepository class and use the Hubspot integration data (link, link, link, link, link, link)
    • Modify the SQL queries and the value strings to use the Hubspot integration data (link, link, link, link, link)
  • Modify the imports in the activity.service.ts file to use the Hubspot integration data (link)
  • Modify the imports in the dataSink.service.ts file to use the Hubspot integration data (link)
    • Add two new cases to the switch statement in the processData method to handle the Hubspot integration data (link)
  • Modify the imports in the member.service.ts file to use the Hubspot integration data (link)
    • Add a new import for the OrganizationService class (link)
    • Add a new method to the MemberService class that updates the Hubspot properties of a member using the MemberRepository class (link)
  • Modify the imports and the data objects in the organization.service.ts file to use the Hubspot integration data (link, link, link, link, link)
    • Add a new method call to the findOrCreate method to update the Hubspot properties of an organization using the MemberService class (link)
    • Add a new method to the OrganizationService class that updates the Hubspot properties of an organization using the OrganizationRepository class (link)
  • Add a new property to the publish object in the processData method of the IntegrationDataService class in the integrationDataService.ts file to handle the Hubspot integration data (link)
    • Add a new method to the IntegrationDataService class that publishes the Hubspot integration data to the data sink service using the publish object (link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

Uroš Marolt and others added 26 commits July 7, 2023 13:12
…1795-C-1794' into feature/hubspot-integration
To make sorting more consistent
…1795-C-1794' into feature/hubspot-integration
Base automatically changed from enhancement/support-object-members-and-organizations-C-1795-C-1794 to main July 18, 2023 11:08
@epipav epipav marked this pull request as ready for review July 25, 2023 08:06
@epipav epipav added the Feature Created by Linear-GitHub Sync label Jul 25, 2023
@gaspergrom gaspergrom self-requested a review July 26, 2023 06:27
@epipav epipav merged commit 76ccc3b into main Jul 26, 2023
9 checks passed
@epipav epipav deleted the feature/hubspot-integration branch July 26, 2023 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants