Skip to content

A local-first personal finance app

:recycle: (loot-core) updated all data model imports to use barrel file (#4609)

Matiss Janis Aboltinsbaadafb15e81
diff --git a/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx b/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx
index 5fad8bfb9e..3edf88d61a 100644
--- a/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx
+++ b/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx
@@ -22,8 +22,10 @@ import { addNotification } from 'loot-core/client/notifications/notificationsSli
import { send } from 'loot-core/platform/client/fetch';
import * as undo from 'loot-core/platform/client/undo';
import { type Handlers } from 'loot-core/types/handlers';
-import { type UserAvailable } from 'loot-core/types/models';
-import { type UserAccessEntity } from 'loot-core/types/models/userAccess';
+import {
+ type UserAvailable,
+ type UserAccessEntity,
+} from 'loot-core/types/models';
import { useMetadataPref } from '../../../hooks/useMetadataPref';
import { useDispatch } from '../../../redux';
diff --git a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx
index d440ce5fbb..5b5425bbad 100644
--- a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx
+++ b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx
@@ -21,10 +21,7 @@ import { pushModal } from 'loot-core/client/modals/modalsSlice';
import { addNotification } from 'loot-core/client/notifications/notificationsSlice';
import { send } from 'loot-core/platform/client/fetch';
import * as undo from 'loot-core/platform/client/undo';
-import {
- type NewUserEntity,
- type UserEntity,
-} from 'loot-core/types/models/user';
+import { type NewUserEntity, type UserEntity } from 'loot-core/types/models';
import { SelectedProvider, useSelected } from '../../../hooks/useSelected';
import { useDispatch } from '../../../redux';
diff --git a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectoryRow.tsx b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectoryRow.tsx
index 9efca94ea1..2e148daa77 100644
--- a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectoryRow.tsx
+++ b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectoryRow.tsx
@@ -6,7 +6,8 @@ import { Button } from '@actual-app/components/button';
import { theme } from '@actual-app/components/theme';
import { View } from '@actual-app/components/view';
-import { PossibleRoles, type UserEntity } from 'loot-core/types/models/user';
+import { PossibleRoles } from 'loot-core/shared/user';
+import { type UserEntity } from 'loot-core/types/models';
import { useSelectedDispatch } from '../../../hooks/useSelected';
import { Checkbox } from '../../forms';
diff --git a/packages/desktop-client/src/components/autocomplete/FilterAutocomplete.tsx b/packages/desktop-client/src/components/autocomplete/FilterAutocomplete.tsx
index d6b443a0a4..653051122a 100644
--- a/packages/desktop-client/src/components/autocomplete/FilterAutocomplete.tsx
+++ b/packages/desktop-client/src/components/autocomplete/FilterAutocomplete.tsx
@@ -1,7 +1,7 @@
import React, { type ComponentProps } from 'react';
import { useFilters } from 'loot-core/client/data-hooks/filters';
-import { type TransactionFilterEntity } from 'loot-core/types/models/transaction-filter';
+import { type TransactionFilterEntity } from 'loot-core/types/models';
import { Autocomplete } from './Autocomplete';
import { FilterList } from './FilterList';
diff --git a/packages/desktop-client/src/components/autocomplete/ReportAutocomplete.tsx b/packages/desktop-client/src/components/autocomplete/ReportAutocomplete.tsx
index 64fa015734..397af5e608 100644
--- a/packages/desktop-client/src/components/autocomplete/ReportAutocomplete.tsx
+++ b/packages/desktop-client/src/components/autocomplete/ReportAutocomplete.tsx
@@ -1,7 +1,7 @@
import React, { type ComponentProps } from 'react';
import { useReports } from 'loot-core/client/data-hooks/reports';
-import { type CustomReportEntity } from 'loot-core/types/models/reports';
+import { type CustomReportEntity } from 'loot-core/types/models';
import { Autocomplete } from './Autocomplete';
import { ReportList } from './ReportList';
diff --git a/packages/desktop-client/src/components/banksync/AccountRow.tsx b/packages/desktop-client/src/components/banksync/AccountRow.tsx
index f783b351db..ec1697d5b0 100644
--- a/packages/desktop-client/src/components/banksync/AccountRow.tsx
+++ b/packages/desktop-client/src/components/banksync/AccountRow.tsx
@@ -5,7 +5,7 @@ import { Button } from '@actual-app/components/button';
import { theme } from '@actual-app/components/theme';
import { tsToRelativeTime } from 'loot-core/shared/util';
-import { type AccountEntity } from 'loot-core/src/types/models';
+import { type AccountEntity } from 'loot-core/types/models';
import { Row, Cell } from '../table';
diff --git a/packages/desktop-client/src/components/banksync/AccountsList.tsx b/packages/desktop-client/src/components/banksync/AccountsList.tsx
index 42b21c0bad..533dab3770 100644
--- a/packages/desktop-client/src/components/banksync/AccountsList.tsx
+++ b/packages/desktop-client/src/components/banksync/AccountsList.tsx
@@ -2,7 +2,7 @@ import React from 'react';
import { View } from '@actual-app/components/view';
-import { type AccountEntity } from 'loot-core/src/types/models';
+import { type AccountEntity } from 'loot-core/types/models';
import { useLocale } from '../../hooks/useLocale';
diff --git a/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx b/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx
index 3b0b61b029..7ace80839c 100644
--- a/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx
+++ b/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx
@@ -12,11 +12,11 @@ import {
mappingsFromString,
mappingsToString,
} from 'loot-core/server/util/custom-sync-mapping';
-import { q } from 'loot-core/src/shared/query';
+import { q } from 'loot-core/shared/query';
import {
type TransactionEntity,
type AccountEntity,
-} from 'loot-core/src/types/models';
+} from 'loot-core/types/models';
import { useSyncedPref } from '../../hooks/useSyncedPref';
import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal';
diff --git a/packages/desktop-client/src/components/filters/FiltersStack.tsx b/packages/desktop-client/src/components/filters/FiltersStack.tsx
index 2b021b86d4..fc29bb5f97 100644
--- a/packages/desktop-client/src/components/filters/FiltersStack.tsx
+++ b/packages/desktop-client/src/components/filters/FiltersStack.tsx
@@ -3,8 +3,10 @@ import React from 'react';
import { Stack } from '@actual-app/components/stack';
import { View } from '@actual-app/components/view';
-import { type TransactionFilterEntity } from 'loot-core/types/models';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+import {
+ type TransactionFilterEntity,
+ type RuleConditionEntity,
+} from 'loot-core/types/models';
import { AppliedFilters } from './AppliedFilters';
import {
diff --git a/packages/desktop-client/src/components/filters/SavedFilterMenuButton.tsx b/packages/desktop-client/src/components/filters/SavedFilterMenuButton.tsx
index b41f80b681..f4fcff704b 100644
--- a/packages/desktop-client/src/components/filters/SavedFilterMenuButton.tsx
+++ b/packages/desktop-client/src/components/filters/SavedFilterMenuButton.tsx
@@ -8,8 +8,10 @@ import { Text } from '@actual-app/components/text';
import { View } from '@actual-app/components/view';
import { send, sendCatch } from 'loot-core/platform/client/fetch';
-import { type TransactionFilterEntity } from 'loot-core/types/models';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+import {
+ type TransactionFilterEntity,
+ type RuleConditionEntity,
+} from 'loot-core/types/models';
import { FilterMenu } from './FilterMenu';
import { NameFilter } from './NameFilter';
diff --git a/packages/desktop-client/src/components/manager/subscribe/Login.tsx b/packages/desktop-client/src/components/manager/subscribe/Login.tsx
index f4399359a6..e6074ab81c 100644
--- a/packages/desktop-client/src/components/manager/subscribe/Login.tsx
+++ b/packages/desktop-client/src/components/manager/subscribe/Login.tsx
@@ -17,7 +17,7 @@ import { View } from '@actual-app/components/view';
import { loggedIn } from 'loot-core/client/actions/user';
import { send } from 'loot-core/platform/client/fetch';
import { isElectron } from 'loot-core/shared/environment';
-import { type OpenIdConfig } from 'loot-core/types/models/openid';
+import { type OpenIdConfig } from 'loot-core/types/models';
import { useNavigate } from '../../../hooks/useNavigate';
import { useDispatch } from '../../../redux';
diff --git a/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx b/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx
index b8fb324d58..eacb3070f3 100644
--- a/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx
+++ b/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx
@@ -15,7 +15,7 @@ import { View } from '@actual-app/components/view';
import { addNotification } from 'loot-core/client/notifications/notificationsSlice';
import { send } from 'loot-core/platform/client/fetch';
import { type Handlers } from 'loot-core/types/handlers';
-import { type OpenIdConfig } from 'loot-core/types/models/openid';
+import { type OpenIdConfig } from 'loot-core/types/models';
import { useDispatch } from '../../../redux';
import { Link } from '../../common/Link';
diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx b/packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx
index fee1e637ca..1527a5e5c5 100644
--- a/packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx
+++ b/packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx
@@ -34,8 +34,10 @@ import { validForTransfer } from 'loot-core/client/transfer';
import * as monthUtils from 'loot-core/shared/months';
import { isPreviewId } from 'loot-core/shared/transactions';
import { groupById, integerToCurrency } from 'loot-core/shared/util';
-import { type AccountEntity } from 'loot-core/types/models';
-import { type TransactionEntity } from 'loot-core/types/models/transaction';
+import {
+ type AccountEntity,
+ type TransactionEntity,
+} from 'loot-core/types/models';
import { useAccounts } from '../../../hooks/useAccounts';
import { useCategories } from '../../../hooks/useCategories';
diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx b/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx
index 4b1289c7a8..66112ed390 100644
--- a/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx
+++ b/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx
@@ -30,8 +30,8 @@ import {
} from '@react-aria/interactions';
import { useCachedSchedules } from 'loot-core/client/data-hooks/schedules';
-import { isPreviewId } from 'loot-core/src/shared/transactions';
-import { integerToCurrency } from 'loot-core/src/shared/util';
+import { isPreviewId } from 'loot-core/shared/transactions';
+import { integerToCurrency } from 'loot-core/shared/util';
import {
type AccountEntity,
type TransactionEntity,
diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.tsx b/packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.tsx
index 206dbd6a8b..23442d8af4 100644
--- a/packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.tsx
+++ b/packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.tsx
@@ -6,8 +6,10 @@ import { styles } from '@actual-app/components/styles';
import { theme } from '@actual-app/components/theme';
import { View } from '@actual-app/components/view';
-import { type AccountEntity } from 'loot-core/types/models';
-import { type TransactionEntity } from 'loot-core/types/models/transaction';
+import {
+ type AccountEntity,
+ type TransactionEntity,
+} from 'loot-core/types/models';
import { SelectedProvider, useSelected } from '../../../hooks/useSelected';
import { Search } from '../../common/Search';
diff --git a/packages/desktop-client/src/components/modals/EditUser.tsx b/packages/desktop-client/src/components/modals/EditUser.tsx
index ae48def311..2a9d3b4070 100644
--- a/packages/desktop-client/src/components/modals/EditUser.tsx
+++ b/packages/desktop-client/src/components/modals/EditUser.tsx
@@ -17,11 +17,8 @@ import {
} from 'loot-core/client/modals/modalsSlice';
import { addNotification } from 'loot-core/client/notifications/notificationsSlice';
import { send } from 'loot-core/platform/client/fetch';
-import {
- type NewUserEntity,
- PossibleRoles,
- type UserEntity,
-} from 'loot-core/types/models/user';
+import { PossibleRoles } from 'loot-core/shared/user';
+import { type NewUserEntity, type UserEntity } from 'loot-core/types/models';
import { useDispatch } from '../../redux';
import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal';
diff --git a/packages/desktop-client/src/components/modals/OpenIDEnableModal.tsx b/packages/desktop-client/src/components/modals/OpenIDEnableModal.tsx
index d945c3aa3b..27e2f1e502 100644
--- a/packages/desktop-client/src/components/modals/OpenIDEnableModal.tsx
+++ b/packages/desktop-client/src/components/modals/OpenIDEnableModal.tsx
@@ -15,7 +15,7 @@ import {
import { send } from 'loot-core/platform/client/fetch';
import * as asyncStorage from 'loot-core/platform/server/asyncStorage';
import { getOpenIdErrors } from 'loot-core/shared/errors';
-import { type OpenIdConfig } from 'loot-core/types/models/openid';
+import { type OpenIdConfig } from 'loot-core/types/models';
import { useDispatch } from '../../redux';
import { Error } from '../alerts';
diff --git a/packages/desktop-client/src/components/modals/PluggyAiInitialiseModal.tsx b/packages/desktop-client/src/components/modals/PluggyAiInitialiseModal.tsx
index 020e84059b..dc66b97bfb 100644
--- a/packages/desktop-client/src/components/modals/PluggyAiInitialiseModal.tsx
+++ b/packages/desktop-client/src/components/modals/PluggyAiInitialiseModal.tsx
@@ -8,9 +8,9 @@ import { Input } from '@actual-app/components/input';
import { Text } from '@actual-app/components/text';
import { View } from '@actual-app/components/view';
+import { type Modal as ModalType } from 'loot-core/client/modals/modalsSlice';
+import { send } from 'loot-core/platform/client/fetch';
import { getSecretsError } from 'loot-core/shared/errors';
-import { type Modal as ModalType } from 'loot-core/src/client/modals/modalsSlice';
-import { send } from 'loot-core/src/platform/client/fetch';
import { Error } from '../alerts';
import { Link } from '../common/Link';
diff --git a/packages/desktop-client/src/components/reports/ChooseGraph.tsx b/packages/desktop-client/src/components/reports/ChooseGraph.tsx
index 9bcee37ea9..a9bc13d31a 100644
--- a/packages/desktop-client/src/components/reports/ChooseGraph.tsx
+++ b/packages/desktop-client/src/components/reports/ChooseGraph.tsx
@@ -2,8 +2,10 @@ import React, { type UIEvent, useRef, type CSSProperties } from 'react';
import { styles } from '@actual-app/components/styles';
-import { type DataEntity } from 'loot-core/types/models/reports';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+import {
+ type DataEntity,
+ type RuleConditionEntity,
+} from 'loot-core/types/models';
import { AreaGraph } from './graphs/AreaGraph';
import { BarGraph } from './graphs/BarGraph';
diff --git a/packages/desktop-client/src/components/reports/ReportSidebar.tsx b/packages/desktop-client/src/components/reports/ReportSidebar.tsx
index ddecaa41dc..cdd1f0362e 100644
--- a/packages/desktop-client/src/components/reports/ReportSidebar.tsx
+++ b/packages/desktop-client/src/components/reports/ReportSidebar.tsx
@@ -13,13 +13,13 @@ import { Tooltip } from '@actual-app/components/tooltip';
import { View } from '@actual-app/components/view';
import * as monthUtils from 'loot-core/shared/months';
-import { type CategoryEntity } from 'loot-core/types/models/category';
-import { type CategoryGroupEntity } from 'loot-core/types/models/category-group';
-import { type TimeFrame } from 'loot-core/types/models/dashboard';
import {
+ type CategoryEntity,
+ type CategoryGroupEntity,
+ type TimeFrame,
type CustomReportEntity,
type sortByOpType,
-} from 'loot-core/types/models/reports';
+} from 'loot-core/types/models';
import { type SyncedPrefs } from 'loot-core/types/prefs';
import { Information } from '../alerts';
diff --git a/packages/desktop-client/src/components/reports/ReportSummary.tsx b/packages/desktop-client/src/components/reports/ReportSummary.tsx
index 95931a6a9a..8e393af5f1 100644
--- a/packages/desktop-client/src/components/reports/ReportSummary.tsx
+++ b/packages/desktop-client/src/components/reports/ReportSummary.tsx
@@ -15,7 +15,7 @@ import {
import {
type balanceTypeOpType,
type DataEntity,
-} from 'loot-core/types/models/reports';
+} from 'loot-core/types/models';
import { useLocale } from '../../hooks/useLocale';
import { PrivacyFilter } from '../PrivacyFilter';
diff --git a/packages/desktop-client/src/components/reports/ReportTopbar.tsx b/packages/desktop-client/src/components/reports/ReportTopbar.tsx
index 2283c451c6..a3b9ce6d56 100644
--- a/packages/desktop-client/src/components/reports/ReportTopbar.tsx
+++ b/packages/desktop-client/src/components/reports/ReportTopbar.tsx
@@ -15,8 +15,10 @@ import { SpaceBetween } from '@actual-app/components/space-between';
import { theme } from '@actual-app/components/theme';
import { View } from '@actual-app/components/view';
-import { type CustomReportEntity } from 'loot-core/types/models/reports';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+import {
+ type CustomReportEntity,
+ type RuleConditionEntity,
+} from 'loot-core/types/models';
import { FilterButton } from '../filters/FiltersMenu';
diff --git a/packages/desktop-client/src/components/reports/SaveReportName.tsx b/packages/desktop-client/src/components/reports/SaveReportName.tsx
index ebc1eabad5..e9aa066715 100644
--- a/packages/desktop-client/src/components/reports/SaveReportName.tsx
+++ b/packages/desktop-client/src/components/reports/SaveReportName.tsx
@@ -9,7 +9,7 @@ import { Text } from '@actual-app/components/text';
import { theme } from '@actual-app/components/theme';
import { View } from '@actual-app/components/view';
-import { type CustomReportEntity } from 'loot-core/types/models/reports';
+import { type CustomReportEntity } from 'loot-core/types/models';
import { FormField, FormLabel } from '../forms';
diff --git a/packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx b/packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx
index 43953784d0..ae4a449313 100644
--- a/packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx
@@ -22,7 +22,7 @@ import {
import {
type balanceTypeOpType,
type DataEntity,
-} from 'loot-core/types/models/reports';
+} from 'loot-core/types/models';
import { usePrivacyMode } from '../../../hooks/usePrivacyMode';
import { Container } from '../Container';
diff --git a/packages/desktop-client/src/components/reports/graphs/BarGraph.tsx b/packages/desktop-client/src/components/reports/graphs/BarGraph.tsx
index 408c435c53..f369a197e8 100644
--- a/packages/desktop-client/src/components/reports/graphs/BarGraph.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/BarGraph.tsx
@@ -25,8 +25,8 @@ import {
import {
type balanceTypeOpType,
type DataEntity,
-} from 'loot-core/types/models/reports';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+ type RuleConditionEntity,
+} from 'loot-core/types/models';
import { useAccounts } from '../../../hooks/useAccounts';
import { useCategories } from '../../../hooks/useCategories';
diff --git a/packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx b/packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx
index a001f5355e..0b52866c54 100644
--- a/packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx
@@ -8,8 +8,8 @@ import { amountToCurrency } from 'loot-core/shared/util';
import {
type balanceTypeOpType,
type DataEntity,
-} from 'loot-core/types/models/reports';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+ type RuleConditionEntity,
+} from 'loot-core/types/models';
import { useAccounts } from '../../../hooks/useAccounts';
import { useCategories } from '../../../hooks/useCategories';
diff --git a/packages/desktop-client/src/components/reports/graphs/LineGraph.tsx b/packages/desktop-client/src/components/reports/graphs/LineGraph.tsx
index 608426e4a9..07d0062217 100644
--- a/packages/desktop-client/src/components/reports/graphs/LineGraph.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/LineGraph.tsx
@@ -22,8 +22,8 @@ import {
import {
type balanceTypeOpType,
type DataEntity,
-} from 'loot-core/types/models/reports';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+ type RuleConditionEntity,
+} from 'loot-core/types/models';
import { useAccounts } from '../../../hooks/useAccounts';
import { useCategories } from '../../../hooks/useCategories';
diff --git a/packages/desktop-client/src/components/reports/graphs/SpendingGraph.tsx b/packages/desktop-client/src/components/reports/graphs/SpendingGraph.tsx
index fc781b77d9..5b03d2cd80 100644
--- a/packages/desktop-client/src/components/reports/graphs/SpendingGraph.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/SpendingGraph.tsx
@@ -19,7 +19,7 @@ import {
amountToCurrency,
amountToCurrencyNoDecimal,
} from 'loot-core/shared/util';
-import { type SpendingEntity } from 'loot-core/types/models/reports';
+import { type SpendingEntity } from 'loot-core/types/models';
import { usePrivacyMode } from '../../../hooks/usePrivacyMode';
import { Container } from '../Container';
diff --git a/packages/desktop-client/src/components/reports/graphs/StackedBarGraph.tsx b/packages/desktop-client/src/components/reports/graphs/StackedBarGraph.tsx
index 2baad742d3..93ced87428 100644
--- a/packages/desktop-client/src/components/reports/graphs/StackedBarGraph.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/StackedBarGraph.tsx
@@ -23,8 +23,8 @@ import {
import {
type balanceTypeOpType,
type DataEntity,
-} from 'loot-core/types/models/reports';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+ type RuleConditionEntity,
+} from 'loot-core/types/models';
import { useAccounts } from '../../../hooks/useAccounts';
import { useCategories } from '../../../hooks/useCategories';
diff --git a/packages/desktop-client/src/components/reports/graphs/showActivity.ts b/packages/desktop-client/src/components/reports/graphs/showActivity.ts
index 433bdb4c2a..c41514cda1 100644
--- a/packages/desktop-client/src/components/reports/graphs/showActivity.ts
+++ b/packages/desktop-client/src/components/reports/graphs/showActivity.ts
@@ -1,11 +1,13 @@
import { type NavigateFunction } from 'react-router-dom';
import * as monthUtils from 'loot-core/shared/months';
-import { type AccountEntity } from 'loot-core/types/models/account';
-import { type CategoryEntity } from 'loot-core/types/models/category';
-import { type CategoryGroupEntity } from 'loot-core/types/models/category-group';
-import { type balanceTypeOpType } from 'loot-core/types/models/reports';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+import {
+ type AccountEntity,
+ type CategoryEntity,
+ type CategoryGroupEntity,
+ type balanceTypeOpType,
+ type RuleConditionEntity,
+} from 'loot-core/types/models';
import { ReportOptions } from '../ReportOptions';
diff --git a/packages/desktop-client/src/components/reports/graphs/tableGraph/RenderTableRow.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/RenderTableRow.tsx
index 410e0fca3e..ea04725373 100644
--- a/packages/desktop-client/src/components/reports/graphs/tableGraph/RenderTableRow.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/RenderTableRow.tsx
@@ -2,7 +2,7 @@ import React, { type ReactNode, type CSSProperties } from 'react';
import { View } from '@actual-app/components/view';
-import { type GroupedEntity } from 'loot-core/types/models/reports';
+import { type GroupedEntity } from 'loot-core/types/models';
import { type renderRowProps } from './ReportTable';
diff --git a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTable.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTable.tsx
index ad8b88c910..543ebc9644 100644
--- a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTable.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTable.tsx
@@ -14,8 +14,8 @@ import {
type GroupedEntity,
type DataEntity,
type balanceTypeOpType,
-} from 'loot-core/types/models/reports';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+ type RuleConditionEntity,
+} from 'loot-core/types/models';
import { ReportTableHeader } from './ReportTableHeader';
import { ReportTableList } from './ReportTableList';
diff --git a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx
index c450dbe873..431039d669 100644
--- a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx
@@ -11,7 +11,7 @@ import { View } from '@actual-app/components/view';
import {
type balanceTypeOpType,
type IntervalEntity,
-} from 'loot-core/types/models/reports';
+} from 'loot-core/types/models';
import { Row, Cell } from '../../../table';
import { ReportOptions } from '../../ReportOptions';
diff --git a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableList.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableList.tsx
index 71841ed728..8af0b3e3a0 100644
--- a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableList.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableList.tsx
@@ -3,10 +3,7 @@ import React, { type ReactNode, type CSSProperties } from 'react';
import { theme } from '@actual-app/components/theme';
import { View } from '@actual-app/components/view';
-import {
- type GroupedEntity,
- type DataEntity,
-} from 'loot-core/types/models/reports';
+import { type GroupedEntity, type DataEntity } from 'loot-core/types/models';
import { Row } from '../../../table';
diff --git a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableRow.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableRow.tsx
index 79beb69c7b..f018b20e0a 100644
--- a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableRow.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableRow.tsx
@@ -18,8 +18,8 @@ import {
import {
type balanceTypeOpType,
type GroupedEntity,
-} from 'loot-core/types/models/reports';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+ type RuleConditionEntity,
+} from 'loot-core/types/models';
import { useAccounts } from '../../../../hooks/useAccounts';
import { useCategories } from '../../../../hooks/useCategories';
diff --git a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx
index 5cd66d580d..c17595ce37 100644
--- a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx
+++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx
@@ -11,10 +11,7 @@ import { styles } from '@actual-app/components/styles';
import { theme } from '@actual-app/components/theme';
import { View } from '@actual-app/components/view';
-import {
- type GroupedEntity,
- type DataEntity,
-} from 'loot-core/types/models/reports';
+import { type GroupedEntity, type DataEntity } from 'loot-core/types/models';
import { type renderTotalsProps } from './ReportTable';
diff --git a/packages/desktop-client/src/components/reports/reports/CustomReport.tsx b/packages/desktop-client/src/components/reports/reports/CustomReport.tsx
index 905f937b8b..b34f6d15f4 100644
--- a/packages/desktop-client/src/components/reports/reports/CustomReport.tsx
+++ b/packages/desktop-client/src/components/reports/reports/CustomReport.tsx
@@ -16,14 +16,14 @@ import { calculateHasWarning } from 'loot-core/client/reports';
import { send } from 'loot-core/platform/client/fetch';
import * as monthUtils from 'loot-core/shared/months';
import { amountToCurrency } from 'loot-core/shared/util';
-import { type CategoryEntity } from 'loot-core/types/models/category';
import {
+ type CategoryEntity,
type balanceTypeOpType,
- type sortByOpType,
type CustomReportEntity,
type DataEntity,
-} from 'loot-core/types/models/reports';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+ type sortByOpType,
+ type RuleConditionEntity,
+} from 'loot-core/types/models';
import { type TransObjectLiteral } from 'loot-core/types/util';
import { useAccounts } from '../../../hooks/useAccounts';
diff --git a/packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx b/packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx
index 4d3a7ac8b1..d9a1292b47 100644
--- a/packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx
+++ b/packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx
@@ -12,7 +12,7 @@ import { addNotification } from 'loot-core/client/notifications/notificationsSli
import { calculateHasWarning } from 'loot-core/client/reports';
import { send, sendCatch } from 'loot-core/platform/client/fetch/index';
import * as monthUtils from 'loot-core/shared/months';
-import { type CustomReportEntity } from 'loot-core/types/models/reports';
+import { type CustomReportEntity } from 'loot-core/types/models';
import { useAccounts } from '../../../hooks/useAccounts';
import { useCategories } from '../../../hooks/useCategories';
diff --git a/packages/desktop-client/src/components/reports/reports/GetCardData.tsx b/packages/desktop-client/src/components/reports/reports/GetCardData.tsx
index 8f266b7797..a3f97c57d6 100644
--- a/packages/desktop-client/src/components/reports/reports/GetCardData.tsx
+++ b/packages/desktop-client/src/components/reports/reports/GetCardData.tsx
@@ -8,11 +8,13 @@ import { Text } from '@actual-app/components/text';
import { theme } from '@actual-app/components/theme';
import * as monthUtils from 'loot-core/shared/months';
-import { type AccountEntity } from 'loot-core/types/models/account';
-import { type CategoryEntity } from 'loot-core/types/models/category';
-import { type CategoryGroupEntity } from 'loot-core/types/models/category-group';
-import { type PayeeEntity } from 'loot-core/types/models/payee';
-import { type CustomReportEntity } from 'loot-core/types/models/reports';
+import {
+ type AccountEntity,
+ type CategoryEntity,
+ type CategoryGroupEntity,
+ type PayeeEntity,
+ type CustomReportEntity,
+} from 'loot-core/types/models';
import { type SyncedPrefs } from 'loot-core/types/prefs';
import { ChooseGraph } from '../ChooseGraph';
diff --git a/packages/desktop-client/src/components/reports/reports/Spending.tsx b/packages/desktop-client/src/components/reports/reports/Spending.tsx
index dab260a60e..b3dd5d6079 100644
--- a/packages/desktop-client/src/components/reports/reports/Spending.tsx
+++ b/packages/desktop-client/src/components/reports/reports/Spending.tsx
@@ -21,8 +21,10 @@ import { addNotification } from 'loot-core/client/notifications/notificationsSli
import { send } from 'loot-core/platform/client/fetch';
import * as monthUtils from 'loot-core/shared/months';
import { amountToCurrency } from 'loot-core/shared/util';
-import { type SpendingWidget } from 'loot-core/types/models';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+import {
+ type SpendingWidget,
+ type RuleConditionEntity,
+} from 'loot-core/types/models';
import { useFilters } from '../../../hooks/useFilters';
import { useLocale } from '../../../hooks/useLocale';
diff --git a/packages/desktop-client/src/components/reports/setSessionReport.ts b/packages/desktop-client/src/components/reports/setSessionReport.ts
index f1ab555be3..508861937c 100644
--- a/packages/desktop-client/src/components/reports/setSessionReport.ts
+++ b/packages/desktop-client/src/components/reports/setSessionReport.ts
@@ -1,4 +1,4 @@
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+import { type RuleConditionEntity } from 'loot-core/types/models';
export const setSessionReport = (
propName: string,
diff --git a/packages/desktop-client/src/components/reports/spreadsheets/calculateLegend.ts b/packages/desktop-client/src/components/reports/spreadsheets/calculateLegend.ts
index ff8bc95f5e..d0543d36ce 100644
--- a/packages/desktop-client/src/components/reports/spreadsheets/calculateLegend.ts
+++ b/packages/desktop-client/src/components/reports/spreadsheets/calculateLegend.ts
@@ -5,7 +5,7 @@ import {
type IntervalEntity,
type GroupedEntity,
type balanceTypeOpType,
-} from 'loot-core/types/models/reports';
+} from 'loot-core/types/models';
import { getColorScale } from '../chart-theme';
diff --git a/packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts b/packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts
index ef9499e77e..372fa697ac 100644
--- a/packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts
+++ b/packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts
@@ -11,14 +11,12 @@ import {
type CategoryEntity,
type RuleConditionEntity,
type CategoryGroupEntity,
-} from 'loot-core/types/models';
-import {
type balanceTypeOpType,
type sortByOpType,
type DataEntity,
type GroupedEntity,
type IntervalEntity,
-} from 'loot-core/types/models/reports';
+} from 'loot-core/types/models';
import { type SyncedPrefs } from 'loot-core/types/prefs';
import {
diff --git a/packages/desktop-client/src/components/reports/spreadsheets/filterEmptyRows.ts b/packages/desktop-client/src/components/reports/spreadsheets/filterEmptyRows.ts
index b6f1cb6b10..ae880fae5e 100644
--- a/packages/desktop-client/src/components/reports/spreadsheets/filterEmptyRows.ts
+++ b/packages/desktop-client/src/components/reports/spreadsheets/filterEmptyRows.ts
@@ -1,7 +1,7 @@
import {
type balanceTypeOpType,
type GroupedEntity,
-} from 'loot-core/types/models/reports';
+} from 'loot-core/types/models';
export function filterEmptyRows({
showEmpty,
diff --git a/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts b/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts
index d8c8679069..225cb8831c 100644
--- a/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts
+++ b/packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts
@@ -2,7 +2,7 @@ import { runQuery } from 'loot-core/client/query-helpers';
import { type useSpreadsheet } from 'loot-core/client/SpreadsheetProvider';
import { send } from 'loot-core/platform/client/fetch';
import * as monthUtils from 'loot-core/shared/months';
-import { type GroupedEntity } from 'loot-core/types/models/reports';
+import { type GroupedEntity } from 'loot-core/types/models';
import {
categoryLists,
diff --git a/packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts b/packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts
index d62f98bd4b..c0aa7b1660 100644
--- a/packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts
+++ b/packages/desktop-client/src/components/reports/spreadsheets/recalculate.ts
@@ -3,7 +3,7 @@ import { amountToInteger, integerToAmount } from 'loot-core/shared/util';
import {
type GroupedEntity,
type IntervalEntity,
-} from 'loot-core/types/models/reports';
+} from 'loot-core/types/models';
import {
type UncategorizedEntity,
diff --git a/packages/desktop-client/src/components/reports/spreadsheets/sortData.ts b/packages/desktop-client/src/components/reports/spreadsheets/sortData.ts
index 259c3fc47d..5730c88fbf 100644
--- a/packages/desktop-client/src/components/reports/spreadsheets/sortData.ts
+++ b/packages/desktop-client/src/components/reports/spreadsheets/sortData.ts
@@ -2,7 +2,7 @@ import {
type balanceTypeOpType,
type sortByOpType,
type GroupedEntity,
-} from 'loot-core/types/models/reports';
+} from 'loot-core/types/models';
const reverseSort: Partial<Record<sortByOpType, sortByOpType>> = {
asc: 'desc',
diff --git a/packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts b/packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts
index 49fb03b877..1b5e975b74 100644
--- a/packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts
+++ b/packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts
@@ -7,11 +7,11 @@ import { send } from 'loot-core/platform/client/fetch';
import * as monthUtils from 'loot-core/shared/months';
import { q } from 'loot-core/shared/query';
import { integerToAmount } from 'loot-core/shared/util';
-import { type RuleConditionEntity } from 'loot-core/types/models';
import {
+ type RuleConditionEntity,
type SpendingMonthEntity,
type SpendingEntity,
-} from 'loot-core/types/models/reports';
+} from 'loot-core/types/models';
import { makeQuery } from './makeQuery';
diff --git a/packages/desktop-client/src/hooks/useFilters.ts b/packages/desktop-client/src/hooks/useFilters.ts
index 1bd75ac252..ccf2d23a4d 100644
--- a/packages/desktop-client/src/hooks/useFilters.ts
+++ b/packages/desktop-client/src/hooks/useFilters.ts
@@ -1,6 +1,6 @@
import { useCallback, useMemo, useState } from 'react';
-import { type RuleConditionEntity } from 'loot-core/types/models/rule';
+import { type RuleConditionEntity } from 'loot-core/types/models';
export function useFilters<T extends RuleConditionEntity>(
initialConditions: T[] = [],
diff --git a/packages/desktop-client/src/hooks/usePluggyAiStatus.ts b/packages/desktop-client/src/hooks/usePluggyAiStatus.ts
index 70d71a962d..be4ecd99a7 100644
--- a/packages/desktop-client/src/hooks/usePluggyAiStatus.ts
+++ b/packages/desktop-client/src/hooks/usePluggyAiStatus.ts
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
-import { send } from 'loot-core/src/platform/client/fetch';
+import { send } from 'loot-core/platform/client/fetch';
import { useSyncServerStatus } from './useSyncServerStatus';
diff --git a/packages/loot-core/src/shared/user.ts b/packages/loot-core/src/shared/user.ts
new file mode 100644
index 0000000000..2dbab825e5
--- /dev/null
+++ b/packages/loot-core/src/shared/user.ts
@@ -0,0 +1,4 @@
+export const PossibleRoles = {
+ ADMIN: 'Admin',
+ BASIC: 'Basic',
+};
diff --git a/packages/loot-core/src/types/models/index.d.ts b/packages/loot-core/src/types/models/index.d.ts
index 82dc4d9d63..be8b943372 100644
--- a/packages/loot-core/src/types/models/index.d.ts
+++ b/packages/loot-core/src/types/models/index.d.ts
@@ -1,18 +1,19 @@
export type * from './account';
+export type * from './bank';
export type * from './bank-sync';
export type * from './category';
export type * from './category-group';
export type * from './dashboard';
export type * from './gocardless';
-export type * from './simplefin';
-export type * from './pluggyai';
export type * from './note';
+export type * from './openid';
export type * from './payee';
+export type * from './pluggyai';
export type * from './reports';
export type * from './rule';
export type * from './schedule';
+export type * from './simplefin';
export type * from './transaction';
export type * from './transaction-filter';
export type * from './user';
-export type * from './bank';
export type * from './userAccess';
diff --git a/packages/loot-core/src/types/models/user.ts b/packages/loot-core/src/types/models/user.ts
index 43b85030d0..666e089bb4 100644
--- a/packages/loot-core/src/types/models/user.ts
+++ b/packages/loot-core/src/types/models/user.ts
@@ -23,8 +23,3 @@ export interface UserAvailable {
haveAccess?: number;
owner?: number;
}
-
-export const PossibleRoles = {
- ADMIN: 'Admin',
- BASIC: 'Basic',
-};
diff --git a/upcoming-release-notes/4609.md b/upcoming-release-notes/4609.md
new file mode 100644
index 0000000000..a5be2577dd
--- /dev/null
+++ b/upcoming-release-notes/4609.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [MatissJanis]
+---
+
+Removed loot-core imports from using the `src` path; updated all data model imports to use barrel file.