Files
calendar/packages/types/UserProfile.d.ts
T
Udit TakkarandGitHub d6605d6dfd feat: display org banner on personal event types (#14101)
* feat: display org banner on personal event types

* chore: add banner url

* fix: type error
2024-03-19 14:20:40 +00:00

37 lines
873 B
TypeScript

import type { Team } from "@calcom/prisma/client";
type OrganizationWithRequestedSlug = Pick<Team, "name" | "id" | "slug" | "calVideoLogo", "bannerUrl"> & {
requestedSlug: string | null;
};
export type OrgProfile = {
id: number;
upId: string;
username: string;
organizationId: number;
organization: OrganizationWithRequestedSlug;
};
export type PersonalProfile = {
id: number;
upId: string;
username: string;
organizationId: null;
organization: null;
};
export type UserAsPersonalProfile = {
id: null;
upId: string;
username: string | null;
organizationId: null;
organization: null;
};
export type UserProfile = PersonalProfile | OrgProfile | UserAsPersonalProfile;
/**
* It's a unique identifier that can refer to a user moved to a profile(with format `usr-${user.id}`) or a profile itself(Profile.id)
*/
export type UpId = string;