Skip to content

The open alternative to Salesforce, designed for AI.

348 B
Raw Blame
import { type ConnectedAccount } from '@/accounts/types/ConnectedAccount';
import { isDefined } from 'twenty-shared/utils';

export const isApplicationConnectionReconnectNeeded = (
  connection: Partial<Pick<ConnectedAccount, 'authFailedAt' | 'archivedAt'>>,
): boolean =>
  isDefined(connection.authFailedAt) && !isDefined(connection.archivedAt);