From bab0139ad4a9909b0692fe35809880b2e6bd90d1 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 01:00:17 +0000 Subject: [PATCH] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routeTree.gen.ts | 63 +++++++++++++++++++++++++++++++++++++++++ src/types/imapflow.d.ts | 26 +++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 src/types/imapflow.d.ts diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts index fb097a5..026bfc4 100644 --- a/src/routeTree.gen.ts +++ b/src/routeTree.gen.ts @@ -18,6 +18,7 @@ import { Route as StatusIndexRouteImport } from './routes/status.index' import { Route as SettingsIndexRouteImport } from './routes/settings.index' import { Route as MessagesIndexRouteImport } from './routes/messages.index' import { Route as InvoicesIndexRouteImport } from './routes/invoices.index' +import { Route as InboxIndexRouteImport } from './routes/inbox.index' import { Route as FormsIndexRouteImport } from './routes/forms.index' import { Route as FilesIndexRouteImport } from './routes/files.index' import { Route as DocumentsIndexRouteImport } from './routes/documents.index' @@ -30,8 +31,10 @@ import { Route as SettingsWorkflowsRouteImport } from './routes/settings.workflo import { Route as SettingsWorkflowRouteImport } from './routes/settings.workflow' import { Route as SettingsSmtpRouteImport } from './routes/settings.smtp' import { Route as SettingsProfileRouteImport } from './routes/settings.profile' +import { Route as SettingsImapRouteImport } from './routes/settings.imap' import { Route as SettingsFeesRouteImport } from './routes/settings.fees' import { Route as InvoicesInvoiceIdRouteImport } from './routes/invoices.$invoiceId' +import { Route as HooksPollImapRouteImport } from './routes/hooks/poll-imap' import { Route as ContactsContactIdRouteImport } from './routes/contacts.$contactId' import { Route as CollectionsCollectionIdRouteImport } from './routes/collections.$collectionId' import { Route as ClientsClientIdRouteImport } from './routes/clients.$clientId' @@ -88,6 +91,11 @@ const InvoicesIndexRoute = InvoicesIndexRouteImport.update({ path: '/invoices/', getParentRoute: () => rootRouteImport, } as any) +const InboxIndexRoute = InboxIndexRouteImport.update({ + id: '/inbox/', + path: '/inbox/', + getParentRoute: () => rootRouteImport, +} as any) const FormsIndexRoute = FormsIndexRouteImport.update({ id: '/forms/', path: '/forms/', @@ -148,6 +156,11 @@ const SettingsProfileRoute = SettingsProfileRouteImport.update({ path: '/profile', getParentRoute: () => SettingsRoute, } as any) +const SettingsImapRoute = SettingsImapRouteImport.update({ + id: '/imap', + path: '/imap', + getParentRoute: () => SettingsRoute, +} as any) const SettingsFeesRoute = SettingsFeesRouteImport.update({ id: '/fees', path: '/fees', @@ -158,6 +171,11 @@ const InvoicesInvoiceIdRoute = InvoicesInvoiceIdRouteImport.update({ path: '/invoices/$invoiceId', getParentRoute: () => rootRouteImport, } as any) +const HooksPollImapRoute = HooksPollImapRouteImport.update({ + id: '/hooks/poll-imap', + path: '/hooks/poll-imap', + getParentRoute: () => rootRouteImport, +} as any) const ContactsContactIdRoute = ContactsContactIdRouteImport.update({ id: '/contacts/$contactId', path: '/contacts/$contactId', @@ -221,8 +239,10 @@ export interface FileRoutesByFullPath { '/clients/$clientId': typeof ClientsClientIdRoute '/collections/$collectionId': typeof CollectionsCollectionIdRoute '/contacts/$contactId': typeof ContactsContactIdRoute + '/hooks/poll-imap': typeof HooksPollImapRoute '/invoices/$invoiceId': typeof InvoicesInvoiceIdRoute '/settings/fees': typeof SettingsFeesRoute + '/settings/imap': typeof SettingsImapRoute '/settings/profile': typeof SettingsProfileRoute '/settings/smtp': typeof SettingsSmtpRoute '/settings/workflow': typeof SettingsWorkflowRoute @@ -235,6 +255,7 @@ export interface FileRoutesByFullPath { '/documents/': typeof DocumentsIndexRoute '/files/': typeof FilesIndexRoute '/forms/': typeof FormsIndexRoute + '/inbox/': typeof InboxIndexRoute '/invoices/': typeof InvoicesIndexRoute '/messages/': typeof MessagesIndexRoute '/settings/': typeof SettingsIndexRoute @@ -255,8 +276,10 @@ export interface FileRoutesByTo { '/clients/$clientId': typeof ClientsClientIdRoute '/collections/$collectionId': typeof CollectionsCollectionIdRoute '/contacts/$contactId': typeof ContactsContactIdRoute + '/hooks/poll-imap': typeof HooksPollImapRoute '/invoices/$invoiceId': typeof InvoicesInvoiceIdRoute '/settings/fees': typeof SettingsFeesRoute + '/settings/imap': typeof SettingsImapRoute '/settings/profile': typeof SettingsProfileRoute '/settings/smtp': typeof SettingsSmtpRoute '/settings/workflow': typeof SettingsWorkflowRoute @@ -269,6 +292,7 @@ export interface FileRoutesByTo { '/documents': typeof DocumentsIndexRoute '/files': typeof FilesIndexRoute '/forms': typeof FormsIndexRoute + '/inbox': typeof InboxIndexRoute '/invoices': typeof InvoicesIndexRoute '/messages': typeof MessagesIndexRoute '/settings': typeof SettingsIndexRoute @@ -291,8 +315,10 @@ export interface FileRoutesById { '/clients/$clientId': typeof ClientsClientIdRoute '/collections/$collectionId': typeof CollectionsCollectionIdRoute '/contacts/$contactId': typeof ContactsContactIdRoute + '/hooks/poll-imap': typeof HooksPollImapRoute '/invoices/$invoiceId': typeof InvoicesInvoiceIdRoute '/settings/fees': typeof SettingsFeesRoute + '/settings/imap': typeof SettingsImapRoute '/settings/profile': typeof SettingsProfileRoute '/settings/smtp': typeof SettingsSmtpRoute '/settings/workflow': typeof SettingsWorkflowRoute @@ -305,6 +331,7 @@ export interface FileRoutesById { '/documents/': typeof DocumentsIndexRoute '/files/': typeof FilesIndexRoute '/forms/': typeof FormsIndexRoute + '/inbox/': typeof InboxIndexRoute '/invoices/': typeof InvoicesIndexRoute '/messages/': typeof MessagesIndexRoute '/settings/': typeof SettingsIndexRoute @@ -328,8 +355,10 @@ export interface FileRouteTypes { | '/clients/$clientId' | '/collections/$collectionId' | '/contacts/$contactId' + | '/hooks/poll-imap' | '/invoices/$invoiceId' | '/settings/fees' + | '/settings/imap' | '/settings/profile' | '/settings/smtp' | '/settings/workflow' @@ -342,6 +371,7 @@ export interface FileRouteTypes { | '/documents/' | '/files/' | '/forms/' + | '/inbox/' | '/invoices/' | '/messages/' | '/settings/' @@ -362,8 +392,10 @@ export interface FileRouteTypes { | '/clients/$clientId' | '/collections/$collectionId' | '/contacts/$contactId' + | '/hooks/poll-imap' | '/invoices/$invoiceId' | '/settings/fees' + | '/settings/imap' | '/settings/profile' | '/settings/smtp' | '/settings/workflow' @@ -376,6 +408,7 @@ export interface FileRouteTypes { | '/documents' | '/files' | '/forms' + | '/inbox' | '/invoices' | '/messages' | '/settings' @@ -397,8 +430,10 @@ export interface FileRouteTypes { | '/clients/$clientId' | '/collections/$collectionId' | '/contacts/$contactId' + | '/hooks/poll-imap' | '/invoices/$invoiceId' | '/settings/fees' + | '/settings/imap' | '/settings/profile' | '/settings/smtp' | '/settings/workflow' @@ -411,6 +446,7 @@ export interface FileRouteTypes { | '/documents/' | '/files/' | '/forms/' + | '/inbox/' | '/invoices/' | '/messages/' | '/settings/' @@ -433,6 +469,7 @@ export interface RootRouteChildren { ClientsClientIdRoute: typeof ClientsClientIdRoute CollectionsCollectionIdRoute: typeof CollectionsCollectionIdRoute ContactsContactIdRoute: typeof ContactsContactIdRoute + HooksPollImapRoute: typeof HooksPollImapRoute InvoicesInvoiceIdRoute: typeof InvoicesInvoiceIdRoute CalendarIndexRoute: typeof CalendarIndexRoute CasesIndexRoute: typeof CasesIndexRoute @@ -442,6 +479,7 @@ export interface RootRouteChildren { DocumentsIndexRoute: typeof DocumentsIndexRoute FilesIndexRoute: typeof FilesIndexRoute FormsIndexRoute: typeof FormsIndexRoute + InboxIndexRoute: typeof InboxIndexRoute InvoicesIndexRoute: typeof InvoicesIndexRoute MessagesIndexRoute: typeof MessagesIndexRoute StatusIndexRoute: typeof StatusIndexRoute @@ -517,6 +555,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof InvoicesIndexRouteImport parentRoute: typeof rootRouteImport } + '/inbox/': { + id: '/inbox/' + path: '/inbox' + fullPath: '/inbox/' + preLoaderRoute: typeof InboxIndexRouteImport + parentRoute: typeof rootRouteImport + } '/forms/': { id: '/forms/' path: '/forms' @@ -601,6 +646,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof SettingsProfileRouteImport parentRoute: typeof SettingsRoute } + '/settings/imap': { + id: '/settings/imap' + path: '/imap' + fullPath: '/settings/imap' + preLoaderRoute: typeof SettingsImapRouteImport + parentRoute: typeof SettingsRoute + } '/settings/fees': { id: '/settings/fees' path: '/fees' @@ -615,6 +667,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof InvoicesInvoiceIdRouteImport parentRoute: typeof rootRouteImport } + '/hooks/poll-imap': { + id: '/hooks/poll-imap' + path: '/hooks/poll-imap' + fullPath: '/hooks/poll-imap' + preLoaderRoute: typeof HooksPollImapRouteImport + parentRoute: typeof rootRouteImport + } '/contacts/$contactId': { id: '/contacts/$contactId' path: '/contacts/$contactId' @@ -690,6 +749,7 @@ declare module '@tanstack/react-router' { interface SettingsRouteChildren { SettingsFeesRoute: typeof SettingsFeesRoute + SettingsImapRoute: typeof SettingsImapRoute SettingsProfileRoute: typeof SettingsProfileRoute SettingsSmtpRoute: typeof SettingsSmtpRoute SettingsWorkflowRoute: typeof SettingsWorkflowRoute @@ -699,6 +759,7 @@ interface SettingsRouteChildren { const SettingsRouteChildren: SettingsRouteChildren = { SettingsFeesRoute: SettingsFeesRoute, + SettingsImapRoute: SettingsImapRoute, SettingsProfileRoute: SettingsProfileRoute, SettingsSmtpRoute: SettingsSmtpRoute, SettingsWorkflowRoute: SettingsWorkflowRoute, @@ -721,6 +782,7 @@ const rootRouteChildren: RootRouteChildren = { ClientsClientIdRoute: ClientsClientIdRoute, CollectionsCollectionIdRoute: CollectionsCollectionIdRoute, ContactsContactIdRoute: ContactsContactIdRoute, + HooksPollImapRoute: HooksPollImapRoute, InvoicesInvoiceIdRoute: InvoicesInvoiceIdRoute, CalendarIndexRoute: CalendarIndexRoute, CasesIndexRoute: CasesIndexRoute, @@ -730,6 +792,7 @@ const rootRouteChildren: RootRouteChildren = { DocumentsIndexRoute: DocumentsIndexRoute, FilesIndexRoute: FilesIndexRoute, FormsIndexRoute: FormsIndexRoute, + InboxIndexRoute: InboxIndexRoute, InvoicesIndexRoute: InvoicesIndexRoute, MessagesIndexRoute: MessagesIndexRoute, StatusIndexRoute: StatusIndexRoute, diff --git a/src/types/imapflow.d.ts b/src/types/imapflow.d.ts new file mode 100644 index 0000000..e15cd4d --- /dev/null +++ b/src/types/imapflow.d.ts @@ -0,0 +1,26 @@ +declare module "imapflow" { + // Minimal types covering only what we use server-side. + export class ImapFlow { + constructor(opts: { + host: string; + port: number; + secure: boolean; + auth: { user: string; pass: string }; + logger?: any; + }); + connect(): Promise; + logout(): Promise; + close(): Promise; + getMailboxLock(folder: string): Promise<{ release: () => void }>; + fetch( + range: string, + query: Record, + options?: Record, + ): AsyncIterable<{ + uid: number; + source: Buffer; + size?: number; + envelope?: any; + }>; + } +}