projectionlab-mcp 1.2.1 → 1.3.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/HOW-IT-WORKS.md +7 -6
- package/MANUAL-SETUP.md +8 -4
- package/README.md +1 -1
- package/REFERENCE.md +27 -11
- package/SETUP-FOR-AGENTS.md +4 -4
- package/dist/bootstrap.js +15 -3
- package/dist/bootstrap.js.map +1 -1
- package/dist/bridge.d.ts +34 -5
- package/dist/config.d.ts +0 -1
- package/dist/config.js +0 -2
- package/dist/config.js.map +1 -1
- package/dist/currentFinances.d.ts +60 -0
- package/dist/currentFinances.js +117 -2
- package/dist/currentFinances.js.map +1 -1
- package/dist/dataModel.d.ts +37 -8
- package/dist/dataModel.js +1138 -15
- package/dist/dataModel.js.map +1 -1
- package/dist/diff.d.ts +18 -10
- package/dist/diff.js +142 -20
- package/dist/diff.js.map +1 -1
- package/dist/editAccess.d.ts +15 -0
- package/dist/editAccess.js +29 -0
- package/dist/editAccess.js.map +1 -0
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/extensionBridge.d.ts +99 -10
- package/dist/extensionBridge.js +445 -48
- package/dist/extensionBridge.js.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js +1 -1
- package/dist/layout.d.ts +68 -0
- package/dist/layout.js +122 -0
- package/dist/layout.js.map +1 -0
- package/dist/pathPatch.d.ts +41 -3
- package/dist/pathPatch.js +162 -14
- package/dist/pathPatch.js.map +1 -1
- package/dist/planSettings.d.ts +21 -2
- package/dist/planSettings.js +30 -6
- package/dist/planSettings.js.map +1 -1
- package/dist/planVersion.d.ts +13 -6
- package/dist/planVersion.js +33 -15
- package/dist/planVersion.js.map +1 -1
- package/dist/plans.d.ts +24 -3
- package/dist/plans.js +55 -2
- package/dist/plans.js.map +1 -1
- package/dist/realEstate.d.ts +20 -0
- package/dist/realEstate.js +57 -0
- package/dist/realEstate.js.map +1 -1
- package/dist/redact.d.ts +20 -0
- package/dist/redact.js +62 -0
- package/dist/redact.js.map +1 -1
- package/dist/resources/dataModel.d.ts +6 -2
- package/dist/resources/dataModel.js +86 -16
- package/dist/resources/dataModel.js.map +1 -1
- package/dist/resources/knowledge.d.ts +7 -1
- package/dist/resources/knowledge.js +262 -14
- package/dist/resources/knowledge.js.map +1 -1
- package/dist/resources/layoutResource.d.ts +19 -0
- package/dist/resources/layoutResource.js +43 -0
- package/dist/resources/layoutResource.js.map +1 -0
- package/dist/resources/planData.js +1 -1
- package/dist/resources/planData.js.map +1 -1
- package/dist/snapshot.d.ts +2 -1
- package/dist/snapshot.js +3 -1
- package/dist/snapshot.js.map +1 -1
- package/dist/summary.d.ts +39 -2
- package/dist/summary.js +148 -31
- package/dist/summary.js.map +1 -1
- package/dist/tools/bootstrap.js +2 -1
- package/dist/tools/bootstrap.js.map +1 -1
- package/dist/tools/clonePlan.js +10 -11
- package/dist/tools/clonePlan.js.map +1 -1
- package/dist/tools/connection.js +8 -8
- package/dist/tools/connection.js.map +1 -1
- package/dist/tools/deletePlan.js +9 -10
- package/dist/tools/deletePlan.js.map +1 -1
- package/dist/tools/diff.js +54 -15
- package/dist/tools/diff.js.map +1 -1
- package/dist/tools/export.js +5 -5
- package/dist/tools/export.js.map +1 -1
- package/dist/tools/getCurrentFinances.js +80 -24
- package/dist/tools/getCurrentFinances.js.map +1 -1
- package/dist/tools/getPlan.js +7 -1
- package/dist/tools/getPlan.js.map +1 -1
- package/dist/tools/getPlanSection.js +10 -3
- package/dist/tools/getPlanSection.js.map +1 -1
- package/dist/tools/getPlanSettings.js +16 -4
- package/dist/tools/getPlanSettings.js.map +1 -1
- package/dist/tools/restore.d.ts +4 -3
- package/dist/tools/restore.js +82 -44
- package/dist/tools/restore.js.map +1 -1
- package/dist/tools/schema.js +100 -22
- package/dist/tools/schema.js.map +1 -1
- package/dist/tools/snapshots.js +47 -21
- package/dist/tools/snapshots.js.map +1 -1
- package/dist/tools/summary.js +34 -1
- package/dist/tools/summary.js.map +1 -1
- package/dist/tools/updateAccount.js +69 -26
- package/dist/tools/updateAccount.js.map +1 -1
- package/dist/tools/updatePlanEvent.js +49 -29
- package/dist/tools/updatePlanEvent.js.map +1 -1
- package/dist/tools/updatePlanSection.js +10 -10
- package/dist/tools/updatePlanSection.js.map +1 -1
- package/dist/tools/updatePlanSettings.js +33 -15
- package/dist/tools/updatePlanSettings.js.map +1 -1
- package/dist/tools/writeGuard.d.ts +11 -0
- package/dist/tools/writeGuard.js +17 -0
- package/dist/tools/writeGuard.js.map +1 -0
- package/dist/types/projectionlab.d.ts +4 -0
- package/dist/types/wire.d.ts +81 -8
- package/dist/types/wire.js +30 -2
- package/dist/types/wire.js.map +1 -1
- package/package.json +1 -1
- package/skills/projectionlab/SKILL.md +222 -20
package/dist/dataModel.js
CHANGED
|
@@ -9,10 +9,13 @@ import { ProjectionLabError } from "./errors.js";
|
|
|
9
9
|
* read back (or matched field-for-field against a known plan).
|
|
10
10
|
* - "ui-label": the control was seen in the UI but not confirmed by a
|
|
11
11
|
* stored-value test.
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* - "export-shape": the field and its value type appear in a ProjectionLab 5
|
|
13
|
+
* export; its meaning is not yet confirmed by a stored-value test.
|
|
14
|
+
* Only fields confirmed against ProjectionLab 4.6.0 or 5.0.0 are listed;
|
|
15
|
+
* fields known from names alone are left out entirely.
|
|
14
16
|
*/
|
|
15
17
|
export const DATA_MODEL_PROJECTIONLAB_VERSION = "4.6.0";
|
|
18
|
+
export const DATA_MODEL_V5_PROJECTIONLAB_VERSION = "5.0.0";
|
|
16
19
|
const PCT = "percentage points";
|
|
17
20
|
const FRAC = "decimal fraction";
|
|
18
21
|
const DOLLARS = "dollars";
|
|
@@ -1350,13 +1353,1111 @@ export const DATA_MODEL_GROUPS = [
|
|
|
1350
1353
|
},
|
|
1351
1354
|
},
|
|
1352
1355
|
];
|
|
1353
|
-
|
|
1356
|
+
function asExportShapeGroup(group) {
|
|
1357
|
+
const fields = {};
|
|
1358
|
+
for (const [pattern, field] of Object.entries(group.fields)) {
|
|
1359
|
+
fields[pattern] = { ...field, evidence: "export-shape" };
|
|
1360
|
+
}
|
|
1361
|
+
return { ...group, fields };
|
|
1362
|
+
}
|
|
1363
|
+
// Year alignment in ProjectionLab 5. Every choice was set in a plan's Override
|
|
1364
|
+
// Year Alignment control and read back; Account Settings offers the same
|
|
1365
|
+
// choices, and "calendar" and "custom" were read back from it as well.
|
|
1366
|
+
const ALIGNMENT_TYPES = ["calendar", "rolling", "au-tax", "uk-tax", "custom"];
|
|
1367
|
+
const ALIGNMENT_NOTE = '"calendar" runs January to December; "rolling" stores no date and counts plan years from the current month; "au-tax" stores date "2000-07-01" and "uk-tax" stores "2000-04-01"; "custom" stores the chosen starting month as "2000-MM-01". The plan ends on the last day of the plan year that holds the household\'s latest life expectancy, so changing the alignment can add or remove a plan year.';
|
|
1368
|
+
const ALIGNMENT_DATE_DESCRIPTION = 'Month each plan year starts, as "2000-MM-01"; only the month is meaningful.';
|
|
1369
|
+
const VARIABLES_V5_BASE = asExportShapeGroup(DATA_MODEL_GROUPS.find((g) => g.scope === "variables"));
|
|
1370
|
+
const VARIABLES_V5_GROUP = {
|
|
1371
|
+
...VARIABLES_V5_BASE,
|
|
1372
|
+
fields: {
|
|
1373
|
+
...VARIABLES_V5_BASE.fields,
|
|
1374
|
+
"bondSettings.allocation": {
|
|
1375
|
+
...VARIABLES_V5_BASE.fields["bondSettings.allocation"],
|
|
1376
|
+
evidence: "observed",
|
|
1377
|
+
note: "Array of { x, y } points: x is the plan year (1 is the current plan year) and y is a percentage (0-100). " +
|
|
1378
|
+
"ProjectionLab keeps the last point on the plan's final year. When a change of year alignment shortens the plan, the app moves that point to the new final year; when the plan lengthens again, it adds a point at the new final year and keeps the moved one.",
|
|
1379
|
+
},
|
|
1380
|
+
"alignment.type": {
|
|
1381
|
+
description: "This plan's own year alignment. null or absent means the plan follows the account's settings plan.alignment.",
|
|
1382
|
+
allowedValues: ALIGNMENT_TYPES,
|
|
1383
|
+
evidence: "observed",
|
|
1384
|
+
note: ALIGNMENT_NOTE,
|
|
1385
|
+
},
|
|
1386
|
+
"alignment.date": {
|
|
1387
|
+
description: ALIGNMENT_DATE_DESCRIPTION,
|
|
1388
|
+
enabledBy: 'alignment.type "custom", "au-tax" or "uk-tax"',
|
|
1389
|
+
evidence: "observed",
|
|
1390
|
+
},
|
|
1391
|
+
},
|
|
1392
|
+
};
|
|
1393
|
+
const MONTECARLO_V5_GROUP = asExportShapeGroup(DATA_MODEL_GROUPS.find((g) => g.scope === "montecarlo"));
|
|
1394
|
+
const WITHDRAWAL_STRATEGY_V5_GROUP = asExportShapeGroup(DATA_MODEL_GROUPS.find((g) => g.scope === "withdrawalStrategy"));
|
|
1395
|
+
export const DATA_MODEL_V5_GROUPS = [
|
|
1396
|
+
{
|
|
1397
|
+
scope: "envelope",
|
|
1398
|
+
title: "Document envelope",
|
|
1399
|
+
fields: {
|
|
1400
|
+
schema: {
|
|
1401
|
+
description: "Root envelope schema version (1 in ProjectionLab 5 exports).",
|
|
1402
|
+
units: "count",
|
|
1403
|
+
evidence: "export-shape",
|
|
1404
|
+
},
|
|
1405
|
+
exportedAt: {
|
|
1406
|
+
description: "Timestamp in milliseconds when the export was generated.",
|
|
1407
|
+
units: "milliseconds",
|
|
1408
|
+
evidence: "export-shape",
|
|
1409
|
+
},
|
|
1410
|
+
documents: {
|
|
1411
|
+
description: "Container holding currentFinances, plans, settings, and accountHistory documents.",
|
|
1412
|
+
evidence: "export-shape",
|
|
1413
|
+
},
|
|
1414
|
+
},
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
scope: "currentFinances",
|
|
1418
|
+
title: "Current Finances document",
|
|
1419
|
+
fields: {
|
|
1420
|
+
schema: {
|
|
1421
|
+
description: "Current Finances document schema version (5 in ProjectionLab 5).",
|
|
1422
|
+
units: "count",
|
|
1423
|
+
evidence: "export-shape",
|
|
1424
|
+
},
|
|
1425
|
+
lastUpdated: {
|
|
1426
|
+
description: "Timestamp in milliseconds of the last modification.",
|
|
1427
|
+
units: "milliseconds",
|
|
1428
|
+
evidence: "export-shape",
|
|
1429
|
+
},
|
|
1430
|
+
"location.country": {
|
|
1431
|
+
description: "Tax residence country code of the household.",
|
|
1432
|
+
evidence: "export-shape",
|
|
1433
|
+
},
|
|
1434
|
+
"location.state": {
|
|
1435
|
+
description: "State or province code of the household.",
|
|
1436
|
+
evidence: "export-shape",
|
|
1437
|
+
},
|
|
1438
|
+
"household.partnerStatus": {
|
|
1439
|
+
description: "Household partnership status.",
|
|
1440
|
+
evidence: "export-shape",
|
|
1441
|
+
},
|
|
1442
|
+
"household.people.me.id": {
|
|
1443
|
+
description: "Identifier of the primary household person.",
|
|
1444
|
+
evidence: "export-shape",
|
|
1445
|
+
},
|
|
1446
|
+
"household.people.me.name": {
|
|
1447
|
+
description: "Display label of the primary household person.",
|
|
1448
|
+
evidence: "export-shape",
|
|
1449
|
+
},
|
|
1450
|
+
"household.people.me.birthYear": {
|
|
1451
|
+
description: "Birth year of the primary household person.",
|
|
1452
|
+
units: "count",
|
|
1453
|
+
evidence: "export-shape",
|
|
1454
|
+
},
|
|
1455
|
+
"household.people.me.birthMonth": {
|
|
1456
|
+
description: "Birth month index of the primary household person.",
|
|
1457
|
+
units: "count",
|
|
1458
|
+
evidence: "export-shape",
|
|
1459
|
+
},
|
|
1460
|
+
"household.people.me.lifeExpectancy": {
|
|
1461
|
+
description: "Target life expectancy age for modeling the primary household person.",
|
|
1462
|
+
units: "age",
|
|
1463
|
+
evidence: "export-shape",
|
|
1464
|
+
},
|
|
1465
|
+
"household.people.me.color": {
|
|
1466
|
+
description: "Display color code for the primary household person.",
|
|
1467
|
+
evidence: "export-shape",
|
|
1468
|
+
},
|
|
1469
|
+
"household.people.me.icon": {
|
|
1470
|
+
description: "Icon identifier for the primary household person.",
|
|
1471
|
+
evidence: "export-shape",
|
|
1472
|
+
},
|
|
1473
|
+
"household.people.me.character": {
|
|
1474
|
+
description: "Character avatar string for the primary household person.",
|
|
1475
|
+
evidence: "export-shape",
|
|
1476
|
+
},
|
|
1477
|
+
"household.people.spouse.id": {
|
|
1478
|
+
description: "Identifier of the spouse.",
|
|
1479
|
+
evidence: "export-shape",
|
|
1480
|
+
},
|
|
1481
|
+
"household.people.spouse.name": {
|
|
1482
|
+
description: "Display label of the spouse.",
|
|
1483
|
+
evidence: "export-shape",
|
|
1484
|
+
},
|
|
1485
|
+
"household.people.spouse.birthYear": {
|
|
1486
|
+
description: "Birth year of the spouse.",
|
|
1487
|
+
units: "count",
|
|
1488
|
+
evidence: "export-shape",
|
|
1489
|
+
},
|
|
1490
|
+
"household.people.spouse.birthMonth": {
|
|
1491
|
+
description: "Birth month index of the spouse.",
|
|
1492
|
+
units: "count",
|
|
1493
|
+
evidence: "export-shape",
|
|
1494
|
+
},
|
|
1495
|
+
"household.people.spouse.lifeExpectancy": {
|
|
1496
|
+
description: "Target life expectancy age for modeling the spouse.",
|
|
1497
|
+
units: "age",
|
|
1498
|
+
evidence: "export-shape",
|
|
1499
|
+
},
|
|
1500
|
+
"household.people.spouse.color": {
|
|
1501
|
+
description: "Display color code for the spouse.",
|
|
1502
|
+
evidence: "export-shape",
|
|
1503
|
+
},
|
|
1504
|
+
"household.people.spouse.icon": {
|
|
1505
|
+
description: "Icon identifier for the spouse.",
|
|
1506
|
+
evidence: "export-shape",
|
|
1507
|
+
},
|
|
1508
|
+
"household.people.spouse.character": {
|
|
1509
|
+
description: "Character avatar string for the spouse.",
|
|
1510
|
+
evidence: "export-shape",
|
|
1511
|
+
},
|
|
1512
|
+
},
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
scope: "accounts",
|
|
1516
|
+
title: "Current Finances accounts and debts (keyed by account ID) and plan account events",
|
|
1517
|
+
fields: {
|
|
1518
|
+
id: {
|
|
1519
|
+
description: "Unique account identifier.",
|
|
1520
|
+
evidence: "export-shape",
|
|
1521
|
+
},
|
|
1522
|
+
name: {
|
|
1523
|
+
description: "Display label of the account.",
|
|
1524
|
+
evidence: "export-shape",
|
|
1525
|
+
},
|
|
1526
|
+
kind: {
|
|
1527
|
+
description: "Account category discriminator.",
|
|
1528
|
+
allowedValues: ["account", "debt", "real-asset"],
|
|
1529
|
+
evidence: "export-shape",
|
|
1530
|
+
},
|
|
1531
|
+
type: {
|
|
1532
|
+
description: "Account classification type.",
|
|
1533
|
+
allowedValues: ["taxable", "401k", "roth-401k", "ira", "savings", "land", "secured-loan"],
|
|
1534
|
+
evidence: "export-shape",
|
|
1535
|
+
note: 'The Solo 401k, Roth Solo 401k, and SEP IRA account types store as type "401k" or "roth-401k" with subtype "solo", and type "ira" with subtype "sep".',
|
|
1536
|
+
},
|
|
1537
|
+
subtype: {
|
|
1538
|
+
description: "Sub-classification of the record.",
|
|
1539
|
+
evidence: "export-shape",
|
|
1540
|
+
note: 'Real assets use values such as "lot"; a 401k or roth-401k account uses subtype "solo" for the Solo 401k and Roth Solo 401k types, and an ira account uses subtype "sep" for the SEP IRA type.',
|
|
1541
|
+
},
|
|
1542
|
+
owner: {
|
|
1543
|
+
description: "Which household member owns the account.",
|
|
1544
|
+
evidence: "observed",
|
|
1545
|
+
note: '"joint" is offered only for savings, taxable and crypto accounts, "spouse" only while the household has a partner, and household person identifiers plus "dependent" are valid for every non-inherited type. No allowedValues list is recorded because the identifiers are app-assigned.',
|
|
1546
|
+
},
|
|
1547
|
+
order: {
|
|
1548
|
+
description: "Display sort order index.",
|
|
1549
|
+
units: "count",
|
|
1550
|
+
evidence: "export-shape",
|
|
1551
|
+
},
|
|
1552
|
+
icon: {
|
|
1553
|
+
description: "Icon identifier displayed in the interface.",
|
|
1554
|
+
evidence: "export-shape",
|
|
1555
|
+
},
|
|
1556
|
+
archivedOn: {
|
|
1557
|
+
description: "ISO date string (YYYY-MM-DD) indicating when the account was archived.",
|
|
1558
|
+
evidence: "export-shape",
|
|
1559
|
+
note: "Present only on archived accounts.",
|
|
1560
|
+
},
|
|
1561
|
+
balance: {
|
|
1562
|
+
description: "Current balance in dollars for accounts and outstanding principal for debts.",
|
|
1563
|
+
units: DOLLARS,
|
|
1564
|
+
evidence: "export-shape",
|
|
1565
|
+
note: "Present on account and debt kinds.",
|
|
1566
|
+
},
|
|
1567
|
+
costBasis: {
|
|
1568
|
+
description: "Unadjusted tax cost basis in dollars for capital gains tracking on taxable accounts.",
|
|
1569
|
+
units: DOLLARS,
|
|
1570
|
+
evidence: "export-shape",
|
|
1571
|
+
note: "Present on account kind.",
|
|
1572
|
+
},
|
|
1573
|
+
value: {
|
|
1574
|
+
description: "Estimated fair market value in dollars for real assets.",
|
|
1575
|
+
units: DOLLARS,
|
|
1576
|
+
evidence: "export-shape",
|
|
1577
|
+
note: "Present on real-asset kind.",
|
|
1578
|
+
},
|
|
1579
|
+
purchasePrice: {
|
|
1580
|
+
description: "Historical acquisition cost in dollars for real assets.",
|
|
1581
|
+
units: DOLLARS,
|
|
1582
|
+
evidence: "export-shape",
|
|
1583
|
+
note: "Present on real-asset kind.",
|
|
1584
|
+
},
|
|
1585
|
+
securedByAssetId: {
|
|
1586
|
+
description: "Identifier of the real asset securing this debt.",
|
|
1587
|
+
evidence: "export-shape",
|
|
1588
|
+
note: "Present on debt kind when secured by an asset.",
|
|
1589
|
+
},
|
|
1590
|
+
accountId: {
|
|
1591
|
+
description: "Identifier of the associated Current Finances account on plan events.",
|
|
1592
|
+
evidence: "export-shape",
|
|
1593
|
+
},
|
|
1594
|
+
liquidity: {
|
|
1595
|
+
description: "Whether the balance counts toward liquid net worth: true, false, \"EWAge\" for once the account's qualified withdrawal age has passed, or a { date, type } object that starts or stops counting on a date.",
|
|
1596
|
+
enabledBy: "the account's Liquidity control",
|
|
1597
|
+
evidence: "observed",
|
|
1598
|
+
note: 'Labelled Liquid, "Whether this counts toward your liquid assets." type "from" is the From Date control and "until" the Until Date control. An EWAge value counts the balance once the qualified withdrawal age has passed. The plan event key liquid does not exist: v5 normalization strips it.',
|
|
1599
|
+
},
|
|
1600
|
+
withdraw: {
|
|
1601
|
+
description: "When the account may be drawn down: true for any time, false for never, \"when-liquid\", \"after\" for a specific year given by withdrawAge, or \"EWAge\" for once the qualified withdrawal age has passed.",
|
|
1602
|
+
evidence: "observed",
|
|
1603
|
+
note: 'Labelled Always, Never, When Liquid, Reach Specific Year and After Qualified Withdrawal Age. The control is offered only to account types that support it; When Liquid appears only while it is the stored value, and EWAge only for types with a qualified age. No allowedValues list is recorded: the list holds strings only, so listing "when-liquid", "after" and "EWAge" would read as ruling out the true and false values the field also takes.',
|
|
1604
|
+
},
|
|
1605
|
+
// Plan account events are listed and written under this scope by
|
|
1606
|
+
// section name, so their plan-side fields are carried from the
|
|
1607
|
+
// ProjectionLab 4 registry into this group as well.
|
|
1608
|
+
investmentGrowthType: {
|
|
1609
|
+
description: "Where the account's stock growth rate comes from.",
|
|
1610
|
+
allowedValues: ["plan", "fixed", "custom", "none"],
|
|
1611
|
+
evidence: "observed",
|
|
1612
|
+
note: 'Labelled Stock Growth Rate ("plan", inherit from Plan Settings > Growth Rates), Fixed Rate ("fixed"), Advanced ("custom"), which stores the curve in investmentGrowthCustom as { type, data: [ { x, y } ] }, and None ("none", no investment growth).',
|
|
1613
|
+
},
|
|
1614
|
+
investmentGrowthRate: {
|
|
1615
|
+
description: "Custom annual growth rate for the account.",
|
|
1616
|
+
units: PCT,
|
|
1617
|
+
enabledBy: 'investmentGrowthType "fixed"',
|
|
1618
|
+
evidence: "observed",
|
|
1619
|
+
},
|
|
1620
|
+
dividendType: {
|
|
1621
|
+
description: "Where the account's dividend yield comes from.",
|
|
1622
|
+
allowedValues: ["plan", "fixed", "custom", "none"],
|
|
1623
|
+
evidence: "observed",
|
|
1624
|
+
note: 'Labelled Stock Dividend Yield ("plan", inherit from Plan Settings > Growth Rates), Fixed Yield ("fixed", which uses dividendRate), Advanced ("custom"), which stores the curve in dividendRateCustom as { type, data: [ { x, y } ] }, and None ("none", no dividend yield).',
|
|
1625
|
+
},
|
|
1626
|
+
dividendRate: {
|
|
1627
|
+
description: "Custom annual dividend yield for the account.",
|
|
1628
|
+
units: PCT,
|
|
1629
|
+
enabledBy: 'dividendType "fixed"',
|
|
1630
|
+
evidence: "observed",
|
|
1631
|
+
},
|
|
1632
|
+
yearlyFee: {
|
|
1633
|
+
description: "Recurring account fee.",
|
|
1634
|
+
enabledBy: "the account's Fees control",
|
|
1635
|
+
evidence: "observed",
|
|
1636
|
+
note: 'Labelled Yearly Fee, "Annual fee deducted from this account." Interpreted per yearlyFeeType: a percentage, a percentage of earnings, or a dollar amount.',
|
|
1637
|
+
},
|
|
1638
|
+
yearlyFeeType: {
|
|
1639
|
+
description: "How yearlyFee is read.",
|
|
1640
|
+
allowedValues: ["$", "today$", "%", "%-earnings"],
|
|
1641
|
+
enabledBy: "yearlyFee",
|
|
1642
|
+
evidence: "observed",
|
|
1643
|
+
note: 'Rendered as a dollar amount a year ("$"), a dollar amount in today\'s currency ("today$"), a percentage of the balance ("%"), or a percentage of earnings a year ("%-earnings").',
|
|
1644
|
+
},
|
|
1645
|
+
withdrawAge: {
|
|
1646
|
+
description: "Timing reference after which the account becomes eligible for drawdown.",
|
|
1647
|
+
enabledBy: 'withdraw "after"',
|
|
1648
|
+
evidence: "observed",
|
|
1649
|
+
note: 'The Reach Specific Year withdraw option, shown beside the Years control. Labelled "When withdrawals become available."',
|
|
1650
|
+
},
|
|
1651
|
+
rmdType: {
|
|
1652
|
+
description: "Statutory required minimum distribution regime.",
|
|
1653
|
+
allowedValues: [
|
|
1654
|
+
"us",
|
|
1655
|
+
"us-inherited",
|
|
1656
|
+
"stretch",
|
|
1657
|
+
"ten-year",
|
|
1658
|
+
"CA",
|
|
1659
|
+
"custom",
|
|
1660
|
+
"none",
|
|
1661
|
+
],
|
|
1662
|
+
evidence: "observed",
|
|
1663
|
+
note: 'Options carry applicableAccountTypes and inapplicableAccountTypes, so a given account offers the subset valid for its type and jurisdiction: "us" current US retirement rules, "us-inherited" inherited retirement rules, "stretch" pre-SECURE Act stretch IRA estimates for inherited ira and roth-ira accounts, "ten-year" a smoothed schedule divesting over ten years, "CA" Canadian RRIF rules, "custom" a schedule held in requiredDistributions, and "none".',
|
|
1664
|
+
},
|
|
1665
|
+
EWAge: {
|
|
1666
|
+
description: "Age used to determine qualified withdrawals.",
|
|
1667
|
+
units: "age",
|
|
1668
|
+
enabledBy: "account types that support a qualified withdrawal age",
|
|
1669
|
+
evidence: "observed",
|
|
1670
|
+
note: 'Labelled Qualified Age, "Age used to determine qualified withdrawals." Offered by the account type rather than gated on hasEWPenalty, and the stored value also backs the liquidity and withdraw "EWAge" options.',
|
|
1671
|
+
},
|
|
1672
|
+
hasEWPenalty: {
|
|
1673
|
+
description: "Whether withdrawals before EWAge incur a penalty.",
|
|
1674
|
+
evidence: "observed",
|
|
1675
|
+
note: 'Labelled Early Withdrawal Penalties, "Penalty for withdrawals before the qualified age." Switching it on reveals Penalty Rate and Freely Withdraw Contributions.',
|
|
1676
|
+
},
|
|
1677
|
+
EWPenaltyRate: {
|
|
1678
|
+
description: "Penalty applied to early withdrawals.",
|
|
1679
|
+
units: PCT,
|
|
1680
|
+
enabledBy: "hasEWPenalty",
|
|
1681
|
+
evidence: "observed",
|
|
1682
|
+
note: 'Labelled Penalty Rate, "Penalty applied to early withdrawals." Commonly 10 for retirement accounts and 20 for an HSA.',
|
|
1683
|
+
},
|
|
1684
|
+
},
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
scope: "assets",
|
|
1688
|
+
title: "Plan assets and real property",
|
|
1689
|
+
fields: {
|
|
1690
|
+
id: {
|
|
1691
|
+
description: "Unique event identifier.",
|
|
1692
|
+
evidence: "export-shape",
|
|
1693
|
+
},
|
|
1694
|
+
name: {
|
|
1695
|
+
description: "Display label of the asset.",
|
|
1696
|
+
evidence: "export-shape",
|
|
1697
|
+
},
|
|
1698
|
+
kind: {
|
|
1699
|
+
description: "Event category discriminator.",
|
|
1700
|
+
allowedValues: ["real-asset"],
|
|
1701
|
+
evidence: "export-shape",
|
|
1702
|
+
},
|
|
1703
|
+
assetId: {
|
|
1704
|
+
description: "Identifier of the corresponding Current Finances real asset.",
|
|
1705
|
+
evidence: "export-shape",
|
|
1706
|
+
},
|
|
1707
|
+
type: {
|
|
1708
|
+
description: "Asset classification type.",
|
|
1709
|
+
allowedValues: ["land"],
|
|
1710
|
+
evidence: "export-shape",
|
|
1711
|
+
},
|
|
1712
|
+
subtype: {
|
|
1713
|
+
description: "Sub-classification of the asset (such as lot).",
|
|
1714
|
+
evidence: "export-shape",
|
|
1715
|
+
},
|
|
1716
|
+
value: {
|
|
1717
|
+
description: "Market value in dollars.",
|
|
1718
|
+
units: DOLLARS,
|
|
1719
|
+
evidence: "export-shape",
|
|
1720
|
+
},
|
|
1721
|
+
valueType: {
|
|
1722
|
+
description: "Currency basis of the asset value.",
|
|
1723
|
+
evidence: "export-shape",
|
|
1724
|
+
},
|
|
1725
|
+
purchasePrice: {
|
|
1726
|
+
description: "Historical acquisition cost in dollars.",
|
|
1727
|
+
units: DOLLARS,
|
|
1728
|
+
evidence: "export-shape",
|
|
1729
|
+
},
|
|
1730
|
+
purchasePriceType: {
|
|
1731
|
+
description: "Currency basis of the purchase price.",
|
|
1732
|
+
evidence: "export-shape",
|
|
1733
|
+
},
|
|
1734
|
+
loans: {
|
|
1735
|
+
description: "Array of linked financing structures.",
|
|
1736
|
+
evidence: "export-shape",
|
|
1737
|
+
},
|
|
1738
|
+
// Entries carried from the ProjectionLab 4 registry for fields the
|
|
1739
|
+
// ProjectionLab 5 export shows.
|
|
1740
|
+
"start.type": {
|
|
1741
|
+
description: "Kind of the start reference: a calendar year, an age, a fixed date, a milestone, a life expectancy, or a keyword.",
|
|
1742
|
+
allowedValues: [
|
|
1743
|
+
"date",
|
|
1744
|
+
"year",
|
|
1745
|
+
"age",
|
|
1746
|
+
"milestone",
|
|
1747
|
+
"lifeExpectancy",
|
|
1748
|
+
"lastLifeExpectancy",
|
|
1749
|
+
"keyword",
|
|
1750
|
+
],
|
|
1751
|
+
evidence: "export-shape",
|
|
1752
|
+
},
|
|
1753
|
+
paymentMethod: {
|
|
1754
|
+
description: "Whether the asset was bought outright or financed.",
|
|
1755
|
+
allowedValues: ["pay-in-full", "financed"],
|
|
1756
|
+
evidence: "export-shape",
|
|
1757
|
+
},
|
|
1758
|
+
downPayment: {
|
|
1759
|
+
description: "Cash down payment at acquisition.",
|
|
1760
|
+
units: DOLLARS,
|
|
1761
|
+
enabledBy: 'paymentMethod "financed"',
|
|
1762
|
+
evidence: "export-shape",
|
|
1763
|
+
},
|
|
1764
|
+
interestRate: {
|
|
1765
|
+
description: "Annual percentage rate of the asset's loan.",
|
|
1766
|
+
units: PCT,
|
|
1767
|
+
enabledBy: 'paymentMethod "financed"',
|
|
1768
|
+
evidence: "export-shape",
|
|
1769
|
+
},
|
|
1770
|
+
interestType: {
|
|
1771
|
+
description: "How interest accrues on the asset's loan.",
|
|
1772
|
+
allowedValues: ["simple", "compound"],
|
|
1773
|
+
evidence: "observed",
|
|
1774
|
+
note: 'Defaults to "simple"; "compound" is what reveals the Compounding control.',
|
|
1775
|
+
},
|
|
1776
|
+
compounding: {
|
|
1777
|
+
description: "Frequency at which loan interest compounds.",
|
|
1778
|
+
allowedValues: ["daily", "monthly"],
|
|
1779
|
+
enabledBy: 'interestType "compound"',
|
|
1780
|
+
evidence: "observed",
|
|
1781
|
+
note: 'The Financing panel offers Daily and Monthly and defaults to monthly. It is a companion of Interest Type and stays hidden while Interest Type is "simple".',
|
|
1782
|
+
},
|
|
1783
|
+
monthlyPayment: {
|
|
1784
|
+
description: "Scheduled monthly financing payment.",
|
|
1785
|
+
units: DOLLARS,
|
|
1786
|
+
enabledBy: 'paymentMethod "financed"',
|
|
1787
|
+
evidence: "export-shape",
|
|
1788
|
+
},
|
|
1789
|
+
generateIncome: {
|
|
1790
|
+
description: "When true, the property generates modeled rental income.",
|
|
1791
|
+
evidence: "export-shape",
|
|
1792
|
+
},
|
|
1793
|
+
"yearlyChange.type": {
|
|
1794
|
+
description: "How the asset's value moves each year. \"custom\" stores the curve in yearlyChange.custom.",
|
|
1795
|
+
allowedValues: [
|
|
1796
|
+
"none",
|
|
1797
|
+
"appreciate",
|
|
1798
|
+
"depreciate",
|
|
1799
|
+
"custom",
|
|
1800
|
+
"match-inflation",
|
|
1801
|
+
"inflation+",
|
|
1802
|
+
"inflation-",
|
|
1803
|
+
],
|
|
1804
|
+
evidence: "observed",
|
|
1805
|
+
note: "The asset control labels the pair Appreciate and Depreciate and the curve option Advanced, where income and expense spell the same option Increase and Decrease. The app validates nothing on write, so a token outside this list stores and renders as nothing.",
|
|
1806
|
+
},
|
|
1807
|
+
taxRate: {
|
|
1808
|
+
description: "Annual property tax figure.",
|
|
1809
|
+
note: "A dollar amount or a percentage of assessedValue, per taxRateType.",
|
|
1810
|
+
evidence: "export-shape",
|
|
1811
|
+
},
|
|
1812
|
+
maintenanceRate: {
|
|
1813
|
+
description: "Annual maintenance cost.",
|
|
1814
|
+
note: "A dollar amount or a percentage of market value, per maintenanceRateType.",
|
|
1815
|
+
evidence: "export-shape",
|
|
1816
|
+
},
|
|
1817
|
+
insuranceRate: {
|
|
1818
|
+
description: "Annual insurance cost.",
|
|
1819
|
+
note: "A dollar amount or a percentage of market value, per insuranceRateType.",
|
|
1820
|
+
evidence: "export-shape",
|
|
1821
|
+
},
|
|
1822
|
+
monthlyHOA: {
|
|
1823
|
+
description: "Monthly homeowners association dues.",
|
|
1824
|
+
units: DOLLARS,
|
|
1825
|
+
enabledBy: "generateIncome",
|
|
1826
|
+
evidence: "export-shape",
|
|
1827
|
+
},
|
|
1828
|
+
"end.type": {
|
|
1829
|
+
description: "Kind of the end reference: a calendar year, an age, a fixed date, a milestone, a life expectancy, or a keyword.",
|
|
1830
|
+
allowedValues: [
|
|
1831
|
+
"date",
|
|
1832
|
+
"year",
|
|
1833
|
+
"age",
|
|
1834
|
+
"milestone",
|
|
1835
|
+
"lifeExpectancy",
|
|
1836
|
+
"lastLifeExpectancy",
|
|
1837
|
+
"keyword",
|
|
1838
|
+
],
|
|
1839
|
+
evidence: "export-shape",
|
|
1840
|
+
note: 'On a one-time event (frequency "once") the end reference is a leftover default: the UI hides it and the simulation ignores it, so it is not a user setting.',
|
|
1841
|
+
},
|
|
1842
|
+
repeat: {
|
|
1843
|
+
description: "When true, the asset is re-acquired on a cadence.",
|
|
1844
|
+
evidence: "export-shape",
|
|
1845
|
+
},
|
|
1846
|
+
sellIfNeeded: {
|
|
1847
|
+
description: "When true, the asset is liquidated automatically if the portfolio depletes.",
|
|
1848
|
+
evidence: "export-shape",
|
|
1849
|
+
},
|
|
1850
|
+
},
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
scope: "income",
|
|
1854
|
+
title: "Plan income events",
|
|
1855
|
+
fields: {
|
|
1856
|
+
id: {
|
|
1857
|
+
description: "Unique event identifier.",
|
|
1858
|
+
evidence: "export-shape",
|
|
1859
|
+
},
|
|
1860
|
+
name: {
|
|
1861
|
+
description: "Display label of the income event.",
|
|
1862
|
+
evidence: "export-shape",
|
|
1863
|
+
},
|
|
1864
|
+
kind: {
|
|
1865
|
+
description: "Event category discriminator.",
|
|
1866
|
+
allowedValues: ["income"],
|
|
1867
|
+
evidence: "export-shape",
|
|
1868
|
+
},
|
|
1869
|
+
type: {
|
|
1870
|
+
description: "Income classification type.",
|
|
1871
|
+
allowedValues: ["other"],
|
|
1872
|
+
evidence: "export-shape",
|
|
1873
|
+
},
|
|
1874
|
+
amount: {
|
|
1875
|
+
description: "Scheduled income amount in dollars.",
|
|
1876
|
+
units: DOLLARS,
|
|
1877
|
+
evidence: "export-shape",
|
|
1878
|
+
},
|
|
1879
|
+
"start.type": {
|
|
1880
|
+
description: "Timing reference mode for when the income event begins.",
|
|
1881
|
+
allowedValues: ["date", "year", "age", "milestone", "lifeExpectancy", "lastLifeExpectancy", "keyword"],
|
|
1882
|
+
evidence: "export-shape",
|
|
1883
|
+
},
|
|
1884
|
+
"start.value": {
|
|
1885
|
+
description: "Target date, milestone identifier, or keyword for the start timing.",
|
|
1886
|
+
evidence: "export-shape",
|
|
1887
|
+
},
|
|
1888
|
+
"start.modifier": {
|
|
1889
|
+
description: "Optional offset modifier for the start timing.",
|
|
1890
|
+
evidence: "export-shape",
|
|
1891
|
+
},
|
|
1892
|
+
"end.type": {
|
|
1893
|
+
description: "Timing reference mode for when the income event ends.",
|
|
1894
|
+
allowedValues: ["date", "year", "age", "milestone", "lifeExpectancy", "lastLifeExpectancy", "keyword"],
|
|
1895
|
+
evidence: "export-shape",
|
|
1896
|
+
},
|
|
1897
|
+
"end.value": {
|
|
1898
|
+
description: "Target date, milestone identifier, or keyword for the end timing.",
|
|
1899
|
+
evidence: "export-shape",
|
|
1900
|
+
},
|
|
1901
|
+
"end.modifier": {
|
|
1902
|
+
description: "Optional offset modifier for the end timing.",
|
|
1903
|
+
evidence: "export-shape",
|
|
1904
|
+
},
|
|
1905
|
+
// Entries carried from the ProjectionLab 4 registry for fields the
|
|
1906
|
+
// ProjectionLab 5 export shows.
|
|
1907
|
+
owner: {
|
|
1908
|
+
description: "Which household member the event belongs to.",
|
|
1909
|
+
allowedValues: ["me", "spouse", "joint"],
|
|
1910
|
+
evidence: "export-shape",
|
|
1911
|
+
},
|
|
1912
|
+
estimateIncome: {
|
|
1913
|
+
description: "When true, the Social Security benefit is estimated from earnings history; when false, amount is entered manually.",
|
|
1914
|
+
evidence: "export-shape",
|
|
1915
|
+
},
|
|
1916
|
+
primaryInsuranceAmount: {
|
|
1917
|
+
description: "Monthly benefit at full retirement age used by the automatic estimate.",
|
|
1918
|
+
units: DOLLARS,
|
|
1919
|
+
enabledBy: "estimateIncome",
|
|
1920
|
+
evidence: "export-shape",
|
|
1921
|
+
},
|
|
1922
|
+
expectedPercent: {
|
|
1923
|
+
description: "Share of the statutory benefit expected to be paid.",
|
|
1924
|
+
units: PCT,
|
|
1925
|
+
enabledBy: "estimateIncome",
|
|
1926
|
+
note: "100 assumes full benefits; a lower figure models trust fund exhaustion.",
|
|
1927
|
+
evidence: "export-shape",
|
|
1928
|
+
},
|
|
1929
|
+
"yearlyChange.type": {
|
|
1930
|
+
description: "How the amount changes each year. \"increase\" and \"decrease\" take yearlyChange.amount as a percent, \"custom\" stores a curve in yearlyChange.custom, and \"match-inflation\", \"inflation+\" and \"inflation-\" follow the plan's inflation rate.",
|
|
1931
|
+
allowedValues: [
|
|
1932
|
+
"none",
|
|
1933
|
+
"increase",
|
|
1934
|
+
"decrease",
|
|
1935
|
+
"custom",
|
|
1936
|
+
"match-inflation",
|
|
1937
|
+
"inflation+",
|
|
1938
|
+
"inflation-",
|
|
1939
|
+
],
|
|
1940
|
+
enabledBy: 'frequency other than "once", or amountType "grow$"',
|
|
1941
|
+
evidence: "observed",
|
|
1942
|
+
note: 'The Change control offers Increase, Decrease, Advanced ("custom"), Match inflation, and Match inflation plus or minus a percent. A once-frequency event such as an inheritance or a windfall shows no Change control at all, and an amountType of "grow$" brings it back. The app validates nothing on write.',
|
|
1943
|
+
},
|
|
1944
|
+
"yearlyChange.amount": {
|
|
1945
|
+
description: "Percent per year applied by yearlyChange.type \"increase\" or \"decrease\".",
|
|
1946
|
+
units: PCT,
|
|
1947
|
+
enabledBy: 'yearlyChange.type "increase" or "decrease"',
|
|
1948
|
+
evidence: "observed",
|
|
1949
|
+
note: "The percent per year field in the Change Over Time dialog, beside the Maximum field.",
|
|
1950
|
+
},
|
|
1951
|
+
"yearlyChange.limit": {
|
|
1952
|
+
description: "Dollar ceiling on the value the yearly change may reach.",
|
|
1953
|
+
units: DOLLARS,
|
|
1954
|
+
enabledBy: 'yearlyChange.limitEnabled with yearlyChange.type "increase" or "decrease"',
|
|
1955
|
+
evidence: "observed",
|
|
1956
|
+
note: 'The Maximum field in the Change Over Time dialog is a dollar field. Its unit is held by yearlyChange.limitType, so a percent token there changes nothing on screen.',
|
|
1957
|
+
},
|
|
1958
|
+
"yearlyChange.limitType": {
|
|
1959
|
+
description: "Unit of yearlyChange.limit.",
|
|
1960
|
+
allowedValues: ["$", "today$"],
|
|
1961
|
+
enabledBy: "yearlyChange.limitEnabled",
|
|
1962
|
+
evidence: "observed",
|
|
1963
|
+
note: 'Present on every yearlyChange object examined and always written "today$". The Maximum control offers no percent form.',
|
|
1964
|
+
},
|
|
1965
|
+
"yearlyChange.custom": {
|
|
1966
|
+
description: "The curve behind yearlyChange.type \"custom\": { type, data } where type is \"%\", \"$\" or \"today$\" and data is an array of { x, y } points.",
|
|
1967
|
+
enabledBy: 'yearlyChange.type "custom"',
|
|
1968
|
+
evidence: "observed",
|
|
1969
|
+
note: "Advanced opens a separate window with the curve editor. x is the year offset from the event start and y is the rate or amount in the unit named by type.",
|
|
1970
|
+
},
|
|
1971
|
+
},
|
|
1972
|
+
},
|
|
1973
|
+
{
|
|
1974
|
+
scope: "expenses",
|
|
1975
|
+
title: "Plan expense events",
|
|
1976
|
+
fields: {
|
|
1977
|
+
id: {
|
|
1978
|
+
description: "Unique event identifier.",
|
|
1979
|
+
evidence: "export-shape",
|
|
1980
|
+
},
|
|
1981
|
+
name: {
|
|
1982
|
+
description: "Display label of the expense event.",
|
|
1983
|
+
evidence: "export-shape",
|
|
1984
|
+
},
|
|
1985
|
+
kind: {
|
|
1986
|
+
description: "Event category discriminator.",
|
|
1987
|
+
allowedValues: ["expense"],
|
|
1988
|
+
evidence: "export-shape",
|
|
1989
|
+
},
|
|
1990
|
+
type: {
|
|
1991
|
+
description: "Expense classification type.",
|
|
1992
|
+
allowedValues: ["living-expenses"],
|
|
1993
|
+
evidence: "export-shape",
|
|
1994
|
+
},
|
|
1995
|
+
spendingType: {
|
|
1996
|
+
description: "How the expense counts towards total spending.",
|
|
1997
|
+
allowedValues: ["essential", "discretionary", "hybrid", "none"],
|
|
1998
|
+
evidence: "observed",
|
|
1999
|
+
note: 'Offered as Essential, Discretionary, Hybrid ("Count a percentage of this expense as discretionary", the only state that uses discretionaryPercent) and Not Spending.',
|
|
2000
|
+
},
|
|
2001
|
+
amount: {
|
|
2002
|
+
description: "Scheduled expense amount in dollars.",
|
|
2003
|
+
units: DOLLARS,
|
|
2004
|
+
evidence: "export-shape",
|
|
2005
|
+
},
|
|
2006
|
+
"start.type": {
|
|
2007
|
+
description: "Timing reference mode for when the expense event begins.",
|
|
2008
|
+
allowedValues: ["date", "year", "age", "milestone", "lifeExpectancy", "lastLifeExpectancy", "keyword"],
|
|
2009
|
+
evidence: "export-shape",
|
|
2010
|
+
},
|
|
2011
|
+
"start.value": {
|
|
2012
|
+
description: "Target date, milestone identifier, or keyword for the start timing.",
|
|
2013
|
+
evidence: "export-shape",
|
|
2014
|
+
},
|
|
2015
|
+
"start.modifier": {
|
|
2016
|
+
description: "Optional offset modifier for the start timing.",
|
|
2017
|
+
evidence: "export-shape",
|
|
2018
|
+
},
|
|
2019
|
+
"end.type": {
|
|
2020
|
+
description: "Timing reference mode for when the expense event ends.",
|
|
2021
|
+
allowedValues: ["date", "year", "age", "milestone", "lifeExpectancy", "lastLifeExpectancy", "keyword"],
|
|
2022
|
+
evidence: "export-shape",
|
|
2023
|
+
},
|
|
2024
|
+
"end.value": {
|
|
2025
|
+
description: "Target date, milestone identifier, or keyword for the end timing.",
|
|
2026
|
+
evidence: "export-shape",
|
|
2027
|
+
},
|
|
2028
|
+
"end.modifier": {
|
|
2029
|
+
description: "Optional offset modifier for the end timing.",
|
|
2030
|
+
evidence: "export-shape",
|
|
2031
|
+
},
|
|
2032
|
+
// Entries carried from the ProjectionLab 4 registry for fields the
|
|
2033
|
+
// ProjectionLab 5 export shows.
|
|
2034
|
+
owner: {
|
|
2035
|
+
description: "Which household member the event belongs to.",
|
|
2036
|
+
allowedValues: ["me", "spouse", "joint"],
|
|
2037
|
+
evidence: "export-shape",
|
|
2038
|
+
},
|
|
2039
|
+
healthcareType: {
|
|
2040
|
+
description: "How a healthcare expense is modeled for tax treatment.",
|
|
2041
|
+
allowedValues: ["standard", "aca"],
|
|
2042
|
+
evidence: "observed",
|
|
2043
|
+
note: 'Labelled Healthcare Type. Offered as Standard, "Regular healthcare expense with no special tax treatment.", and ACA Marketplace, "ACA marketplace plan, with estimated Premium Tax Credit subsidy." The control is offered only on a US plan. The Auto and Manual deductibility selector is a derived chip, not a stored field: taxDeductible is the stored value.',
|
|
2044
|
+
},
|
|
2045
|
+
taxDeductible: {
|
|
2046
|
+
description: "When true, the expense reduces taxable income.",
|
|
2047
|
+
evidence: "export-shape",
|
|
2048
|
+
},
|
|
2049
|
+
repeat: {
|
|
2050
|
+
description: "When true, the event repeats on a cadence instead of occurring once.",
|
|
2051
|
+
evidence: "export-shape",
|
|
2052
|
+
},
|
|
2053
|
+
"yearlyChange.type": {
|
|
2054
|
+
description: "How the amount changes each year. \"increase\" and \"decrease\" take yearlyChange.amount as a percent, \"custom\" stores a curve in yearlyChange.custom, and \"match-inflation\", \"inflation+\" and \"inflation-\" follow the plan's inflation rate.",
|
|
2055
|
+
allowedValues: [
|
|
2056
|
+
"none",
|
|
2057
|
+
"increase",
|
|
2058
|
+
"decrease",
|
|
2059
|
+
"custom",
|
|
2060
|
+
"match-inflation",
|
|
2061
|
+
"inflation+",
|
|
2062
|
+
"inflation-",
|
|
2063
|
+
],
|
|
2064
|
+
enabledBy: 'frequency other than "once", or amountType "grow$"',
|
|
2065
|
+
evidence: "observed",
|
|
2066
|
+
note: "On an expense the pair is labelled Increase Spending and Decrease Spending, each described as changing spending by a certain percentage. The app validates nothing on write, so a token outside this list stores and renders as nothing.",
|
|
2067
|
+
},
|
|
2068
|
+
"yearlyChange.amount": {
|
|
2069
|
+
description: "Percent per year applied by yearlyChange.type \"increase\" or \"decrease\".",
|
|
2070
|
+
units: PCT,
|
|
2071
|
+
enabledBy: 'yearlyChange.type "increase" or "decrease"',
|
|
2072
|
+
evidence: "observed",
|
|
2073
|
+
note: "The percent per year field in the Change Over Time dialog, beside the Maximum field.",
|
|
2074
|
+
},
|
|
2075
|
+
"yearlyChange.limit": {
|
|
2076
|
+
description: "Dollar ceiling on the value the yearly change may reach.",
|
|
2077
|
+
units: DOLLARS,
|
|
2078
|
+
enabledBy: 'yearlyChange.limitEnabled with yearlyChange.type "increase" or "decrease"',
|
|
2079
|
+
evidence: "observed",
|
|
2080
|
+
note: 'The Maximum field in the Change Over Time dialog is a dollar field. Its unit is held by yearlyChange.limitType, so a percent token there changes nothing on screen.',
|
|
2081
|
+
},
|
|
2082
|
+
"yearlyChange.limitType": {
|
|
2083
|
+
description: "Unit of yearlyChange.limit.",
|
|
2084
|
+
allowedValues: ["$", "today$"],
|
|
2085
|
+
enabledBy: "yearlyChange.limitEnabled",
|
|
2086
|
+
evidence: "observed",
|
|
2087
|
+
note: 'Present on every yearlyChange object examined and always written "today$". The Maximum control offers no percent form.',
|
|
2088
|
+
},
|
|
2089
|
+
"yearlyChange.custom": {
|
|
2090
|
+
description: "The curve behind yearlyChange.type \"custom\": { type, data } where type is \"%\", \"$\" or \"today$\" and data is an array of { x, y } points.",
|
|
2091
|
+
enabledBy: 'yearlyChange.type "custom"',
|
|
2092
|
+
evidence: "observed",
|
|
2093
|
+
note: "Advanced opens a separate window with the curve editor. x is the year offset from the event start and y is the rate or amount in the unit named by type.",
|
|
2094
|
+
},
|
|
2095
|
+
fundWithAccounts: {
|
|
2096
|
+
description: "Plan account event IDs prioritized to pay this expense, such as an HSA for health care or a 529 for education.",
|
|
2097
|
+
evidence: "observed",
|
|
2098
|
+
note: "Array of accounts.events[].id values in the same plan, not Current Finances account IDs.",
|
|
2099
|
+
},
|
|
2100
|
+
},
|
|
2101
|
+
},
|
|
2102
|
+
{
|
|
2103
|
+
scope: "priorities",
|
|
2104
|
+
title: "Plan priorities (cash flow routing)",
|
|
2105
|
+
fields: {
|
|
2106
|
+
id: {
|
|
2107
|
+
description: "Unique event identifier.",
|
|
2108
|
+
evidence: "export-shape",
|
|
2109
|
+
},
|
|
2110
|
+
name: {
|
|
2111
|
+
description: "Display label of the priority flow.",
|
|
2112
|
+
evidence: "export-shape",
|
|
2113
|
+
},
|
|
2114
|
+
kind: {
|
|
2115
|
+
description: "Event category discriminator.",
|
|
2116
|
+
allowedValues: ["priority"],
|
|
2117
|
+
evidence: "export-shape",
|
|
2118
|
+
},
|
|
2119
|
+
type: {
|
|
2120
|
+
description: "Priority routing target type.",
|
|
2121
|
+
allowedValues: ["taxable"],
|
|
2122
|
+
evidence: "export-shape",
|
|
2123
|
+
},
|
|
2124
|
+
accountId: {
|
|
2125
|
+
description: "Identifier of the plan account event this priority routes cash to (an accounts.events[].id in the same plan), not a Current Finances account ID.",
|
|
2126
|
+
evidence: "export-shape",
|
|
2127
|
+
},
|
|
2128
|
+
// Entries carried from the ProjectionLab 4 registry for fields the
|
|
2129
|
+
// ProjectionLab 5 export shows.
|
|
2130
|
+
desiredContribution: {
|
|
2131
|
+
description: "How much the flow receives from surplus cash flow.",
|
|
2132
|
+
allowedValues: ["max", "%-remaining", "amount", "%-balance"],
|
|
2133
|
+
evidence: "observed",
|
|
2134
|
+
note: 'Offered as Maximize Contribution ("max"), % of Remaining Income ("%-remaining") and Specific Amount ("amount"). "%-balance", % of Remaining Balance, is a real token the flow editor does not request: only the extra-contribution control asks for it, so a flow normally holds one of the first three.',
|
|
2135
|
+
},
|
|
2136
|
+
amount: {
|
|
2137
|
+
description: 'Dollar amount the flow takes when desiredContribution is "amount".',
|
|
2138
|
+
units: DOLLARS,
|
|
2139
|
+
evidence: "export-shape",
|
|
2140
|
+
},
|
|
2141
|
+
},
|
|
2142
|
+
},
|
|
2143
|
+
{
|
|
2144
|
+
scope: "milestones",
|
|
2145
|
+
title: "Plan milestones",
|
|
2146
|
+
fields: {
|
|
2147
|
+
id: {
|
|
2148
|
+
description: "Unique identifier of the milestone.",
|
|
2149
|
+
evidence: "export-shape",
|
|
2150
|
+
},
|
|
2151
|
+
name: {
|
|
2152
|
+
description: "Display label of the milestone.",
|
|
2153
|
+
evidence: "export-shape",
|
|
2154
|
+
},
|
|
2155
|
+
"criteria.*.type": {
|
|
2156
|
+
description: "Kind of milestone criterion.",
|
|
2157
|
+
allowedValues: ["date", "year", "milestone", "netWorth", "totalDebt", "age"],
|
|
2158
|
+
evidence: "export-shape",
|
|
2159
|
+
},
|
|
2160
|
+
"criteria.*.value": {
|
|
2161
|
+
description: "Target value of the criterion.",
|
|
2162
|
+
evidence: "export-shape",
|
|
2163
|
+
},
|
|
2164
|
+
"criteria.*.modifier": {
|
|
2165
|
+
description: "Offset modifier for the criterion.",
|
|
2166
|
+
evidence: "export-shape",
|
|
2167
|
+
},
|
|
2168
|
+
"criteria.*.years": {
|
|
2169
|
+
description: "Age the criterion is met at, for an age criterion.",
|
|
2170
|
+
units: YEARS,
|
|
2171
|
+
evidence: "export-shape",
|
|
2172
|
+
},
|
|
2173
|
+
"criteria.*.precision": {
|
|
2174
|
+
description: "How finely an age criterion is resolved.",
|
|
2175
|
+
evidence: "export-shape",
|
|
2176
|
+
note: 'Observed value: "yearly".',
|
|
2177
|
+
},
|
|
2178
|
+
},
|
|
2179
|
+
},
|
|
2180
|
+
VARIABLES_V5_GROUP,
|
|
2181
|
+
MONTECARLO_V5_GROUP,
|
|
2182
|
+
WITHDRAWAL_STRATEGY_V5_GROUP,
|
|
2183
|
+
{
|
|
2184
|
+
scope: "settings",
|
|
2185
|
+
title: "Application and plan settings",
|
|
2186
|
+
fields: {
|
|
2187
|
+
schema: {
|
|
2188
|
+
description: "Settings document schema version (5 in ProjectionLab 5).",
|
|
2189
|
+
units: "count",
|
|
2190
|
+
evidence: "export-shape",
|
|
2191
|
+
},
|
|
2192
|
+
seenVersion: {
|
|
2193
|
+
description: "Last recorded application version.",
|
|
2194
|
+
evidence: "export-shape",
|
|
2195
|
+
},
|
|
2196
|
+
"plan.activeId": {
|
|
2197
|
+
description: "Active plan identifier in the application interface. Reported as stored; it does not tell which plan the user is working in, and the server never treats it as the selected plan.",
|
|
2198
|
+
evidence: "export-shape",
|
|
2199
|
+
},
|
|
2200
|
+
"plan.baselineId": {
|
|
2201
|
+
description: "Baseline comparison plan identifier. Reported as stored.",
|
|
2202
|
+
evidence: "export-shape",
|
|
2203
|
+
},
|
|
2204
|
+
"plan.alignment.type": {
|
|
2205
|
+
description: "Account year alignment: where each plan year starts, for every plan without its own alignment.",
|
|
2206
|
+
allowedValues: ALIGNMENT_TYPES,
|
|
2207
|
+
evidence: "observed",
|
|
2208
|
+
note: ALIGNMENT_NOTE,
|
|
2209
|
+
},
|
|
2210
|
+
"plan.alignment.date": {
|
|
2211
|
+
description: ALIGNMENT_DATE_DESCRIPTION,
|
|
2212
|
+
enabledBy: 'plan.alignment.type "custom", "au-tax" or "uk-tax"',
|
|
2213
|
+
evidence: "observed",
|
|
2214
|
+
},
|
|
2215
|
+
"plan.tabs.pinned": {
|
|
2216
|
+
description: "Whether plan tabs are pinned in the interface.",
|
|
2217
|
+
evidence: "export-shape",
|
|
2218
|
+
},
|
|
2219
|
+
"plugins.enabled": {
|
|
2220
|
+
description: "Whether the Plugin API is enabled.",
|
|
2221
|
+
evidence: "export-shape",
|
|
2222
|
+
},
|
|
2223
|
+
"plugins.apiKey": {
|
|
2224
|
+
description: "Secret authentication key for the Plugin API (redacted on reads).",
|
|
2225
|
+
evidence: "export-shape",
|
|
2226
|
+
},
|
|
2227
|
+
},
|
|
2228
|
+
},
|
|
2229
|
+
{
|
|
2230
|
+
scope: "accountHistory",
|
|
2231
|
+
title: "Account history",
|
|
2232
|
+
fields: {
|
|
2233
|
+
"*.*.schema": {
|
|
2234
|
+
description: "History record schema version (5 in ProjectionLab 5).",
|
|
2235
|
+
units: "count",
|
|
2236
|
+
evidence: "export-shape",
|
|
2237
|
+
note: "Keyed by account ID then calendar year.",
|
|
2238
|
+
},
|
|
2239
|
+
"*.*.kind": {
|
|
2240
|
+
description: "Account category discriminator.",
|
|
2241
|
+
allowedValues: ["account", "real-asset"],
|
|
2242
|
+
evidence: "export-shape",
|
|
2243
|
+
},
|
|
2244
|
+
"*.*.balance.*": {
|
|
2245
|
+
description: "Historical end-of-year balance in dollars for an account, keyed by account ID.",
|
|
2246
|
+
units: DOLLARS,
|
|
2247
|
+
evidence: "export-shape",
|
|
2248
|
+
},
|
|
2249
|
+
"*.*.costBasis.*": {
|
|
2250
|
+
description: "Historical end-of-year cost basis in dollars for an account, keyed by account ID.",
|
|
2251
|
+
units: DOLLARS,
|
|
2252
|
+
evidence: "export-shape",
|
|
2253
|
+
},
|
|
2254
|
+
"*.*.value.*": {
|
|
2255
|
+
description: "Historical end-of-year estimated value in dollars for a real asset, keyed by asset ID.",
|
|
2256
|
+
units: DOLLARS,
|
|
2257
|
+
evidence: "export-shape",
|
|
2258
|
+
},
|
|
2259
|
+
},
|
|
2260
|
+
},
|
|
2261
|
+
];
|
|
2262
|
+
/**
|
|
2263
|
+
* On-screen labels in ProjectionLab 5.0.0, keyed by scope then path. Each was
|
|
2264
|
+
* found in the app by writing a distinct value to the field, or by matching a
|
|
2265
|
+
* stored value to the control that shows it. A label attaches to the entry for
|
|
2266
|
+
* its path in every export layout that lists the path.
|
|
2267
|
+
*/
|
|
2268
|
+
const RATES = "Plan Settings > Rates";
|
|
2269
|
+
const TAX = "Plan Settings > Tax";
|
|
2270
|
+
const ESTATE = "Plan overview > Estate Settings";
|
|
2271
|
+
const MC_DATA = "Chance of Success > Data Sources";
|
|
2272
|
+
const TEXTBOOK = "Optimize > Drawdown Strategy > Textbook Withdrawals";
|
|
2273
|
+
const strategyAt = (name) => `${TEXTBOOK}, Strategy "${name}"`;
|
|
2274
|
+
const INCOME = "Plan > income event";
|
|
2275
|
+
const EXPENSE = "Plan > expense event";
|
|
2276
|
+
const DETAILS = "Net Worth > account or asset > Details (also the Details tab in the plan)";
|
|
2277
|
+
const ACCOUNT_PLAN = "Plan > Accounts > account > Plan";
|
|
2278
|
+
const ACCOUNT_SETTINGS = "Plan > Accounts > account > Settings";
|
|
2279
|
+
const ASSET_PLAN = "Plan > real asset > Plan";
|
|
2280
|
+
const FLOW = "Plan > Flows > flow";
|
|
2281
|
+
const HOUSEHOLD = "Profile menu > Household";
|
|
2282
|
+
const changeOverTime = (event) => ({
|
|
2283
|
+
"yearlyChange.type": ["Change", `${event} > Change Over Time`],
|
|
2284
|
+
"yearlyChange.amount": ["Percent per year", `${event} > Change Over Time (Increase or Decrease)`],
|
|
2285
|
+
"yearlyChange.limit": ["Maximum", `${event} > Change Over Time (Increase or Decrease)`],
|
|
2286
|
+
});
|
|
2287
|
+
export const UI_LABELS_V5 = {
|
|
2288
|
+
variables: {
|
|
2289
|
+
inflation: ["Inflation Rate", `${RATES} (Fixed mode)`],
|
|
2290
|
+
investmentReturn: ["Stock Growth Rate", `${RATES} (Fixed mode)`],
|
|
2291
|
+
dividendRate: ["Stock Dividend Yield", `${RATES} (Fixed mode)`],
|
|
2292
|
+
bondInvestmentReturn: ["Bond Growth Rate", `${RATES} (Fixed mode)`],
|
|
2293
|
+
bondDividendRate: ["Bond Yield", `${RATES} (Fixed mode)`],
|
|
2294
|
+
benefitColaModifier: ["Benefit COLA Modifier", RATES],
|
|
2295
|
+
startYear: ["Start Year", `${RATES} (Historical mode)`],
|
|
2296
|
+
loopYear: ["Loopback Year", `${RATES} (Historical mode)`],
|
|
2297
|
+
"dividendSettings.composition.qualifiedPercent": [
|
|
2298
|
+
"Qualified Dividends",
|
|
2299
|
+
"Plan Settings > Dividends > Stock Dividend Composition",
|
|
2300
|
+
],
|
|
2301
|
+
"bondSettings.composition.municipalPercent": [
|
|
2302
|
+
"Municipal Bonds",
|
|
2303
|
+
"Plan Settings > Bonds > Bond Income Composition",
|
|
2304
|
+
],
|
|
2305
|
+
"bondSettings.composition.treasuryPercent": [
|
|
2306
|
+
"Treasury / Government",
|
|
2307
|
+
"Plan Settings > Bonds > Bond Income Composition",
|
|
2308
|
+
],
|
|
2309
|
+
"withholding.taxDeferred": ["Tax-Deferred Withdrawals", `${TAX} > Withholding`],
|
|
2310
|
+
"withholding.taxable": ["Taxable Withdrawals", `${TAX} > Withholding`],
|
|
2311
|
+
"withholding.conversions": ["Conversions", `${TAX} > Withholding`],
|
|
2312
|
+
incomeTaxModifier: ["Income Tax Modifier", `${TAX} > More Options`],
|
|
2313
|
+
capGainsModifier: ["Capital Gains Tax Modifier", `${TAX} > More Options`],
|
|
2314
|
+
"taxStrategy.bracketRate": ["Tax Bracket", "Plan overview > Tax Strategy"],
|
|
2315
|
+
"estate.taxDeferredRate": ["Tax-Deferred Account Tax Rate", ESTATE],
|
|
2316
|
+
"estate.assetLiquidationFee": ["Liquidation Costs", ESTATE],
|
|
2317
|
+
"estate.charityRate": ["Charitable Giving", ESTATE],
|
|
2318
|
+
"estate.adminRate": ["Administrative Costs", ESTATE],
|
|
2319
|
+
},
|
|
2320
|
+
montecarlo: {
|
|
2321
|
+
investmentReturnMean: ["Mean", `${MC_DATA} > Stock Growth Rate`],
|
|
2322
|
+
investmentReturnStdDev: ["Std. Dev.", `${MC_DATA} > Stock Growth Rate`],
|
|
2323
|
+
dividendRateMean: ["Mean", `${MC_DATA} > Stock Dividend Yield`],
|
|
2324
|
+
dividendRateStdDev: ["Std. Dev.", `${MC_DATA} > Stock Dividend Yield`],
|
|
2325
|
+
inflationMean: ["Mean", `${MC_DATA} > Inflation`],
|
|
2326
|
+
inflationStdDev: ["Std. Dev.", `${MC_DATA} > Inflation`],
|
|
2327
|
+
bondReturnMean: ["Mean", `${MC_DATA} > Bond Returns (Normal Distribution)`],
|
|
2328
|
+
bondReturnStdDev: ["Std. Dev.", `${MC_DATA} > Bond Returns (Normal Distribution)`],
|
|
2329
|
+
},
|
|
2330
|
+
withdrawalStrategy: {
|
|
2331
|
+
enabled: ["Textbook Strategy", TEXTBOOK],
|
|
2332
|
+
"initial-%.amount": ["Initial Withdrawal", strategyAt("Initial Percentage")],
|
|
2333
|
+
"fixed-%.amount": ["Yearly Withdrawal", strategyAt("Fixed Percentage")],
|
|
2334
|
+
"fixed-amount.amount": ["The amount withdrawn each year", strategyAt("Fixed Amount")],
|
|
2335
|
+
"kitces-ratchet.amount": [
|
|
2336
|
+
"Initial Withdrawal",
|
|
2337
|
+
strategyAt("Ratcheting Safe Withdrawal Rate"),
|
|
2338
|
+
],
|
|
2339
|
+
"kitces-ratchet.threshold": [
|
|
2340
|
+
"Ratchet Threshold",
|
|
2341
|
+
strategyAt("Ratcheting Safe Withdrawal Rate"),
|
|
2342
|
+
],
|
|
2343
|
+
"kitces-ratchet.ratchet": [
|
|
2344
|
+
"Ratchet Increase",
|
|
2345
|
+
strategyAt("Ratcheting Safe Withdrawal Rate"),
|
|
2346
|
+
],
|
|
2347
|
+
"kitces-ratchet.cooldown": [
|
|
2348
|
+
"The years to wait between ratchets",
|
|
2349
|
+
strategyAt("Ratcheting Safe Withdrawal Rate"),
|
|
2350
|
+
],
|
|
2351
|
+
"clyatt-95%.amount": ["Portfolio Share", strategyAt("Clyatt 95% Rule")],
|
|
2352
|
+
"clyatt-95%.percentOfPrevious": [
|
|
2353
|
+
"Previous Withdrawal Floor",
|
|
2354
|
+
strategyAt("Clyatt 95% Rule"),
|
|
2355
|
+
],
|
|
2356
|
+
"guyton-klinger.amount": ["Initial Withdrawal", strategyAt("Guyton-Klinger")],
|
|
2357
|
+
"guyton-klinger.guardrail": ["Guardrail", strategyAt("Guyton-Klinger")],
|
|
2358
|
+
"guyton-klinger.adjustment": ["Adjustment", strategyAt("Guyton-Klinger")],
|
|
2359
|
+
},
|
|
2360
|
+
income: {
|
|
2361
|
+
amount: ["Amount", `${INCOME} (Enter Amount mode for Social Security)`],
|
|
2362
|
+
owner: ["Earner", INCOME],
|
|
2363
|
+
estimateIncome: ["Estimate Benefit or Enter Amount", `${INCOME} (Social Security)`],
|
|
2364
|
+
primaryInsuranceAmount: [
|
|
2365
|
+
"Primary Insurance Amount",
|
|
2366
|
+
`${INCOME} (Social Security, Estimate Benefit mode)`,
|
|
2367
|
+
],
|
|
2368
|
+
expectedPercent: ["Expected Percentage", `${INCOME} (Social Security)`],
|
|
2369
|
+
...changeOverTime(INCOME),
|
|
2370
|
+
},
|
|
2371
|
+
expenses: {
|
|
2372
|
+
amount: ["Amount", EXPENSE],
|
|
2373
|
+
owner: ["Spender", EXPENSE],
|
|
2374
|
+
spendingType: ["Spending Type", `${EXPENSE} > Flexibility`],
|
|
2375
|
+
healthcareType: ["Healthcare Type", `${EXPENSE} (health care)`],
|
|
2376
|
+
taxDeductible: ["Tax-Deductible", EXPENSE],
|
|
2377
|
+
fundWithAccounts: ["Funding Source", `${EXPENSE} > Pay From`],
|
|
2378
|
+
repeat: ["Recurrence", `${EXPENSE} (More Options > Advanced Options on)`],
|
|
2379
|
+
...changeOverTime(EXPENSE),
|
|
2380
|
+
},
|
|
2381
|
+
accounts: {
|
|
2382
|
+
name: ["Name", DETAILS],
|
|
2383
|
+
owner: ["Owner", DETAILS],
|
|
2384
|
+
type: ["Type", DETAILS],
|
|
2385
|
+
balance: ["Balance", DETAILS],
|
|
2386
|
+
costBasis: ["Cost Basis", `${DETAILS} ("Past Contributions" on a Roth account)`],
|
|
2387
|
+
value: ["Current Value", DETAILS],
|
|
2388
|
+
purchasePrice: ["Purchase Price", DETAILS],
|
|
2389
|
+
investmentGrowthRate: ["Growth Rate", `${ACCOUNT_PLAN} > Growth`],
|
|
2390
|
+
dividendRate: ["Dividend Yield", `${ACCOUNT_PLAN} > Growth`],
|
|
2391
|
+
yearlyFee: ["Yearly Fee", `${ACCOUNT_PLAN} > Fees`],
|
|
2392
|
+
withdraw: ["Withdrawals", `${ACCOUNT_PLAN} > Withdrawals`],
|
|
2393
|
+
withdrawAge: ["Withdrawals", `${ACCOUNT_PLAN} > Withdrawals`],
|
|
2394
|
+
rmdType: ["Rules", `${ACCOUNT_PLAN} > RMDs`],
|
|
2395
|
+
EWAge: ["Qualified Age", ACCOUNT_SETTINGS],
|
|
2396
|
+
hasEWPenalty: ["Early Withdrawal Penalties", ACCOUNT_SETTINGS],
|
|
2397
|
+
EWPenaltyRate: ["Penalty Rate", ACCOUNT_SETTINGS],
|
|
2398
|
+
},
|
|
2399
|
+
assets: {
|
|
2400
|
+
value: ["Current Value", DETAILS],
|
|
2401
|
+
purchasePrice: ["Purchase Price", DETAILS],
|
|
2402
|
+
"start.type": ["Purchase Date", `${ASSET_PLAN} > Purchase (future purchase)`],
|
|
2403
|
+
paymentMethod: ["Payment Method", `${ASSET_PLAN} > Purchase (future purchase)`],
|
|
2404
|
+
downPayment: ["Down Payment", `${ASSET_PLAN} > Financing`],
|
|
2405
|
+
interestRate: ["Annual Percentage Rate", `${ASSET_PLAN} > Financing`],
|
|
2406
|
+
interestType: ["Interest Type", `${ASSET_PLAN} > Financing`],
|
|
2407
|
+
compounding: ["Compounding", `${ASSET_PLAN} > Financing`],
|
|
2408
|
+
monthlyPayment: ["Monthly Payment", `${ASSET_PLAN} > Financing`],
|
|
2409
|
+
generateIncome: ["Generate rental income", `${ASSET_PLAN} > Usage`],
|
|
2410
|
+
"yearlyChange.type": ["Change Over Time", `${ASSET_PLAN} > Change Over Time`],
|
|
2411
|
+
taxRate: ["Yearly Property Tax", `${ASSET_PLAN} > Taxes ("Taxes" on a vehicle)`],
|
|
2412
|
+
maintenanceRate: ["Yearly Maintenance Costs", `${ASSET_PLAN} > Expenses`],
|
|
2413
|
+
insuranceRate: ["Yearly Insurance Costs", `${ASSET_PLAN} > Expenses`],
|
|
2414
|
+
monthlyHOA: ["Monthly HOA Fees", `${ASSET_PLAN} > Expenses`],
|
|
2415
|
+
"end.type": ["Timing", `${ASSET_PLAN} > Sale`],
|
|
2416
|
+
repeat: ["Repeat", `${ASSET_PLAN} > Recurrence`],
|
|
2417
|
+
sellIfNeeded: ["Liquidate if Necessary", `${ASSET_PLAN} > More Options`],
|
|
2418
|
+
},
|
|
2419
|
+
priorities: {
|
|
2420
|
+
accountId: ["Account", FLOW],
|
|
2421
|
+
amount: ["Funding", FLOW],
|
|
2422
|
+
desiredContribution: ["Goal", `${FLOW} (offered as Maximize Contribution, % of Remaining Income or Specific Amount)`],
|
|
2423
|
+
},
|
|
2424
|
+
currentFinances: {
|
|
2425
|
+
"household.people.me.name": ["First Name", HOUSEHOLD],
|
|
2426
|
+
"household.people.me.birthYear": ["Born", HOUSEHOLD],
|
|
2427
|
+
"household.people.me.lifeExpectancy": ["Life Expectancy", HOUSEHOLD],
|
|
2428
|
+
"household.people.spouse.name": ["First Name", `${HOUSEHOLD} (partner)`],
|
|
2429
|
+
"household.people.spouse.birthYear": ["Born", `${HOUSEHOLD} (partner)`],
|
|
2430
|
+
"household.people.spouse.lifeExpectancy": ["Life Expectancy", `${HOUSEHOLD} (partner)`],
|
|
2431
|
+
},
|
|
2432
|
+
};
|
|
2433
|
+
for (const [scope, labels] of Object.entries(UI_LABELS_V5)) {
|
|
2434
|
+
const groups = [...DATA_MODEL_GROUPS, ...DATA_MODEL_V5_GROUPS].filter((candidate) => candidate.scope === scope);
|
|
2435
|
+
for (const [path, [label, location]] of Object.entries(labels)) {
|
|
2436
|
+
const fields = groups.flatMap((group) => group.fields[path] ?? []);
|
|
2437
|
+
if (fields.length === 0) {
|
|
2438
|
+
throw new Error(`UI label for unknown data model path ${scope}.${path}`);
|
|
2439
|
+
}
|
|
2440
|
+
for (const field of fields) {
|
|
2441
|
+
field.uiLabel = label;
|
|
2442
|
+
field.uiLocation = location;
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
}
|
|
2446
|
+
const compiledByScopeV4 = new Map();
|
|
1354
2447
|
for (const group of DATA_MODEL_GROUPS) {
|
|
1355
2448
|
const entries = [];
|
|
1356
2449
|
for (const [pattern, field] of Object.entries(group.fields)) {
|
|
1357
2450
|
entries.push({ pattern, segments: pattern.split("."), field });
|
|
1358
2451
|
}
|
|
1359
|
-
|
|
2452
|
+
compiledByScopeV4.set(group.scope, entries);
|
|
2453
|
+
}
|
|
2454
|
+
const compiledByScopeV5 = new Map();
|
|
2455
|
+
for (const group of DATA_MODEL_V5_GROUPS) {
|
|
2456
|
+
const entries = [];
|
|
2457
|
+
for (const [pattern, field] of Object.entries(group.fields)) {
|
|
2458
|
+
entries.push({ pattern, segments: pattern.split("."), field });
|
|
2459
|
+
}
|
|
2460
|
+
compiledByScopeV5.set(group.scope, entries);
|
|
1360
2461
|
}
|
|
1361
2462
|
function entryMatches(segments, pathSegments) {
|
|
1362
2463
|
if (segments.length !== pathSegments.length)
|
|
@@ -1367,9 +2468,14 @@ function entryMatches(segments, pathSegments) {
|
|
|
1367
2468
|
}
|
|
1368
2469
|
return true;
|
|
1369
2470
|
}
|
|
2471
|
+
/** Get the data model groups for the specified export layout. */
|
|
2472
|
+
export function getDataModelGroups(layout = "v4") {
|
|
2473
|
+
return layout === "v5" ? DATA_MODEL_V5_GROUPS : DATA_MODEL_GROUPS;
|
|
2474
|
+
}
|
|
1370
2475
|
/** Field entry for a scope-prefixed concrete path, or undefined. */
|
|
1371
|
-
export function matchDataModelField(scope, path) {
|
|
1372
|
-
const
|
|
2476
|
+
export function matchDataModelField(scope, path, layout = "v4") {
|
|
2477
|
+
const map = layout === "v5" ? compiledByScopeV5 : compiledByScopeV4;
|
|
2478
|
+
const entries = map.get(scope);
|
|
1373
2479
|
if (!entries)
|
|
1374
2480
|
return undefined;
|
|
1375
2481
|
const exact = entries.find((entry) => entry.pattern === path);
|
|
@@ -1385,21 +2491,38 @@ export function matchDataModelField(scope, path) {
|
|
|
1385
2491
|
return undefined;
|
|
1386
2492
|
}
|
|
1387
2493
|
/**
|
|
1388
|
-
*
|
|
2494
|
+
* Whether a write of a value outside an entry's `allowedValues` is refused.
|
|
2495
|
+
* Only an observed entry binds a write: its field is confirmed by a
|
|
2496
|
+
* stored-value test and its list is held as the app's own set of choices. A
|
|
2497
|
+
* ui-label or export-shape list is a hint and may leave choices the app offers
|
|
2498
|
+
* out of it.
|
|
2499
|
+
*/
|
|
2500
|
+
export function enforcesAllowedValues(field) {
|
|
2501
|
+
return field.evidence === "observed";
|
|
2502
|
+
}
|
|
2503
|
+
/**
|
|
2504
|
+
* Copy listed values, attaching description, units, allowedValues with its
|
|
2505
|
+
* allowedValuesEnforced, and the ProjectionLab 5.0.0 uiLabel and uiLocation for
|
|
1389
2506
|
* paths with a registry entry. Entries for unknown paths are returned
|
|
1390
2507
|
* unchanged, so existing listPaths fields never change.
|
|
1391
2508
|
*/
|
|
1392
|
-
export function annotateAddressableValues(scope, values) {
|
|
2509
|
+
export function annotateAddressableValues(scope, values, layout = "v4") {
|
|
1393
2510
|
return values.map((value) => {
|
|
1394
|
-
const field = scope ? matchDataModelField(scope, value.path) : undefined;
|
|
2511
|
+
const field = scope ? matchDataModelField(scope, value.path, layout) : undefined;
|
|
1395
2512
|
if (!field)
|
|
1396
2513
|
return value;
|
|
1397
2514
|
const annotated = { ...value };
|
|
1398
2515
|
annotated.description = field.description;
|
|
1399
2516
|
if (field.units)
|
|
1400
2517
|
annotated.units = field.units;
|
|
1401
|
-
if (field.allowedValues)
|
|
2518
|
+
if (field.allowedValues) {
|
|
1402
2519
|
annotated.allowedValues = field.allowedValues;
|
|
2520
|
+
annotated.allowedValuesEnforced = enforcesAllowedValues(field);
|
|
2521
|
+
}
|
|
2522
|
+
if (field.uiLabel)
|
|
2523
|
+
annotated.uiLabel = field.uiLabel;
|
|
2524
|
+
if (field.uiLocation)
|
|
2525
|
+
annotated.uiLocation = field.uiLocation;
|
|
1403
2526
|
return annotated;
|
|
1404
2527
|
});
|
|
1405
2528
|
}
|
|
@@ -1408,19 +2531,19 @@ export function annotateAddressableValues(scope, values) {
|
|
|
1408
2531
|
* string outside it. undefined when no refusal applies. Numeric and boolean
|
|
1409
2532
|
* values are never refused; ui-label enums are annotated but not enforced.
|
|
1410
2533
|
*/
|
|
1411
|
-
export function refusedEnumChoices(scope, path, value) {
|
|
2534
|
+
export function refusedEnumChoices(scope, path, value, layout = "v4") {
|
|
1412
2535
|
if (scope === undefined || typeof value !== "string")
|
|
1413
2536
|
return undefined;
|
|
1414
|
-
const field = matchDataModelField(scope, path);
|
|
1415
|
-
if (!field?.allowedValues || field
|
|
2537
|
+
const field = matchDataModelField(scope, path, layout);
|
|
2538
|
+
if (!field?.allowedValues || !enforcesAllowedValues(field))
|
|
1416
2539
|
return undefined;
|
|
1417
2540
|
if (field.allowedValues.includes(value))
|
|
1418
2541
|
return undefined;
|
|
1419
2542
|
return field.allowedValues;
|
|
1420
2543
|
}
|
|
1421
2544
|
/** Refusal for a value a write sets outside an observed enum's choices. */
|
|
1422
|
-
export function enumRefusalError(scope, path, value) {
|
|
1423
|
-
const choices = refusedEnumChoices(scope, path, value);
|
|
2545
|
+
export function enumRefusalError(scope, path, value, layout = "v4") {
|
|
2546
|
+
const choices = refusedEnumChoices(scope, path, value, layout);
|
|
1424
2547
|
if (!choices)
|
|
1425
2548
|
return undefined;
|
|
1426
2549
|
const shown = typeof value === "string" ? JSON.stringify(value) : String(value);
|