A local-first personal finance app
[AI] Move ImportTransactionsOpts from api package to loot-core (#7053)
Matiss Janis Aboltins286d05d187d5
diff --git a/packages/api/methods.ts b/packages/api/methods.tsindex 1f19215186..eef0198b9c 100644--- a/packages/api/methods.ts+++ b/packages/api/methods.ts@@ -8,6 +8,7 @@ import type {APITagEntity,} from 'loot-core/server/api-models';import type { Query } from 'loot-core/shared/query';+import type { ImportTransactionsOpts } from 'loot-core/types/api-handlers';import type { Handlers } from 'loot-core/types/handlers';import type {ImportTransactionEntity,@@ -126,11 +127,6 @@ export function addTransactions(});}-export type ImportTransactionsOpts = {- defaultCleared?: boolean;- dryRun?: boolean;-};-export function importTransactions(accountId: APIAccountEntity['id'],transactions: ImportTransactionEntity[],diff --git a/packages/loot-core/src/types/api-handlers.ts b/packages/loot-core/src/types/api-handlers.tsindex 665bd76175..294e8e2afb 100644--- a/packages/loot-core/src/types/api-handlers.ts+++ b/packages/loot-core/src/types/api-handlers.ts@@ -1,6 +1,4 @@// @ts-strict-ignore-import type { ImportTransactionsOpts } from '@actual-app/api';-import type { ImportTransactionsResult } from '../server/accounts/app';import type {APIAccountEntity,@@ -23,6 +21,11 @@ import type {TransactionEntity,} from './models';+export type ImportTransactionsOpts = {+ defaultCleared?: boolean;+ dryRun?: boolean;+};+export type ApiHandlers = {'api/batch-budget-start': () => Promise<void>;diff --git a/upcoming-release-notes/7053.md b/upcoming-release-notes/7053.mdnew file mode 100644index 0000000000..b76657c3cb--- /dev/null+++ b/upcoming-release-notes/7053.md@@ -0,0 +1,6 @@+---+category: Maintenance+authors: [MatissJanis]+---++TypeScript: move ImportTransactionsOpts from the api package to loot-core