UNPKG

@finagraph/strongbox-finconnect-react

Version:

React components to integrate with Finagraph Strongbox

53 lines (52 loc) 2.05 kB
import * as React from 'react'; import { AccountingPackage } from '../../Models/AccountingPackages'; import { StrongboxConnectionRequest } from '../../Utils/ConnectStrongbox'; import { Theme } from '../../Models/Theme/Theme'; import { ConnectionRequestDescriptor } from '../../Models/Api/strongbox.models'; import { TextContent } from '../../Text/TextContent'; export type StrongboxLinkerChildProps = { cxnRequest?: StrongboxConnectionRequest; authorized: boolean | undefined; disconnect: () => Promise<void>; renderAuthButton: (idConnectButton: string) => JSX.Element; connectionInitiated: (existingConnectionId: string) => void; theme?: Theme; disabled?: boolean; errorMsg?: string; isWorking?: boolean; }; export type Props = { cxnRequest?: StrongboxConnectionRequest; strongboxCxnRequestDescriptor?: ConnectionRequestDescriptor; onOpen?: (authWindow: Window) => void; existingConnectionId?: string; autoStartOnAuthorized?: boolean; autoStartOnIntialized?: boolean; children: (props: StrongboxLinkerChildProps) => JSX.Element; datasourceId: AccountingPackage; executeConnect: (accountingPackage: AccountingPackage, connectionRequestId: string, connectionWindowHandle: Window | undefined) => void; executeDisconnect?: () => void; theme?: Theme; isAuthorized?: boolean; checkAuthorizationStatus?: boolean; disabled?: boolean; errorMsg?: string; isWorking?: boolean; textContent?: TextContent; }; export type State = {}; declare class StrongboxLinker extends React.PureComponent<Props, State> { static defaultProps: { existingConnectionId: undefined; autoStartOnAuthorized: boolean; isAuthorized: boolean; checkAuthorizationStatus: boolean; }; constructor(props: Props); render(): JSX.Element; private DisconnectConnection; private AuthorizeConnection; private CreateJob; private RenderAuthButton; } export default StrongboxLinker;