-
Notifications
You must be signed in to change notification settings - Fork 195
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
Improved synchronization service for all entities. #336
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,6 +95,7 @@ export class HubspotCompanyMapper implements ICompanyMapper { | |
})) || []; | ||
|
||
let opts: any = {}; | ||
//TODO - Logic needs to be reconsider | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The TODO comment about reconsidering logic indicates an area that may need further attention or refinement. It's important to ensure that any logic related to owner ID mapping is correctly implemented and does not introduce inconsistencies. Would you like me to help refine this logic or open a GitHub issue to track this task? |
||
if (company.properties.hubspot_owner_id) { | ||
const owner_id = await this.utils.getUserUuidFromRemoteId( | ||
company.properties.hubspot_owner_id, | ||
|
@@ -108,6 +109,7 @@ export class HubspotCompanyMapper implements ICompanyMapper { | |
} | ||
|
||
return { | ||
remote_id: company.id, | ||
name: company.properties.name, | ||
industry: company.properties.industry, | ||
number_of_employees: 0, // Placeholder, as there's no direct mapping provided | ||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -143,8 +143,8 @@ export class HubspotEngagementMapper implements IEngagementMapper { | |||||||||
source.direction === 'INBOUND' | ||||||||||
? 'INCOMING_EMAIL' | ||||||||||
: source.direction === 'OUTBOUND' | ||||||||||
? 'FORWARDED_EMAIL' | ||||||||||
: '', | ||||||||||
? 'FORWARDED_EMAIL' | ||||||||||
: '', | ||||||||||
Comment on lines
+146
to
+147
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The ternary operator for - ? 'FORWARDED_EMAIL'
+ ? 'OUTBOUND_EMAIL' // Assuming 'OUTBOUND_EMAIL' is the correct mapping, please replace with the correct HubSpot value. Committable suggestion
Suggested change
|
||||||||||
hs_email_to_lastname: '', // Placeholder, needs appropriate mapping | ||||||||||
hs_email_sender_email: '', // Placeholder, needs appropriate mapping | ||||||||||
hs_email_to_firstname: '', // Placeholder, needs appropriate mapping | ||||||||||
|
@@ -191,15 +191,15 @@ export class HubspotEngagementMapper implements IEngagementMapper { | |||||||||
case 'MEETING': | ||||||||||
return await this.unifyMeeting( | ||||||||||
source as | ||||||||||
| HubspotEngagementMeetingOutput | ||||||||||
| HubspotEngagementMeetingOutput[], | ||||||||||
| HubspotEngagementMeetingOutput | ||||||||||
| HubspotEngagementMeetingOutput[], | ||||||||||
customFieldMappings, | ||||||||||
); | ||||||||||
case 'EMAIL': | ||||||||||
return await this.unifyEmail( | ||||||||||
source as | ||||||||||
| HubspotEngagementEmailOutput | ||||||||||
| HubspotEngagementEmailOutput[], | ||||||||||
| HubspotEngagementEmailOutput | ||||||||||
| HubspotEngagementEmailOutput[], | ||||||||||
customFieldMappings, | ||||||||||
); | ||||||||||
default: | ||||||||||
|
@@ -296,6 +296,7 @@ export class HubspotEngagementMapper implements IEngagementMapper { | |||||||||
} | ||||||||||
|
||||||||||
return { | ||||||||||
remote_id: engagement.id, | ||||||||||
content: engagement.properties.hs_call_body, | ||||||||||
subject: engagement.properties.hs_call_title, | ||||||||||
start_at: new Date(engagement.properties.createdate), | ||||||||||
|
@@ -378,8 +379,8 @@ export class HubspotEngagementMapper implements IEngagementMapper { | |||||||||
engagement.properties.hs_email_direction === 'INCOMING_EMAIL' | ||||||||||
? 'INBOUND' | ||||||||||
: engagement.properties.hs_email_direction === 'FORWARDED_EMAIL' | ||||||||||
? 'OUTBOUND' | ||||||||||
: '', | ||||||||||
? 'OUTBOUND' | ||||||||||
: '', | ||||||||||
field_mappings, | ||||||||||
...opts, | ||||||||||
}; | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TODO comment indicates a need for reconsidering logic related to
company.values.team[0]?.target_record_id
.Would you like assistance in addressing this TODO? It's important to ensure that the logic aligns with the intended functionality and data integrity requirements.