- Created demo emails with various states (inbox, sent, drafts, trash, etc.) in `emails.ts`. - Added demo file nodes representing directories and files in `files.ts`. - Implemented demo Sieve capabilities and scripts in `filters.ts`. - Defined demo identities for users in `identities.ts`. - Established demo mailboxes with permissions and counts in `mailboxes.ts`. - Created a demo vacation response in `vacation.ts`. - Introduced a comprehensive JMAP client interface in `client-interface.ts` to standardize interactions with the JMAP API.
14 lines
625 B
TypeScript
14 lines
625 B
TypeScript
import type { VacationResponse } from '@/lib/jmap/types';
|
|
|
|
export function createDemoVacationResponse(): VacationResponse {
|
|
return {
|
|
id: 'singleton',
|
|
isEnabled: false,
|
|
fromDate: null,
|
|
toDate: null,
|
|
subject: 'Out of Office',
|
|
textBody: 'Thank you for your email. I am currently out of the office and will return on Monday. For urgent matters, please contact support@example.com.',
|
|
htmlBody: '<p>Thank you for your email. I am currently out of the office and will return on Monday.</p><p>For urgent matters, please contact <a href="mailto:support@example.com">support@example.com</a>.</p>',
|
|
};
|
|
}
|