Spaces:
Sleeping
Sleeping
File size: 512 Bytes
149698e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import type { ScanDateRange } from '@icc/shared';
export function buildIMAPSearch(dateRange: ScanDateRange) {
const start = new Date(dateRange.startDate);
const end = new Date(dateRange.endDate);
return [
{ from: 'notify@payments.interac.ca' },
{ since: start },
{ before: end },
];
}
// TODO: Implement IMAP connection and email fetching
// - connect(config: IMAPConfig): Promise<void>
// - search(criteria: any[]): Promise<string[]>
// - fetchMessage(uid: string): Promise<EmailMessage>
|