cal/packages/types/next.d.ts
Omar López b7851e6e53
refactor: next/router hooks with next/navigation hooks (#9105)
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Bailey Pumfleet <bailey@pumfleet.co.uk>
Co-authored-by: Peer Richelsen <peer@cal.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
2023-08-02 11:35:48 +02:00

32 lines
909 B
TypeScript

import type { IncomingMessage } from "http";
import type { Session } from "next-auth";
import type { PrismaClient } from "@calcom/prisma/client";
import "./next-auth";
export declare module "next" {
interface NextApiRequest extends IncomingMessage {
// args is defined by /integrations/[...args] endpoint
query: Partial<{ [key: string]: string | string[] }> & { args: string[] };
session?: Session | null;
// ⬇ These are needed by @calcom/api
body: unkown;
userId: number;
method: string;
prisma: PrismaClient;
// session: { user: { id: number } };
// query: Partial<{ [key: string]: string | string[] }>;
isAdmin: boolean;
isCustomPrisma: boolean;
pagination: { take: number; skip: number };
}
}
export declare module "next/navigation" {
interface Params {
[key: string]: string;
}
export declare function useParams(): Params | null;
}