import { APIAccountEntity, APICategoryEntity, APICategoryGroupEntity, APIPayeeEntity } from '@actual-app/api/models'; import { CustomReportEntity, DashboardPageEntity, DashboardWidgetEntity, RuleEntity, TransactionEntity } from '@actual-app/core/types/models'; import { ImportTransactionEntity } from '@actual-app/core/types/models/import-transaction'; import { BudgetMonth, TransactionData, UpdateTransactionData } from './types.js'; /** * Ensures the shared Actual connection is ready. * * @deprecated Use `getActualConnection().ensureReady()` directly. */ export declare function initActualApi(): Promise; /** * Drains pending work and closes the shared Actual connection. * * @deprecated Use `getActualConnection().drainAndClose()` directly. */ export declare function shutdownActualApi(): Promise; /** * Returns every account in the loaded budget. */ export declare function getAccounts(): Promise; /** * Returns every category in the loaded budget. */ export declare function getCategories(): Promise<(APICategoryEntity | APICategoryGroupEntity)[]>; /** * Returns every category group in the loaded budget. */ export declare function getCategoryGroups(): Promise; /** * Returns every payee in the loaded budget. */ export declare function getPayees(): Promise; /** * Returns transactions for an account within an inclusive date range. */ export declare function getTransactions(accountId: string, start: string, end: string): Promise; /** * Returns the months for which the loaded budget has data. */ export declare function getBudgetMonths(): Promise; /** * Returns budget data for a month in `YYYY-MM` format. */ export declare function getBudgetMonth(month: string): Promise; /** * Returns an account balance, optionally as of a cutoff date. */ export declare function getAccountBalance(accountId: string, cutoff?: Date): Promise; /** * Returns every transaction rule in the loaded budget. */ export declare function getRules(): Promise; /** * Creates a payee and returns its identifier. */ export declare function createPayee(args: Record): Promise; /** * Updates a payee with the supplied fields. */ export declare function updatePayee(id: string, args: Record): Promise; /** * Deletes a payee by identifier. */ export declare function deletePayee(id: string): Promise; /** * Merges payees into a target payee. Transactions referencing the merged payees are * reassigned to the target; rules keep working because Actual maps the merged payee IDs * to the target when rules are loaded. */ export declare function mergePayees(targetId: string, mergeIds: string[]): Promise; /** * Creates a transaction rule and returns the resulting entity. */ export declare function createRule(args: Record): Promise; /** * Updates an existing transaction rule. */ export declare function updateRule(args: Record): Promise; /** * Deletes a transaction rule by identifier. */ export declare function deleteRule(id: string): Promise; /** * Creates a category and returns its identifier. */ export declare function createCategory(args: Record): Promise; /** * Updates a category with the supplied fields. */ export declare function updateCategory(id: string, args: Record): Promise; /** * Deletes a category by identifier. */ export declare function deleteCategory(id: string): Promise; /** * Creates a category group and returns its identifier. */ export declare function createCategoryGroup(args: Record): Promise; /** * Updates a category group with the supplied fields. */ export declare function updateCategoryGroup(id: string, args: Record): Promise; /** * Deletes a category group by identifier. */ export declare function deleteCategoryGroup(id: string): Promise; /** * Adds a transaction to an account and returns its identifier. */ export declare function createTransaction(accountId: string, data: TransactionData): Promise; /** * Imports transactions using Actual's reconciliation and deduplication logic. */ export declare function importTransactions(accountId: string, transactions: ImportTransactionEntity[], opts?: { defaultCleared?: boolean; dryRun?: boolean; }): Promise<{ added: string[]; updated: string[]; errors: Array<{ message: string; }>; }>; /** * Updates a transaction with the supplied fields. */ export declare function updateTransaction(id: string, data: UpdateTransactionData): Promise; /** * Deletes a transaction by identifier. */ export declare function deleteTransaction(id: string): Promise; /** * Runs bank synchronization for one account or all linked accounts. */ export declare function runBankSync(accountId?: string): Promise; /** * Returns every custom report in the loaded budget. */ export declare function getReports(): Promise; /** * Creates a custom report and returns its identifier. */ export declare function createReport(report: CustomReportEntity): Promise; /** * Updates an existing custom report. */ export declare function updateReport(report: CustomReportEntity): Promise; /** * Deletes a custom report by identifier. */ export declare function deleteReport(id: string): Promise; /** * Returns every active dashboard page. */ export declare function getDashboardPages(): Promise; /** * Returns every active dashboard widget. */ export declare function getDashboardWidgets(): Promise; /** * Adds a widget to a dashboard. */ export declare function addDashboardWidget(widget: Record): Promise; /** * Updates an existing dashboard widget. */ export declare function updateDashboardWidget(widget: Record): Promise; /** * Removes a widget from a dashboard. */ export declare function removeDashboardWidget(widgetId: string): Promise; /** * Replaces the dashboard's widget configuration. */ export declare function updateDashboard(widgets: Array>): Promise; /** * Creates a dashboard page and returns its identifier. */ export declare function createDashboardPage(name: string): Promise; /** * Renames a dashboard page. */ export declare function renameDashboardPage(id: string, name: string): Promise; /** * Deletes a dashboard page by identifier. */ export declare function deleteDashboardPage(id: string): Promise; /** * Sets the budgeted amount for a category and month. */ export declare function setBudgetAmount(month: string, categoryId: string, value: number): Promise; /** * Enables or disables category carryover for a month. */ export declare function setBudgetCarryover(month: string, categoryId: string, flag: boolean): Promise; /** * Holds an amount from a month for use in the following month. */ export declare function holdBudgetForNextMonth(month: string, value: number): Promise; /** * Clears a previously configured budget hold for a month. */ export declare function resetBudgetHold(month: string): Promise; //# sourceMappingURL=actual-api.d.ts.map