@lssm/example.wealth-snapshot 1.41.1 → 1.42.1
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/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -1
- package/dist/docs/wealth-snapshot.docblock.d.ts +1 -0
- package/dist/docs/wealth-snapshot.docblock.js +60 -5
- package/dist/docs/wealth-snapshot.docblock.js.map +1 -0
- package/dist/entities/index.d.ts +132 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +230 -1
- package/dist/entities/index.js.map +1 -0
- package/dist/events.d.ts +225 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +181 -1
- package/dist/events.js.map +1 -0
- package/dist/example.d.ts +40 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +50 -1
- package/dist/example.js.map +1 -0
- package/dist/handlers/index.d.ts +8 -0
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +9 -1
- package/dist/handlers/index.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -1
- package/dist/index.js.map +1 -0
- package/dist/operations/index.d.ts +410 -0
- package/dist/operations/index.d.ts.map +1 -0
- package/dist/operations/index.js +427 -0
- package/dist/operations/index.js.map +1 -0
- package/dist/presentations/index.d.ts +5 -0
- package/dist/presentations/index.d.ts.map +1 -0
- package/dist/presentations/index.js +12 -1
- package/dist/presentations/index.js.map +1 -0
- package/dist/presentations.d.ts +11 -0
- package/dist/presentations.d.ts.map +1 -0
- package/dist/presentations.js +132 -1
- package/dist/presentations.js.map +1 -0
- package/dist/wealth-snapshot.feature.d.ts +7 -0
- package/dist/wealth-snapshot.feature.d.ts.map +1 -0
- package/dist/wealth-snapshot.feature.js +139 -1
- package/dist/wealth-snapshot.feature.js.map +1 -0
- package/package.json +28 -21
- package/dist/contracts/index.js +0 -1
|
@@ -1 +1,139 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/wealth-snapshot.feature.ts
|
|
2
|
+
const WealthSnapshotFeature = {
|
|
3
|
+
meta: {
|
|
4
|
+
key: "wealth-snapshot",
|
|
5
|
+
version: 1,
|
|
6
|
+
title: "Wealth Snapshot",
|
|
7
|
+
description: "Mini-app for accounts, assets, liabilities, goals, and net worth.",
|
|
8
|
+
domain: "finance",
|
|
9
|
+
owners: ["@wealth-snapshot"],
|
|
10
|
+
tags: [
|
|
11
|
+
"finance",
|
|
12
|
+
"net-worth",
|
|
13
|
+
"goals"
|
|
14
|
+
],
|
|
15
|
+
stability: "experimental"
|
|
16
|
+
},
|
|
17
|
+
operations: [
|
|
18
|
+
{
|
|
19
|
+
key: "wealth.account.create",
|
|
20
|
+
version: 1
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
key: "wealth.asset.add",
|
|
24
|
+
version: 1
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
key: "wealth.liability.add",
|
|
28
|
+
version: 1
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
key: "wealth.goal.create",
|
|
32
|
+
version: 1
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
key: "wealth.goal.update",
|
|
36
|
+
version: 1
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
key: "wealth.networth.get",
|
|
40
|
+
version: 1
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
events: [
|
|
44
|
+
{
|
|
45
|
+
key: "wealth.asset.added",
|
|
46
|
+
version: 1
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: "wealth.liability.added",
|
|
50
|
+
version: 1
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: "wealth.goal.updated",
|
|
54
|
+
version: 1
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
key: "wealth.networth.snapshot_created",
|
|
58
|
+
version: 1
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
presentations: [
|
|
62
|
+
{
|
|
63
|
+
key: "wealth-snapshot.dashboard",
|
|
64
|
+
version: 1
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
key: "wealth-snapshot.accounts.list",
|
|
68
|
+
version: 1
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: "wealth-snapshot.assets.list",
|
|
72
|
+
version: 1
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
key: "wealth-snapshot.liabilities.list",
|
|
76
|
+
version: 1
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
key: "wealth-snapshot.goals.list",
|
|
80
|
+
version: 1
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
presentationsTargets: [
|
|
84
|
+
{
|
|
85
|
+
key: "wealth-snapshot.dashboard",
|
|
86
|
+
version: 1,
|
|
87
|
+
targets: ["react", "markdown"]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
key: "wealth-snapshot.assets.list",
|
|
91
|
+
version: 1,
|
|
92
|
+
targets: ["react", "markdown"]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
key: "wealth-snapshot.liabilities.list",
|
|
96
|
+
version: 1,
|
|
97
|
+
targets: ["react", "markdown"]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
key: "wealth-snapshot.goals.list",
|
|
101
|
+
version: 1,
|
|
102
|
+
targets: ["react", "markdown"]
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
capabilities: {
|
|
106
|
+
requires: [
|
|
107
|
+
{
|
|
108
|
+
key: "identity",
|
|
109
|
+
version: 1
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
key: "audit-trail",
|
|
113
|
+
version: 1
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
key: "notifications",
|
|
117
|
+
version: 1
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
provides: [
|
|
121
|
+
{
|
|
122
|
+
key: "accounts",
|
|
123
|
+
version: 1
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
key: "net-worth",
|
|
127
|
+
version: 1
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
key: "goals",
|
|
131
|
+
version: 1
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
//#endregion
|
|
138
|
+
export { WealthSnapshotFeature };
|
|
139
|
+
//# sourceMappingURL=wealth-snapshot.feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wealth-snapshot.feature.js","names":["WealthSnapshotFeature: FeatureModuleSpec"],"sources":["../src/wealth-snapshot.feature.ts"],"sourcesContent":["import type { FeatureModuleSpec } from '@lssm/lib.contracts';\n\nexport const WealthSnapshotFeature: FeatureModuleSpec = {\n meta: {\n key: 'wealth-snapshot',\n version: 1,\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 },\n { key: 'wealth.asset.add', version: 1 },\n { key: 'wealth.liability.add', version: 1 },\n { key: 'wealth.goal.create', version: 1 },\n { key: 'wealth.goal.update', version: 1 },\n { key: 'wealth.networth.get', version: 1 },\n ],\n events: [\n { key: 'wealth.asset.added', version: 1 },\n { key: 'wealth.liability.added', version: 1 },\n { key: 'wealth.goal.updated', version: 1 },\n { key: 'wealth.networth.snapshot_created', version: 1 },\n ],\n presentations: [\n { key: 'wealth-snapshot.dashboard', version: 1 },\n { key: 'wealth-snapshot.accounts.list', version: 1 },\n { key: 'wealth-snapshot.assets.list', version: 1 },\n { key: 'wealth-snapshot.liabilities.list', version: 1 },\n { key: 'wealth-snapshot.goals.list', version: 1 },\n ],\n presentationsTargets: [\n {\n key: 'wealth-snapshot.dashboard',\n version: 1,\n targets: ['react', 'markdown'],\n },\n {\n key: 'wealth-snapshot.assets.list',\n version: 1,\n targets: ['react', 'markdown'],\n },\n {\n key: 'wealth-snapshot.liabilities.list',\n version: 1,\n targets: ['react', 'markdown'],\n },\n {\n key: 'wealth-snapshot.goals.list',\n version: 1,\n targets: ['react', 'markdown'],\n },\n ],\n capabilities: {\n requires: [\n { key: 'identity', version: 1 },\n { key: 'audit-trail', version: 1 },\n { key: 'notifications', version: 1 },\n ],\n provides: [\n { key: 'accounts', version: 1 },\n { key: 'net-worth', version: 1 },\n { key: 'goals', version: 1 },\n ],\n },\n};\n"],"mappings":";AAEA,MAAaA,wBAA2C;CACtD,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;GAAG;EAC5C;GAAE,KAAK;GAAoB,SAAS;GAAG;EACvC;GAAE,KAAK;GAAwB,SAAS;GAAG;EAC3C;GAAE,KAAK;GAAsB,SAAS;GAAG;EACzC;GAAE,KAAK;GAAsB,SAAS;GAAG;EACzC;GAAE,KAAK;GAAuB,SAAS;GAAG;EAC3C;CACD,QAAQ;EACN;GAAE,KAAK;GAAsB,SAAS;GAAG;EACzC;GAAE,KAAK;GAA0B,SAAS;GAAG;EAC7C;GAAE,KAAK;GAAuB,SAAS;GAAG;EAC1C;GAAE,KAAK;GAAoC,SAAS;GAAG;EACxD;CACD,eAAe;EACb;GAAE,KAAK;GAA6B,SAAS;GAAG;EAChD;GAAE,KAAK;GAAiC,SAAS;GAAG;EACpD;GAAE,KAAK;GAA+B,SAAS;GAAG;EAClD;GAAE,KAAK;GAAoC,SAAS;GAAG;EACvD;GAAE,KAAK;GAA8B,SAAS;GAAG;EAClD;CACD,sBAAsB;EACpB;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACD;GACE,KAAK;GACL,SAAS;GACT,SAAS,CAAC,SAAS,WAAW;GAC/B;EACF;CACD,cAAc;EACZ,UAAU;GACR;IAAE,KAAK;IAAY,SAAS;IAAG;GAC/B;IAAE,KAAK;IAAe,SAAS;IAAG;GAClC;IAAE,KAAK;IAAiB,SAAS;IAAG;GACrC;EACD,UAAU;GACR;IAAE,KAAK;IAAY,SAAS;IAAG;GAC/B;IAAE,KAAK;IAAa,SAAS;IAAG;GAChC;IAAE,KAAK;IAAS,SAAS;IAAG;GAC7B;EACF;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/example.wealth-snapshot",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.42.1",
|
|
4
4
|
"description": "Wealth Snapshot mini-app for accounts, assets, liabilities, and goals",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
|
|
10
10
|
"publish:pkg:canary": "bun publish:pkg --tag canary",
|
|
11
|
-
"build": "bun build:
|
|
11
|
+
"build": "bun build:types && bun build:bundle",
|
|
12
12
|
"build:bundle": "tsdown",
|
|
13
13
|
"build:types": "tsc --noEmit",
|
|
14
14
|
"dev": "bun build:bundle --watch",
|
|
@@ -18,30 +18,30 @@
|
|
|
18
18
|
"lint:check": "eslint src"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@lssm/lib.schema": "1.
|
|
22
|
-
"@lssm/lib.contracts": "1.
|
|
23
|
-
"@lssm/lib.bus": "1.
|
|
24
|
-
"@lssm/lib.identity-rbac": "1.
|
|
25
|
-
"@lssm/module.audit-trail": "1.
|
|
26
|
-
"@lssm/module.notifications": "1.
|
|
21
|
+
"@lssm/lib.schema": "1.42.1",
|
|
22
|
+
"@lssm/lib.contracts": "1.42.1",
|
|
23
|
+
"@lssm/lib.bus": "1.42.1",
|
|
24
|
+
"@lssm/lib.identity-rbac": "1.42.1",
|
|
25
|
+
"@lssm/module.audit-trail": "1.42.1",
|
|
26
|
+
"@lssm/module.notifications": "1.42.1",
|
|
27
27
|
"zod": "^4.1.13"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@lssm/tool.typescript": "1.
|
|
31
|
-
"@lssm/tool.tsdown": "1.
|
|
30
|
+
"@lssm/tool.typescript": "1.42.1",
|
|
31
|
+
"@lssm/tool.tsdown": "1.42.1",
|
|
32
32
|
"typescript": "^5.9.3"
|
|
33
33
|
},
|
|
34
34
|
"exports": {
|
|
35
|
-
".": "./
|
|
36
|
-
"./
|
|
37
|
-
"./docs": "./
|
|
38
|
-
"./
|
|
39
|
-
"./
|
|
40
|
-
"./
|
|
41
|
-
"./
|
|
42
|
-
"./
|
|
43
|
-
"./presentations": "./
|
|
44
|
-
"./wealth-snapshot.feature": "./
|
|
35
|
+
".": "./dist/index.js",
|
|
36
|
+
"./docs": "./dist/docs/index.js",
|
|
37
|
+
"./docs/wealth-snapshot.docblock": "./dist/docs/wealth-snapshot.docblock.js",
|
|
38
|
+
"./entities": "./dist/entities/index.js",
|
|
39
|
+
"./events": "./dist/events.js",
|
|
40
|
+
"./example": "./dist/example.js",
|
|
41
|
+
"./handlers": "./dist/handlers/index.js",
|
|
42
|
+
"./operations": "./dist/operations/index.js",
|
|
43
|
+
"./presentations": "./dist/presentations/index.js",
|
|
44
|
+
"./wealth-snapshot.feature": "./dist/wealth-snapshot.feature.js",
|
|
45
45
|
"./*": "./*"
|
|
46
46
|
},
|
|
47
47
|
"module": "./dist/index.js",
|
|
@@ -63,6 +63,13 @@
|
|
|
63
63
|
"./presentations": "./dist/presentations/index.js",
|
|
64
64
|
"./wealth-snapshot.feature": "./dist/wealth-snapshot.feature.js",
|
|
65
65
|
"./*": "./*"
|
|
66
|
-
}
|
|
66
|
+
},
|
|
67
|
+
"registry": "https://registry.npmjs.org/"
|
|
68
|
+
},
|
|
69
|
+
"license": "MIT",
|
|
70
|
+
"repository": {
|
|
71
|
+
"type": "git",
|
|
72
|
+
"url": "https://github.com/lssm-tech/contractspec.git",
|
|
73
|
+
"directory": "packages/examples/wealth-snapshot"
|
|
67
74
|
}
|
|
68
75
|
}
|
package/dist/contracts/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ScalarTypeEnum as e,defineSchemaModel as t}from"@lssm/lib.schema";import{defineCommand as n,defineQuery as r}from"@lssm/lib.contracts";const i=[`examples.wealth-snapshot`],a=t({name:`Account`,description:`Account model`,fields:{id:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},type:{type:e.String_unsecure(),isOptional:!1},currency:{type:e.String_unsecure(),isOptional:!1},balance:{type:e.Float_unsecure(),isOptional:!1}}}),o=t({name:`Asset`,description:`Asset model`,fields:{id:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},category:{type:e.String_unsecure(),isOptional:!1},value:{type:e.Float_unsecure(),isOptional:!1},currency:{type:e.String_unsecure(),isOptional:!1}}}),s=t({name:`Liability`,description:`Liability model`,fields:{id:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},category:{type:e.String_unsecure(),isOptional:!1},balance:{type:e.Float_unsecure(),isOptional:!1},currency:{type:e.String_unsecure(),isOptional:!1}}}),c=t({name:`Goal`,description:`Goal model`,fields:{id:{type:e.String_unsecure(),isOptional:!1},name:{type:e.String_unsecure(),isOptional:!1},targetAmount:{type:e.Float_unsecure(),isOptional:!1},currentAmount:{type:e.Float_unsecure(),isOptional:!1},currency:{type:e.String_unsecure(),isOptional:!1},status:{type:e.String_unsecure(),isOptional:!1}}}),l=t({name:`NetWorthSnapshot`,description:`Net worth snapshot model`,fields:{asOf:{type:e.DateTime(),isOptional:!1},totalAssets:{type:e.Float_unsecure(),isOptional:!1},totalLiabilities:{type:e.Float_unsecure(),isOptional:!1},netWorth:{type:e.Float_unsecure(),isOptional:!1},currency:{type:e.String_unsecure(),isOptional:!1}}}),u=t({name:`CreateAccountInput`,description:`Create account input`,fields:{name:{type:e.String_unsecure(),isOptional:!1},type:{type:e.String_unsecure(),isOptional:!1},currency:{type:e.String_unsecure(),isOptional:!0},balance:{type:e.Float_unsecure(),isOptional:!0},orgId:{type:e.String_unsecure(),isOptional:!1}}}),d=t({name:`AddAssetInput`,description:`Add asset input`,fields:{accountId:{type:e.String_unsecure(),isOptional:!0},name:{type:e.String_unsecure(),isOptional:!1},category:{type:e.String_unsecure(),isOptional:!1},value:{type:e.Float_unsecure(),isOptional:!1},currency:{type:e.String_unsecure(),isOptional:!0},orgId:{type:e.String_unsecure(),isOptional:!1}}}),f=t({name:`AddLiabilityInput`,description:`Add liability input`,fields:{accountId:{type:e.String_unsecure(),isOptional:!0},name:{type:e.String_unsecure(),isOptional:!1},category:{type:e.String_unsecure(),isOptional:!1},balance:{type:e.Float_unsecure(),isOptional:!1},currency:{type:e.String_unsecure(),isOptional:!0},orgId:{type:e.String_unsecure(),isOptional:!1}}}),p=t({name:`UpdateGoalInput`,description:`Update goal progress`,fields:{goalId:{type:e.String_unsecure(),isOptional:!1},currentAmount:{type:e.Float_unsecure(),isOptional:!1},status:{type:e.String_unsecure(),isOptional:!0}}}),m=t({name:`CreateGoalInput`,description:`Create goal input`,fields:{name:{type:e.String_unsecure(),isOptional:!1},targetAmount:{type:e.Float_unsecure(),isOptional:!1},currency:{type:e.String_unsecure(),isOptional:!0},targetDate:{type:e.DateTime(),isOptional:!0},orgId:{type:e.String_unsecure(),isOptional:!1}}}),h=t({name:`NetWorthQueryInput`,description:`Filter for net worth snapshots`,fields:{orgId:{type:e.String_unsecure(),isOptional:!1},from:{type:e.DateTime(),isOptional:!0},to:{type:e.DateTime(),isOptional:!0}}}),g=n({meta:{name:`wealth.account.create`,version:1,stability:`stable`,owners:[...i],tags:[`wealth`,`account`,`create`],description:`Create a financial account.`,goal:`Track account balances.`,context:`Onboarding/import.`},io:{input:u,output:a},policy:{auth:`user`}}),_=n({meta:{name:`wealth.asset.add`,version:1,stability:`stable`,owners:[...i],tags:[`wealth`,`asset`,`add`],description:`Add an asset position.`,goal:`Track holdings.`,context:`Asset onboarding/update.`},io:{input:d,output:o},policy:{auth:`user`}}),v=n({meta:{name:`wealth.liability.add`,version:1,stability:`stable`,owners:[...i],tags:[`wealth`,`liability`,`add`],description:`Add a liability.`,goal:`Track debts.`,context:`Debt onboarding/update.`},io:{input:f,output:s},policy:{auth:`user`}}),y=n({meta:{name:`wealth.goal.create`,version:1,stability:`stable`,owners:[...i],tags:[`wealth`,`goal`,`create`],description:`Create a financial goal.`,goal:`Track progress toward goals.`,context:`Planning.`},io:{input:m,output:c},policy:{auth:`user`}}),b=n({meta:{name:`wealth.goal.update`,version:1,stability:`stable`,owners:[...i],tags:[`wealth`,`goal`,`update`],description:`Update goal progress.`,goal:`Keep progress current.`,context:`Periodic update.`},io:{input:p,output:c},policy:{auth:`user`}}),x=r({meta:{name:`wealth.networth.get`,version:1,stability:`stable`,owners:[...i],tags:[`wealth`,`networth`],description:`Get net worth snapshots for a period.`,goal:`Render charts and indicators.`,context:`Dashboard.`},io:{input:h,output:t({name:`NetWorthQueryOutput`,description:`Snapshots + latest indicators`,fields:{snapshots:{type:l,isArray:!0,isOptional:!1},latest:{type:l,isOptional:!0}}})},policy:{auth:`user`}});export{a as AccountModel,_ as AddAssetContract,v as AddLiabilityContract,o as AssetModel,g as CreateAccountContract,y as CreateGoalContract,x as GetNetWorthContract,c as GoalModel,s as LiabilityModel,l as NetWorthSnapshotModel,b as UpdateGoalContract};
|