import { ClientAnalytics, ReferrerType } from '@zeniai/client-analytics'; import { ConnectorCredentialsBySlug, FetchState, IntegrationsView, PlaidConnectionDetails } from '@zeniai/client-epic-state'; export type ConnectorCredentialsSlug = ConnectorCredentialsBySlug["connectionName"]; export interface PlaidAccountSummary { accountId: string; balanceFormatted: string; isActive: boolean; isLoginRequired: boolean; mask: string; name: string; reLoginStatus: FetchState; institutionLogoUrl?: string; } export interface IntegrationsSectionProps { deleteConnectionState: FetchState; integrationsView: IntegrationsView; isAdmin: boolean; isLoading: boolean; notifyMeRegisteredSlugs: ReadonlySet; /** * Plaid link-token + public-token exchange status, keyed by link token type. * The component reads the `link_external_account` slot to drive the Plaid * connect / add-account button's loading state — covers the in-flight * window between Plaid popup completion and the new account row appearing. * Same shape SetUpAccountSection consumes. */ plaidConnectionDetails: PlaidConnectionDetails; saveChargeBeeState: FetchState; saveConnectorCredentialsErrorBySlug: Partial>; saveConnectorCredentialsStateBySlug: Partial>; saveHubSpotState: FetchState; analytics?: ClientAnalytics; /** * Hide the Ledger tab + its QBO card. Used by the onboarding flow's * `connect_data_source` step where QBO is either already connected by the * Zeni team (zeni_user mode) or by the customer in the preceding * `connect_ledger` step — re-surfacing it here would be redundant. */ /** * When set, the section for this tabId is scrolled into view on mount * (and whenever the value changes). Used by onboarding's data-sources step * to land focus on the email card after Gmail/Outlook OAuth redirects back. */ autoFocusTabId?: IntegrationsTabId; deleteConnectionError?: string; hideLedger?: boolean; plaidAccounts?: ReadonlyArray; referrer?: ReferrerType; saveChargeBeeError?: string; saveHubSpotError?: string; onConnectGmail: () => void; onConnectHubSpot: (clientId: string, clientSecret: string) => void; onConnectOutlook: () => void; onDisconnect: (connectionId: string, connectionType: string) => void; onNotifyMe: (slug: string) => void; onReconnectQBO: () => void; onRefreshClick: () => void; onSaveChargeBeeCredentials: (apiKey: string, site: string) => void; /** Discriminated union enforces the correct credential shape per connector: * Stripe + Mercury are ``{api_key}``, PayPal is ``{client_id, client_secret}``. * Mismatched fields fail at compile time instead of getting rejected by the BE. */ onSaveConnectorCredentials: (args: ConnectorCredentialsBySlug) => void; onAddPlaidAccount?: () => void; /** Trigger Plaid re-authentication for a login-required account. */ onReLoginPlaidAccount?: (accountId: string) => void; } declare const TAB_IDS: readonly ["ledger", "banks", "revenue", "payroll", "email"]; type IntegrationsTabId = (typeof TAB_IDS)[number]; export declare const IntegrationsSection: ({ isAdmin, analytics, referrer, deleteConnectionState, deleteConnectionError, integrationsView, isLoading, notifyMeRegisteredSlugs, onAddPlaidAccount, onConnectGmail, onConnectHubSpot, onConnectOutlook, onDisconnect, onNotifyMe, onReconnectQBO, onReLoginPlaidAccount, onSaveChargeBeeCredentials, onSaveConnectorCredentials, plaidAccounts, plaidConnectionDetails, saveChargeBeeState, saveChargeBeeError, saveConnectorCredentialsErrorBySlug, saveConnectorCredentialsStateBySlug, saveHubSpotState, saveHubSpotError, onRefreshClick, hideLedger, autoFocusTabId, }: IntegrationsSectionProps) => import("react/jsx-runtime").JSX.Element; export default IntegrationsSection;