>;
- trpc: any;
}
interface IWipeMyCalAction {
@@ -45,7 +44,7 @@ const wipeMyCalAction = async (props: IWipeMyCalAction) => {
export const ConfirmDialog = (props: IConfirmDialogWipe) => {
const { t } = useLocale();
- const { isOpenDialog, setIsOpenDialog, trpc } = props;
+ const { isOpenDialog, setIsOpenDialog } = props;
const [isLoading, setIsLoading] = useState(false);
const today = dayjs();
const initialDate = today.startOf("day");
diff --git a/packages/app-store/wipemycalother/components/wipeMyCalActionButton.tsx b/packages/app-store/wipemycalother/components/wipeMyCalActionButton.tsx
index 476c868553aaf..ad243f4051db7 100644
--- a/packages/app-store/wipemycalother/components/wipeMyCalActionButton.tsx
+++ b/packages/app-store/wipemycalother/components/wipeMyCalActionButton.tsx
@@ -1,17 +1,17 @@
import { useState } from "react";
+import { trpc } from "@calcom/trpc/react";
import Button from "@calcom/ui/Button";
import { ConfirmDialog } from "./confirmDialog";
interface IWipeMyCalActionButtonProps {
- trpc: any;
bookingsEmpty: boolean;
bookingStatus: "upcoming" | "recurring" | "past" | "cancelled";
}
const WipeMyCalActionButton = (props: IWipeMyCalActionButtonProps) => {
- const { trpc, bookingsEmpty, bookingStatus } = props;
+ const { bookingsEmpty, bookingStatus } = props;
const [openDialog, setOpenDialog] = useState(false);
const { isSuccess, isLoading, data } = trpc.useQuery([
"viewer.integrations",
@@ -21,9 +21,7 @@ const WipeMyCalActionButton = (props: IWipeMyCalActionButtonProps) => {
if (bookingStatus !== "upcoming" || bookingsEmpty) {
return <>>;
}
- const wipeMyCalCredentials: { credentialIds: number[] } = data?.items.find(
- (item: { type: string }) => item.type === "wipemycal_other"
- );
+ const wipeMyCalCredentials = data?.items.find((item: { type: string }) => item.type === "wipemycal_other");
const [credentialId] = wipeMyCalCredentials?.credentialIds || [false];
@@ -31,7 +29,7 @@ const WipeMyCalActionButton = (props: IWipeMyCalActionButtonProps) => {
{data && isSuccess && !isLoading && credentialId && (
<>
-
+
diff --git a/packages/app-store/zapier/pages/setup/index.tsx b/packages/app-store/zapier/pages/setup/index.tsx
index ac2e13a071cad..27c8fc11fe79f 100644
--- a/packages/app-store/zapier/pages/setup/index.tsx
+++ b/packages/app-store/zapier/pages/setup/index.tsx
@@ -6,11 +6,9 @@ import { Toaster } from "react-hot-toast";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import showToast from "@calcom/lib/notification";
+import { trpc } from "@calcom/trpc/react";
import { Button, Loader, Tooltip } from "@calcom/ui";
-/** TODO: Maybe extract this into a package to prevent circular dependencies */
-import { trpc } from "@calcom/web/lib/trpc";
-
export interface IZapierSetupProps {
inviteLink: string;
}
@@ -21,11 +19,7 @@ export default function ZapierSetup(props: IZapierSetupProps) {
const [newApiKey, setNewApiKey] = useState("");
const { t } = useLocale();
const utils = trpc.useContext();
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
const integrations = trpc.useQuery(["viewer.integrations", { variant: "other" }]);
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
const oldApiKey = trpc.useQuery(["viewer.apiKeys.findKeyOfType", { appId: ZAPIER }]);
const deleteApiKey = trpc.useMutation("viewer.apiKeys.delete");
@@ -38,8 +32,6 @@ export default function ZapierSetup(props: IZapierSetupProps) {
async function createApiKey() {
const event = { note: "Zapier", expiresAt: null, appId: ZAPIER };
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
const apiKey = await utils.client.mutation("viewer.apiKeys.create", event);
if (oldApiKey.data) {
deleteApiKey.mutate({
diff --git a/packages/config/next-i18next.config.js b/packages/config/next-i18next.config.js
new file mode 100644
index 0000000000000..c0c2c65203f4a
--- /dev/null
+++ b/packages/config/next-i18next.config.js
@@ -0,0 +1,35 @@
+const path = require("path");
+
+/** @type {import("next-i18next").UserConfig} */
+const config = {
+ i18n: {
+ defaultLocale: "en",
+ locales: [
+ "en",
+ "fr",
+ "it",
+ "ru",
+ "es",
+ "de",
+ "pt",
+ "ro",
+ "nl",
+ "pt-BR",
+ "es-419",
+ "ko",
+ "ja",
+ "pl",
+ "ar",
+ "iw",
+ "zh-CN",
+ "zh-TW",
+ "cs",
+ "sr",
+ "sv",
+ "vi",
+ ],
+ },
+ reloadOnPrerender: process.env.NODE_ENV !== "production",
+};
+
+module.exports = config;
diff --git a/packages/core/videoClient.ts b/packages/core/videoClient.ts
index d2102c6f206b8..af5e5ebc9fd80 100644
--- a/packages/core/videoClient.ts
+++ b/packages/core/videoClient.ts
@@ -6,7 +6,7 @@ import appStore from "@calcom/app-store";
import { sendBrokenIntegrationEmail } from "@calcom/emails";
import { getUid } from "@calcom/lib/CalEventParser";
import logger from "@calcom/lib/logger";
-import type { CalendarEvent } from "@calcom/types/Calendar";
+import type { CalendarEvent, EventBusyDate } from "@calcom/types/Calendar";
import type { EventResult, PartialReference } from "@calcom/types/EventManager";
import type { VideoApiAdapter, VideoApiAdapterFactory, VideoCallData } from "@calcom/types/VideoApiAdapter";
@@ -29,8 +29,8 @@ const getVideoAdapters = (withCredentials: Credential[]): VideoApiAdapter[] =>
}, []);
const getBusyVideoTimes = (withCredentials: Credential[]) =>
- Promise.all(getVideoAdapters(withCredentials).map((c) => c.getAvailability())).then((results) =>
- results.reduce((acc, availability) => acc.concat(availability), [])
+ Promise.all(getVideoAdapters(withCredentials).map((c) => c?.getAvailability())).then((results) =>
+ results.reduce((acc, availability) => acc.concat(availability), [] as (EventBusyDate | undefined)[])
);
const createMeeting = async (credential: Credential, calEvent: CalendarEvent) => {
@@ -44,7 +44,7 @@ const createMeeting = async (credential: Credential, calEvent: CalendarEvent) =>
const videoAdapters = getVideoAdapters([credential]);
const [firstVideoAdapter] = videoAdapters;
- const createdMeeting = await firstVideoAdapter.createMeeting(calEvent).catch(async (e) => {
+ const createdMeeting = await firstVideoAdapter?.createMeeting(calEvent).catch(async (e) => {
await sendBrokenIntegrationEmail(calEvent, "video");
console.error("createMeeting failed", e, calEvent);
});
@@ -79,7 +79,7 @@ const updateMeeting = async (
const [firstVideoAdapter] = getVideoAdapters([credential]);
const updatedMeeting =
credential && bookingRef
- ? await firstVideoAdapter.updateMeeting(bookingRef, calEvent).catch(async (e) => {
+ ? await firstVideoAdapter?.updateMeeting(bookingRef, calEvent).catch(async (e) => {
await sendBrokenIntegrationEmail(calEvent, "video");
log.error("updateMeeting failed", e, calEvent);
success = false;
@@ -107,7 +107,11 @@ const updateMeeting = async (
const deleteMeeting = (credential: Credential, uid: string): Promise => {
if (credential) {
- return getVideoAdapters([credential])[0].deleteMeeting(uid);
+ const videoAdapter = getVideoAdapters([credential])[0];
+ // There are certain video apps with no video adapter defined. e.g. riverby,whereby
+ if (videoAdapter) {
+ return videoAdapter.deleteMeeting(uid);
+ }
}
return Promise.resolve({});
diff --git a/packages/emails/templates/attendee-request-reschedule-email.ts b/packages/emails/templates/attendee-request-reschedule-email.ts
index fbc842e434940..2a325a79cc7e9 100644
--- a/packages/emails/templates/attendee-request-reschedule-email.ts
+++ b/packages/emails/templates/attendee-request-reschedule-email.ts
@@ -2,7 +2,7 @@ import { createEvent, DateArray, Person } from "ics";
import dayjs from "@calcom/dayjs";
import { getCancelLink } from "@calcom/lib/CalEventParser";
-import { CalendarEvent } from "@calcom/types/Calendar";
+import type { CalendarEvent } from "@calcom/types/Calendar";
import { renderEmail } from "../";
import OrganizerScheduledEmail from "./organizer-scheduled-email";
diff --git a/packages/emails/templates/organizer-request-reschedule-email.ts b/packages/emails/templates/organizer-request-reschedule-email.ts
index 06d6b77d4ffb5..452c3489a33fb 100644
--- a/packages/emails/templates/organizer-request-reschedule-email.ts
+++ b/packages/emails/templates/organizer-request-reschedule-email.ts
@@ -2,7 +2,7 @@ import { createEvent, DateArray, Person } from "ics";
import dayjs from "@calcom/dayjs";
import { getRichDescription } from "@calcom/lib/CalEventParser";
-import { CalendarEvent } from "@calcom/types/Calendar";
+import type { CalendarEvent } from "@calcom/types/Calendar";
import { renderEmail } from "../";
import OrganizerScheduledEmail from "./organizer-scheduled-email";
diff --git a/packages/embeds/embed-core/src/ModalBox/ModalBoxHtml.ts b/packages/embeds/embed-core/src/ModalBox/ModalBoxHtml.ts
index bd8f76110fa3a..c0985c9731ca5 100644
--- a/packages/embeds/embed-core/src/ModalBox/ModalBoxHtml.ts
+++ b/packages/embeds/embed-core/src/ModalBox/ModalBoxHtml.ts
@@ -10,30 +10,16 @@ const html = `