82951cd04e
* chore: Move post booking stuff to separate service * refactor: improve ISP compliance in BookingEventHandlerService - Refactor updatePrivateLinkUsage to only accept hashedLink parameter instead of full payload - Remove shouldProcess function and inline isDryRun check for better clarity - Addresses feedback from PR #24025 Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com> * define only what is used * Define hashed-link-service as well in api-v2 * fix: export HashedLinkService through platform-libraries - Add HashedLinkService to platform-libraries/private-links.ts - Update API V2 to import from platform library instead of direct path - Fixes MODULE_NOT_FOUND error in API V2 build Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
28 lines
871 B
TypeScript
28 lines
871 B
TypeScript
import { WorkflowActions, WorkflowTriggerEvents } from "@calcom/prisma/enums";
|
|
|
|
type WorkflowWithStepsAndTrigger = {
|
|
trigger: WorkflowTriggerEvents;
|
|
steps: {
|
|
action: WorkflowActions;
|
|
}[];
|
|
};
|
|
|
|
export function allowDisablingHostConfirmationEmails(workflows: WorkflowWithStepsAndTrigger[]) {
|
|
return !!workflows.find(
|
|
(workflow) =>
|
|
workflow.trigger === WorkflowTriggerEvents.NEW_EVENT &&
|
|
!!workflow.steps.find((step) => step.action === WorkflowActions.EMAIL_HOST)
|
|
);
|
|
}
|
|
|
|
export function allowDisablingAttendeeConfirmationEmails(workflows: WorkflowWithStepsAndTrigger[]) {
|
|
return !!workflows.find(
|
|
(workflow) =>
|
|
workflow.trigger === WorkflowTriggerEvents.NEW_EVENT &&
|
|
!!workflow.steps.find(
|
|
(step) =>
|
|
step.action === WorkflowActions.EMAIL_ATTENDEE || step.action === WorkflowActions.SMS_ATTENDEE
|
|
)
|
|
);
|
|
}
|