cal/packages/types/AppHandler.d.ts
Hariom Balhara 3937b0c4c6
Add support to open a redirect URL in new tab (#5480)
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2022-11-13 15:51:31 +00:00

20 lines
551 B
TypeScript

import { NextApiHandler } from "next";
import { Session } from "next-auth";
import { Credential } from "@calcom/prisma/client";
export type AppDeclarativeHandler = {
appType: string;
slug: string;
variant: string;
supportsMultipleInstalls: false;
handlerType: "add";
createCredential: (arg: { user: Session["user"]; appType: string; slug: string }) => Promise<Credential>;
supportsMultipleInstalls: boolean;
redirect?: {
newTab?: boolean;
url: string;
};
};
export type AppHandler = AppDeclarativeHandler | NextApiHandler;