import { APIAccountEntity } from '@actual-app/core/server/api-models'; import { APICategoryEntity } from '@actual-app/core/server/api-models'; import { APICategoryGroupEntity } from '@actual-app/core/server/api-models'; import { APIFileEntity } from '@actual-app/core/server/api-models'; import { APIPayeeEntity } from '@actual-app/core/server/api-models'; import { APIScheduleEntity } from '@actual-app/core/server/api-models'; import { APITagEntity } from '@actual-app/core/server/api-models'; import { ImportTransactionEntity } from '@actual-app/core/types/models'; import { ImportTransactionsOpts } from '@actual-app/core/types/api-handlers'; import { InitConfig } from '@actual-app/core/server/main'; import { lib } from '@actual-app/core/server/main'; import { Query } from '@actual-app/core/shared/query'; import { RuleEntity } from '@actual-app/core/types/models'; import { TransactionEntity } from '@actual-app/core/types/models'; export declare function addTransactions(accountId: APIAccountEntity['id'], transactions: Omit[], { learnCategories, runTransfers, }?: { learnCategories?: boolean; runTransfers?: boolean; }): Promise; declare const amountToInteger: any; export declare function aqlQuery(query: Query): Promise; export declare function batchBudgetUpdates(func: () => Promise): Promise; export declare function closeAccount(id: APIAccountEntity['id'], transferAccountId?: APIAccountEntity['id'], transferCategoryId?: APICategoryEntity['id']): Promise; export declare function createAccount(account: Omit, initialBalance?: number): Promise; export declare function createCategory(category: Omit): Promise; export declare function createCategoryGroup(group: Omit): Promise; export declare function createPayee(payee: Omit): Promise; export declare function createRule(rule: Omit): Promise; export declare function createSchedule(schedule: Omit): Promise; export declare function createTag(tag: Omit): Promise; export declare function deleteAccount(id: APIAccountEntity['id']): Promise; export declare function deleteCategory(id: APICategoryEntity['id'], transferCategoryId?: APICategoryEntity['id']): Promise; export declare function deleteCategoryGroup(id: APICategoryGroupEntity['id'], transferCategoryId?: APICategoryEntity['id']): Promise; export declare function deletePayee(id: APIPayeeEntity['id']): Promise; export declare function deleteRule(id: RuleEntity['id']): Promise; export declare function deleteSchedule(scheduleId: APIScheduleEntity['id']): Promise; export declare function deleteTag(id: APITagEntity['id']): Promise; export declare function deleteTransaction(id: TransactionEntity['id']): Promise; export declare function downloadBudget(syncId: string, { password }?: { password?: string; }): Promise; export declare function getAccountBalance(id: APIAccountEntity['id'], cutoff?: Date): Promise; export declare function getAccounts(): Promise; export declare function getBudgetMonth(month: string): Promise; export declare function getBudgetMonths(): Promise; export declare function getBudgets(): Promise; export declare function getCategories(): Promise; export declare function getCategoryGroups(): Promise; export declare function getCommonPayees(): Promise; export declare function getIDByName(type: 'accounts' | 'schedules' | 'categories' | 'payees', name: string): Promise; export declare function getPayeeRules(id: RuleEntity['id']): Promise; export declare function getPayees(): Promise; export declare function getRules(): Promise; export declare function getSchedules(): Promise; export declare function getServerVersion(): Promise; export declare function getTags(): Promise; export declare function getTransactions(accountId: APIAccountEntity['id'], startDate: string, endDate: string): Promise; export declare function holdBudgetForNextMonth(month: string, amount: number): Promise; export declare function importTransactions(accountId: APIAccountEntity['id'], transactions: ImportTransactionEntity[], opts?: ImportTransactionsOpts): Promise; export declare function init(config?: InitConfig): Promise; declare const integerToAmount: any; /** @deprecated Please use return value of `init` instead */ export declare let internal: typeof lib | null; export declare function loadBudget(budgetId: string): Promise; export declare function mergePayees(targetId: APIPayeeEntity['id'], mergeIds: APIPayeeEntity['id'][]): Promise; export declare function q(table: any): Query_2; declare class Query_2 { constructor(state: any); /** @type {import('loot-core/shared/query').QueryState} */ state: any; filter(expr: any): Query_2; unfilter(exprs: any): Query_2; select(exprs?: any[]): Query_2; calculate(expr: any): Query_2; groupBy(exprs: any): Query_2; orderBy(exprs: any): Query_2; limit(num: any): Query_2; offset(num: any): Query_2; raw(): Query_2; withDead(): Query_2; withoutValidatedRefs(): Query_2; options(opts: any): Query_2; serialize(): any; reset(): Query_2; serializeAsString(): string; } export declare function reopenAccount(id: APIAccountEntity['id']): Promise; export declare function resetBudgetHold(month: string): Promise; export declare function runBankSync(args?: { accountId: APIAccountEntity['id']; }): Promise; export declare function runImport(budgetName: APIFileEntity['name'], func: () => Promise): Promise; /** * @deprecated Please use `aqlQuery` instead. * This function will be removed in a future release. */ export declare function runQuery(query: Query): Promise; export declare function setBudgetAmount(month: string, categoryId: APICategoryEntity['id'], value: number): Promise; export declare function setBudgetCarryover(month: string, categoryId: APICategoryEntity['id'], flag: boolean): Promise; export declare function shutdown(): Promise; export declare function sync(): Promise; export declare function updateAccount(id: APIAccountEntity['id'], fields: Partial): Promise; export declare function updateCategory(id: APICategoryEntity['id'], fields: Partial): Promise; export declare function updateCategoryGroup(id: APICategoryGroupEntity['id'], fields: Partial): Promise; export declare function updatePayee(id: APIPayeeEntity['id'], fields: Partial): Promise; export declare function updateRule(rule: RuleEntity): Promise; export declare function updateSchedule(id: APIScheduleEntity['id'], fields: Partial, resetNextDate?: boolean): Promise; export declare function updateTag(id: APITagEntity['id'], fields: Partial>): Promise; export declare function updateTransaction(id: TransactionEntity['id'], fields: Partial): Promise; export declare namespace utils { export { amountToInteger, integerToAmount } } export { }