additionInformation => additionalInformation
This commit is contained in:
1 parent
41c5ad45fd
commit
13f20dd7cf
12 files changed
+26
-26
No files matched your search
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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]"}}
|
||||
{"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]"}}
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user