Skip to content

chore: salesforce for Router / Booker atoms and api v2#19217

Merged
ThyMinimalDev merged 12 commits intomainfrom
enable-salesforce-router-apiv2-atom
Feb 12, 2025
Merged

chore: salesforce for Router / Booker atoms and api v2#19217
ThyMinimalDev merged 12 commits intomainfrom
enable-salesforce-router-apiv2-atom

Conversation

@ThyMinimalDev
Copy link
Copy Markdown
Contributor

@ThyMinimalDev ThyMinimalDev commented Feb 10, 2025

What does this PR do?

add salesforce support

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • N/A I confirm automated tests are in place that prove my fix is effective or that my feature works.

@ThyMinimalDev ThyMinimalDev requested a review from a team February 10, 2025 13:11
@keithwillcode keithwillcode added core area: core, team members only platform Anything related to our platform plan labels Feb 10, 2025
@dosubot dosubot Bot added the crm-apps area: crm apps, salesforce, hubspot, close.com, sendgrid label Feb 10, 2025
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cal-com-ui-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2025 11:50am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2025 11:50am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2025 11:50am

Comment on lines +53 to +59
if (
routingSearchParams.get("cal.action") === "eventTypeRedirectUrl" &&
routingSearchParams.has("email") &&
routingSearchParams.has("cal.teamId")
) {
return this.handleEventTypeRedirect(routingUrl, routingSearchParams);
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if team eventtype redirect url, check if we need to get salesforce param

email: teamMemberEmail,
recordType: crmOwnerRecordType,
crmAppSlug,
} = await getTeamMemberEmailForResponseOrContactUsingUrlQuery({
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joeauyeung can you confirm when should this function be called ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a call with @ThyMinimalDev about this.

Comment on lines +84 to +92
...(routingSearchParams.get("cal.teamMemberEmail") && {
teamMemberEmail: routingSearchParams.get("cal.teamMemberEmail") ?? undefined,
}),
...(routingSearchParams.get("cal.crmOwnerRecordType") && {
crmOwnerRecordType: routingSearchParams.get("cal.crmOwnerRecordType") ?? undefined,
}),
...(routingSearchParams.get("cal.crmAppSlug") && {
crmAppSlug: routingSearchParams.get("cal.crmAppSlug") ?? undefined,
}),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add props concerning salesforce

Comment on lines +73 to +75
teamMemberEmail={teamMemberEmail}
crmOwnerRecordType={crmOwnerRecordType}
crmAppSlug={crmAppSlug}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

give props concerning salesforce to the booker

rest.routedTeamMemberIds,
rest.skipContactOwner,
rest.shouldServeCache,
rest.teamMemberEmail,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

team member email from salesforce

crmAppSlug,
isSEOIndexable: allowSEOIndexing,
},
};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactored for clarity

joeauyeung
joeauyeung previously approved these changes Feb 11, 2025
Copy link
Copy Markdown
Contributor

@joeauyeung joeauyeung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a call with @ThyMinimalDev. Logic makes sense and we're passing the right params. Will approve.

routingSearchParams.get("cal.action") === "eventTypeRedirectUrl" &&
routingSearchParams.has("email") &&
routingSearchParams.has("cal.teamId") &&
!routingSearchParams.has("cal.skipContactOwner")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if skipContactOwner is defined, no need to check with salesforce

email: teamMemberEmail,
recordType: crmOwnerRecordType,
crmAppSlug,
} = await getTeamMemberEmailForResponseOrContactUsingUrlQuery({
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in a follow up pr, we can try to create a new function that would merge the logic of getting the routed url and the contact owner in a more optimised fashion

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Feb 11, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/detect-port@1.3.5 None 0 3.37 kB types
npm/@types/lodash@4.17.15 None 0 868 kB types
npm/@types/mime-types@2.1.4 None 0 3.38 kB types
npm/@types/node@16.9.1 🔁 npm/@types/node@20.17.17, npm/@types/node@22.13.1 None 0 1.63 MB types
npm/classnames@2.5.1 None 0 23.6 kB jedwatson
npm/ical.js@1.5.0 None 0 669 kB kewisch

🚮 Removed packages: npm/@axiomhq/winston@1.3.1, npm/@calcom/platform-libraries@0.0.2, npm/@calcom/platform-libraries@0.0.95, npm/@golevelup/ts-jest@0.4.0, npm/@microsoft/microsoft-graph-types-beta@0.42.0-preview, npm/@nest-lab/throttler-storage-redis@1.0.0, npm/@nestjs/bull@10.2.3, npm/@nestjs/cli@10.4.9, npm/@nestjs/common@10.4.15, npm/@nestjs/config@3.3.0, npm/@nestjs/core@10.4.15, npm/@nestjs/jwt@10.2.0, npm/@nestjs/passport@10.0.3, npm/@nestjs/platform-express@10.4.15, npm/@nestjs/schematics@10.2.3, npm/@nestjs/swagger@7.4.2, npm/@nestjs/testing@10.4.15, npm/@nestjs/throttler@6.2.1, npm/@sentry/nestjs@8.54.0, npm/@sentry/nextjs@8.54.0, npm/@sentry/profiling-node@8.54.0, npm/@types/cookie-parser@1.4.8, npm/@types/express@4.17.21, npm/@types/fs-extra@11.0.4, npm/@types/luxon@3.4.2, npm/@types/passport-jwt@3.0.13, npm/@types/supertest@2.0.16, npm/body-parser@1.20.3, npm/bull@4.16.5, npm/class-transformer@0.5.1, npm/class-validator@0.14.1, npm/connect@3.7.0, npm/cookie-parser@1.4.7, npm/googleapis@84.0.0, npm/helmet@7.2.0, npm/http-proxy-middleware@2.0.7, npm/http@0.0.1-security, npm/ioredis@5.5.0, npm/jest-date-mock@1.0.10, npm/jest@29.7.0, npm/jsforce@1.11.1, npm/memory-cache@0.2.0, npm/nest-winston@1.10.2, npm/next-api-middleware@1.0.1, npm/next-auth@4.24.11, npm/next-axiom@0.17.0, npm/next-swagger-doc@0.3.6, npm/next-validations@0.2.1, npm/next@13.5.8, npm/node-mocks-http@1.16.2, npm/passport-jwt@4.0.1, npm/passport@0.7.0, npm/qs-stringify@1.2.1, npm/querystring@0.2.1, npm/reflect-metadata@0.1.14, npm/stripe@15.12.0, npm/supertest@6.3.4, npm/ts-jest@29.2.5, npm/ts-loader@9.5.2, npm/tsconfig-paths@4.2.0, npm/tzdata@1.0.43

View full report↗︎

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Feb 11, 2025

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteCI
Critical CVE npm/dompurify@=2.3.3 ⚠︎
Possible typosquat attack npm/css-gradient-parser@0.0.16 ⚠︎

View full report↗︎

Next steps

What is a critical CVE?

Contains a Critical Common Vulnerability and Exposure (CVE).

Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

What is a typosquat?

Package name is similar to other popular packages and may not be the package you want.

Use care when consuming similarly named packages and ensure that you did not intend to consume a different package. Malicious packages often publish using similar names as existing popular packages.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/dompurify@=2.3.3
  • @SocketSecurity ignore npm/css-gradient-parser@0.0.16

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 11, 2025

E2E results are ready!

@ThyMinimalDev ThyMinimalDev merged commit 486e3a3 into main Feb 12, 2025
@ThyMinimalDev ThyMinimalDev deleted the enable-salesforce-router-apiv2-atom branch February 12, 2025 13:04
MuhammadAimanSulaiman pushed a commit to hit-pay/cal.com that referenced this pull request Feb 25, 2025
* wip

* small refactor

* small refactor

* fixup! Merge branch 'main' into enable-salesforce-router-apiv2-atom

* crm props

* fixup! crm props

* bump platform libraries

* bump platform libraries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only crm-apps area: crm apps, salesforce, hubspot, close.com, sendgrid platform Anything related to our platform plan ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants