Broken Integration Alarm System (#3135)
* Create broken integration email * Send video on broken video link * Add translations * Add Trans components * Remove calendars file * Type fixes * Add translations * Fix type errors * Fix Spanish translation Co-authored-by: Omar López <[email protected]> * Remove iCal event * Locale fixes * Clean up trans tag * Apply suggested translation Co-authored-by: Bailey Pumfleet <[email protected]> * Change email to en * Fix type error * Type fix * Fix e2e * Fix e2e * Fix e2e * Fix e2e * Fix e2e * Update webhookResponse-chromium.txt Co-authored-by: Omar López <[email protected]> Co-authored-by: Bailey Pumfleet <[email protected]>
This commit is contained in:
22 files changed
+290
-27
No files matched your search
+1
-1
Submodule apps/console updated: bf9484c64b...3fe93861ba.
@@ -104,6 +104,7 @@ async function patchHandler(req: NextApiRequest) {
|
||||
eventTypeId: true,
|
||||
eventType: {
|
||||
select: {
|
||||
id: true,
|
||||
recurringEvent: true,
|
||||
requiresConfirmation: true,
|
||||
},
|
||||
@@ -178,6 +179,7 @@ async function patchHandler(req: NextApiRequest) {
|
||||
uid: booking.uid,
|
||||
destinationCalendar: booking?.destinationCalendar || currentUser.destinationCalendar,
|
||||
requiresConfirmation: booking?.eventType?.requiresConfirmation ?? false,
|
||||
eventTypeId: booking.eventType?.id,
|
||||
};
|
||||
|
||||
const recurringEvent = parseRecurringEvent(booking.eventType?.recurringEvent);
|
||||
|
||||
@@ -403,6 +403,7 @@ async function handler(req: NextApiRequest) {
|
||||
destinationCalendar: eventType.destinationCalendar || organizerUser.destinationCalendar,
|
||||
hideCalendarNotes: eventType.hideCalendarNotes,
|
||||
requiresConfirmation: eventType.requiresConfirmation ?? false,
|
||||
eventTypeId: eventType.id,
|
||||
};
|
||||
|
||||
if (eventType.schedulingType === SchedulingType.COLLECTIVE) {
|
||||
@@ -803,6 +804,7 @@ async function handler(req: NextApiRequest) {
|
||||
bookingId,
|
||||
rescheduleUid,
|
||||
metadata: reqBody.metadata,
|
||||
eventTypeId,
|
||||
}).catch((e) => {
|
||||
console.error(`Error executing webhook for event: ${eventTrigger}, URL: ${sub.subscriberUrl}`, e);
|
||||
})
|
||||
|
||||
@@ -6,6 +6,7 @@ import { getTranslation } from "@calcom/lib/server/i18n";
|
||||
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
if (process.env.NODE_ENV !== "development") return res.write("Only for development purposes"), res.end();
|
||||
const t = await getTranslation("en", "common");
|
||||
const language = { translate: t, locale: "en" };
|
||||
|
||||
const evt = {
|
||||
type: "30min",
|
||||
@@ -22,14 +23,14 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
name: "Pro Example",
|
||||
email: "[email protected]",
|
||||
timeZone: "Europe/London",
|
||||
language: { translate: t, locale: "en" },
|
||||
language,
|
||||
},
|
||||
attendees: [
|
||||
{
|
||||
email: "[email protected]",
|
||||
name: "[email protected]",
|
||||
timeZone: "America/Chihuahua",
|
||||
language: { translate: t, locale: "en" },
|
||||
language,
|
||||
},
|
||||
],
|
||||
location: "Zoom video",
|
||||
|
||||
@@ -76,6 +76,7 @@ test.describe("Integrations", () => {
|
||||
body.payload.bookingId = dynamic;
|
||||
body.payload.additionalInformation = dynamic;
|
||||
body.payload.requiresConfirmation = dynamic;
|
||||
body.payload.eventTypeId = dynamic;
|
||||
|
||||
// if we change the shape of our webhooks, we can simply update this by clicking `u`
|
||||
// console.log("BODY", body);
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"triggerEvent":"BOOKING_CREATED","createdAt":"[redacted/dynamic]","payload":{"type":"30 min","title":"30 min between PRO and Test Testson","description":"","additionalNotes":"","customInputs":{},"startTime":"[redacted/dynamic]","endTime":"[redacted/dynamic]","organizer":{"name":"PRO","email":"[redacted/dynamic]","timeZone":"[redacted/dynamic]","language":"[redacted/dynamic]"},"attendees":[{"email":"[email protected]","name":"Test Testson","timeZone":"[redacted/dynamic]","language":"[redacted/dynamic]"}],"location":"[redacted/dynamic]","destinationCalendar":null,"hideCalendarNotes":false,"requiresConfirmation":"[redacted/dynamic]","uid":"[redacted/dynamic]","bookingId":"[redacted/dynamic]","metadata":{},"additionalInformation":"[redacted/dynamic]"}}
|
||||
{"triggerEvent":"BOOKING_CREATED","createdAt":"[redacted/dynamic]","payload":{"type":"30 min","title":"30 min between PRO and Test Testson","description":"","additionalNotes":"","customInputs":{},"startTime":"[redacted/dynamic]","endTime":"[redacted/dynamic]","organizer":{"name":"PRO","email":"[redacted/dynamic]","timeZone":"[redacted/dynamic]","language":"[redacted/dynamic]"},"attendees":[{"email":"[email protected]","name":"Test Testson","timeZone":"[redacted/dynamic]","language":"[redacted/dynamic]"}],"location":"[redacted/dynamic]","destinationCalendar":null,"hideCalendarNotes":false,"requiresConfirmation":"[redacted/dynamic]","eventTypeId":"[redacted/dynamic]","uid":"[redacted/dynamic]","bookingId":"[redacted/dynamic]","metadata":{},"additionalInformation":"[redacted/dynamic]"}}
|
||||
@@ -911,5 +911,10 @@
|
||||
"add_exchange2016": "Connect Exchange 2016 Server",
|
||||
"specific_issue": "Have a specific issue",
|
||||
"browse_our_docs": "browse our docs",
|
||||
"attendee_name": "Attendee's name"
|
||||
"broken_video_action": "We could not add the <1>{{location}}</1> meeting link to your scheduled event. Contact your invitees or update your calendar event to add the details. You can either <3> change your location on the event type </3> or try <5>removing and adding the app again.</5>",
|
||||
"broken_calendar_action": "We could not update your <1>{{calendar}}</1>. <2> Please check your calendar settings or remove and add your calendar again </2>",
|
||||
"attendee_name": "Attendee's name",
|
||||
"broken_integration": "Broken integration",
|
||||
"problem_adding_video_link": "There was a problem adding a video link",
|
||||
"problem_updating_calendar": "There was a problem updating your calendar"
|
||||
}
|
||||
@@ -903,5 +903,8 @@
|
||||
"requires_confirmation": "Requiere confirmación",
|
||||
"add_exchange2013": "Conectar con Exchange 2013 Server",
|
||||
"add_exchange2016": "Conectar con Exchange 2016 Server",
|
||||
"broken_video_action": "No pudimos agregar el enlace de <1>{{location}}</1> a tu evento agendado. Contacta a tus invitados o actualiza tu calendario para agregar los detalles. Puedes <3>cambiar la ubicación de tu tipo de evento</3> o <5>remover la App y agregarla de nuevo.</5>",
|
||||
"problem_adding_video_link": "Hubo un problema al añadir un enlace de vídeo",
|
||||
"problem_updating_calendar": "Hubo un problema al actualizar su calendario",
|
||||
"attendee_name": "Nombre del asistente"
|
||||
}
|
||||
Reference in new issue
Block a user