import type { IntegrationAccountRequirement, TriggerDefinition } from "../types" const CALCOM_ACCOUNT = { connectionOptions: [{ connectionMethodId: "api-key", requiredScopes: [] }], serviceId: "calcom", } as const satisfies IntegrationAccountRequirement export const calcomTriggerDefinitions = { calcomAfterGuestsCalVideoNoShow: definition( "calcom.afterGuestsCalVideoNoShow", ), calcomAfterHostsCalVideoNoShow: definition("calcom.afterHostsCalVideoNoShow"), calcomBookingCancelled: definition("calcom.booking.cancelled"), calcomBookingCreated: definition("calcom.booking.created"), calcomBookingLocationUpdated: definition("calcom.booking.locationUpdated"), calcomBookingNoShowUpdated: definition("calcom.booking.noShowUpdated"), calcomBookingPaid: definition("calcom.booking.paid"), calcomBookingPaymentInitiated: definition("calcom.booking.paymentInitiated"), calcomBookingReassigned: definition("calcom.booking.reassigned"), calcomBookingRejected: definition("calcom.booking.rejected"), calcomBookingRequested: definition("calcom.booking.requested"), calcomBookingRescheduled: definition("calcom.booking.rescheduled"), calcomCalendarEntryRejected: definition("calcom.calendarEntryRejected"), calcomDelegationCredentialError: definition( "calcom.delegationCredential.error", ), calcomDelegationCredentialRotationRequired: definition( "calcom.delegationCredential.rotationRequired", ), calcomDelegationCredentialSecretRotated: definition( "calcom.delegationCredential.secretRotated", ), calcomDelegationCredentialSecretRotationFailed: definition( "calcom.delegationCredential.secretRotationFailed", ), calcomEvent: definition("calcom.event"), calcomFormSubmitted: definition("calcom.form.submitted"), calcomFormSubmittedWithoutEvent: definition( "calcom.form.submittedWithoutEvent", ), calcomInstantMeetingAccepted: definition("calcom.instantMeeting.accepted"), calcomInstantMeetingCreated: definition("calcom.instantMeeting.created"), calcomMeetingEnded: definition("calcom.meeting.ended"), calcomMeetingStarted: definition("calcom.meeting.started"), calcomOutOfOfficeCreated: definition("calcom.outOfOffice.created"), calcomRecordingReady: definition("calcom.recording.ready"), calcomRecordingTranscriptionGenerated: definition( "calcom.recording.transcriptionGenerated", ), calcomRoutingFormFallbackHit: definition("calcom.routingForm.fallbackHit"), calcomWrongAssignmentReported: definition("calcom.wrongAssignmentReported"), } as const satisfies Record /** * Builds a Cal.com managed-webhook trigger definition. * * @param type Platform event type. */ function definition(type: TType) { return { account: CALCOM_ACCOUNT, type } as const }