Type fixes for API

This commit is contained in:
zomars committed 2022-11-25 07:24:44 -07:00
1 parent a2a4ff934f
commit 3137a188a0
9 files changed
+23 -49

No files matched your search

+12
View File
@@ -1,6 +1,8 @@
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" {
@@ -8,5 +10,15 @@ export declare module "next" {
// 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 };
}
}
+1 -1
View File
@@ -86,7 +86,7 @@ export {
} from "./v2/core/Dropdown";
export { RadioGroup } from "./v2/core/form";
export { BooleanToggleGroupField } from "./v2/core/form/BooleanToggleGroup";
export { default as DateRangePicker } from "./v2/core/form/date-range-picker/DateRangePicker";
export { DateRangePickerLazy as DateRangePicker } from "./v2/core/form/date-range-picker";
export { default as DatePickerField } from "./v2/core/form/DatePicker";
export { default as FormCard } from "./v2/core/form/FormCard";
export { default as MultiSelectCheckboxes } from "./v2/core/form/MultiSelectCheckboxes";
+1
View File
@@ -20,6 +20,7 @@
"@radix-ui/react-portal": "^1.0.0",
"@radix-ui/react-select": "^0.1.1",
"@tanstack/react-query": "^4.3.9",
"@wojtekmaj/react-daterange-picker": "^3.3.1",
"class-variance-authority": "^0.3.0",
"downshift": "^6.1.9",
"next": "^12.3.1",
@@ -0,0 +1,5 @@
import dynamic from "next/dynamic";
export const DateRangePickerLazy = dynamic(
() => import("./DateRangePicker")
) as unknown as typeof import("./DateRangePicker").default;