expo-finance-kit
Version:
Native Expo module for Apple FinanceKit - Access financial data from Apple Card and other accounts
55 lines • 1.94 kB
TypeScript
/**
* Balance management module for Expo Finance Kit
* Handles fetching and managing account balance data
*/
import { AccountBalance, BalanceQueryOptions } from '../ExpoFinanceKit.types';
/**
* Fetches account balances
* @param options - Query options for filtering balances
* @returns Promise resolving to array of account balances
*/
export declare function getBalances(options?: BalanceQueryOptions): Promise<AccountBalance[]>;
/**
* Fetches balance for a specific account
* @param accountId - The account ID to fetch balance for
* @returns Promise resolving to the account balance or null
*/
export declare function getBalanceByAccount(accountId: string): Promise<AccountBalance | null>;
/**
* Fetches all balances and calculates total
* @returns Promise resolving to total balance across all accounts
*/
export declare function getTotalBalance(): Promise<{
total: number;
byCurrency: Map<string, number>;
accounts: AccountBalance[];
}>;
/**
* Gets balance summary for all accounts
* @returns Promise resolving to balance summary
*/
export declare function getBalanceSummary(): Promise<{
totalAssets: number;
totalLiabilities: number;
netWorth: number;
accountCount: number;
lastUpdated: number;
}>;
/**
* Monitors balance changes over time
* @param accountId - Account to monitor
* @param callback - Callback function for balance updates
* @returns Function to stop monitoring
*/
export declare function monitorBalanceChanges(accountId: string, callback: (balance: AccountBalance) => void): () => void;
/**
* Gets historical balance data (simulated)
* @param accountId - Account ID to get history for
* @param days - Number of days of history
* @returns Promise resolving to historical balance data
*/
export declare function getBalanceHistory(accountId: string, days?: number): Promise<Array<{
date: number;
balance: number;
}>>;
//# sourceMappingURL=balances.d.ts.map