Several type fixes (#855)
* Several type fixes * Update ee/lib/stripe/client.ts Co-authored-by: Alex Johansson <[email protected]> * Typo * Refactors createPaymentLink * Simplify calendarClietn type Co-authored-by: Alex Johansson <[email protected]> Co-authored-by: Peer Richelsen <[email protected]> Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
6 files changed
+37
-24
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { Prisma, Credential } from "@prisma/client";
|
||||
import { Credential } from "@prisma/client";
|
||||
|
||||
import { EventResult } from "@lib/events/EventManager";
|
||||
import logger from "@lib/logger";
|
||||
@@ -110,10 +110,7 @@ const o365Auth = (credential) => {
|
||||
};
|
||||
};
|
||||
|
||||
const userData = Prisma.validator<Prisma.UserArgs>()({
|
||||
select: { name: true, email: true, timeZone: true },
|
||||
});
|
||||
export type Person = Prisma.UserGetPayload<typeof userData>;
|
||||
export type Person = { name: string; email: string; timeZone: string };
|
||||
|
||||
export interface CalendarEvent {
|
||||
type: string;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
export type RequiredNotNull<T> = {
|
||||
[P in keyof T]: NonNullable<T[P]>;
|
||||
};
|
||||
|
||||
export type Ensure<T, K extends keyof T> = T & RequiredNotNull<Pick<T, K>>;
|
||||
Reference in new issue
Block a user