feat: IMAP Driver Integration (#12576)
### Added IMAP integration This PR adds support for connecting email accounts via IMAP protocol, allowing users to sync their emails without OAuth. #### DB Changes: - Added customConnectionParams and connectionType fields to ConnectedAccountWorkspaceEntity #### UI: - Added settings pages for creating and editing IMAP connections with proper validation and connection testing. - Implemented reconnection flows for handling permission issues. #### Backend: - Built ImapConnectionModule with corresponding resolver and service for managing IMAP connections. - Created MessagingIMAPDriverModule to handle IMAP client operations, message fetching/parsing, and error handling. #### Dependencies: Integrated `imapflow` and `mailparser` libraries with their type definitions to handle the IMAP protocol communication. --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { CalendarChannel } from '@/accounts/types/CalendarChannel';
|
||||
import { MessageChannel } from './MessageChannel';
|
||||
import { ImapSmtpCaldavAccount } from '@/accounts/types/ImapSmtpCaldavAccount';
|
||||
import { ConnectedAccountProvider } from 'twenty-shared/types';
|
||||
import { MessageChannel } from './MessageChannel';
|
||||
|
||||
export type ConnectedAccount = {
|
||||
id: string;
|
||||
@ -14,5 +15,6 @@ export type ConnectedAccount = {
|
||||
messageChannels: MessageChannel[];
|
||||
calendarChannels: CalendarChannel[];
|
||||
scopes: string[] | null;
|
||||
connectionParameters?: ImapSmtpCaldavAccount;
|
||||
__typename: 'ConnectedAccount';
|
||||
};
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
import { ConnectionParameters } from '~/generated/graphql';
|
||||
|
||||
export type ImapSmtpCaldavAccount = {
|
||||
IMAP?: ConnectionParameters;
|
||||
SMTP?: ConnectionParameters;
|
||||
CALDAV?: ConnectionParameters;
|
||||
};
|
||||
@ -1,5 +1,6 @@
|
||||
import { MessageChannelVisibility } from '~/generated/graphql';
|
||||
import { ImapSmtpCaldavAccount } from '@/accounts/types/ImapSmtpCaldavAccount';
|
||||
import { ConnectedAccountProvider } from 'twenty-shared/types';
|
||||
import { MessageChannelVisibility } from '~/generated/graphql';
|
||||
|
||||
export enum MessageChannelContactAutoCreationPolicy {
|
||||
SENT_AND_RECEIVED = 'SENT_AND_RECEIVED',
|
||||
@ -40,6 +41,7 @@ export type MessageChannel = {
|
||||
connectedAccount?: {
|
||||
id: string;
|
||||
provider: ConnectedAccountProvider;
|
||||
connectionParameters?: ImapSmtpCaldavAccount;
|
||||
};
|
||||
__typename: 'MessageChannel';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user