UNPKG

@mono.co/connect-react-native

Version:

Easily add mono connect widget to your react-native app and get access to users' financial data.

69 lines (68 loc) 1.68 kB
import { ReactNode } from "react"; interface WebviewMessage { type: string; data: any; } interface MonoConnectButtonProps { accountId?: string; } interface MonoProviderProps extends DataConfig { children: ReactNode; publicKey: string; onClose: () => void; onSuccess: (data: { id: string; }) => void; accountId?: string; onEvent?: (eventName: string, data: MonoEventData) => void; reference?: string; } interface PaymentScopeData { type: string; amount: number; description: string; plan?: string; currency?: string; period?: string; reference?: string; [key: string]: any; } interface DataDetails { customer?: any; payment_id?: any; } interface DataConfig { scope?: string; data?: PaymentScopeData | DataDetails | null | undefined; } interface MonoEventData { code?: string; reference?: string; errorType?: string; errorMessage?: string; mfaType?: string; prevAuthMethod?: string; authMethod?: string; pageName?: string; selectedAccountsCount?: number; institution?: { id?: string; name?: string; }; timestamp?: number; } interface MonoConnectProps extends DataConfig { publicKey: string; onClose: () => void; onSuccess: (data: { id: string; }) => void; live?: boolean; accountId?: string; setOpenWidget: (v: boolean) => void; openWidget: boolean; onEvent?: (eventName: string, data: MonoEventData) => void; reference?: string; children?: any; } export { WebviewMessage, MonoConnectProps, MonoConnectButtonProps, MonoProviderProps, DataConfig, MonoEventData };