@actual-app/api 25.3.0 → 25.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/loot-core/client/accounts/accountsSlice.d.ts +175 -0
- package/@types/loot-core/client/app/appSlice.d.ts +175 -0
- package/@types/loot-core/client/budgets/budgetsSlice.d.ts +401 -0
- package/@types/loot-core/client/modals/modalsSlice.d.ts +486 -0
- package/@types/loot-core/client/notifications/notificationsSlice.d.ts +47 -0
- package/@types/loot-core/client/platform.d.ts +1 -0
- package/@types/loot-core/client/prefs/prefsSlice.d.ts +186 -0
- package/@types/loot-core/client/queries/queriesSlice.d.ts +692 -0
- package/@types/loot-core/client/redux.d.ts +18546 -0
- package/@types/loot-core/client/store/index.d.ts +133 -0
- package/@types/loot-core/client/users/usersSlice.d.ts +89 -0
- package/@types/loot-core/platform/client/fetch/index.d.ts +1 -10
- package/@types/loot-core/platform/client/undo/index.d.ts +19 -31
- package/@types/loot-core/platform/exceptions/index.d.ts +2 -5
- package/@types/loot-core/platform/server/connection/index.d.ts +0 -3
- package/@types/loot-core/platform/server/fetch/index.d.ts +1 -4
- package/@types/loot-core/platform/server/log/index.d.ts +4 -6
- package/@types/loot-core/server/accounts/app.d.ts +19 -5
- package/@types/loot-core/server/accounts/link.d.ts +6 -1
- package/@types/loot-core/server/admin/app.d.ts +54 -1
- package/@types/loot-core/server/api-models.d.ts +22 -22
- package/@types/loot-core/server/aql/exec.d.ts +1 -1
- package/@types/loot-core/server/aql/schema/index.d.ts +9 -0
- package/@types/loot-core/server/budget/actions.d.ts +6 -5
- package/@types/loot-core/server/budget/app.d.ts +103 -2
- package/@types/loot-core/server/budget/cleanup-template.d.ts +1 -1
- package/@types/loot-core/server/budget/goaltemplates.d.ts +1 -1
- package/@types/loot-core/server/budget/statements.d.ts +2 -2
- package/@types/loot-core/server/budget/template-notes.d.ts +1 -1
- package/@types/loot-core/server/budget/types/templates.d.ts +2 -1
- package/@types/loot-core/server/cloud-storage.d.ts +1 -1
- package/@types/loot-core/server/dashboard/app.d.ts +35 -1
- package/@types/loot-core/server/db/index.d.ts +38 -31
- package/@types/loot-core/server/db/sort.d.ts +1 -1
- package/@types/loot-core/server/encryption-internals.d.ts +5 -5
- package/@types/loot-core/server/encryption-internals.web.d.ts +2 -2
- package/@types/loot-core/server/encryption.d.ts +3 -3
- package/@types/loot-core/server/filters/app.d.ts +10 -1
- package/@types/loot-core/server/main-app.d.ts +1 -1
- package/@types/loot-core/server/models.d.ts +24 -23
- package/@types/loot-core/server/notes/app.d.ts +6 -1
- package/@types/loot-core/server/payees/app.d.ts +48 -0
- package/@types/loot-core/server/preferences/app.d.ts +1 -10
- package/@types/loot-core/server/reports/app.d.ts +9 -1
- package/@types/loot-core/server/rules/app.d.ts +50 -1
- package/@types/loot-core/server/schedules/app.d.ts +25 -2
- package/@types/loot-core/server/schedules/find-schedules.d.ts +1 -1
- package/@types/loot-core/server/server-config.d.ts +1 -0
- package/@types/loot-core/server/sheet.d.ts +1 -1
- package/@types/loot-core/server/spreadsheet/app.d.ts +38 -0
- package/@types/loot-core/server/spreadsheet/graph-data-structure.d.ts +4 -4
- package/@types/loot-core/server/spreadsheet/spreadsheet.d.ts +3 -2
- package/@types/loot-core/server/sync/app.d.ts +38 -0
- package/@types/loot-core/server/sync/make-test-message.d.ts +1 -1
- package/@types/loot-core/server/tools/app.d.ts +13 -1
- package/@types/loot-core/server/transactions/transaction-rules.d.ts +5 -4
- package/@types/loot-core/server/undo.d.ts +1 -1
- package/@types/loot-core/shared/async.d.ts +4 -3
- package/@types/loot-core/shared/locale.d.ts +1 -0
- package/@types/loot-core/shared/months.d.ts +2 -2
- package/@types/loot-core/shared/schedules.d.ts +5 -3
- package/@types/loot-core/shared/util.d.ts +4 -1
- package/@types/loot-core/types/handlers.d.ts +16 -10
- package/@types/loot-core/types/models/account.d.ts +2 -1
- package/@types/loot-core/types/models/bank-sync.d.ts +1 -1
- package/@types/loot-core/types/models/index.d.ts +5 -1
- package/@types/loot-core/types/models/openid.d.ts +2 -1
- package/@types/loot-core/types/models/payee.d.ts +2 -2
- package/@types/loot-core/types/models/pluggyai.d.ts +18 -0
- package/@types/loot-core/types/models/user-access.d.ts +10 -0
- package/@types/loot-core/types/models/user.d.ts +17 -18
- package/@types/loot-core/types/prefs.d.ts +13 -1
- package/@types/loot-core/types/server-handlers.d.ts +0 -99
- package/@types/loot-core/types/util.d.ts +7 -0
- package/dist/app/bundle.api.js +93477 -49658
- package/dist/index.js +17 -7
- package/dist/jest.config.js +0 -2
- package/dist/methods.js +17 -7
- package/dist/migrations/1740506588539_add_last_reconciled_at.sql +5 -0
- package/dist/package.json +8 -8
- package/dist/validateNodeVersion.js +17 -7
- package/package.json +8 -8
- package/@types/loot-core/client/constants.d.ts +0 -21
- package/@types/loot-core/client/state-types/budgets.d.ts +0 -36
- package/@types/loot-core/client/state-types/index.d.ts +0 -27
- package/@types/loot-core/client/state-types/modals.d.ts +0 -392
- package/@types/loot-core/client/state-types/notifications.d.ts +0 -57
- package/@types/loot-core/client/state-types/prefs.d.ts +0 -40
- package/@types/loot-core/client/state-types/user.d.ts +0 -13
- package/@types/loot-core/server/admin/types/handlers.d.ts +0 -43
- package/@types/loot-core/server/budget/types/handlers.d.ts +0 -91
- package/@types/loot-core/server/dashboard/types/handlers.d.ts +0 -24
- package/@types/loot-core/server/filters/types/handlers.d.ts +0 -7
- package/@types/loot-core/server/notes/types/handlers.d.ts +0 -3
- package/@types/loot-core/server/reports/types/handlers.d.ts +0 -6
- package/@types/loot-core/server/rules/types/handlers.d.ts +0 -40
- package/@types/loot-core/server/schedules/types/handlers.d.ts +0 -31
- package/@types/loot-core/server/tools/types/handlers.d.ts +0 -11
- package/@types/loot-core/types/models/userAccess.d.ts +0 -9
- package/dist/methods.test.js +0 -541
- /package/@types/{methods.test.d.ts → loot-core/server/api.test.d.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
package/dist/jest.config.js
CHANGED
package/dist/methods.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.q = void 0;
|
|
27
37
|
exports.runImport = runImport;
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actual-app/api",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "An API for Actual",
|
|
6
6
|
"engines": {
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@actual-app/crdt": "workspace:^",
|
|
26
|
-
"better-sqlite3": "^11.
|
|
27
|
-
"compare-versions": "^6.1.
|
|
26
|
+
"better-sqlite3": "^11.9.1",
|
|
27
|
+
"compare-versions": "^6.1.1",
|
|
28
28
|
"node-fetch": "^3.3.2",
|
|
29
29
|
"uuid": "^9.0.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@swc/core": "^1.5.3",
|
|
33
33
|
"@swc/jest": "^0.2.36",
|
|
34
|
-
"@types/jest": "^
|
|
35
|
-
"@types/uuid": "^9.0.
|
|
36
|
-
"jest": "^
|
|
37
|
-
"tsc-alias": "^1.8.
|
|
38
|
-
"typescript": "^5.
|
|
34
|
+
"@types/jest": "^29.5.14",
|
|
35
|
+
"@types/uuid": "^9.0.8",
|
|
36
|
+
"jest": "^29.7.0",
|
|
37
|
+
"tsc-alias": "^1.8.11",
|
|
38
|
+
"typescript": "^5.8.2"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.validateNodeVersion = validateNodeVersion;
|
|
27
37
|
const compare_versions_1 = require("compare-versions");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actual-app/api",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "An API for Actual",
|
|
6
6
|
"engines": {
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@actual-app/crdt": "^2.1.0",
|
|
26
|
-
"better-sqlite3": "^11.
|
|
27
|
-
"compare-versions": "^6.1.
|
|
26
|
+
"better-sqlite3": "^11.9.1",
|
|
27
|
+
"compare-versions": "^6.1.1",
|
|
28
28
|
"node-fetch": "^3.3.2",
|
|
29
29
|
"uuid": "^9.0.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@swc/core": "^1.5.3",
|
|
33
33
|
"@swc/jest": "^0.2.36",
|
|
34
|
-
"@types/jest": "^
|
|
35
|
-
"@types/uuid": "^9.0.
|
|
36
|
-
"jest": "^
|
|
37
|
-
"tsc-alias": "^1.8.
|
|
38
|
-
"typescript": "^5.
|
|
34
|
+
"@types/jest": "^29.5.14",
|
|
35
|
+
"@types/uuid": "^9.0.8",
|
|
36
|
+
"jest": "^29.7.0",
|
|
37
|
+
"tsc-alias": "^1.8.11",
|
|
38
|
+
"typescript": "^5.8.2"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare const SET_PREFS = "SET_PREFS";
|
|
2
|
-
export declare const MERGE_LOCAL_PREFS = "MERGE_LOCAL_PREFS";
|
|
3
|
-
export declare const MERGE_GLOBAL_PREFS = "MERGE_GLOBAL_PREFS";
|
|
4
|
-
export declare const MERGE_SYNCED_PREFS = "MERGE_SYNCED_PREFS";
|
|
5
|
-
export declare const SET_BUDGETS = "SET_BUDGETS";
|
|
6
|
-
export declare const SET_REMOTE_FILES = "SET_REMOTE_FILES";
|
|
7
|
-
export declare const SET_ALL_FILES = "SET_ALL_FILES";
|
|
8
|
-
export declare const CLOSE_BUDGET = "CLOSE_BUDGET";
|
|
9
|
-
export declare const SET_APP_STATE = "SET_APP_STATE";
|
|
10
|
-
export declare const PUSH_MODAL = "PUSH_MODAL";
|
|
11
|
-
export declare const REPLACE_MODAL = "REPLACE_MODAL";
|
|
12
|
-
export declare const CLOSE_MODAL = "CLOSE_MODAL";
|
|
13
|
-
export declare const COLLAPSE_MODALS = "COLLAPSE_MODALS";
|
|
14
|
-
export declare const POP_MODAL = "POP_MODAL";
|
|
15
|
-
export declare const ADD_NOTIFICATION = "ADD_NOTIFICATION";
|
|
16
|
-
export declare const REMOVE_NOTIFICATION = "REMOVE_NOTIFICATION";
|
|
17
|
-
export declare const SET_NOTIFICATION_INSET = "SET_NOTIFICATION_INSET";
|
|
18
|
-
export declare const GET_USER_DATA = "GET_USER_DATA";
|
|
19
|
-
export declare const SET_ACCOUNTS_SYNCING = "SET_ACCOUNTS_SYNCING";
|
|
20
|
-
export declare const ACCOUNT_SYNC_STATUS = "ACCOUNT_SYNC_STATUS";
|
|
21
|
-
export declare const SIGN_OUT = "SIGN_OUT";
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { RemoteFile } from '../../server/cloud-storage';
|
|
2
|
-
import type { Budget } from '../../types/budget';
|
|
3
|
-
import type { File } from '../../types/file';
|
|
4
|
-
import type * as constants from '../constants';
|
|
5
|
-
|
|
6
|
-
export type BudgetsState = {
|
|
7
|
-
budgets: Budget[];
|
|
8
|
-
remoteFiles: RemoteFile[] | null;
|
|
9
|
-
allFiles: File[] | null;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type SetBudgetsAction = {
|
|
13
|
-
type: typeof constants.SET_BUDGETS;
|
|
14
|
-
budgets: Budget[];
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export type SetRemoteFilesAction = {
|
|
18
|
-
type: typeof constants.SET_REMOTE_FILES;
|
|
19
|
-
files: RemoteFile[];
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export type SetAllFilesAction = {
|
|
23
|
-
type: typeof constants.SET_ALL_FILES;
|
|
24
|
-
budgets: Budget[];
|
|
25
|
-
remoteFiles: RemoteFile[];
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export type SignOutAction = {
|
|
29
|
-
type: typeof constants.SIGN_OUT;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export type BudgetsActions =
|
|
33
|
-
| SetBudgetsAction
|
|
34
|
-
| SetRemoteFilesAction
|
|
35
|
-
| SetAllFilesAction
|
|
36
|
-
| SignOutAction;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type * as constants from '../constants';
|
|
2
|
-
|
|
3
|
-
import type { BudgetsActions, BudgetsState } from './budgets';
|
|
4
|
-
import type { ModalsActions, ModalsState } from './modals';
|
|
5
|
-
import type { NotificationsActions, NotificationsState } from './notifications';
|
|
6
|
-
import type { PrefsActions, PrefsState } from './prefs';
|
|
7
|
-
import type { UserActions, UserState } from './user';
|
|
8
|
-
|
|
9
|
-
export type CloseBudgetAction = {
|
|
10
|
-
type: typeof constants.CLOSE_BUDGET;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export type Action =
|
|
14
|
-
| BudgetsActions
|
|
15
|
-
| ModalsActions
|
|
16
|
-
| NotificationsActions
|
|
17
|
-
| PrefsActions
|
|
18
|
-
| UserActions
|
|
19
|
-
| CloseBudgetAction;
|
|
20
|
-
|
|
21
|
-
export type State = {
|
|
22
|
-
budgets: BudgetsState;
|
|
23
|
-
modals: ModalsState;
|
|
24
|
-
notifications: NotificationsState;
|
|
25
|
-
prefs: PrefsState;
|
|
26
|
-
user: UserState;
|
|
27
|
-
};
|
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
import { type File } from '../../types/file';
|
|
2
|
-
import type {
|
|
3
|
-
AccountEntity,
|
|
4
|
-
CategoryEntity,
|
|
5
|
-
CategoryGroupEntity,
|
|
6
|
-
GoCardlessToken,
|
|
7
|
-
ScheduleEntity,
|
|
8
|
-
TransactionEntity,
|
|
9
|
-
} from '../../types/models';
|
|
10
|
-
import type { NewRuleEntity, RuleEntity } from '../../types/models/rule';
|
|
11
|
-
import { type NewUserEntity, type UserEntity } from '../../types/models/user';
|
|
12
|
-
import { type UserAccessEntity } from '../../types/models/userAccess';
|
|
13
|
-
import type { EmptyObject, StripNever } from '../../types/util';
|
|
14
|
-
import type * as constants from '../constants';
|
|
15
|
-
export type ModalType = keyof FinanceModals;
|
|
16
|
-
|
|
17
|
-
export type OptionlessModal = {
|
|
18
|
-
[K in ModalType]: EmptyObject extends FinanceModals[K] ? K : never;
|
|
19
|
-
}[ModalType];
|
|
20
|
-
|
|
21
|
-
export type ModalWithOptions = StripNever<{
|
|
22
|
-
[K in ModalType]: keyof FinanceModals[K] extends never
|
|
23
|
-
? never
|
|
24
|
-
: FinanceModals[K];
|
|
25
|
-
}>;
|
|
26
|
-
|
|
27
|
-
// There is a separate (overlapping!) set of modals for the management app. Fun!
|
|
28
|
-
type FinanceModals = {
|
|
29
|
-
'import-transactions': {
|
|
30
|
-
accountId: string;
|
|
31
|
-
filename: string;
|
|
32
|
-
onImported: (didChange: boolean) => void;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
'add-account': EmptyObject;
|
|
36
|
-
'add-local-account': EmptyObject;
|
|
37
|
-
'close-account': {
|
|
38
|
-
account: AccountEntity;
|
|
39
|
-
balance: number;
|
|
40
|
-
canDelete: boolean;
|
|
41
|
-
};
|
|
42
|
-
'select-linked-accounts': {
|
|
43
|
-
accounts: unknown[];
|
|
44
|
-
requisitionId?: string;
|
|
45
|
-
upgradingAccountId?: string | undefined;
|
|
46
|
-
syncSource?: AccountSyncSource;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
'confirm-category-delete': { onDelete: (categoryId: string) => void } & (
|
|
50
|
-
| { category: string }
|
|
51
|
-
| { group: string }
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
'load-backup': EmptyObject;
|
|
55
|
-
|
|
56
|
-
'manage-rules': { payeeId?: string };
|
|
57
|
-
'edit-rule': {
|
|
58
|
-
rule: RuleEntity | NewRuleEntity;
|
|
59
|
-
onSave?: (rule: RuleEntity) => void;
|
|
60
|
-
};
|
|
61
|
-
'merge-unused-payees': {
|
|
62
|
-
payeeIds: string[];
|
|
63
|
-
targetPayeeId: string;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
'gocardless-init': {
|
|
67
|
-
onSuccess: () => void;
|
|
68
|
-
};
|
|
69
|
-
'simplefin-init': {
|
|
70
|
-
onSuccess: () => void;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
'gocardless-external-msg': {
|
|
74
|
-
onMoveExternal: (arg: {
|
|
75
|
-
institutionId: string;
|
|
76
|
-
}) => Promise<{ error: string } | { data: unknown }>;
|
|
77
|
-
onClose?: (() => void) | undefined;
|
|
78
|
-
onSuccess: (data: GoCardlessToken) => Promise<void>;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
'delete-budget': { file: File };
|
|
82
|
-
|
|
83
|
-
'duplicate-budget': {
|
|
84
|
-
/** The budget file to be duplicated */
|
|
85
|
-
file: File;
|
|
86
|
-
/**
|
|
87
|
-
* Indicates whether the duplication is initiated from the budget
|
|
88
|
-
* management page. This may affect the behavior or UI of the
|
|
89
|
-
* duplication process.
|
|
90
|
-
*/
|
|
91
|
-
managePage?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* loadBudget indicates whether to open the 'original' budget, the
|
|
94
|
-
* new duplicated 'copy' budget, or no budget ('none'). If 'none'
|
|
95
|
-
* duplicate-budget stays on the same page.
|
|
96
|
-
*/
|
|
97
|
-
loadBudget?: 'none' | 'original' | 'copy';
|
|
98
|
-
/**
|
|
99
|
-
* onComplete is called when the DuplicateFileModal is closed.
|
|
100
|
-
* @param event the event object will pass back the status of the
|
|
101
|
-
* duplicate process.
|
|
102
|
-
* 'success' if the budget was duplicated.
|
|
103
|
-
* 'failed' if the budget could not be duplicated. This will also
|
|
104
|
-
* pass an error on the event object.
|
|
105
|
-
* 'canceled' if the DuplicateFileModal was canceled.
|
|
106
|
-
* @returns
|
|
107
|
-
*/
|
|
108
|
-
onComplete?: (event: {
|
|
109
|
-
status: 'success' | 'failed' | 'canceled';
|
|
110
|
-
error?: Error;
|
|
111
|
-
}) => void;
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
import: null;
|
|
115
|
-
|
|
116
|
-
'import-ynab4': null;
|
|
117
|
-
|
|
118
|
-
'import-ynab5': null;
|
|
119
|
-
|
|
120
|
-
'import-actual': null;
|
|
121
|
-
|
|
122
|
-
'out-of-sync-migrations': null;
|
|
123
|
-
|
|
124
|
-
'files-settings': null;
|
|
125
|
-
|
|
126
|
-
'confirm-change-document-dir': {
|
|
127
|
-
currentBudgetDirectory: string;
|
|
128
|
-
newDirectory: string;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
'create-encryption-key': { recreate?: boolean };
|
|
132
|
-
'fix-encryption-key': {
|
|
133
|
-
hasExistingKey?: boolean;
|
|
134
|
-
cloudFileId?: string;
|
|
135
|
-
onSuccess?: () => void;
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
'edit-field': {
|
|
139
|
-
name: keyof Pick<TransactionEntity, 'date' | 'amount' | 'notes'>;
|
|
140
|
-
onSubmit: (
|
|
141
|
-
name: keyof Pick<TransactionEntity, 'date' | 'amount' | 'notes'>,
|
|
142
|
-
value: string | number,
|
|
143
|
-
mode?: 'prepend' | 'append' | 'replace' | null,
|
|
144
|
-
) => void;
|
|
145
|
-
onClose?: () => void;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
'category-autocomplete': {
|
|
149
|
-
categoryGroups?: CategoryGroupEntity[];
|
|
150
|
-
onSelect: (categoryId: string, categoryName: string) => void;
|
|
151
|
-
month?: string | undefined;
|
|
152
|
-
showHiddenCategories?: boolean;
|
|
153
|
-
onClose?: () => void;
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
'account-autocomplete': {
|
|
157
|
-
onSelect: (accountId: string, accountName: string) => void;
|
|
158
|
-
includeClosedAccounts?: boolean;
|
|
159
|
-
onClose?: () => void;
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
'payee-autocomplete': {
|
|
163
|
-
onSelect: (payeeId: string) => void;
|
|
164
|
-
onClose?: () => void;
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
'payee-category-learning': null;
|
|
168
|
-
|
|
169
|
-
'budget-summary': {
|
|
170
|
-
month: string;
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
'schedule-edit': { id: string; transaction?: TransactionEntity } | null;
|
|
174
|
-
|
|
175
|
-
'schedule-link': {
|
|
176
|
-
transactionIds: string[];
|
|
177
|
-
getTransaction: (
|
|
178
|
-
transactionId: TransactionEntity['id'],
|
|
179
|
-
) => TransactionEntity;
|
|
180
|
-
accountName?: string;
|
|
181
|
-
onScheduleLinked?: (schedule: ScheduleEntity) => void;
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
'schedules-discover': null;
|
|
185
|
-
|
|
186
|
-
'schedules-upcoming-length': null;
|
|
187
|
-
|
|
188
|
-
'schedule-posts-offline-notification': null;
|
|
189
|
-
|
|
190
|
-
'synced-account-edit': {
|
|
191
|
-
account: AccountEntity;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
'account-menu': {
|
|
195
|
-
accountId: string;
|
|
196
|
-
onSave: (account: AccountEntity) => void;
|
|
197
|
-
onCloseAccount: (accountId: string) => void;
|
|
198
|
-
onReopenAccount: (accountId: string) => void;
|
|
199
|
-
onEditNotes: (id: string) => void;
|
|
200
|
-
onClose?: () => void;
|
|
201
|
-
};
|
|
202
|
-
'category-menu': {
|
|
203
|
-
categoryId: string;
|
|
204
|
-
onSave: (category: CategoryEntity) => void;
|
|
205
|
-
onEditNotes: (id: string) => void;
|
|
206
|
-
onDelete: (categoryId: string) => void;
|
|
207
|
-
onToggleVisibility: (categoryId: string) => void;
|
|
208
|
-
onBudgetAction: (month: string, action: string, args?: unknown) => void;
|
|
209
|
-
onClose?: () => void;
|
|
210
|
-
};
|
|
211
|
-
'envelope-budget-menu': {
|
|
212
|
-
categoryId: string;
|
|
213
|
-
month: string;
|
|
214
|
-
onUpdateBudget: (amount: number) => void;
|
|
215
|
-
onCopyLastMonthAverage: () => void;
|
|
216
|
-
onSetMonthsAverage: (numberOfMonths: number) => void;
|
|
217
|
-
onApplyBudgetTemplate: () => void;
|
|
218
|
-
};
|
|
219
|
-
'tracking-budget-menu': {
|
|
220
|
-
categoryId: string;
|
|
221
|
-
month: string;
|
|
222
|
-
onUpdateBudget: (amount: number) => void;
|
|
223
|
-
onCopyLastMonthAverage: () => void;
|
|
224
|
-
onSetMonthsAverage: (numberOfMonths: number) => void;
|
|
225
|
-
onApplyBudgetTemplate: () => void;
|
|
226
|
-
};
|
|
227
|
-
'category-group-menu': {
|
|
228
|
-
groupId: string;
|
|
229
|
-
onSave: (group: CategoryGroupEntity) => void;
|
|
230
|
-
onAddCategory: (groupId: string, isIncome: boolean) => void;
|
|
231
|
-
onEditNotes: (id: string) => void;
|
|
232
|
-
onDelete: (groupId: string) => void;
|
|
233
|
-
onToggleVisibility: (groupId: string) => void;
|
|
234
|
-
onClose?: () => void;
|
|
235
|
-
};
|
|
236
|
-
notes: {
|
|
237
|
-
id: string;
|
|
238
|
-
name: string;
|
|
239
|
-
onSave: (id: string, notes: string) => void;
|
|
240
|
-
};
|
|
241
|
-
'tracking-budget-summary': { month: string };
|
|
242
|
-
'envelope-budget-summary': {
|
|
243
|
-
month: string;
|
|
244
|
-
onBudgetAction: (
|
|
245
|
-
month: string,
|
|
246
|
-
type: string,
|
|
247
|
-
args: unknown,
|
|
248
|
-
) => Promise<void>;
|
|
249
|
-
};
|
|
250
|
-
'new-category-group': {
|
|
251
|
-
onValidate?: (value: string) => string;
|
|
252
|
-
onSubmit: (value: string) => Promise<void>;
|
|
253
|
-
};
|
|
254
|
-
'new-category': {
|
|
255
|
-
onValidate?: (value: string) => string;
|
|
256
|
-
onSubmit: (value: string) => Promise<void>;
|
|
257
|
-
};
|
|
258
|
-
'envelope-balance-menu': {
|
|
259
|
-
categoryId: string;
|
|
260
|
-
month: string;
|
|
261
|
-
onCarryover: (carryover: boolean) => void;
|
|
262
|
-
onTransfer: () => void;
|
|
263
|
-
onCover: () => void;
|
|
264
|
-
};
|
|
265
|
-
'envelope-summary-to-budget-menu': {
|
|
266
|
-
month: string;
|
|
267
|
-
onTransfer: () => void;
|
|
268
|
-
onCover: () => void;
|
|
269
|
-
onHoldBuffer: () => void;
|
|
270
|
-
onResetHoldBuffer: () => void;
|
|
271
|
-
};
|
|
272
|
-
'tracking-balance-menu': {
|
|
273
|
-
categoryId: string;
|
|
274
|
-
month: string;
|
|
275
|
-
onCarryover: (carryover: boolean) => void;
|
|
276
|
-
};
|
|
277
|
-
transfer: {
|
|
278
|
-
title: string;
|
|
279
|
-
categoryId?: CategoryEntity['id'];
|
|
280
|
-
month: string;
|
|
281
|
-
amount: number;
|
|
282
|
-
onSubmit: (amount: number, toCategoryId: string) => void;
|
|
283
|
-
showToBeBudgeted?: boolean;
|
|
284
|
-
};
|
|
285
|
-
cover: {
|
|
286
|
-
title: string;
|
|
287
|
-
categoryId?: CategoryEntity['id'];
|
|
288
|
-
month: string;
|
|
289
|
-
showToBeBudgeted?: boolean;
|
|
290
|
-
onSubmit: (fromCategoryId: string) => void;
|
|
291
|
-
};
|
|
292
|
-
'hold-buffer': {
|
|
293
|
-
month: string;
|
|
294
|
-
onSubmit: (amount: number) => void;
|
|
295
|
-
};
|
|
296
|
-
'scheduled-transaction-menu': {
|
|
297
|
-
transactionId: string;
|
|
298
|
-
onPost: (transactionId: string) => void;
|
|
299
|
-
onSkip: (transactionId: string) => void;
|
|
300
|
-
onComplete: (transactionId: string) => void;
|
|
301
|
-
};
|
|
302
|
-
'budget-page-menu': {
|
|
303
|
-
onAddCategoryGroup: () => void;
|
|
304
|
-
onToggleHiddenCategories: () => void;
|
|
305
|
-
onSwitchBudgetFile: () => void;
|
|
306
|
-
};
|
|
307
|
-
'envelope-budget-month-menu': {
|
|
308
|
-
month: string;
|
|
309
|
-
onBudgetAction: (month: string, action: string, arg?: unknown) => void;
|
|
310
|
-
onEditNotes: (month: string) => void;
|
|
311
|
-
};
|
|
312
|
-
'tracking-budget-month-menu': {
|
|
313
|
-
month: string;
|
|
314
|
-
onBudgetAction: (month: string, action: string, arg?: unknown) => void;
|
|
315
|
-
onEditNotes: (month: string) => void;
|
|
316
|
-
};
|
|
317
|
-
'budget-list';
|
|
318
|
-
'confirm-transaction-edit': {
|
|
319
|
-
onConfirm: () => void;
|
|
320
|
-
onCancel?: () => void;
|
|
321
|
-
confirmReason: string;
|
|
322
|
-
};
|
|
323
|
-
'confirm-transaction-delete': {
|
|
324
|
-
message?: string | undefined;
|
|
325
|
-
onConfirm: () => void;
|
|
326
|
-
};
|
|
327
|
-
'edit-user': {
|
|
328
|
-
user: UserEntity | NewUserEntity;
|
|
329
|
-
onSave: (rule: UserEntity) => void;
|
|
330
|
-
};
|
|
331
|
-
'edit-access': {
|
|
332
|
-
access: UserAccessEntity | NewUserAccessEntity;
|
|
333
|
-
onSave: (rule: UserEntity) => void;
|
|
334
|
-
};
|
|
335
|
-
'transfer-ownership': {
|
|
336
|
-
onSave: () => void;
|
|
337
|
-
};
|
|
338
|
-
'enable-openid': {
|
|
339
|
-
onSave: () => void;
|
|
340
|
-
};
|
|
341
|
-
'enable-password-auth': {
|
|
342
|
-
onSave: () => void;
|
|
343
|
-
};
|
|
344
|
-
'confirm-unlink-account': {
|
|
345
|
-
accountName: string;
|
|
346
|
-
onUnlink: () => void;
|
|
347
|
-
};
|
|
348
|
-
'keyboard-shortcuts': EmptyObject;
|
|
349
|
-
'goal-templates': EmptyObject;
|
|
350
|
-
'category-automations-edit': EmptyObject;
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
export type PushModalAction = {
|
|
354
|
-
type: typeof constants.PUSH_MODAL;
|
|
355
|
-
modal: Modal;
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
export type ReplaceModalAction = {
|
|
359
|
-
type: typeof constants.REPLACE_MODAL;
|
|
360
|
-
modal: Modal;
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
export type PopModalAction = {
|
|
364
|
-
type: typeof constants.POP_MODAL;
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
export type CloseModalAction = {
|
|
368
|
-
type: typeof constants.CLOSE_MODAL;
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
export type CollapseModalsAction = {
|
|
372
|
-
type: typeof constants.COLLAPSE_MODALS;
|
|
373
|
-
rootModalName: string;
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
export type ModalsActions =
|
|
377
|
-
| PushModalAction
|
|
378
|
-
| ReplaceModalAction
|
|
379
|
-
| PopModalAction
|
|
380
|
-
| CloseModalAction
|
|
381
|
-
| CollapseModalsAction;
|
|
382
|
-
|
|
383
|
-
export type ModalsState = {
|
|
384
|
-
modalStack: Modal[];
|
|
385
|
-
isHidden: boolean;
|
|
386
|
-
};
|
|
387
|
-
|
|
388
|
-
type Modal = {
|
|
389
|
-
name: string;
|
|
390
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
391
|
-
options?: any;
|
|
392
|
-
};
|