Scheduling infrastructure for absolutely everyone.
Merge branch 'main' into production
Agusti Fernandez Pardob2f3242a8edf
diff --cc lib/helpers/extendRequest.tsindex 14de4044182,5ae84596d18..2924782d3e7--- a/lib/helpers/extendRequest.ts+++ b/lib/helpers/extendRequest.ts@@@ -13,9 -13,8 +13,9 @@@ declare module "next"method: string;prisma: PrismaClient;session: { user: { id: number } };- query: { [key: string]: string | string[] };+ query: Partial<{ [key: string]: string | string[] }>;isAdmin: boolean;+ pagination: { take: number; skip: number };}}export const extendRequest: NextMiddleware = async (req, res, next) => {diff --cc next.config.jsindex 0c61f37a7ca,8c5749db559..683d8c516bc--- a/next.config.js+++ b/next.config.js@@@ -8,36 -8,38 +8,40 @@@ const withTM = require("next-transpile-"@calcom/prisma","@calcom/stripe","@calcom/ui",+ "@calcom/dayjs","@calcom/emails",+ "@calcom/dayjs","@calcom/embed-core",+ "@calcom/dayjs","@calcom/embed-snippet",]);+ const { withAxiom } = require("next-axiom");- module.exports = withTM({- async rewrites() {- return {- afterFiles: [- // This redirects requests recieved at / the root to the /api/ folder.- {- source: "/v:version/:rest*",- destination: "/api/v:version/:rest*",- },- // This redirects requests to api/v*/ to /api/ passing version as a query parameter.- {- source: "/api/v:version/:rest*",- destination: "/api/:rest*?version=:version",- },- ],- fallback: [- // These rewrites are checked after both pages/public files- // and dynamic routes are checked- {- source: "/:path*",- destination: `/api/:path*`,- },- ],- };- },- });+ module.exports = withAxiom(+ withTM({+ async rewrites() {+ return {+ afterFiles: [+ // This redirects requests recieved at / the root to the /api/ folder.+ {+ source: "/v:version/:rest*",+ destination: "/api/v:version/:rest*",+ },+ // This redirects requests to api/v*/ to /api/ passing version as a query parameter.+ {+ source: "/api/v:version/:rest*",+ destination: "/api/:rest*?version=:version",+ },+ ],+ fallback: [+ // These rewrites are checked after both pages/public files+ // and dynamic routes are checked+ {+ source: "/:path*",+ destination: `/api/:path*`,+ },+ ],+ };+ },+ })+ );