Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.1.0] - 2026-04-04

### Added

- Support `CASH` and `ESCROW` as valid `AccountType` enum values.
- Add `CASH` and `ESCROW` account examples to bundled example datasets.
- Add validation tests covering `CASH` and `ESCROW` account types.

### Changed

- Update README account schema documentation to include the new account types.

## [3.0.3] - 2026-03-18

### Changed

- Upgrade runtime and development dependencies to their latest compatible versions.
- Refresh the linting and test toolchain, including the ESLint and Jest stacks.
- Regenerate `pnpm-lock.yaml` to capture the updated dependency graph for the 3.0.3 release.

## [3.0.2] - 2026-02-14

### Changed
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ const common = {

Validates financial accounts.

Supported account types include `CHECKING`, `SAVINGS`, `CASH`, `CREDIT_CARD`, `ESCROW`, and `EXTERNAL`. Use `CASH` for physical cash balances and `ESCROW` for held-funds accounts such as deposits or tax escrows.

```typescript
const account = {
id: string;
name: string;
type: 'CHECKING' | 'SAVINGS' | 'CREDIT_CARD' | 'EXTERNAL';
type: 'CHECKING' | 'SAVINGS' | 'CASH' | 'CREDIT_CARD' | 'ESCROW' | 'EXTERNAL';
institution: string | null;
aggregationServiceId: string | null;
statementClosingDay: number | null;
Expand Down
28 changes: 28 additions & 0 deletions examples/luca-schema-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,34 @@
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": null
},
{
"id": "50c75f50-3246-45d0-ac5c-cd317c1797d2",
"name": "Property Tax Escrow",
"type": "ESCROW",
"institution": "Main Street Bank",
"aggregationServiceId": null,
"statementClosingDay": null,
"paymentDueDate": null,
"creditLimit": null,
"apr": null,
"closedAt": null,
"createdAt": "2024-01-02T00:00:00Z",
"updatedAt": null
},
{
"id": "3dff9295-67cf-4827-b8ab-d28835cb6f55",
"name": "Cash Wallet",
"type": "CASH",
"institution": null,
"aggregationServiceId": null,
"statementClosingDay": null,
"paymentDueDate": null,
"creditLimit": null,
"apr": null,
"closedAt": null,
"createdAt": "2024-01-03T00:00:00Z",
"updatedAt": null
},
{
"id": "b4067fbe-3a9e-4c8d-82bd-af651d03cad1",
"name": "City Utilities Department",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@luca-financial/luca-schema",
"version": "3.0.3",
"version": "3.1.0",
"description": "Schemas for the Luca Ledger application",
"author": "Johnathan Aspinwall",
"main": "dist/esm/index.js",
Expand Down
16 changes: 16 additions & 0 deletions src/examples/accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,21 @@
"statementClosingDay": null,
"createdAt": "2024-01-14T00:00:00Z",
"updatedAt": null
},
{
"id": "00000000-0000-0000-0000-000000000011",
"name": "Security Deposit Escrow",
"type": "ESCROW",
"statementClosingDay": null,
"createdAt": "2024-01-15T00:00:00Z",
"updatedAt": null
},
{
"id": "00000000-0000-0000-0000-000000000012",
"name": "Cash Wallet",
"type": "CASH",
"statementClosingDay": null,
"createdAt": "2024-01-16T00:00:00Z",
"updatedAt": null
}
]
16 changes: 16 additions & 0 deletions src/examples/lucaSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@
"statementClosingDay": null,
"createdAt": "2024-01-03T00:00:00Z",
"updatedAt": null
},
{
"id": "00000000-0000-0000-0000-000000000004",
"name": "Lease Deposit Escrow",
"type": "ESCROW",
"statementClosingDay": null,
"createdAt": "2024-01-04T00:00:00Z",
"updatedAt": null
},
{
"id": "00000000-0000-0000-0000-000000000005",
"name": "Petty Cash",
"type": "CASH",
"statementClosingDay": null,
"createdAt": "2024-01-05T00:00:00Z",
"updatedAt": null
}
],
"recurringTransactions": [],
Expand Down
9 changes: 8 additions & 1 deletion src/schemas/enums.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@
"$defs": {
"AccountType": {
"type": "string",
"enum": ["CHECKING", "SAVINGS", "CREDIT_CARD", "EXTERNAL"],
"enum": [
"CHECKING",
"SAVINGS",
"CASH",
"CREDIT_CARD",
"ESCROW",
"EXTERNAL"
],
"description": "Allowed account types"
},
"TransactionState": {
Expand Down
10 changes: 10 additions & 0 deletions src/tests/account.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ describe('account schema', () => {
expectValid(validate, 'account', account);
});

test('cash account type is valid', () => {
const account = makeAccount({ type: 'CASH' });
expectValid(validate, 'account', account);
});

test('escrow account type is valid', () => {
const account = makeAccount({ type: 'ESCROW' });
expectValid(validate, 'account', account);
});

test('missing type is invalid', () => {
const account = makeAccount();
delete account.type;
Expand Down
Loading