export type ProfileType = 'parent' | 'child';

export interface CalendarAccount {
    accessToken: string;
    refreshToken?: string;
    resourceId?: string;
    email?: string;
    expiresAt?: Date;
}

export interface GoogleAccount extends CalendarAccount {
    scope?: string;
}

export interface MicrosoftAccount extends CalendarAccount {
    subscriptionId?: string;
}

export interface AppleAccount extends CalendarAccount {
    identityToken?: string;
}

export type CalendarAccounts = {
    [email: string]: GoogleAccount | MicrosoftAccount | AppleAccount;
};

export interface UserProfile {
    userType: ProfileType;
    firstName: string;
    lastName: string;
    childrenIds?: string[];
    birthday?: Date;
    parentId?: string;
    contact?: string;
    email: string;
    password: string;
    familyId?: string;
    uid?: string;
    pfp?: string | null;
    eventColor?: string | null;
    timeZone?: string | null;
    firstDayOfWeek?: string | null;
    googleAccounts?: { [email: string]: GoogleAccount };
    microsoftAccounts?: { [email: string]: MicrosoftAccount };
    appleAccounts?: { [email: string]: AppleAccount };
}