@contractspec/example.wealth-snapshot 1.44.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/LICENSE +21 -0
- package/README.md +14 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/wealth-snapshot.docblock.d.ts +1 -0
- package/dist/docs/wealth-snapshot.docblock.js +104 -0
- 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 -0
- 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 -0
- 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 -0
- 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 -0
- 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 -0
- 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 -0
- 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 -0
- 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 -0
- package/dist/wealth-snapshot.feature.js.map +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
2
|
+
import { defineCommand, defineQuery } from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/operations/index.ts
|
|
5
|
+
const OWNERS = ["examples.wealth-snapshot"];
|
|
6
|
+
const AccountModel = defineSchemaModel({
|
|
7
|
+
name: "Account",
|
|
8
|
+
description: "Account model",
|
|
9
|
+
fields: {
|
|
10
|
+
id: {
|
|
11
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
12
|
+
isOptional: false
|
|
13
|
+
},
|
|
14
|
+
name: {
|
|
15
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
16
|
+
isOptional: false
|
|
17
|
+
},
|
|
18
|
+
type: {
|
|
19
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
20
|
+
isOptional: false
|
|
21
|
+
},
|
|
22
|
+
currency: {
|
|
23
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
24
|
+
isOptional: false
|
|
25
|
+
},
|
|
26
|
+
balance: {
|
|
27
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
28
|
+
isOptional: false
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const AssetModel = defineSchemaModel({
|
|
33
|
+
name: "Asset",
|
|
34
|
+
description: "Asset model",
|
|
35
|
+
fields: {
|
|
36
|
+
id: {
|
|
37
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
38
|
+
isOptional: false
|
|
39
|
+
},
|
|
40
|
+
name: {
|
|
41
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
42
|
+
isOptional: false
|
|
43
|
+
},
|
|
44
|
+
category: {
|
|
45
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
46
|
+
isOptional: false
|
|
47
|
+
},
|
|
48
|
+
value: {
|
|
49
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
50
|
+
isOptional: false
|
|
51
|
+
},
|
|
52
|
+
currency: {
|
|
53
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
54
|
+
isOptional: false
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
const LiabilityModel = defineSchemaModel({
|
|
59
|
+
name: "Liability",
|
|
60
|
+
description: "Liability model",
|
|
61
|
+
fields: {
|
|
62
|
+
id: {
|
|
63
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
64
|
+
isOptional: false
|
|
65
|
+
},
|
|
66
|
+
name: {
|
|
67
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
68
|
+
isOptional: false
|
|
69
|
+
},
|
|
70
|
+
category: {
|
|
71
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
72
|
+
isOptional: false
|
|
73
|
+
},
|
|
74
|
+
balance: {
|
|
75
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
76
|
+
isOptional: false
|
|
77
|
+
},
|
|
78
|
+
currency: {
|
|
79
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
80
|
+
isOptional: false
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
const GoalModel = defineSchemaModel({
|
|
85
|
+
name: "Goal",
|
|
86
|
+
description: "Goal model",
|
|
87
|
+
fields: {
|
|
88
|
+
id: {
|
|
89
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
90
|
+
isOptional: false
|
|
91
|
+
},
|
|
92
|
+
name: {
|
|
93
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
94
|
+
isOptional: false
|
|
95
|
+
},
|
|
96
|
+
targetAmount: {
|
|
97
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
98
|
+
isOptional: false
|
|
99
|
+
},
|
|
100
|
+
currentAmount: {
|
|
101
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
102
|
+
isOptional: false
|
|
103
|
+
},
|
|
104
|
+
currency: {
|
|
105
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
106
|
+
isOptional: false
|
|
107
|
+
},
|
|
108
|
+
status: {
|
|
109
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
110
|
+
isOptional: false
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
const NetWorthSnapshotModel = defineSchemaModel({
|
|
115
|
+
name: "NetWorthSnapshot",
|
|
116
|
+
description: "Net worth snapshot model",
|
|
117
|
+
fields: {
|
|
118
|
+
asOf: {
|
|
119
|
+
type: ScalarTypeEnum.DateTime(),
|
|
120
|
+
isOptional: false
|
|
121
|
+
},
|
|
122
|
+
totalAssets: {
|
|
123
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
124
|
+
isOptional: false
|
|
125
|
+
},
|
|
126
|
+
totalLiabilities: {
|
|
127
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
128
|
+
isOptional: false
|
|
129
|
+
},
|
|
130
|
+
netWorth: {
|
|
131
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
132
|
+
isOptional: false
|
|
133
|
+
},
|
|
134
|
+
currency: {
|
|
135
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
136
|
+
isOptional: false
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
const CreateAccountInput = defineSchemaModel({
|
|
141
|
+
name: "CreateAccountInput",
|
|
142
|
+
description: "Create account input",
|
|
143
|
+
fields: {
|
|
144
|
+
name: {
|
|
145
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
146
|
+
isOptional: false
|
|
147
|
+
},
|
|
148
|
+
type: {
|
|
149
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
150
|
+
isOptional: false
|
|
151
|
+
},
|
|
152
|
+
currency: {
|
|
153
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
154
|
+
isOptional: true
|
|
155
|
+
},
|
|
156
|
+
balance: {
|
|
157
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
158
|
+
isOptional: true
|
|
159
|
+
},
|
|
160
|
+
orgId: {
|
|
161
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
162
|
+
isOptional: false
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
const AddAssetInput = defineSchemaModel({
|
|
167
|
+
name: "AddAssetInput",
|
|
168
|
+
description: "Add asset input",
|
|
169
|
+
fields: {
|
|
170
|
+
accountId: {
|
|
171
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
172
|
+
isOptional: true
|
|
173
|
+
},
|
|
174
|
+
name: {
|
|
175
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
176
|
+
isOptional: false
|
|
177
|
+
},
|
|
178
|
+
category: {
|
|
179
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
180
|
+
isOptional: false
|
|
181
|
+
},
|
|
182
|
+
value: {
|
|
183
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
184
|
+
isOptional: false
|
|
185
|
+
},
|
|
186
|
+
currency: {
|
|
187
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
188
|
+
isOptional: true
|
|
189
|
+
},
|
|
190
|
+
orgId: {
|
|
191
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
192
|
+
isOptional: false
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
const AddLiabilityInput = defineSchemaModel({
|
|
197
|
+
name: "AddLiabilityInput",
|
|
198
|
+
description: "Add liability input",
|
|
199
|
+
fields: {
|
|
200
|
+
accountId: {
|
|
201
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
202
|
+
isOptional: true
|
|
203
|
+
},
|
|
204
|
+
name: {
|
|
205
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
206
|
+
isOptional: false
|
|
207
|
+
},
|
|
208
|
+
category: {
|
|
209
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
210
|
+
isOptional: false
|
|
211
|
+
},
|
|
212
|
+
balance: {
|
|
213
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
214
|
+
isOptional: false
|
|
215
|
+
},
|
|
216
|
+
currency: {
|
|
217
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
218
|
+
isOptional: true
|
|
219
|
+
},
|
|
220
|
+
orgId: {
|
|
221
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
222
|
+
isOptional: false
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
const UpdateGoalInput = defineSchemaModel({
|
|
227
|
+
name: "UpdateGoalInput",
|
|
228
|
+
description: "Update goal progress",
|
|
229
|
+
fields: {
|
|
230
|
+
goalId: {
|
|
231
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
232
|
+
isOptional: false
|
|
233
|
+
},
|
|
234
|
+
currentAmount: {
|
|
235
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
236
|
+
isOptional: false
|
|
237
|
+
},
|
|
238
|
+
status: {
|
|
239
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
240
|
+
isOptional: true
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
const CreateGoalInput = defineSchemaModel({
|
|
245
|
+
name: "CreateGoalInput",
|
|
246
|
+
description: "Create goal input",
|
|
247
|
+
fields: {
|
|
248
|
+
name: {
|
|
249
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
250
|
+
isOptional: false
|
|
251
|
+
},
|
|
252
|
+
targetAmount: {
|
|
253
|
+
type: ScalarTypeEnum.Float_unsecure(),
|
|
254
|
+
isOptional: false
|
|
255
|
+
},
|
|
256
|
+
currency: {
|
|
257
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
258
|
+
isOptional: true
|
|
259
|
+
},
|
|
260
|
+
targetDate: {
|
|
261
|
+
type: ScalarTypeEnum.DateTime(),
|
|
262
|
+
isOptional: true
|
|
263
|
+
},
|
|
264
|
+
orgId: {
|
|
265
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
266
|
+
isOptional: false
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
const NetWorthQueryInput = defineSchemaModel({
|
|
271
|
+
name: "NetWorthQueryInput",
|
|
272
|
+
description: "Filter for net worth snapshots",
|
|
273
|
+
fields: {
|
|
274
|
+
orgId: {
|
|
275
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
276
|
+
isOptional: false
|
|
277
|
+
},
|
|
278
|
+
from: {
|
|
279
|
+
type: ScalarTypeEnum.DateTime(),
|
|
280
|
+
isOptional: true
|
|
281
|
+
},
|
|
282
|
+
to: {
|
|
283
|
+
type: ScalarTypeEnum.DateTime(),
|
|
284
|
+
isOptional: true
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
const CreateAccountContract = defineCommand({
|
|
289
|
+
meta: {
|
|
290
|
+
key: "wealth.account.create",
|
|
291
|
+
version: 1,
|
|
292
|
+
stability: "stable",
|
|
293
|
+
owners: [...OWNERS],
|
|
294
|
+
tags: [
|
|
295
|
+
"wealth",
|
|
296
|
+
"account",
|
|
297
|
+
"create"
|
|
298
|
+
],
|
|
299
|
+
description: "Create a financial account.",
|
|
300
|
+
goal: "Track account balances.",
|
|
301
|
+
context: "Onboarding/import."
|
|
302
|
+
},
|
|
303
|
+
io: {
|
|
304
|
+
input: CreateAccountInput,
|
|
305
|
+
output: AccountModel
|
|
306
|
+
},
|
|
307
|
+
policy: { auth: "user" }
|
|
308
|
+
});
|
|
309
|
+
const AddAssetContract = defineCommand({
|
|
310
|
+
meta: {
|
|
311
|
+
key: "wealth.asset.add",
|
|
312
|
+
version: 1,
|
|
313
|
+
stability: "stable",
|
|
314
|
+
owners: [...OWNERS],
|
|
315
|
+
tags: [
|
|
316
|
+
"wealth",
|
|
317
|
+
"asset",
|
|
318
|
+
"add"
|
|
319
|
+
],
|
|
320
|
+
description: "Add an asset position.",
|
|
321
|
+
goal: "Track holdings.",
|
|
322
|
+
context: "Asset onboarding/update."
|
|
323
|
+
},
|
|
324
|
+
io: {
|
|
325
|
+
input: AddAssetInput,
|
|
326
|
+
output: AssetModel
|
|
327
|
+
},
|
|
328
|
+
policy: { auth: "user" }
|
|
329
|
+
});
|
|
330
|
+
const AddLiabilityContract = defineCommand({
|
|
331
|
+
meta: {
|
|
332
|
+
key: "wealth.liability.add",
|
|
333
|
+
version: 1,
|
|
334
|
+
stability: "stable",
|
|
335
|
+
owners: [...OWNERS],
|
|
336
|
+
tags: [
|
|
337
|
+
"wealth",
|
|
338
|
+
"liability",
|
|
339
|
+
"add"
|
|
340
|
+
],
|
|
341
|
+
description: "Add a liability.",
|
|
342
|
+
goal: "Track debts.",
|
|
343
|
+
context: "Debt onboarding/update."
|
|
344
|
+
},
|
|
345
|
+
io: {
|
|
346
|
+
input: AddLiabilityInput,
|
|
347
|
+
output: LiabilityModel
|
|
348
|
+
},
|
|
349
|
+
policy: { auth: "user" }
|
|
350
|
+
});
|
|
351
|
+
const CreateGoalContract = defineCommand({
|
|
352
|
+
meta: {
|
|
353
|
+
key: "wealth.goal.create",
|
|
354
|
+
version: 1,
|
|
355
|
+
stability: "stable",
|
|
356
|
+
owners: [...OWNERS],
|
|
357
|
+
tags: [
|
|
358
|
+
"wealth",
|
|
359
|
+
"goal",
|
|
360
|
+
"create"
|
|
361
|
+
],
|
|
362
|
+
description: "Create a financial goal.",
|
|
363
|
+
goal: "Track progress toward goals.",
|
|
364
|
+
context: "Planning."
|
|
365
|
+
},
|
|
366
|
+
io: {
|
|
367
|
+
input: CreateGoalInput,
|
|
368
|
+
output: GoalModel
|
|
369
|
+
},
|
|
370
|
+
policy: { auth: "user" }
|
|
371
|
+
});
|
|
372
|
+
const UpdateGoalContract = defineCommand({
|
|
373
|
+
meta: {
|
|
374
|
+
key: "wealth.goal.update",
|
|
375
|
+
version: 1,
|
|
376
|
+
stability: "stable",
|
|
377
|
+
owners: [...OWNERS],
|
|
378
|
+
tags: [
|
|
379
|
+
"wealth",
|
|
380
|
+
"goal",
|
|
381
|
+
"update"
|
|
382
|
+
],
|
|
383
|
+
description: "Update goal progress.",
|
|
384
|
+
goal: "Keep progress current.",
|
|
385
|
+
context: "Periodic update."
|
|
386
|
+
},
|
|
387
|
+
io: {
|
|
388
|
+
input: UpdateGoalInput,
|
|
389
|
+
output: GoalModel
|
|
390
|
+
},
|
|
391
|
+
policy: { auth: "user" }
|
|
392
|
+
});
|
|
393
|
+
const GetNetWorthContract = defineQuery({
|
|
394
|
+
meta: {
|
|
395
|
+
key: "wealth.networth.get",
|
|
396
|
+
version: 1,
|
|
397
|
+
stability: "stable",
|
|
398
|
+
owners: [...OWNERS],
|
|
399
|
+
tags: ["wealth", "networth"],
|
|
400
|
+
description: "Get net worth snapshots for a period.",
|
|
401
|
+
goal: "Render charts and indicators.",
|
|
402
|
+
context: "Dashboard."
|
|
403
|
+
},
|
|
404
|
+
io: {
|
|
405
|
+
input: NetWorthQueryInput,
|
|
406
|
+
output: defineSchemaModel({
|
|
407
|
+
name: "NetWorthQueryOutput",
|
|
408
|
+
description: "Snapshots + latest indicators",
|
|
409
|
+
fields: {
|
|
410
|
+
snapshots: {
|
|
411
|
+
type: NetWorthSnapshotModel,
|
|
412
|
+
isArray: true,
|
|
413
|
+
isOptional: false
|
|
414
|
+
},
|
|
415
|
+
latest: {
|
|
416
|
+
type: NetWorthSnapshotModel,
|
|
417
|
+
isOptional: true
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
})
|
|
421
|
+
},
|
|
422
|
+
policy: { auth: "user" }
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
//#endregion
|
|
426
|
+
export { AccountModel, AddAssetContract, AddLiabilityContract, AssetModel, CreateAccountContract, CreateGoalContract, GetNetWorthContract, GoalModel, LiabilityModel, NetWorthSnapshotModel, UpdateGoalContract };
|
|
427
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,\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,\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,\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,\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,\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,\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,UAA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V;CACD,IAAI;EAAE,OAAO;EAAiB,QAAQ;EAAW;CACjD,QAAQ,EAAE,MAAM,QAAQ;CACzB,CAAC;AAGF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,UAAU,WAAW;EAC5B,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ,kBAAkB;GACxB,MAAM;GACN,aAAa;GACb,QAAQ;IACN,WAAW;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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/presentations/index.ts"],"sourcesContent":[],"mappings":";cAAa"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/presentations/index.ts
|
|
2
|
+
const WealthSnapshotPresentations = [
|
|
3
|
+
"wealth-snapshot.dashboard",
|
|
4
|
+
"wealth-snapshot.accounts.list",
|
|
5
|
+
"wealth-snapshot.assets.list",
|
|
6
|
+
"wealth-snapshot.liabilities.list",
|
|
7
|
+
"wealth-snapshot.goals.list"
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { WealthSnapshotPresentations };
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PresentationSpec } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/presentations.d.ts
|
|
4
|
+
declare const WealthDashboardPresentation: PresentationSpec;
|
|
5
|
+
declare const AccountsListPresentation: PresentationSpec;
|
|
6
|
+
declare const AssetsListPresentation: PresentationSpec;
|
|
7
|
+
declare const LiabilitiesListPresentation: PresentationSpec;
|
|
8
|
+
declare const GoalsListPresentation: PresentationSpec;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { AccountsListPresentation, AssetsListPresentation, GoalsListPresentation, LiabilitiesListPresentation, WealthDashboardPresentation };
|
|
11
|
+
//# sourceMappingURL=presentations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentations.d.ts","names":[],"sources":["../src/presentations.ts"],"sourcesContent":[],"mappings":";;;cAGa,6BAA6B;cAwB7B,0BAA0B;AAxB1B,cAgDA,sBA1BZ,EA0BoC,gBAhDK;AAwB7B,cAgDA,2BAhD0B,EAgDG,gBA1BzC;AAEY,cAgDA,qBAhDwB,EAgDD,gBA1BnC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { StabilityEnum } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/presentations.ts
|
|
4
|
+
const WealthDashboardPresentation = {
|
|
5
|
+
meta: {
|
|
6
|
+
key: "wealth-snapshot.dashboard",
|
|
7
|
+
version: 1,
|
|
8
|
+
title: "Wealth Dashboard",
|
|
9
|
+
description: "Wealth snapshot dashboard with net worth overview",
|
|
10
|
+
domain: "finance",
|
|
11
|
+
owners: ["@wealth-snapshot"],
|
|
12
|
+
tags: [
|
|
13
|
+
"finance",
|
|
14
|
+
"wealth",
|
|
15
|
+
"dashboard"
|
|
16
|
+
],
|
|
17
|
+
stability: StabilityEnum.Experimental,
|
|
18
|
+
goal: "Overview of wealth",
|
|
19
|
+
context: "Dashboard"
|
|
20
|
+
},
|
|
21
|
+
source: {
|
|
22
|
+
type: "component",
|
|
23
|
+
framework: "react",
|
|
24
|
+
componentKey: "WealthDashboard"
|
|
25
|
+
},
|
|
26
|
+
targets: ["react", "markdown"],
|
|
27
|
+
policy: { flags: ["wealth.dashboard.enabled"] }
|
|
28
|
+
};
|
|
29
|
+
const AccountsListPresentation = {
|
|
30
|
+
meta: {
|
|
31
|
+
key: "wealth-snapshot.accounts.list",
|
|
32
|
+
version: 1,
|
|
33
|
+
title: "Accounts List",
|
|
34
|
+
description: "List of financial accounts",
|
|
35
|
+
domain: "finance",
|
|
36
|
+
owners: ["@wealth-snapshot"],
|
|
37
|
+
tags: [
|
|
38
|
+
"finance",
|
|
39
|
+
"accounts",
|
|
40
|
+
"list"
|
|
41
|
+
],
|
|
42
|
+
stability: StabilityEnum.Experimental,
|
|
43
|
+
goal: "List accounts",
|
|
44
|
+
context: "Overview"
|
|
45
|
+
},
|
|
46
|
+
source: {
|
|
47
|
+
type: "component",
|
|
48
|
+
framework: "react",
|
|
49
|
+
componentKey: "AccountsList"
|
|
50
|
+
},
|
|
51
|
+
targets: ["react", "markdown"],
|
|
52
|
+
policy: { flags: ["wealth.accounts.enabled"] }
|
|
53
|
+
};
|
|
54
|
+
const AssetsListPresentation = {
|
|
55
|
+
meta: {
|
|
56
|
+
key: "wealth-snapshot.assets.list",
|
|
57
|
+
version: 1,
|
|
58
|
+
title: "Assets List",
|
|
59
|
+
description: "List of assets with valuations",
|
|
60
|
+
domain: "finance",
|
|
61
|
+
owners: ["@wealth-snapshot"],
|
|
62
|
+
tags: [
|
|
63
|
+
"finance",
|
|
64
|
+
"assets",
|
|
65
|
+
"list"
|
|
66
|
+
],
|
|
67
|
+
stability: StabilityEnum.Experimental,
|
|
68
|
+
goal: "List assets",
|
|
69
|
+
context: "Overview"
|
|
70
|
+
},
|
|
71
|
+
source: {
|
|
72
|
+
type: "component",
|
|
73
|
+
framework: "react",
|
|
74
|
+
componentKey: "AssetsList"
|
|
75
|
+
},
|
|
76
|
+
targets: ["react", "markdown"],
|
|
77
|
+
policy: { flags: ["wealth.assets.enabled"] }
|
|
78
|
+
};
|
|
79
|
+
const LiabilitiesListPresentation = {
|
|
80
|
+
meta: {
|
|
81
|
+
key: "wealth-snapshot.liabilities.list",
|
|
82
|
+
version: 1,
|
|
83
|
+
title: "Liabilities List",
|
|
84
|
+
description: "List of liabilities and debts",
|
|
85
|
+
domain: "finance",
|
|
86
|
+
owners: ["@wealth-snapshot"],
|
|
87
|
+
tags: [
|
|
88
|
+
"finance",
|
|
89
|
+
"liabilities",
|
|
90
|
+
"list"
|
|
91
|
+
],
|
|
92
|
+
stability: StabilityEnum.Experimental,
|
|
93
|
+
goal: "List liabilities",
|
|
94
|
+
context: "Overview"
|
|
95
|
+
},
|
|
96
|
+
source: {
|
|
97
|
+
type: "component",
|
|
98
|
+
framework: "react",
|
|
99
|
+
componentKey: "LiabilitiesList"
|
|
100
|
+
},
|
|
101
|
+
targets: ["react", "markdown"],
|
|
102
|
+
policy: { flags: ["wealth.liabilities.enabled"] }
|
|
103
|
+
};
|
|
104
|
+
const GoalsListPresentation = {
|
|
105
|
+
meta: {
|
|
106
|
+
key: "wealth-snapshot.goals.list",
|
|
107
|
+
version: 1,
|
|
108
|
+
title: "Goals List",
|
|
109
|
+
description: "List of financial goals with progress",
|
|
110
|
+
domain: "finance",
|
|
111
|
+
owners: ["@wealth-snapshot"],
|
|
112
|
+
tags: [
|
|
113
|
+
"finance",
|
|
114
|
+
"goals",
|
|
115
|
+
"list"
|
|
116
|
+
],
|
|
117
|
+
stability: StabilityEnum.Experimental,
|
|
118
|
+
goal: "List goals",
|
|
119
|
+
context: "Overview"
|
|
120
|
+
},
|
|
121
|
+
source: {
|
|
122
|
+
type: "component",
|
|
123
|
+
framework: "react",
|
|
124
|
+
componentKey: "GoalsList"
|
|
125
|
+
},
|
|
126
|
+
targets: ["react", "markdown"],
|
|
127
|
+
policy: { flags: ["wealth.goals.enabled"] }
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
//#endregion
|
|
131
|
+
export { AccountsListPresentation, AssetsListPresentation, GoalsListPresentation, LiabilitiesListPresentation, WealthDashboardPresentation };
|
|
132
|
+
//# sourceMappingURL=presentations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentations.js","names":["WealthDashboardPresentation: PresentationSpec","AccountsListPresentation: PresentationSpec","AssetsListPresentation: PresentationSpec","LiabilitiesListPresentation: PresentationSpec","GoalsListPresentation: PresentationSpec"],"sources":["../src/presentations.ts"],"sourcesContent":["import type { PresentationSpec } from '@contractspec/lib.contracts';\nimport { StabilityEnum } from '@contractspec/lib.contracts';\n\nexport const WealthDashboardPresentation: PresentationSpec = {\n meta: {\n key: 'wealth-snapshot.dashboard',\n version: 1,\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: PresentationSpec = {\n meta: {\n key: 'wealth-snapshot.accounts.list',\n version: 1,\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: PresentationSpec = {\n meta: {\n key: 'wealth-snapshot.assets.list',\n version: 1,\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: PresentationSpec = {\n meta: {\n key: 'wealth-snapshot.liabilities.list',\n version: 1,\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: PresentationSpec = {\n meta: {\n key: 'wealth-snapshot.goals.list',\n version: 1,\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":";;;AAGA,MAAaA,8BAAgD;CAC3D,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,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,2BAA2B,EACpC;CACF;AAED,MAAaC,2BAA6C;CACxD,MAAM;EACJ,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Q,EACN,OAAO,CAAC,uBAAuB,EAChC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FeatureModuleSpec } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/wealth-snapshot.feature.d.ts
|
|
4
|
+
declare const WealthSnapshotFeature: FeatureModuleSpec;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { WealthSnapshotFeature };
|
|
7
|
+
//# sourceMappingURL=wealth-snapshot.feature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wealth-snapshot.feature.d.ts","names":[],"sources":["../src/wealth-snapshot.feature.ts"],"sourcesContent":[],"mappings":";;;cAEa,uBAAuB"}
|