A local-first personal finance app
API Account Object (#6915)
J Bcf5fe67e7b0e
diff --git a/packages/docs/docs/api/types.jsx b/packages/docs/docs/api/types.jsxindex 50d8b64179..7fda7e8d81 100644--- a/packages/docs/docs/api/types.jsx+++ b/packages/docs/docs/api/types.jsx@@ -161,6 +161,16 @@ export const objects = {</span>),},+ {+ name: 'balance_current',+ type: 'number | null',+ description: (+ <span>+ The current balance of the account as reported by bank sync. Can also+ be set manually. Defaults to <code>null</code>+ </span>+ ),+ },],category: [diff --git a/packages/loot-core/src/server/api-models.ts b/packages/loot-core/src/server/api-models.tsindex 9e6e764a0d..832965459b 100644--- a/packages/loot-core/src/server/api-models.ts+++ b/packages/loot-core/src/server/api-models.ts@@ -14,6 +14,7 @@ import * as models from './models';export type APIAccountEntity = Pick<AccountEntity, 'id' | 'name'> & {offbudget?: boolean;closed?: boolean;+ balance_current?: number | null;};export const accountModel = {@@ -25,6 +26,7 @@ export const accountModel = {name: account.name,offbudget: account.offbudget ? true : false,closed: account.closed ? true : false,+ balance_current: account.balance_current ?? null,};},diff --git a/upcoming-release-notes/6915.md b/upcoming-release-notes/6915.mdnew file mode 100644index 0000000000..f3e3c7e4ce--- /dev/null+++ b/upcoming-release-notes/6915.md@@ -0,0 +1,6 @@+---+category: Enhancements+authors: [totallynotjon]+---++The Account API now allows `balance_current` to be set, making balances visible for reconciliation when using custom importers.