Skip to content

Scheduling infrastructure for absolutely everyone.

additionInformation => additionalInformation

zomars13f20dd7cf34
diff --git a/apps/web/pages/api/book/confirm.ts b/apps/web/pages/api/book/confirm.ts
index fdaf42a7dc6..22a02ebc87a 100644
--- a/apps/web/pages/api/book/confirm.ts
+++ b/apps/web/pages/api/book/confirm.ts
@@ -7,7 +7,7 @@ import { sendDeclinedEmails, sendScheduledEmails } from "@calcom/emails";
import { isPrismaObjOrUndefined } from "@calcom/lib";
import logger from "@calcom/lib/logger";
import prisma from "@calcom/prisma";
-import type { AdditionInformation, CalendarEvent, RecurringEvent } from "@calcom/types/Calendar";
+import type { AdditionalInformation, CalendarEvent, RecurringEvent } from "@calcom/types/Calendar";
import { refund } from "@ee/lib/stripe/server";
import { getSession } from "@lib/auth";
@@ -208,7 +208,7 @@ async function patchHandler(req: NextApiRequest) {
log.error(`Booking ${currentUser.username} failed`, error, results);
} else {
- const metadata: AdditionInformation = {};
+ const metadata: AdditionalInformation = {};
if (results.length) {
// TODO: Handle created event metadata more elegantly
@@ -218,7 +218,7 @@ async function patchHandler(req: NextApiRequest) {
}
try {
await sendScheduledEmails(
- { ...evt, additionInformation: metadata },
+ { ...evt, additionalInformation: metadata },
recurringEventId ? recurringEvent : {} // Send email with recurring event info only on recurring event context
);
} catch (error) {
diff --git a/apps/web/pages/api/book/event.ts b/apps/web/pages/api/book/event.ts
index a203863fc21..e934681cf6a 100644
--- a/apps/web/pages/api/book/event.ts
+++ b/apps/web/pages/api/book/event.ts
@@ -22,7 +22,7 @@ import { getDefaultEvent, getGroupName, getUsernameList } from "@calcom/lib/defa
import { getErrorFromUnknown } from "@calcom/lib/errors";
import logger from "@calcom/lib/logger";
import type { BufferedBusyTime } from "@calcom/types/BufferedBusyTime";
-import type { AdditionInformation, CalendarEvent, RecurringEvent } from "@calcom/types/Calendar";
+import type { AdditionalInformation, CalendarEvent, RecurringEvent } from "@calcom/types/Calendar";
import type { EventResult, PartialReference } from "@calcom/types/EventManager";
import { handlePayment } from "@ee/lib/stripe/server";
@@ -706,7 +706,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
log.error(`Booking ${user.name} failed`, error, results);
} else {
- const metadata: AdditionInformation = {};
+ const metadata: AdditionalInformation = {};
if (results.length) {
// TODO: Handle created event metadata more elegantly
@@ -724,7 +724,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
await sendRescheduledEmails(
{
...evt,
- additionInformation: metadata,
+ additionalInformation: metadata,
additionalNotes, // Resets back to the additionalNote input and not the override value
cancellationReason: reqBody.rescheduleReason,
},
@@ -752,7 +752,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
log.error(`Booking ${user.username} failed`, error, results);
} else {
- const metadata: AdditionInformation = {};
+ const metadata: AdditionalInformation = {};
if (results.length) {
// TODO: Handle created event metadata more elegantly
@@ -764,7 +764,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
await sendScheduledEmails(
{
...evt,
- additionInformation: metadata,
+ additionalInformation: metadata,
additionalNotes,
customInputs,
},
diff --git a/apps/web/playwright/integrations.test.ts b/apps/web/playwright/integrations.test.ts
index df750b3cc89..d034779e4ab 100644
--- a/apps/web/playwright/integrations.test.ts
+++ b/apps/web/playwright/integrations.test.ts
@@ -71,7 +71,7 @@ test.describe("Integrations", () => {
body.payload.organizer.timeZone = dynamic;
body.payload.organizer.language = dynamic;
body.payload.uid = dynamic;
- body.payload.additionInformation = dynamic;
+ body.payload.additionalInformation = dynamic;
// if we change the shape of our webhooks, we can simply update this by clicking `u`
// console.log("BODY", body);
diff --git a/apps/web/playwright/integrations.test.ts-snapshots/webhookResponse-chromium.txt b/apps/web/playwright/integrations.test.ts-snapshots/webhookResponse-chromium.txt
index 1f8f35ad098..d17c29af6e7 100644
--- a/apps/web/playwright/integrations.test.ts-snapshots/webhookResponse-chromium.txt
+++ b/apps/web/playwright/integrations.test.ts-snapshots/webhookResponse-chromium.txt
@@ -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,"uid":"[redacted/dynamic]","metadata":{},"additionInformation":"[redacted/dynamic]"}}
\ No newline at end of file
+{"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,"uid":"[redacted/dynamic]","metadata":{},"additionalInformation":"[redacted/dynamic]"}}
\ No newline at end of file
diff --git a/apps/web/server/routers/viewer/bookings.tsx b/apps/web/server/routers/viewer/bookings.tsx
index fd035bbf868..88548aae828 100644
--- a/apps/web/server/routers/viewer/bookings.tsx
+++ b/apps/web/server/routers/viewer/bookings.tsx
@@ -6,7 +6,7 @@ import EventManager from "@calcom/core/EventManager";
import { sendLocationChangeEmails } from "@calcom/emails";
import logger from "@calcom/lib/logger";
import { getTranslation } from "@calcom/lib/server/i18n";
-import type { AdditionInformation, CalendarEvent } from "@calcom/types/Calendar";
+import type { AdditionalInformation, CalendarEvent } from "@calcom/types/Calendar";
import { createProtectedRouter } from "@server/createRouter";
import { TRPCError } from "@trpc/server";
@@ -133,14 +133,14 @@ export const bookingsRouter = createProtectedRouter()
};
logger.error(`Booking ${ctx.user.username} failed`, error, results);
} else {
- const metadata: AdditionInformation = {};
+ const metadata: AdditionalInformation = {};
if (results.length) {
metadata.hangoutLink = results[0].createdEvent?.hangoutLink;
metadata.conferenceData = results[0].createdEvent?.conferenceData;
metadata.entryPoints = results[0].createdEvent?.entryPoints;
}
try {
- await sendLocationChangeEmails({ ...evt, additionInformation: metadata });
+ await sendLocationChangeEmails({ ...evt, additionalInformation: metadata });
} catch (error) {
console.log("Error sending LocationChangeEmails");
}
diff --git a/packages/app-store/googlecalendar/lib/CalendarService.ts b/packages/app-store/googlecalendar/lib/CalendarService.ts
index 5df04987b93..78fcd7ce43d 100644
--- a/packages/app-store/googlecalendar/lib/CalendarService.ts
+++ b/packages/app-store/googlecalendar/lib/CalendarService.ts
@@ -145,7 +145,7 @@ export default class GoogleCalendarService implements Calendar {
requestBody: {
description: getRichDescription({
...calEventRaw,
- additionInformation: { hangoutLink: event.data.hangoutLink || "" },
+ additionalInformation: { hangoutLink: event.data.hangoutLink || "" },
}),
},
});
diff --git a/packages/core/EventManager.ts b/packages/core/EventManager.ts
index 45e9dcaa673..0ac101a4cad 100644
--- a/packages/core/EventManager.ts
+++ b/packages/core/EventManager.ts
@@ -6,7 +6,7 @@ import { v5 as uuidv5 } from "uuid";
import { FAKE_DAILY_CREDENTIAL } from "@calcom/app-store/dailyvideo/lib/VideoApiAdapter";
import getApps from "@calcom/app-store/utils";
import prisma from "@calcom/prisma";
-import type { AdditionInformation, CalendarEvent } from "@calcom/types/Calendar";
+import type { AdditionalInformation, CalendarEvent } from "@calcom/types/Calendar";
import type {
CreateUpdateResult,
EventResult,
@@ -19,7 +19,7 @@ import { createEvent, updateEvent } from "./CalendarManager";
import { LocationType } from "./location";
import { createMeeting, updateMeeting } from "./videoClient";
-export type Event = AdditionInformation & VideoCallData;
+export type Event = AdditionalInformation & VideoCallData;
export const isZoom = (location: string): boolean => {
return location === "integrations:zoom";
diff --git a/packages/core/builders/CalendarEvent/class.ts b/packages/core/builders/CalendarEvent/class.ts
index c9fa5ba2fe5..60a8e6351a9 100644
--- a/packages/core/builders/CalendarEvent/class.ts
+++ b/packages/core/builders/CalendarEvent/class.ts
@@ -1,6 +1,6 @@
import { DestinationCalendar } from "@prisma/client";
-import { AdditionInformation, CalendarEvent, ConferenceData, Person } from "@calcom/types/Calendar";
+import { AdditionalInformation, CalendarEvent, ConferenceData, Person } from "@calcom/types/Calendar";
class CalendarEventClass implements CalendarEvent {
type!: string;
@@ -13,7 +13,7 @@ class CalendarEventClass implements CalendarEvent {
team?: { name: string; members: string[] };
location?: string | null;
conferenceData?: ConferenceData;
- additionInformation?: AdditionInformation;
+ additionalInformation?: AdditionalInformation;
uid?: string | null;
videoCallData?: any;
paymentInfo?: any;
diff --git a/packages/emails/src/components/LocationInfo.tsx b/packages/emails/src/components/LocationInfo.tsx
index 302b3c528cf..6341f4f37c3 100644
--- a/packages/emails/src/components/LocationInfo.tsx
+++ b/packages/emails/src/components/LocationInfo.tsx
@@ -74,8 +74,8 @@ export function LocationInfo(props: { calEvent: CalendarEvent }) {
);
}
- if (props.calEvent.additionInformation?.hangoutLink) {
- const hangoutLink: string = props.calEvent.additionInformation.hangoutLink;
+ if (props.calEvent.additionalInformation?.hangoutLink) {
+ const hangoutLink: string = props.calEvent.additionalInformation.hangoutLink;
return (
<Info
diff --git a/packages/lib/CalEventParser.ts b/packages/lib/CalEventParser.ts
index 2eb6d1d8bcb..bee5faa5c79 100644
--- a/packages/lib/CalEventParser.ts
+++ b/packages/lib/CalEventParser.ts
@@ -94,8 +94,8 @@ export const getLocation = (calEvent: CalendarEvent) => {
return calEvent.videoCallData.url;
}
- if (calEvent.additionInformation?.hangoutLink) {
- return calEvent.additionInformation.hangoutLink;
+ if (calEvent.additionalInformation?.hangoutLink) {
+ return calEvent.additionalInformation.hangoutLink;
}
return providerName || calEvent.location || "";
diff --git a/packages/types/Calendar.d.ts b/packages/types/Calendar.d.ts
index 8b253657aee..73b8b46a461 100644
--- a/packages/types/Calendar.d.ts
+++ b/packages/types/Calendar.d.ts
@@ -79,7 +79,7 @@ export interface ConferenceData {
createRequest?: calendar_v3.Schema$CreateConferenceRequest;
}
-export interface AdditionInformation {
+export interface AdditionalInformation {
conferenceData?: ConferenceData;
entryPoints?: EntryPoint[];
hangoutLink?: string;
@@ -111,7 +111,7 @@ export interface CalendarEvent {
};
location?: string | null;
conferenceData?: ConferenceData;
- additionInformation?: AdditionInformation;
+ additionalInformation?: AdditionalInformation;
uid?: string | null;
videoCallData?: VideoCallData;
paymentInfo?: PaymentInfo | null;
@@ -133,7 +133,7 @@ export interface EntryPoint {
password?: string;
}
-export interface AdditionInformation {
+export interface AdditionalInformation {
conferenceData?: ConferenceData;
entryPoints?: EntryPoint[];
hangoutLink?: string;
diff --git a/packages/types/Event.d.ts b/packages/types/Event.d.ts
index 37db902913c..6797354e3c8 100644
--- a/packages/types/Event.d.ts
+++ b/packages/types/Event.d.ts
@@ -1,4 +1,4 @@
import type { PartialReference } from "./EventManager";
import type { VideoCallData } from "./VideoApiAdapter";
-export type Event = AdditionInformation & VideoCallData;
+export type Event = AdditionalInformation & VideoCallData;