@contractspec/example.wealth-snapshot 1.57.0 → 1.59.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.
Files changed (72) hide show
  1. package/dist/browser/docs/index.js +93 -0
  2. package/dist/browser/docs/wealth-snapshot.docblock.js +93 -0
  3. package/dist/browser/entities/index.js +191 -0
  4. package/dist/browser/events.js +111 -0
  5. package/dist/browser/example.js +42 -0
  6. package/dist/browser/handlers/index.js +5 -0
  7. package/dist/browser/index.js +885 -0
  8. package/dist/browser/operations/index.js +238 -0
  9. package/dist/browser/presentations/index.js +11 -0
  10. package/dist/browser/presentations.js +124 -0
  11. package/dist/browser/wealth-snapshot.capability.js +40 -0
  12. package/dist/browser/wealth-snapshot.feature.js +72 -0
  13. package/dist/docs/index.d.ts +2 -1
  14. package/dist/docs/index.d.ts.map +1 -0
  15. package/dist/docs/index.js +94 -1
  16. package/dist/docs/wealth-snapshot.docblock.d.ts +2 -1
  17. package/dist/docs/wealth-snapshot.docblock.d.ts.map +1 -0
  18. package/dist/docs/wealth-snapshot.docblock.js +45 -55
  19. package/dist/entities/index.d.ts +120 -125
  20. package/dist/entities/index.d.ts.map +1 -1
  21. package/dist/entities/index.js +181 -219
  22. package/dist/events.d.ts +167 -173
  23. package/dist/events.d.ts.map +1 -1
  24. package/dist/events.js +103 -172
  25. package/dist/example.d.ts +2 -6
  26. package/dist/example.d.ts.map +1 -1
  27. package/dist/example.js +41 -54
  28. package/dist/handlers/index.d.ts +1 -4
  29. package/dist/handlers/index.d.ts.map +1 -1
  30. package/dist/handlers/index.js +5 -8
  31. package/dist/index.d.ts +12 -16
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +882 -23
  34. package/dist/node/docs/index.js +93 -0
  35. package/dist/node/docs/wealth-snapshot.docblock.js +93 -0
  36. package/dist/node/entities/index.js +191 -0
  37. package/dist/node/events.js +111 -0
  38. package/dist/node/example.js +42 -0
  39. package/dist/node/handlers/index.js +5 -0
  40. package/dist/node/index.js +885 -0
  41. package/dist/node/operations/index.js +238 -0
  42. package/dist/node/presentations/index.js +11 -0
  43. package/dist/node/presentations.js +124 -0
  44. package/dist/node/wealth-snapshot.capability.js +40 -0
  45. package/dist/node/wealth-snapshot.feature.js +72 -0
  46. package/dist/operations/index.d.ts +392 -398
  47. package/dist/operations/index.d.ts.map +1 -1
  48. package/dist/operations/index.js +237 -425
  49. package/dist/presentations/index.d.ts +1 -4
  50. package/dist/presentations/index.d.ts.map +1 -1
  51. package/dist/presentations/index.js +11 -11
  52. package/dist/presentations.d.ts +5 -10
  53. package/dist/presentations.d.ts.map +1 -1
  54. package/dist/presentations.js +120 -127
  55. package/dist/wealth-snapshot.capability.d.ts +3 -8
  56. package/dist/wealth-snapshot.capability.d.ts.map +1 -1
  57. package/dist/wealth-snapshot.capability.js +41 -46
  58. package/dist/wealth-snapshot.feature.d.ts +1 -6
  59. package/dist/wealth-snapshot.feature.d.ts.map +1 -1
  60. package/dist/wealth-snapshot.feature.js +71 -139
  61. package/package.json +144 -37
  62. package/dist/docs/wealth-snapshot.docblock.js.map +0 -1
  63. package/dist/entities/index.js.map +0 -1
  64. package/dist/events.js.map +0 -1
  65. package/dist/example.js.map +0 -1
  66. package/dist/handlers/index.js.map +0 -1
  67. package/dist/index.js.map +0 -1
  68. package/dist/operations/index.js.map +0 -1
  69. package/dist/presentations/index.js.map +0 -1
  70. package/dist/presentations.js.map +0 -1
  71. package/dist/wealth-snapshot.capability.js.map +0 -1
  72. package/dist/wealth-snapshot.feature.js.map +0 -1
@@ -1,141 +1,73 @@
1
+ // @bun
2
+ // src/wealth-snapshot.feature.ts
1
3
  import { defineFeature } from "@contractspec/lib.contracts";
2
-
3
- //#region src/wealth-snapshot.feature.ts
4
- const WealthSnapshotFeature = defineFeature({
5
- meta: {
6
- key: "wealth-snapshot",
7
- version: "1.0.0",
8
- title: "Wealth Snapshot",
9
- description: "Mini-app for accounts, assets, liabilities, goals, and net worth.",
10
- domain: "finance",
11
- owners: ["@wealth-snapshot"],
12
- tags: [
13
- "finance",
14
- "net-worth",
15
- "goals"
16
- ],
17
- stability: "experimental"
18
- },
19
- operations: [
20
- {
21
- key: "wealth.account.create",
22
- version: "1.0.0"
23
- },
24
- {
25
- key: "wealth.asset.add",
26
- version: "1.0.0"
27
- },
28
- {
29
- key: "wealth.liability.add",
30
- version: "1.0.0"
31
- },
32
- {
33
- key: "wealth.goal.create",
34
- version: "1.0.0"
35
- },
36
- {
37
- key: "wealth.goal.update",
38
- version: "1.0.0"
39
- },
40
- {
41
- key: "wealth.networth.get",
42
- version: "1.0.0"
43
- }
44
- ],
45
- events: [
46
- {
47
- key: "wealth.asset.added",
48
- version: "1.0.0"
49
- },
50
- {
51
- key: "wealth.liability.added",
52
- version: "1.0.0"
53
- },
54
- {
55
- key: "wealth.goal.updated",
56
- version: "1.0.0"
57
- },
58
- {
59
- key: "wealth.networth.snapshot_created",
60
- version: "1.0.0"
61
- }
62
- ],
63
- presentations: [
64
- {
65
- key: "wealth-snapshot.dashboard",
66
- version: "1.0.0"
67
- },
68
- {
69
- key: "wealth-snapshot.accounts.list",
70
- version: "1.0.0"
71
- },
72
- {
73
- key: "wealth-snapshot.assets.list",
74
- version: "1.0.0"
75
- },
76
- {
77
- key: "wealth-snapshot.liabilities.list",
78
- version: "1.0.0"
79
- },
80
- {
81
- key: "wealth-snapshot.goals.list",
82
- version: "1.0.0"
83
- }
84
- ],
85
- presentationsTargets: [
86
- {
87
- key: "wealth-snapshot.dashboard",
88
- version: "1.0.0",
89
- targets: ["react", "markdown"]
90
- },
91
- {
92
- key: "wealth-snapshot.assets.list",
93
- version: "1.0.0",
94
- targets: ["react", "markdown"]
95
- },
96
- {
97
- key: "wealth-snapshot.liabilities.list",
98
- version: "1.0.0",
99
- targets: ["react", "markdown"]
100
- },
101
- {
102
- key: "wealth-snapshot.goals.list",
103
- version: "1.0.0",
104
- targets: ["react", "markdown"]
105
- }
106
- ],
107
- capabilities: {
108
- requires: [
109
- {
110
- key: "identity",
111
- version: "1.0.0"
112
- },
113
- {
114
- key: "audit-trail",
115
- version: "1.0.0"
116
- },
117
- {
118
- key: "notifications",
119
- version: "1.0.0"
120
- }
121
- ],
122
- provides: [
123
- {
124
- key: "accounts",
125
- version: "1.0.0"
126
- },
127
- {
128
- key: "net-worth",
129
- version: "1.0.0"
130
- },
131
- {
132
- key: "goals",
133
- version: "1.0.0"
134
- }
135
- ]
136
- }
4
+ var WealthSnapshotFeature = defineFeature({
5
+ meta: {
6
+ key: "wealth-snapshot",
7
+ version: "1.0.0",
8
+ title: "Wealth Snapshot",
9
+ description: "Mini-app for accounts, assets, liabilities, goals, and net worth.",
10
+ domain: "finance",
11
+ owners: ["@wealth-snapshot"],
12
+ tags: ["finance", "net-worth", "goals"],
13
+ stability: "experimental"
14
+ },
15
+ operations: [
16
+ { key: "wealth.account.create", version: "1.0.0" },
17
+ { key: "wealth.asset.add", version: "1.0.0" },
18
+ { key: "wealth.liability.add", version: "1.0.0" },
19
+ { key: "wealth.goal.create", version: "1.0.0" },
20
+ { key: "wealth.goal.update", version: "1.0.0" },
21
+ { key: "wealth.networth.get", version: "1.0.0" }
22
+ ],
23
+ events: [
24
+ { key: "wealth.asset.added", version: "1.0.0" },
25
+ { key: "wealth.liability.added", version: "1.0.0" },
26
+ { key: "wealth.goal.updated", version: "1.0.0" },
27
+ { key: "wealth.networth.snapshot_created", version: "1.0.0" }
28
+ ],
29
+ presentations: [
30
+ { key: "wealth-snapshot.dashboard", version: "1.0.0" },
31
+ { key: "wealth-snapshot.accounts.list", version: "1.0.0" },
32
+ { key: "wealth-snapshot.assets.list", version: "1.0.0" },
33
+ { key: "wealth-snapshot.liabilities.list", version: "1.0.0" },
34
+ { key: "wealth-snapshot.goals.list", version: "1.0.0" }
35
+ ],
36
+ presentationsTargets: [
37
+ {
38
+ key: "wealth-snapshot.dashboard",
39
+ version: "1.0.0",
40
+ targets: ["react", "markdown"]
41
+ },
42
+ {
43
+ key: "wealth-snapshot.assets.list",
44
+ version: "1.0.0",
45
+ targets: ["react", "markdown"]
46
+ },
47
+ {
48
+ key: "wealth-snapshot.liabilities.list",
49
+ version: "1.0.0",
50
+ targets: ["react", "markdown"]
51
+ },
52
+ {
53
+ key: "wealth-snapshot.goals.list",
54
+ version: "1.0.0",
55
+ targets: ["react", "markdown"]
56
+ }
57
+ ],
58
+ capabilities: {
59
+ requires: [
60
+ { key: "identity", version: "1.0.0" },
61
+ { key: "audit-trail", version: "1.0.0" },
62
+ { key: "notifications", version: "1.0.0" }
63
+ ],
64
+ provides: [
65
+ { key: "accounts", version: "1.0.0" },
66
+ { key: "net-worth", version: "1.0.0" },
67
+ { key: "goals", version: "1.0.0" }
68
+ ]
69
+ }
137
70
  });
138
-
139
- //#endregion
140
- export { WealthSnapshotFeature };
141
- //# sourceMappingURL=wealth-snapshot.feature.js.map
71
+ export {
72
+ WealthSnapshotFeature
73
+ };
package/package.json CHANGED
@@ -1,46 +1,52 @@
1
1
  {
2
2
  "name": "@contractspec/example.wealth-snapshot",
3
- "version": "1.57.0",
3
+ "version": "1.59.0",
4
4
  "description": "Wealth Snapshot mini-app for accounts, assets, liabilities, and goals",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
9
9
  "publish:pkg:canary": "bun publish:pkg --tag canary",
10
- "build": "bun build:types && bun build:bundle",
11
- "build:bundle": "tsdown",
12
- "build:types": "tsc --noEmit",
13
- "dev": "bun build:bundle --watch",
10
+ "build": "bun run prebuild && bun run build:bundle && bun run build:types",
11
+ "build:bundle": "contractspec-bun-build transpile",
12
+ "build:types": "contractspec-bun-build types",
13
+ "dev": "contractspec-bun-build dev",
14
14
  "clean": "rimraf dist .turbo",
15
15
  "lint": "bun lint:fix",
16
16
  "lint:fix": "eslint src --fix",
17
- "lint:check": "eslint src"
17
+ "lint:check": "eslint src",
18
+ "prebuild": "contractspec-bun-build prebuild",
19
+ "typecheck": "tsc --noEmit"
18
20
  },
19
21
  "dependencies": {
20
- "@contractspec/lib.identity-rbac": "1.57.0",
21
- "@contractspec/lib.schema": "1.57.0",
22
- "@contractspec/lib.contracts": "1.57.0",
23
- "@contractspec/module.audit-trail": "1.57.0",
24
- "@contractspec/module.notifications": "1.57.0"
22
+ "@contractspec/lib.identity-rbac": "1.59.0",
23
+ "@contractspec/lib.schema": "1.59.0",
24
+ "@contractspec/lib.contracts": "1.59.0",
25
+ "@contractspec/module.audit-trail": "1.59.0",
26
+ "@contractspec/module.notifications": "1.59.0"
25
27
  },
26
28
  "devDependencies": {
27
- "@contractspec/tool.typescript": "1.57.0",
28
- "@contractspec/tool.tsdown": "1.57.0",
29
- "typescript": "^5.9.3"
29
+ "@contractspec/tool.typescript": "1.59.0",
30
+ "typescript": "^5.9.3",
31
+ "@contractspec/tool.bun": "1.58.0"
30
32
  },
31
33
  "exports": {
32
- ".": "./dist/index.js",
33
- "./docs": "./dist/docs/index.js",
34
- "./docs/wealth-snapshot.docblock": "./dist/docs/wealth-snapshot.docblock.js",
35
- "./entities": "./dist/entities/index.js",
36
- "./events": "./dist/events.js",
37
- "./example": "./dist/example.js",
38
- "./handlers": "./dist/handlers/index.js",
39
- "./operations": "./dist/operations/index.js",
40
- "./presentations": "./dist/presentations/index.js",
41
- "./wealth-snapshot.capability": "./dist/wealth-snapshot.capability.js",
42
- "./wealth-snapshot.feature": "./dist/wealth-snapshot.feature.js",
43
- "./*": "./*"
34
+ ".": "./src/index.ts",
35
+ "./docs": "./src/docs/index.ts",
36
+ "./docs/index": "./src/docs/index.ts",
37
+ "./docs/wealth-snapshot.docblock": "./src/docs/wealth-snapshot.docblock.ts",
38
+ "./entities": "./src/entities/index.ts",
39
+ "./entities/index": "./src/entities/index.ts",
40
+ "./events": "./src/events.ts",
41
+ "./example": "./src/example.ts",
42
+ "./handlers": "./src/handlers/index.ts",
43
+ "./handlers/index": "./src/handlers/index.ts",
44
+ "./operations": "./src/operations/index.ts",
45
+ "./operations/index": "./src/operations/index.ts",
46
+ "./presentations": "./src/presentations.ts",
47
+ "./presentations/index": "./src/presentations/index.ts",
48
+ "./wealth-snapshot.capability": "./src/wealth-snapshot.capability.ts",
49
+ "./wealth-snapshot.feature": "./src/wealth-snapshot.feature.ts"
44
50
  },
45
51
  "files": [
46
52
  "dist",
@@ -49,17 +55,118 @@
49
55
  "publishConfig": {
50
56
  "access": "public",
51
57
  "exports": {
52
- ".": "./dist/index.js",
53
- "./contracts": "./dist/contracts/index.js",
54
- "./docs": "./dist/docs/index.js",
55
- "./docs/wealth-snapshot.docblock": "./dist/docs/wealth-snapshot.docblock.js",
56
- "./entities": "./dist/entities/index.js",
57
- "./events": "./dist/events.js",
58
- "./example": "./dist/example.js",
59
- "./handlers": "./dist/handlers/index.js",
60
- "./presentations": "./dist/presentations/index.js",
61
- "./wealth-snapshot.feature": "./dist/wealth-snapshot.feature.js",
62
- "./*": "./*"
58
+ ".": {
59
+ "types": "./dist/index.d.ts",
60
+ "bun": "./dist/index.js",
61
+ "node": "./dist/node/index.mjs",
62
+ "browser": "./dist/browser/index.js",
63
+ "default": "./dist/index.js"
64
+ },
65
+ "./docs": {
66
+ "types": "./dist/docs/index.d.ts",
67
+ "bun": "./dist/docs/index.js",
68
+ "node": "./dist/node/docs/index.mjs",
69
+ "browser": "./dist/browser/docs/index.js",
70
+ "default": "./dist/docs/index.js"
71
+ },
72
+ "./docs/index": {
73
+ "types": "./dist/docs/index.d.ts",
74
+ "bun": "./dist/docs/index.js",
75
+ "node": "./dist/node/docs/index.mjs",
76
+ "browser": "./dist/browser/docs/index.js",
77
+ "default": "./dist/docs/index.js"
78
+ },
79
+ "./docs/wealth-snapshot.docblock": {
80
+ "types": "./dist/docs/wealth-snapshot.docblock.d.ts",
81
+ "bun": "./dist/docs/wealth-snapshot.docblock.js",
82
+ "node": "./dist/node/docs/wealth-snapshot.docblock.mjs",
83
+ "browser": "./dist/browser/docs/wealth-snapshot.docblock.js",
84
+ "default": "./dist/docs/wealth-snapshot.docblock.js"
85
+ },
86
+ "./entities": {
87
+ "types": "./dist/entities/index.d.ts",
88
+ "bun": "./dist/entities/index.js",
89
+ "node": "./dist/node/entities/index.mjs",
90
+ "browser": "./dist/browser/entities/index.js",
91
+ "default": "./dist/entities/index.js"
92
+ },
93
+ "./entities/index": {
94
+ "types": "./dist/entities/index.d.ts",
95
+ "bun": "./dist/entities/index.js",
96
+ "node": "./dist/node/entities/index.mjs",
97
+ "browser": "./dist/browser/entities/index.js",
98
+ "default": "./dist/entities/index.js"
99
+ },
100
+ "./events": {
101
+ "types": "./dist/events.d.ts",
102
+ "bun": "./dist/events.js",
103
+ "node": "./dist/node/events.mjs",
104
+ "browser": "./dist/browser/events.js",
105
+ "default": "./dist/events.js"
106
+ },
107
+ "./example": {
108
+ "types": "./dist/example.d.ts",
109
+ "bun": "./dist/example.js",
110
+ "node": "./dist/node/example.mjs",
111
+ "browser": "./dist/browser/example.js",
112
+ "default": "./dist/example.js"
113
+ },
114
+ "./handlers": {
115
+ "types": "./dist/handlers/index.d.ts",
116
+ "bun": "./dist/handlers/index.js",
117
+ "node": "./dist/node/handlers/index.mjs",
118
+ "browser": "./dist/browser/handlers/index.js",
119
+ "default": "./dist/handlers/index.js"
120
+ },
121
+ "./handlers/index": {
122
+ "types": "./dist/handlers/index.d.ts",
123
+ "bun": "./dist/handlers/index.js",
124
+ "node": "./dist/node/handlers/index.mjs",
125
+ "browser": "./dist/browser/handlers/index.js",
126
+ "default": "./dist/handlers/index.js"
127
+ },
128
+ "./operations": {
129
+ "types": "./dist/operations/index.d.ts",
130
+ "bun": "./dist/operations/index.js",
131
+ "node": "./dist/node/operations/index.mjs",
132
+ "browser": "./dist/browser/operations/index.js",
133
+ "default": "./dist/operations/index.js"
134
+ },
135
+ "./operations/index": {
136
+ "types": "./dist/operations/index.d.ts",
137
+ "bun": "./dist/operations/index.js",
138
+ "node": "./dist/node/operations/index.mjs",
139
+ "browser": "./dist/browser/operations/index.js",
140
+ "default": "./dist/operations/index.js"
141
+ },
142
+ "./presentations": {
143
+ "types": "./dist/presentations.d.ts",
144
+ "bun": "./dist/presentations.js",
145
+ "node": "./dist/node/presentations.mjs",
146
+ "browser": "./dist/browser/presentations.js",
147
+ "default": "./dist/presentations.js"
148
+ },
149
+ "./presentations/index": {
150
+ "types": "./dist/presentations/index.d.ts",
151
+ "bun": "./dist/presentations/index.js",
152
+ "node": "./dist/node/presentations/index.mjs",
153
+ "browser": "./dist/browser/presentations/index.js",
154
+ "default": "./dist/presentations/index.js"
155
+ },
156
+ "./wealth-snapshot.capability": {
157
+ "types": "./dist/wealth-snapshot.capability.d.ts",
158
+ "bun": "./dist/wealth-snapshot.capability.js",
159
+ "node": "./dist/node/wealth-snapshot.capability.mjs",
160
+ "browser": "./dist/browser/wealth-snapshot.capability.js",
161
+ "default": "./dist/wealth-snapshot.capability.js"
162
+ },
163
+ "./wealth-snapshot.feature": {
164
+ "types": "./dist/wealth-snapshot.feature.d.ts",
165
+ "bun": "./dist/wealth-snapshot.feature.js",
166
+ "node": "./dist/node/wealth-snapshot.feature.mjs",
167
+ "browser": "./dist/browser/wealth-snapshot.feature.js",
168
+ "default": "./dist/wealth-snapshot.feature.js"
169
+ }
63
170
  },
64
171
  "registry": "https://registry.npmjs.org/"
65
172
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"wealth-snapshot.docblock.js","names":[],"sources":["../../src/docs/wealth-snapshot.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@contractspec/lib.contracts/docs';\nimport { registerDocBlocks } from '@contractspec/lib.contracts/docs';\n\nconst wealthSnapshotDocBlocks: DocBlock[] = [\n {\n id: 'docs.examples.wealth-snapshot',\n title: 'Wealth Snapshot',\n summary:\n 'Simple wealth overview with accounts, assets, liabilities, goals, and net-worth snapshots.',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/wealth-snapshot',\n tags: ['finance', 'net-worth', 'goals'],\n body: `## Features\n\n- Accounts with balances/currencies.\n- Assets & liabilities categorized for net worth.\n- Goals with target amounts/dates and status.\n- Net worth snapshots for charting; events emitted for analytics.\n\n## Modules reused\n- Identity/RBAC for scoping to household/org\n- Notifications for threshold crossings/goal reminders\n- Audit trail for financial changes\n\n## Presentations\n- Dashboard, accounts list, assets list, liabilities list, goals list (React + Markdown targets).\n`,\n },\n {\n id: 'docs.examples.wealth-snapshot.goal',\n title: 'Wealth Snapshot — Goal',\n summary: 'Why this personal/household finance template exists.',\n kind: 'goal',\n visibility: 'public',\n route: '/docs/examples/wealth-snapshot/goal',\n tags: ['finance', 'goal'],\n body: `## Why it matters\n- Provides a regenerable net-worth and goals view without bespoke finance code.\n- Keeps accounts/assets/liabilities/goals consistent across surfaces with PII care.\n\n## Business/Product goal\n- Deliver clear net-worth visibility, goal tracking, and alerting for thresholds.\n- Support safe regeneration while keeping currency/units explicit.\n\n## Success criteria\n- Spec changes to assets/liabilities/goals regenerate UI/API/events cleanly.\n- PII and sensitive values are marked and redacted where needed.`,\n },\n {\n id: 'docs.examples.wealth-snapshot.usage',\n title: 'Wealth Snapshot — Usage',\n summary: 'How to seed, extend, and regenerate wealth tracking safely.',\n kind: 'usage',\n visibility: 'public',\n route: '/docs/examples/wealth-snapshot/usage',\n tags: ['finance', 'usage'],\n body: `## Setup\n1) Seed (if provided) or add accounts/assets/liabilities/goals via UI.\n2) Configure Notifications for goal reminders/threshold alerts; Audit for changes.\n\n## Extend & regenerate\n1) Adjust schemas for asset classes, liability terms, goal metrics; keep currency/units explicit.\n2) Regenerate to update dashboards and events; mark PII paths (account numbers, holder names).\n3) Use Feature Flags to trial new indicators or alerting rules.\n\n## Guardrails\n- Emit events for asset/liability/goal changes; log in Audit Trail.\n- Redact sensitive identifiers in presentations.\n- Keep calculations (net worth) transparent and driven by spec fields.`,\n },\n {\n id: 'docs.examples.wealth-snapshot.constraints',\n title: 'Wealth Snapshot — Constraints & Safety',\n summary:\n 'Internal guardrails for finance data, PII, and regeneration semantics.',\n kind: 'reference',\n visibility: 'internal',\n route: '/docs/examples/wealth-snapshot/constraints',\n tags: ['finance', 'constraints', 'internal'],\n body: `## Constraints\n- Net worth and goal calculations must stay spec-driven; avoid hidden math.\n- Events to emit: asset.created/updated, liability.created/updated, goal.created/updated, snapshot.recorded.\n- Regeneration should not alter currency/unit semantics without explicit spec change.\n\n## PII & Sensitivity\n- Mark account identifiers, holder names, and addresses as PII; redact in presentations.\n- Avoid exposing raw balances in MCP/web without policy checks; prefer summaries.\n\n## Verification\n- Add fixtures for currency/unit changes and snapshot calculations.\n- Ensure Audit Trail covers all financial mutations; Notifications optional for goals/thresholds.\n- Use Feature Flags for new indicators/alert rules; default safe/off.`,\n },\n];\n\nregisterDocBlocks(wealthSnapshotDocBlocks);\n"],"mappings":";;;AAgGA,kBA7F4C;CAC1C;EACE,IAAI;EACJ,OAAO;EACP,SACE;EACF,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAW;GAAa;GAAQ;EACvC,MAAM;;;;;;;;;;;;;;;EAeP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,WAAW,OAAO;EACzB,MAAM;;;;;;;;;;;EAWP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM,CAAC,WAAW,QAAQ;EAC1B,MAAM;;;;;;;;;;;;;EAaP;CACD;EACE,IAAI;EACJ,OAAO;EACP,SACE;EACF,MAAM;EACN,YAAY;EACZ,OAAO;EACP,MAAM;GAAC;GAAW;GAAe;GAAW;EAC5C,MAAM;;;;;;;;;;;;;EAaP;CACF,CAEyC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/entities/index.ts"],"sourcesContent":["import {\n defineEntity,\n defineEntityEnum,\n field,\n index,\n} from '@contractspec/lib.schema';\nimport type { ModuleSchemaContribution } from '@contractspec/lib.schema';\n\nconst schema = 'lssm_wealth_snapshot';\n\nexport const AccountTypeEnum = defineEntityEnum({\n name: 'AccountType',\n schema,\n values: ['CHECKING', 'SAVINGS', 'INVESTMENT', 'CREDIT_CARD', 'LOAN'] as const,\n description: 'Account categories for holdings and debts.',\n});\n\nexport const AssetCategoryEnum = defineEntityEnum({\n name: 'AssetCategory',\n schema,\n values: ['CASH', 'EQUITY', 'REAL_ESTATE', 'CRYPTO', 'OTHER'] as const,\n description: 'Asset categories.',\n});\n\nexport const LiabilityCategoryEnum = defineEntityEnum({\n name: 'LiabilityCategory',\n schema,\n values: ['CREDIT_CARD', 'LOAN', 'MORTGAGE', 'TAX', 'OTHER'] as const,\n description: 'Liability categories.',\n});\n\nexport const GoalStatusEnum = defineEntityEnum({\n name: 'GoalStatus',\n schema,\n values: ['ACTIVE', 'ON_TRACK', 'AT_RISK', 'OFF_TRACK', 'COMPLETED'] as const,\n description: 'Goal health/status.',\n});\n\nexport const AccountEntity = defineEntity({\n name: 'Account',\n description: 'Financial account representing holdings or debts.',\n schema,\n map: 'account',\n fields: {\n id: field.id({ description: 'Account ID' }),\n name: field.string({ description: 'Account name' }),\n type: field.enum('AccountType', { description: 'Account type' }),\n currency: field.string({ description: 'Currency code', default: '\"USD\"' }),\n balance: field.decimal({ description: 'Current balance' }),\n institution: field.string({ description: 'Institution', isOptional: true }),\n orgId: field.string({ description: 'Org/household id' }),\n ownerId: field.string({ description: 'Owner user id', isOptional: true }),\n createdAt: field.createdAt(),\n updatedAt: field.updatedAt(),\n },\n enums: [AccountTypeEnum],\n indexes: [index.on(['orgId']), index.on(['type']), index.on(['ownerId'])],\n});\n\nexport const AssetEntity = defineEntity({\n name: 'Asset',\n description: 'Individual asset position.',\n schema,\n map: 'asset',\n fields: {\n id: field.id({ description: 'Asset ID' }),\n accountId: field.foreignKey({\n description: 'Holding account',\n isOptional: true,\n }),\n name: field.string({ description: 'Asset name' }),\n category: field.enum('AssetCategory', { description: 'Asset category' }),\n value: field.decimal({ description: 'Current value' }),\n currency: field.string({ description: 'Currency', default: '\"USD\"' }),\n orgId: field.string({ description: 'Org/household id' }),\n metadata: field.json({ description: 'Metadata', isOptional: true }),\n updatedAt: field.updatedAt(),\n createdAt: field.createdAt(),\n account: field.belongsTo('Account', ['accountId'], ['id'], {\n onDelete: 'SetNull',\n }),\n },\n enums: [AssetCategoryEnum],\n indexes: [index.on(['orgId']), index.on(['category'])],\n});\n\nexport const LiabilityEntity = defineEntity({\n name: 'Liability',\n description: 'Debt or obligation.',\n schema,\n map: 'liability',\n fields: {\n id: field.id({ description: 'Liability ID' }),\n accountId: field.foreignKey({\n description: 'Liability account',\n isOptional: true,\n }),\n name: field.string({ description: 'Liability name' }),\n category: field.enum('LiabilityCategory', {\n description: 'Liability category',\n }),\n balance: field.decimal({ description: 'Outstanding balance' }),\n currency: field.string({ description: 'Currency', default: '\"USD\"' }),\n interestRate: field.decimal({\n description: 'Interest rate (e.g., 0.05 for 5%)',\n isOptional: true,\n }),\n orgId: field.string({ description: 'Org/household id' }),\n metadata: field.json({ description: 'Metadata', isOptional: true }),\n updatedAt: field.updatedAt(),\n createdAt: field.createdAt(),\n account: field.belongsTo('Account', ['accountId'], ['id'], {\n onDelete: 'SetNull',\n }),\n },\n enums: [LiabilityCategoryEnum],\n indexes: [index.on(['orgId']), index.on(['category'])],\n});\n\nexport const GoalEntity = defineEntity({\n name: 'Goal',\n description: 'Financial goal with target amount/date.',\n schema,\n map: 'goal',\n fields: {\n id: field.id({ description: 'Goal ID' }),\n name: field.string({ description: 'Goal name' }),\n targetAmount: field.decimal({ description: 'Target amount' }),\n currentAmount: field.decimal({\n description: 'Current progress amount',\n default: 0,\n }),\n currency: field.string({ description: 'Currency', default: '\"USD\"' }),\n targetDate: field.dateTime({\n description: 'Target completion date',\n isOptional: true,\n }),\n status: field.enum('GoalStatus', {\n description: 'Goal status',\n default: 'ACTIVE',\n }),\n orgId: field.string({ description: 'Org/household id' }),\n ownerId: field.string({ description: 'Owner user id', isOptional: true }),\n createdAt: field.createdAt(),\n updatedAt: field.updatedAt(),\n },\n enums: [GoalStatusEnum],\n indexes: [\n index.on(['orgId']),\n index.on(['status']),\n index.on(['targetDate']),\n ],\n});\n\nexport const NetWorthSnapshotEntity = defineEntity({\n name: 'NetWorthSnapshot',\n description: 'Aggregated net worth snapshot for a date.',\n schema,\n map: 'networth_snapshot',\n fields: {\n id: field.id({ description: 'Snapshot ID' }),\n asOf: field.dateTime({ description: 'Snapshot date' }),\n totalAssets: field.decimal({ description: 'Total assets' }),\n totalLiabilities: field.decimal({ description: 'Total liabilities' }),\n netWorth: field.decimal({ description: 'Net worth' }),\n currency: field.string({ description: 'Currency', default: '\"USD\"' }),\n orgId: field.string({ description: 'Org/household id' }),\n createdAt: field.createdAt(),\n },\n indexes: [index.unique(['orgId', 'asOf'], { name: 'networth_unique' })],\n});\n\nexport const wealthSnapshotEntities = [\n AccountEntity,\n AssetEntity,\n LiabilityEntity,\n GoalEntity,\n NetWorthSnapshotEntity,\n];\n\nexport const wealthSnapshotSchemaContribution: ModuleSchemaContribution = {\n moduleId: '@contractspec/example.wealth-snapshot',\n // schema,\n entities: wealthSnapshotEntities,\n enums: [\n AccountTypeEnum,\n AssetCategoryEnum,\n LiabilityCategoryEnum,\n GoalStatusEnum,\n ],\n};\n"],"mappings":";;;AAQA,MAAM,SAAS;AAEf,MAAa,kBAAkB,iBAAiB;CAC9C,MAAM;CACN;CACA,QAAQ;EAAC;EAAY;EAAW;EAAc;EAAe;EAAO;CACpE,aAAa;CACd,CAAC;AAEF,MAAa,oBAAoB,iBAAiB;CAChD,MAAM;CACN;CACA,QAAQ;EAAC;EAAQ;EAAU;EAAe;EAAU;EAAQ;CAC5D,aAAa;CACd,CAAC;AAEF,MAAa,wBAAwB,iBAAiB;CACpD,MAAM;CACN;CACA,QAAQ;EAAC;EAAe;EAAQ;EAAY;EAAO;EAAQ;CAC3D,aAAa;CACd,CAAC;AAEF,MAAa,iBAAiB,iBAAiB;CAC7C,MAAM;CACN;CACA,QAAQ;EAAC;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ACD,SAAS,CAAC,MAAM,OAAO,CAAC,SAAS,OAAO,EAAE,EAAE,MAAM,mBAAmB,CAAC,CAAC;CACxE,CAAC;AAEF,MAAa,yBAAyB;CACpC;CACA;CACA;CACA;CACA;CACD;AAED,MAAa,mCAA6D;CACxE,UAAU;CAEV,UAAU;CACV,OAAO;EACL;EACA;EACA;EACA;EACD;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.js","names":[],"sources":["../src/events.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent, StabilityEnum } from '@contractspec/lib.contracts';\n\nconst AssetEventPayload = defineSchemaModel({\n name: 'AssetEventPayload',\n description: 'Payload for asset events',\n fields: {\n assetId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n category: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n value: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst LiabilityEventPayload = defineSchemaModel({\n name: 'LiabilityEventPayload',\n description: 'Payload for liability events',\n fields: {\n liabilityId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n category: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n balance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst GoalEventPayload = defineSchemaModel({\n name: 'GoalEventPayload',\n description: 'Payload for goal events',\n fields: {\n goalId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n currentAmount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n targetAmount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const AssetAddedEvent = defineEvent({\n meta: {\n key: 'wealth.asset.added',\n version: '1.0.0',\n description: 'An asset was added or updated.',\n stability: StabilityEnum.Experimental,\n owners: [],\n tags: [],\n },\n payload: AssetEventPayload,\n});\n\nexport const LiabilityAddedEvent = defineEvent({\n meta: {\n key: 'wealth.liability.added',\n version: '1.0.0',\n description: 'A liability was added or updated.',\n stability: StabilityEnum.Experimental,\n owners: [],\n tags: [],\n },\n payload: LiabilityEventPayload,\n});\n\nexport const GoalUpdatedEvent = defineEvent({\n meta: {\n key: 'wealth.goal.updated',\n version: '1.0.0',\n description: 'A goal was updated.',\n stability: StabilityEnum.Experimental,\n owners: [],\n tags: [],\n },\n payload: GoalEventPayload,\n});\n\nexport const NetWorthSnapshotCreatedEvent = defineEvent({\n meta: {\n key: 'wealth.networth.snapshot_created',\n version: '1.0.0',\n description: 'A net worth snapshot was generated.',\n stability: StabilityEnum.Experimental,\n owners: [],\n tags: [],\n },\n payload: defineSchemaModel({\n name: 'NetWorthSnapshotEventPayload',\n description: 'Net worth snapshot payload',\n fields: {\n netWorth: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n totalAssets: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n totalLiabilities: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: false,\n },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n asOf: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n }),\n});\n\nexport const WealthSnapshotEvents = {\n AssetAddedEvent,\n LiabilityAddedEvent,\n GoalUpdatedEvent,\n NetWorthSnapshotCreatedEvent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AAe,iBAAiB;GAAE,YAAY;GAAO;EACpE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;AAEF,MAAa,kBAAkB,YAAY;CACzC,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW,cAAc;EACzB,QAAQ,EAAE;EACV,MAAM,EAAE;EACT;CACD,SAAS;CACV,CAAC;AAEF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW,cAAc;EACzB,QAAQ,EAAE;EACV,MAAM,EAAE;EACT;CACD,SAAS;CACV,CAAC;AAEF,MAAa,mBAAmB,YAAY;CAC1C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW,cAAc;EACzB,QAAQ,EAAE;EACV,MAAM,EAAE;EACT;CACD,SAAS;CACV,CAAC;AAEF,MAAa,+BAA+B,YAAY;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW,cAAc;EACzB,QAAQ,EAAE;EACV,MAAM,EAAE;EACT;CACD,SAAS,kBAAkB;EACzB,MAAM;EACN,aAAa;EACb,QAAQ;GACN,UAAU;IAAE,MAAM,eAAe,gBAAgB;IAAE,YAAY;IAAO;GACtE,aAAa;IAAE,MAAM,eAAe,gBAAgB;IAAE,YAAY;IAAO;GACzE,kBAAkB;IAChB,MAAM,eAAe,gBAAgB;IACrC,YAAY;IACb;GACD,UAAU;IAAE,MAAM,eAAe,iBAAiB;IAAE,YAAY;IAAO;GACvE,OAAO;IAAE,MAAM,eAAe,iBAAiB;IAAE,YAAY;IAAO;GACpE,MAAM;IAAE,MAAM,eAAe,UAAU;IAAE,YAAY;IAAO;GAC7D;EACF,CAAC;CACH,CAAC;AAEF,MAAa,uBAAuB;CAClC;CACA;CACA;CACA;CACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["import { defineExample } from '@contractspec/lib.contracts';\n\nconst example = defineExample({\n meta: {\n key: 'wealth-snapshot',\n version: '1.0.0',\n title: 'Wealth Snapshot',\n description:\n 'Simple wealth overview with accounts, assets, liabilities, goals, and net-worth snapshots.',\n kind: 'template',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['finance', 'net-worth', 'goals'],\n },\n docs: {\n rootDocId: 'docs.examples.wealth-snapshot',\n goalDocId: 'docs.examples.wealth-snapshot.goal',\n usageDocId: 'docs.examples.wealth-snapshot.usage',\n constraintsDocId: 'docs.examples.wealth-snapshot.constraints',\n },\n entrypoints: {\n packageName: '@contractspec/example.wealth-snapshot',\n feature: './feature',\n contracts: './contracts',\n presentations: './presentations',\n handlers: './handlers',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: {\n enabled: true,\n modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],\n },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n});\n\nexport default example;\n"],"mappings":";;;AAEA,MAAM,UAAU,cAAc;CAC5B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAW;GAAa;GAAQ;EACxC;CACD,MAAM;EACJ,WAAW;EACX,WAAW;EACX,YAAY;EACZ,kBAAkB;EACnB;CACD,aAAa;EACX,aAAa;EACb,SAAS;EACT,WAAW;EACX,eAAe;EACf,UAAU;EACV,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GACP,SAAS;GACT,OAAO;IAAC;IAAc;IAAS;IAAW;IAAY;IAAY;GACnE;EACD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/handlers/index.ts"],"sourcesContent":["/**\n * Placeholder handler registry for Wealth Snapshot contracts.\n */\n\nexport function registerWealthSnapshotHandlers() {\n // Bind contracts to runtime implementations in the host app.\n}\n"],"mappings":";;;;AAIA,SAAgB,iCAAiC"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export * from './entities';\nexport * from './operations';\nexport * from './events';\nexport * from './presentations';\nexport * from './wealth-snapshot.feature';\nexport * from './handlers';\nexport { default as example } from './example';\nimport './docs';\n\nimport { identityRbacSchemaContribution } from '@contractspec/lib.identity-rbac';\nimport { auditTrailSchemaContribution } from '@contractspec/module.audit-trail';\nimport { notificationsSchemaContribution } from '@contractspec/module.notifications';\nimport { wealthSnapshotSchemaContribution } from './entities';\n\nexport const schemaComposition = {\n modules: [\n identityRbacSchemaContribution,\n auditTrailSchemaContribution,\n notificationsSchemaContribution,\n wealthSnapshotSchemaContribution,\n ],\n provider: 'postgresql' as const,\n outputPath: './prisma/schema/generated.prisma',\n};\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAa,oBAAoB;CAC/B,SAAS;EACP;EACA;EACA;EACA;EACD;CACD,UAAU;CACV,YAAY;CACb"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/operations/index.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineCommand, defineQuery } from '@contractspec/lib.contracts';\n\nconst OWNERS = ['examples.wealth-snapshot'] as const;\n\nexport const AccountModel = defineSchemaModel({\n name: 'Account',\n description: 'Account model',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n type: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n balance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n },\n});\n\nexport const AssetModel = defineSchemaModel({\n name: 'Asset',\n description: 'Asset model',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n category: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n value: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const LiabilityModel = defineSchemaModel({\n name: 'Liability',\n description: 'Liability model',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n category: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n balance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const GoalModel = defineSchemaModel({\n name: 'Goal',\n description: 'Goal model',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n targetAmount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currentAmount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nexport const NetWorthSnapshotModel = defineSchemaModel({\n name: 'NetWorthSnapshot',\n description: 'Net worth snapshot model',\n fields: {\n asOf: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n totalAssets: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n totalLiabilities: {\n type: ScalarTypeEnum.Float_unsecure(),\n isOptional: false,\n },\n netWorth: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\n// Inputs\nconst CreateAccountInput = defineSchemaModel({\n name: 'CreateAccountInput',\n description: 'Create account input',\n fields: {\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n type: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n balance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: true },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst AddAssetInput = defineSchemaModel({\n name: 'AddAssetInput',\n description: 'Add asset input',\n fields: {\n accountId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n category: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n value: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst AddLiabilityInput = defineSchemaModel({\n name: 'AddLiabilityInput',\n description: 'Add liability input',\n fields: {\n accountId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n category: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n balance: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst UpdateGoalInput = defineSchemaModel({\n name: 'UpdateGoalInput',\n description: 'Update goal progress',\n fields: {\n goalId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n currentAmount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nconst CreateGoalInput = defineSchemaModel({\n name: 'CreateGoalInput',\n description: 'Create goal input',\n fields: {\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n targetAmount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n currency: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n targetDate: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst NetWorthQueryInput = defineSchemaModel({\n name: 'NetWorthQueryInput',\n description: 'Filter for net worth snapshots',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n from: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n to: { type: ScalarTypeEnum.DateTime(), isOptional: true },\n },\n});\n\n// Commands\nexport const CreateAccountContract = defineCommand({\n meta: {\n key: 'wealth.account.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['wealth', 'account', 'create'],\n description: 'Create a financial account.',\n goal: 'Track account balances.',\n context: 'Onboarding/import.',\n },\n io: { input: CreateAccountInput, output: AccountModel },\n policy: { auth: 'user' },\n});\n\nexport const AddAssetContract = defineCommand({\n meta: {\n key: 'wealth.asset.add',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['wealth', 'asset', 'add'],\n description: 'Add an asset position.',\n goal: 'Track holdings.',\n context: 'Asset onboarding/update.',\n },\n io: { input: AddAssetInput, output: AssetModel },\n policy: { auth: 'user' },\n});\n\nexport const AddLiabilityContract = defineCommand({\n meta: {\n key: 'wealth.liability.add',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['wealth', 'liability', 'add'],\n description: 'Add a liability.',\n goal: 'Track debts.',\n context: 'Debt onboarding/update.',\n },\n io: { input: AddLiabilityInput, output: LiabilityModel },\n policy: { auth: 'user' },\n});\n\nexport const CreateGoalContract = defineCommand({\n meta: {\n key: 'wealth.goal.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['wealth', 'goal', 'create'],\n description: 'Create a financial goal.',\n goal: 'Track progress toward goals.',\n context: 'Planning.',\n },\n io: { input: CreateGoalInput, output: GoalModel },\n policy: { auth: 'user' },\n});\n\nexport const UpdateGoalContract = defineCommand({\n meta: {\n key: 'wealth.goal.update',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['wealth', 'goal', 'update'],\n description: 'Update goal progress.',\n goal: 'Keep progress current.',\n context: 'Periodic update.',\n },\n io: { input: UpdateGoalInput, output: GoalModel },\n policy: { auth: 'user' },\n});\n\n// Queries\nexport const GetNetWorthContract = defineQuery({\n meta: {\n key: 'wealth.networth.get',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['wealth', 'networth'],\n description: 'Get net worth snapshots for a period.',\n goal: 'Render charts and indicators.',\n context: 'Dashboard.',\n },\n io: {\n input: NetWorthQueryInput,\n output: defineSchemaModel({\n name: 'NetWorthQueryOutput',\n description: 'Snapshots + latest indicators',\n fields: {\n snapshots: {\n type: NetWorthSnapshotModel,\n isArray: true,\n isOptional: false,\n },\n latest: { type: NetWorthSnapshotModel, isOptional: true },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n"],"mappings":";;;;AAGA,MAAM,SAAS,CAAC,2BAA2B;AAE3C,MAAa,eAAe,kBAAkB;CAC5C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,SAAS;GAAE,MAAM,eAAe,gBAAgB;GAAE,YAAY;GAAO;EACtE;CACF,CAAC;AAEF,MAAa,aAAa,kBAAkB;CAC1C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;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KACT,MAAM;KACN,SAAS;KACT,YAAY;KACb;IACD,QAAQ;KAAE,MAAM;KAAuB,YAAY;KAAM;IAC1D;GACF,CAAC;EACH;CACD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/presentations/index.ts"],"sourcesContent":["export const WealthSnapshotPresentations = [\n 'wealth-snapshot.dashboard',\n 'wealth-snapshot.accounts.list',\n 'wealth-snapshot.assets.list',\n 'wealth-snapshot.liabilities.list',\n 'wealth-snapshot.goals.list',\n];\n"],"mappings":";AAAA,MAAa,8BAA8B;CACzC;CACA;CACA;CACA;CACA;CACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"presentations.js","names":[],"sources":["../src/presentations.ts"],"sourcesContent":["import { definePresentation, StabilityEnum } from '@contractspec/lib.contracts';\n\nexport const WealthDashboardPresentation = definePresentation({\n meta: {\n key: 'wealth-snapshot.dashboard',\n version: '1.0.0',\n title: 'Wealth Dashboard',\n description: 'Wealth snapshot dashboard with net worth overview',\n domain: 'finance',\n owners: ['@wealth-snapshot'],\n tags: ['finance', 'wealth', 'dashboard'],\n stability: StabilityEnum.Experimental,\n goal: 'Overview of wealth',\n context: 'Dashboard',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'WealthDashboard',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['wealth.dashboard.enabled'],\n },\n});\n\nexport const AccountsListPresentation = definePresentation({\n meta: {\n key: 'wealth-snapshot.accounts.list',\n version: '1.0.0',\n title: 'Accounts List',\n description: 'List of financial accounts',\n domain: 'finance',\n owners: ['@wealth-snapshot'],\n tags: ['finance', 'accounts', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'List accounts',\n context: 'Overview',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'AccountsList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['wealth.accounts.enabled'],\n },\n});\n\nexport const AssetsListPresentation = definePresentation({\n meta: {\n key: 'wealth-snapshot.assets.list',\n version: '1.0.0',\n title: 'Assets List',\n description: 'List of assets with valuations',\n domain: 'finance',\n owners: ['@wealth-snapshot'],\n tags: ['finance', 'assets', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'List assets',\n context: 'Overview',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'AssetsList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['wealth.assets.enabled'],\n },\n});\n\nexport const LiabilitiesListPresentation = definePresentation({\n meta: {\n key: 'wealth-snapshot.liabilities.list',\n version: '1.0.0',\n title: 'Liabilities List',\n description: 'List of liabilities and debts',\n domain: 'finance',\n owners: ['@wealth-snapshot'],\n tags: ['finance', 'liabilities', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'List liabilities',\n context: 'Overview',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'LiabilitiesList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['wealth.liabilities.enabled'],\n },\n});\n\nexport const GoalsListPresentation = definePresentation({\n meta: {\n key: 'wealth-snapshot.goals.list',\n version: '1.0.0',\n title: 'Goals List',\n description: 'List of financial goals with progress',\n domain: 'finance',\n owners: ['@wealth-snapshot'],\n tags: ['finance', 'goals', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'List goals',\n context: 'Overview',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'GoalsList',\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['wealth.goals.enabled'],\n },\n});\n"],"mappings":";;;AAEA,MAAa,8BAA8B,mBAAmB;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,mBAAmB;EAC5B,MAAM;GAAC;GAAW;GAAU;GAAY;EACxC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS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,MAAM;GAAC;GAAW;GAAS;GAAO;EAClC,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACf;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,uBAAuB,EAChC;CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"wealth-snapshot.capability.js","names":[],"sources":["../src/wealth-snapshot.capability.ts"],"sourcesContent":["import { defineCapability, StabilityEnum } from '@contractspec/lib.contracts';\n\nexport const AccountsCapability = defineCapability({\n meta: {\n key: 'accounts',\n version: '1.0.0',\n kind: 'data',\n stability: StabilityEnum.Experimental,\n description: 'Financial accounts tracking and aggregation',\n owners: ['platform.finance'],\n tags: ['accounts', 'finance', 'wealth'],\n },\n});\n\nexport const NetWorthCapability = defineCapability({\n meta: {\n key: 'net-worth',\n version: '1.0.0',\n kind: 'ui',\n stability: StabilityEnum.Experimental,\n description: 'Net worth visualization and tracking',\n owners: ['platform.finance'],\n tags: ['net-worth', 'wealth', 'dashboard'],\n },\n});\n\nexport const GoalsCapability = defineCapability({\n meta: {\n key: 'goals',\n version: '1.0.0',\n kind: 'ui',\n stability: StabilityEnum.Experimental,\n description: 'Financial goal setting and progress tracking',\n owners: ['platform.finance'],\n tags: ['goals', 'planning', 'wealth'],\n },\n});\n"],"mappings":";;;AAEA,MAAa,qBAAqB,iBAAiB,EACjD,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,mBAAmB;CAC5B,MAAM;EAAC;EAAY;EAAW;EAAS;CACxC,EACF,CAAC;AAEF,MAAa,qBAAqB,iBAAiB,EACjD,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,mBAAmB;CAC5B,MAAM;EAAC;EAAa;EAAU;EAAY;CAC3C,EACF,CAAC;AAEF,MAAa,kBAAkB,iBAAiB,EAC9C,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,mBAAmB;CAC5B,MAAM;EAAC;EAAS;EAAY;EAAS;CACtC,EACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"wealth-snapshot.feature.js","names":[],"sources":["../src/wealth-snapshot.feature.ts"],"sourcesContent":["import { defineFeature } from '@contractspec/lib.contracts';\n\nexport const WealthSnapshotFeature = defineFeature({\n meta: {\n key: 'wealth-snapshot',\n version: '1.0.0',\n title: 'Wealth Snapshot',\n description:\n 'Mini-app for accounts, assets, liabilities, goals, and net worth.',\n domain: 'finance',\n owners: ['@wealth-snapshot'],\n tags: ['finance', 'net-worth', 'goals'],\n stability: 'experimental',\n },\n operations: [\n { key: 'wealth.account.create', version: '1.0.0' },\n { key: 'wealth.asset.add', version: '1.0.0' },\n { key: 'wealth.liability.add', version: '1.0.0' },\n { key: 'wealth.goal.create', version: '1.0.0' },\n { key: 'wealth.goal.update', version: '1.0.0' },\n { key: 'wealth.networth.get', version: '1.0.0' },\n ],\n events: [\n { key: 'wealth.asset.added', version: '1.0.0' },\n { key: 'wealth.liability.added', version: '1.0.0' },\n { key: 'wealth.goal.updated', version: '1.0.0' },\n { key: 'wealth.networth.snapshot_created', version: '1.0.0' },\n ],\n presentations: [\n { key: 'wealth-snapshot.dashboard', version: '1.0.0' },\n { key: 'wealth-snapshot.accounts.list', version: '1.0.0' },\n { key: 'wealth-snapshot.assets.list', version: '1.0.0' },\n { key: 'wealth-snapshot.liabilities.list', version: '1.0.0' },\n { key: 'wealth-snapshot.goals.list', version: '1.0.0' },\n ],\n presentationsTargets: [\n {\n key: 'wealth-snapshot.dashboard',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'wealth-snapshot.assets.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'wealth-snapshot.liabilities.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'wealth-snapshot.goals.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n ],\n capabilities: {\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'audit-trail', version: '1.0.0' },\n { key: 'notifications', version: '1.0.0' },\n ],\n provides: [\n { key: 'accounts', version: '1.0.0' },\n { key: 'net-worth', version: '1.0.0' },\n { key: 'goals', version: '1.0.0' },\n ],\n },\n});\n"],"mappings":";;;AAEA,MAAa,wBAAwB,cAAc;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,mBAAmB;EAC5B,MAAM;GAAC;GAAW;GAAa;GAAQ;EACvC,WAAW;EACZ;CACD,YAAY;EACV;GAAE,KAAK;GAAyB,SAAS;GAAS;EAClD;GAAE,KAAK;GAAoB,SAAS;GAAS;EAC7C;GAAE,KAAK;GAAwB,SAAS;GAAS;EACjD;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAAuB,SAAS;GAAS;EACjD;CACD,QAAQ;EACN;GAAE,KAAK;GAAsB,SAAS;GAAS;EAC/C;GAAE,KAAK;GAA0B,SAAS;GAAS;EACnD;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAoC,SAAS;GAAS;EAC9D;CACD,eAAe;EACb;GAAE,KAAK;GAA6B,SAAS;GAAS;EACtD;GAAE,KAAK;GAAiC,SAAS;GAAS;EAC1D;GAAE,KAAK;GAA+B,SAAS;GAAS;EACxD;GAAE,KAAK;GAAoC,SAAS;GAAS;EAC7D;GAAE,KAAK;GAA8B,SAAS;GAAS;EACxD;CACD,sBAAsB;EACpB;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS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