import { Connector, Item } from 'pluggy-js/dist/types'; export interface PluggyData { value: JSON; } export interface PluggyError { code: string; msg: string; } export enum CountryCode { AR = 'AR', BR = 'BR', CL = 'CL', MX = 'MX', } export enum CountryName { AR = 'ARGENTINA', BR = 'BRAZIL', CL = 'COLOMBIA', MX = 'MEXICO', } export type CountryCodes = keyof typeof CountryCode; export type CountryNames = keyof typeof CountryName; export type Country = { code: CountryCode; name: CountryName; }; export enum ConnectorType { PERSONAL_BANK = 'PERSONAL_BANK', BUSINESS_BANK = 'BUSINESS_BANK', INVESTMENT = 'INVESTMENT', } export type ConnectorTypes = keyof typeof ConnectorType; export type Institution = Partial; export enum InstitutionTabType { PERSONAL = 'PERSONAL', BUSINESS = 'BUSINESS', INVESTMENT = 'INVESTMENT', } export type InstitutionTabTypes = keyof typeof InstitutionTabType; export type StackParams = { Welcome: undefined; Countries: undefined; Institutions: { country: CountryCodes } | undefined; Connect: { institution: Institution }; Connecting: { item: Item }; Connected: undefined; }; export interface Dictionary { [key: string]: T; } export type PluggyConnectProps = { token: string; countries?: Array; withSandbox?: boolean; onSuccess: () => void; onError: () => void; }; export type ConnectProps = { onSuccess: Function; onError: Function; withSandbox: boolean; }; export type ErrorField = { parameter: string; message: string; };