import client from "jmap-client-ts/lib/types";

export interface IMailbox extends client.IMailboxProperties {
	emailIds: Array<string> | null;
	emails: Array<client.IEmailProperties> | null;
}

export interface IEmail extends client.IEmailProperties {}

export interface IAccount extends client.IAccount {
	id: string;
	mailboxes: Array<IMailbox> | null;
}

export type AccountIdMap = { [accountId: string]: IAccount };
export type EmailIdMap = { [emailId: string]: IEmail };

export interface ISession extends client.ISession {
	accounts: AccountIdMap;
	emails: EmailIdMap;
}
