feat: SMTP Driver Integration (#12993)

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:
neo773
2025-07-10 18:47:26 +05:30
committed by GitHub
parent fe9de195c3
commit aede38000e
50 changed files with 1358 additions and 484 deletions

View File

@ -1,11 +1,21 @@
import { useGetConnectedImapSmtpCaldavAccountQuery } from '~/generated-metadata/graphql';
import {
type GetConnectedImapSmtpCaldavAccountQuery,
useGetConnectedImapSmtpCaldavAccountQuery,
} from '~/generated-metadata/graphql';
export type ConnectedImapSmtpCaldavAccount =
GetConnectedImapSmtpCaldavAccountQuery['getConnectedImapSmtpCaldavAccount'];
export const useConnectedImapSmtpCaldavAccount = (
connectedAccountId: string | undefined,
onCompleted?: (data: ConnectedImapSmtpCaldavAccount) => void,
) => {
const { data, loading, error } = useGetConnectedImapSmtpCaldavAccountQuery({
variables: { id: connectedAccountId ?? '' },
skip: !connectedAccountId,
onCompleted: (data) => {
onCompleted?.(data.getConnectedImapSmtpCaldavAccount);
},
});
return {