Skip to content
This repository was archived by the owner on Jul 21, 2026. It is now read-only.

Commit 62bffde

Browse files
committed
Refactor account schema and examples: update field names and add new properties for better clarity and functionality
1 parent 9f3243f commit 62bffde

5 files changed

Lines changed: 76 additions & 45 deletions

File tree

src/examples/accounts.json

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,82 @@
11
[
22
{
33
"id": "00000000-0000-0000-0000-000000000001",
4-
"name": "Main Street Bank",
4+
"name": "Everyday Checking",
55
"type": "CHECKING",
6-
"statementDay": null,
7-
"createdAt": "2024-01-01T00:00:00Z",
8-
"updatedAt": null
6+
"statementClosingDay": null,
7+
"createdAt": "2024-01-05T00:00:00Z",
8+
"updatedAt": "2024-02-01T00:00:00Z"
99
},
1010
{
1111
"id": "00000000-0000-0000-0000-000000000002",
12-
"name": "John Doe",
13-
"type": "EXTERNAL",
14-
"statementDay": null,
15-
"createdAt": "2024-01-02T00:00:00Z",
12+
"name": "High-Yield Savings",
13+
"type": "SAVINGS",
14+
"statementClosingDay": null,
15+
"createdAt": "2024-01-06T00:00:00Z",
1616
"updatedAt": null
1717
},
1818
{
1919
"id": "00000000-0000-0000-0000-000000000003",
20-
"name": "City Water Department",
21-
"type": "EXTERNAL",
22-
"statementDay": null,
23-
"createdAt": "2024-01-03T00:00:00Z",
20+
"name": "Rewards Credit Card",
21+
"type": "CREDIT_CARD",
22+
"statementClosingDay": 15,
23+
"createdAt": "2024-01-07T00:00:00Z",
2424
"updatedAt": null
2525
},
2626
{
2727
"id": "00000000-0000-0000-0000-000000000004",
28-
"name": "Gadget World",
29-
"type": "EXTERNAL",
30-
"statementDay": null,
31-
"createdAt": "2024-01-04T00:00:00Z",
32-
"updatedAt": null
28+
"name": "Travel Credit Card",
29+
"type": "CREDIT_CARD",
30+
"statementClosingDay": 20,
31+
"createdAt": "2024-01-08T00:00:00Z",
32+
"updatedAt": "2024-02-08T00:00:00Z"
3333
},
3434
{
3535
"id": "00000000-0000-0000-0000-000000000005",
36-
"name": "FastFix Plumbing",
36+
"name": "Employer Payroll",
3737
"type": "EXTERNAL",
38-
"statementDay": null,
39-
"createdAt": "2024-01-05T00:00:00Z",
38+
"statementClosingDay": null,
39+
"createdAt": "2024-01-09T00:00:00Z",
4040
"updatedAt": null
4141
},
4242
{
4343
"id": "00000000-0000-0000-0000-000000000006",
44-
"name": "Municipal Government",
44+
"name": "Mortgage Servicer",
4545
"type": "EXTERNAL",
46-
"statementDay": null,
47-
"createdAt": "2024-01-06T00:00:00Z",
48-
"updatedAt": null
46+
"statementClosingDay": null,
47+
"createdAt": "2024-01-10T00:00:00Z",
48+
"updatedAt": "2024-02-10T00:00:00Z"
4949
},
5050
{
5151
"id": "00000000-0000-0000-0000-000000000007",
52-
"name": "Sunny Savings & Loan",
53-
"type": "SAVINGS",
54-
"statementDay": null,
55-
"createdAt": "2024-01-07T00:00:00Z",
52+
"name": "Utilities - Electric",
53+
"type": "EXTERNAL",
54+
"statementClosingDay": null,
55+
"createdAt": "2024-01-11T00:00:00Z",
5656
"updatedAt": null
5757
},
5858
{
5959
"id": "00000000-0000-0000-0000-000000000008",
60-
"name": "Jane Smith",
60+
"name": "Gig Payouts",
6161
"type": "EXTERNAL",
62-
"statementDay": null,
63-
"createdAt": "2024-01-08T00:00:00Z",
62+
"statementClosingDay": null,
63+
"createdAt": "2024-01-12T00:00:00Z",
6464
"updatedAt": null
6565
},
6666
{
6767
"id": "00000000-0000-0000-0000-000000000009",
68-
"name": "Tech Solutions Ltd.",
68+
"name": "Brokerage Sweep",
6969
"type": "EXTERNAL",
70-
"statementDay": null,
71-
"createdAt": "2024-01-09T00:00:00Z",
70+
"statementClosingDay": null,
71+
"createdAt": "2024-01-13T00:00:00Z",
7272
"updatedAt": null
7373
},
7474
{
7575
"id": "00000000-0000-0000-0000-000000000010",
76-
"name": "Green Energy Co.",
77-
"type": "EXTERNAL",
78-
"statementDay": null,
79-
"createdAt": "2024-01-10T00:00:00Z",
76+
"name": "Vacation Savings",
77+
"type": "SAVINGS",
78+
"statementClosingDay": null,
79+
"createdAt": "2024-01-14T00:00:00Z",
8080
"updatedAt": null
8181
}
8282
]

src/examples/lucaSchema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@
2323
"id": "00000000-0000-0000-0000-000000000001",
2424
"name": "Main Street Bank",
2525
"type": "CHECKING",
26-
"statementDay": null,
26+
"statementClosingDay": null,
2727
"createdAt": "2024-01-01T00:00:00Z",
2828
"updatedAt": null
2929
},
3030
{
3131
"id": "00000000-0000-0000-0000-000000000002",
3232
"name": "John Doe",
3333
"type": "EXTERNAL",
34-
"statementDay": null,
34+
"statementClosingDay": null,
3535
"createdAt": "2024-01-02T00:00:00Z",
3636
"updatedAt": null
3737
},
3838
{
3939
"id": "00000000-0000-0000-0000-000000000003",
4040
"name": "City Water Department",
4141
"type": "EXTERNAL",
42-
"statementDay": null,
42+
"statementClosingDay": null,
4343
"createdAt": "2024-01-03T00:00:00Z",
4444
"updatedAt": null
4545
}

src/schemas/account.json

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,43 @@
2121
"enum": ["CHECKING", "SAVINGS", "CREDIT_CARD", "EXTERNAL"],
2222
"description": "The type of the account."
2323
},
24-
"statementDay": {
24+
"aggregationServiceId": {
25+
"type": ["string", "null"],
26+
"title": "Aggregation Service ID",
27+
"description": "Identifier for this account in a financial data aggregation service (e.g., Plaid)."
28+
},
29+
"statementClosingDay": {
2530
"type": ["integer", "null"],
26-
"title": "Statement Day",
31+
"title": "Statement Closing Day",
2732
"minimum": 1,
2833
"maximum": 31,
2934
"description": "The day of the month the statement is issued (for credit cards)."
35+
},
36+
"paymentDueDate": {
37+
"type": ["string", "null"],
38+
"title": "Payment Due Date",
39+
"format": "date",
40+
"description": "Next payment due date in YYYY-MM-DD format, if applicable."
41+
},
42+
"creditLimit": {
43+
"type": ["number", "null"],
44+
"title": "Credit Limit",
45+
"minimum": 0,
46+
"description": "Credit limit for the account, if applicable."
47+
},
48+
"apr": {
49+
"type": ["number", "null"],
50+
"title": "APR",
51+
"minimum": 0,
52+
"maximum": 100,
53+
"description": "Annual percentage rate for the account, if applicable."
54+
},
55+
"closedAt": {
56+
"type": ["string", "null"],
57+
"title": "Closed At",
58+
"format": "date-time",
59+
"pattern": "Z$",
60+
"description": "Timestamp when the account was closed, if applicable (UTC)."
3061
}
3162
},
3263
"required": ["name", "type"]

src/tests/test-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const createTestAccount = (
3535
id: '123e4567-e89b-12d3-a456-426614174001',
3636
name: 'Test Account',
3737
type: 'CHECKING',
38-
statementDay: null,
38+
statementClosingDay: null,
3939
createdAt: '2024-01-01T00:00:00Z',
4040
updatedAt: null,
4141
...overrides

src/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface Account {
3232
id: string;
3333
name: string;
3434
type: AccountType;
35-
statementDay: number | null;
35+
statementClosingDay: number | null;
3636
createdAt: string;
3737
updatedAt: string | null;
3838
}

0 commit comments

Comments
 (0)