UNPKG

flexbase-client

Version:
40 lines (39 loc) 1.48 kB
import { FlexbaseClientBase } from './FlexbaseClient.Base.js'; interface PublicTokenExchangeResponse { success: boolean; response?: { accessToken: string; accountId: string; itemId: string; userId: string; unitProcessorToken: string; }; } interface PlaidAcctLocationResponse { accountName: string; accountType: string; bankName: string; officialAccountName: string; success: boolean; } export declare class FlexbaseClientPlaid extends FlexbaseClientBase { /** * Request a Plaid `link_token` used to initialize [Plaid Link](https://plaid.com/docs/link/) * @returns A link token if successful, null otherwise */ getPlaidLinkToken(): Promise<string | null>; /** * Exchange a Plaid `public_token` * @param public_token The public token issued by [Plaid Link](https://plaid.com/docs/link/) * @param metadata * @returns `success: true` and response data to be used on web if successful, otherwise `success: false` */ exchangePlaidPublicToken(public_token: string, metadata: unknown): Promise<PublicTokenExchangeResponse>; /** * Update a Plaid `link_token` used by [Plaid Link](https://plaid.com/docs/link/). Used when re-authentication is required. * @returns A link token if successful, null otherwise */ updatePlaidLinkToken(): Promise<string | null>; getPlaidAcctLocation(): Promise<PlaidAcctLocationResponse | null>; } export {};