@warmio/contracts 3.0.5 → 3.0.7

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 (50) hide show
  1. package/dist/api/endpoints.d.ts +2 -0
  2. package/dist/api/endpoints.d.ts.map +1 -1
  3. package/dist/api/endpoints.js +2 -0
  4. package/dist/api/endpoints.js.map +1 -1
  5. package/dist/financial-context-artifact-protocol.d.ts +1425 -7
  6. package/dist/financial-context-artifact-protocol.d.ts.map +1 -1
  7. package/dist/financial-context-artifact-protocol.js +20 -4
  8. package/dist/financial-context-artifact-protocol.js.map +1 -1
  9. package/dist/generated/mcp-package-release-metadata.d.ts +1 -1
  10. package/dist/generated/mcp-package-release-metadata.d.ts.map +1 -1
  11. package/dist/generated/mcp-package-release-metadata.js +1 -1
  12. package/dist/generated/mcp-package-release-metadata.js.map +1 -1
  13. package/dist/generated/private-mcp-tool-descriptors.d.ts +157 -3
  14. package/dist/generated/private-mcp-tool-descriptors.d.ts.map +1 -1
  15. package/dist/generated/private-mcp-tool-descriptors.js +228 -5
  16. package/dist/generated/private-mcp-tool-descriptors.js.map +1 -1
  17. package/dist/generated/protected-crawler-paths.d.ts +1 -1
  18. package/dist/generated/protected-crawler-paths.d.ts.map +1 -1
  19. package/dist/generated/protected-crawler-paths.js +0 -3
  20. package/dist/generated/protected-crawler-paths.js.map +1 -1
  21. package/dist/generated/warm-app-api-manifest.d.ts +162 -8
  22. package/dist/generated/warm-app-api-manifest.d.ts.map +1 -1
  23. package/dist/generated/warm-app-api-manifest.js +233 -10
  24. package/dist/generated/warm-app-api-manifest.js.map +1 -1
  25. package/dist/manifest.d.ts +2 -2
  26. package/dist/mcp/hosted-write-tools.d.ts +1745 -0
  27. package/dist/mcp/hosted-write-tools.d.ts.map +1 -0
  28. package/dist/mcp/hosted-write-tools.js +318 -0
  29. package/dist/mcp/hosted-write-tools.js.map +1 -0
  30. package/dist/mcp/index.d.ts +1 -0
  31. package/dist/mcp/index.d.ts.map +1 -1
  32. package/dist/mcp/index.js +1 -0
  33. package/dist/mcp/index.js.map +1 -1
  34. package/dist/mcp/public-output.d.ts +63 -3
  35. package/dist/mcp/public-output.d.ts.map +1 -1
  36. package/dist/mcp/public-output.js +23 -2
  37. package/dist/mcp/public-output.js.map +1 -1
  38. package/dist/mcp/public-tools.d.ts +48 -3
  39. package/dist/mcp/public-tools.d.ts.map +1 -1
  40. package/dist/mcp/public-tools.js +2 -0
  41. package/dist/mcp/public-tools.js.map +1 -1
  42. package/dist/mcp/tools.d.ts +550 -6
  43. package/dist/mcp/tools.d.ts.map +1 -1
  44. package/dist/mcp/tools.js +43 -5
  45. package/dist/mcp/tools.js.map +1 -1
  46. package/dist/schemas/financial-context.d.ts +53 -0
  47. package/dist/schemas/financial-context.d.ts.map +1 -1
  48. package/dist/schemas/financial-context.js +9 -0
  49. package/dist/schemas/financial-context.js.map +1 -1
  50. package/package.json +1 -1
@@ -1,5 +1,4 @@
1
1
  import { z } from 'zod';
2
- import { financialContextSchema, transactionMonthSchema } from './schemas/financial-context.js';
3
2
  export declare const FINANCIAL_CONTEXT_PROTOCOL_VERSION: 2;
4
3
  export declare const financialContextAccessEpochSchema: z.ZodObject<{
5
4
  user_revision: z.ZodString;
@@ -78,12 +77,1369 @@ export declare const financialContextAdmissionSchema: z.ZodObject<{
78
77
  };
79
78
  }>;
80
79
  export type FinancialContextAdmission = z.infer<typeof financialContextAdmissionSchema>;
81
- type FinancialContextArtifactHashContent = {
80
+ export declare const financialContextInterpretationSchema: z.ZodObject<{
81
+ transfers: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
82
+ merchants: z.ZodLiteral<0>;
83
+ }, "strict", z.ZodTypeAny, {
84
+ transfers: 0 | 1;
85
+ merchants: 0;
86
+ }, {
87
+ transfers: 0 | 1;
88
+ merchants: 0;
89
+ }>;
90
+ declare const financialContextArtifactHashInputSchema: z.ZodEffects<z.ZodObject<{
91
+ user_id: z.ZodString;
92
+ access_epoch: z.ZodObject<{
93
+ user_revision: z.ZodString;
94
+ household: z.ZodNullable<z.ZodObject<{
95
+ id: z.ZodEffects<z.ZodString, string, string>;
96
+ revision: z.ZodString;
97
+ }, "strict", z.ZodTypeAny, {
98
+ id: string;
99
+ revision: string;
100
+ }, {
101
+ id: string;
102
+ revision: string;
103
+ }>>;
104
+ }, "strict", z.ZodTypeAny, {
105
+ user_revision: string;
106
+ household: {
107
+ id: string;
108
+ revision: string;
109
+ } | null;
110
+ }, {
111
+ user_revision: string;
112
+ household: {
113
+ id: string;
114
+ revision: string;
115
+ } | null;
116
+ }>;
117
+ context: z.ZodObject<{
118
+ version: z.ZodEnum<["v1"]>;
119
+ updated_at: z.ZodString;
120
+ currency: z.ZodEnum<["USD"]>;
121
+ status: z.ZodObject<{
122
+ position: z.ZodNullable<z.ZodObject<{
123
+ date: z.ZodNullable<z.ZodString>;
124
+ net_worth: z.ZodNullable<z.ZodNumber>;
125
+ cash: z.ZodNullable<z.ZodNumber>;
126
+ debt: z.ZodNullable<z.ZodNumber>;
127
+ investments: z.ZodNullable<z.ZodNumber>;
128
+ other_assets: z.ZodNullable<z.ZodNumber>;
129
+ total_assets: z.ZodNullable<z.ZodNumber>;
130
+ }, "strict", z.ZodTypeAny, {
131
+ date: string | null;
132
+ net_worth: number | null;
133
+ cash: number | null;
134
+ debt: number | null;
135
+ investments: number | null;
136
+ other_assets: number | null;
137
+ total_assets: number | null;
138
+ }, {
139
+ date: string | null;
140
+ net_worth: number | null;
141
+ cash: number | null;
142
+ debt: number | null;
143
+ investments: number | null;
144
+ other_assets: number | null;
145
+ total_assets: number | null;
146
+ }>>;
147
+ accounts: z.ZodArray<z.ZodObject<{
148
+ id: z.ZodString;
149
+ name: z.ZodString;
150
+ source: z.ZodNullable<z.ZodEnum<["plaid", "manual", "csv_import"]>>;
151
+ type: z.ZodEnum<["depository", "credit", "loan", "investment", "brokerage", "other"]>;
152
+ subtype: z.ZodNullable<z.ZodString>;
153
+ group: z.ZodNullable<z.ZodEnum<["cash", "debt", "investments", "other"]>>;
154
+ institution: z.ZodNullable<z.ZodString>;
155
+ mask: z.ZodNullable<z.ZodString>;
156
+ balance: z.ZodNullable<z.ZodNumber>;
157
+ available: z.ZodNullable<z.ZodNumber>;
158
+ currency: z.ZodNullable<z.ZodString>;
159
+ updated_at: z.ZodNullable<z.ZodString>;
160
+ }, "strict", z.ZodTypeAny, {
161
+ id: string;
162
+ name: string;
163
+ source: "csv_import" | "manual" | "plaid" | null;
164
+ type: "brokerage" | "credit" | "depository" | "investment" | "loan" | "other";
165
+ subtype: string | null;
166
+ group: "cash" | "debt" | "investments" | "other" | null;
167
+ institution: string | null;
168
+ mask: string | null;
169
+ balance: number | null;
170
+ available: number | null;
171
+ currency: string | null;
172
+ updated_at: string | null;
173
+ }, {
174
+ id: string;
175
+ name: string;
176
+ source: "csv_import" | "manual" | "plaid" | null;
177
+ type: "brokerage" | "credit" | "depository" | "investment" | "loan" | "other";
178
+ subtype: string | null;
179
+ group: "cash" | "debt" | "investments" | "other" | null;
180
+ institution: string | null;
181
+ mask: string | null;
182
+ balance: number | null;
183
+ available: number | null;
184
+ currency: string | null;
185
+ updated_at: string | null;
186
+ }>, "many">;
187
+ }, "strict", z.ZodTypeAny, {
188
+ position: {
189
+ date: string | null;
190
+ net_worth: number | null;
191
+ cash: number | null;
192
+ debt: number | null;
193
+ investments: number | null;
194
+ other_assets: number | null;
195
+ total_assets: number | null;
196
+ } | null;
197
+ accounts: {
198
+ id: string;
199
+ name: string;
200
+ source: "csv_import" | "manual" | "plaid" | null;
201
+ type: "brokerage" | "credit" | "depository" | "investment" | "loan" | "other";
202
+ subtype: string | null;
203
+ group: "cash" | "debt" | "investments" | "other" | null;
204
+ institution: string | null;
205
+ mask: string | null;
206
+ balance: number | null;
207
+ available: number | null;
208
+ currency: string | null;
209
+ updated_at: string | null;
210
+ }[];
211
+ }, {
212
+ position: {
213
+ date: string | null;
214
+ net_worth: number | null;
215
+ cash: number | null;
216
+ debt: number | null;
217
+ investments: number | null;
218
+ other_assets: number | null;
219
+ total_assets: number | null;
220
+ } | null;
221
+ accounts: {
222
+ id: string;
223
+ name: string;
224
+ source: "csv_import" | "manual" | "plaid" | null;
225
+ type: "brokerage" | "credit" | "depository" | "investment" | "loan" | "other";
226
+ subtype: string | null;
227
+ group: "cash" | "debt" | "investments" | "other" | null;
228
+ institution: string | null;
229
+ mask: string | null;
230
+ balance: number | null;
231
+ available: number | null;
232
+ currency: string | null;
233
+ updated_at: string | null;
234
+ }[];
235
+ }>;
236
+ transactions: z.ZodObject<{
237
+ total: z.ZodNumber;
238
+ months: z.ZodArray<z.ZodObject<{
239
+ month: z.ZodString;
240
+ count: z.ZodNumber;
241
+ }, "strict", z.ZodTypeAny, {
242
+ month: string;
243
+ count: number;
244
+ }, {
245
+ month: string;
246
+ count: number;
247
+ }>, "many">;
248
+ }, "strict", z.ZodTypeAny, {
249
+ total: number;
250
+ months: {
251
+ month: string;
252
+ count: number;
253
+ }[];
254
+ }, {
255
+ total: number;
256
+ months: {
257
+ month: string;
258
+ count: number;
259
+ }[];
260
+ }>;
261
+ recurring: z.ZodArray<z.ZodObject<{
262
+ id: z.ZodString;
263
+ account_id: z.ZodNullable<z.ZodString>;
264
+ direction: z.ZodNullable<z.ZodEnum<["inflow", "outflow"]>>;
265
+ frequency: z.ZodNullable<z.ZodEnum<["WEEKLY", "BIWEEKLY", "MONTHLY", "QUARTERLY", "SEMI_ANNUALLY", "ANNUALLY"]>>;
266
+ status: z.ZodNullable<z.ZodEnum<["active", "inactive", "dismissed"]>>;
267
+ merchant: z.ZodNullable<z.ZodString>;
268
+ amount: z.ZodNullable<z.ZodNumber>;
269
+ next_date: z.ZodNullable<z.ZodString>;
270
+ excluded_from_subscriptions: z.ZodOptional<z.ZodBoolean>;
271
+ }, "strict", z.ZodTypeAny, {
272
+ id: string;
273
+ account_id: string | null;
274
+ direction: "inflow" | "outflow" | null;
275
+ frequency: "ANNUALLY" | "BIWEEKLY" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUALLY" | "WEEKLY" | null;
276
+ status: "active" | "dismissed" | "inactive" | null;
277
+ merchant: string | null;
278
+ amount: number | null;
279
+ next_date: string | null;
280
+ excluded_from_subscriptions?: boolean | undefined;
281
+ }, {
282
+ id: string;
283
+ account_id: string | null;
284
+ direction: "inflow" | "outflow" | null;
285
+ frequency: "ANNUALLY" | "BIWEEKLY" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUALLY" | "WEEKLY" | null;
286
+ status: "active" | "dismissed" | "inactive" | null;
287
+ merchant: string | null;
288
+ amount: number | null;
289
+ next_date: string | null;
290
+ excluded_from_subscriptions?: boolean | undefined;
291
+ }>, "many">;
292
+ budgets: z.ZodArray<z.ZodObject<{
293
+ id: z.ZodString;
294
+ name: z.ZodString;
295
+ type: z.ZodEnum<["category", "merchant"]>;
296
+ period: z.ZodEnum<["weekly", "biweekly", "monthly"]>;
297
+ status: z.ZodEnum<["under", "warning", "over"]>;
298
+ amount: z.ZodNumber;
299
+ spent: z.ZodNumber;
300
+ remaining: z.ZodNumber;
301
+ used_percent: z.ZodNumber;
302
+ }, "strict", z.ZodTypeAny, {
303
+ id: string;
304
+ name: string;
305
+ type: "category" | "merchant";
306
+ period: "biweekly" | "monthly" | "weekly";
307
+ status: "over" | "under" | "warning";
308
+ amount: number;
309
+ spent: number;
310
+ remaining: number;
311
+ used_percent: number;
312
+ }, {
313
+ id: string;
314
+ name: string;
315
+ type: "category" | "merchant";
316
+ period: "biweekly" | "monthly" | "weekly";
317
+ status: "over" | "under" | "warning";
318
+ amount: number;
319
+ spent: number;
320
+ remaining: number;
321
+ used_percent: number;
322
+ }>, "many">;
323
+ goals: z.ZodArray<z.ZodObject<{
324
+ id: z.ZodString;
325
+ name: z.ZodString;
326
+ category: z.ZodString;
327
+ status: z.ZodEnum<["not_started", "in_progress", "on_track", "behind", "completed"]>;
328
+ target: z.ZodNumber;
329
+ current: z.ZodNumber;
330
+ progress_percent: z.ZodNumber;
331
+ target_date: z.ZodNullable<z.ZodString>;
332
+ }, "strict", z.ZodTypeAny, {
333
+ id: string;
334
+ name: string;
335
+ category: string;
336
+ status: "behind" | "completed" | "in_progress" | "not_started" | "on_track";
337
+ target: number;
338
+ current: number;
339
+ progress_percent: number;
340
+ target_date: string | null;
341
+ }, {
342
+ id: string;
343
+ name: string;
344
+ category: string;
345
+ status: "behind" | "completed" | "in_progress" | "not_started" | "on_track";
346
+ target: number;
347
+ current: number;
348
+ progress_percent: number;
349
+ target_date: string | null;
350
+ }>, "many">;
351
+ snapshots: z.ZodArray<z.ZodObject<{
352
+ date: z.ZodString;
353
+ net_worth: z.ZodNullable<z.ZodNumber>;
354
+ cash: z.ZodNullable<z.ZodNumber>;
355
+ debt: z.ZodNullable<z.ZodNumber>;
356
+ income: z.ZodNullable<z.ZodNumber>;
357
+ expenses: z.ZodNullable<z.ZodNumber>;
358
+ cash_flow: z.ZodNullable<z.ZodNumber>;
359
+ savings_rate: z.ZodNullable<z.ZodNumber>;
360
+ investments: z.ZodNullable<z.ZodNumber>;
361
+ assets: z.ZodNullable<z.ZodNumber>;
362
+ health_score: z.ZodNullable<z.ZodNumber>;
363
+ health_score_model_version: z.ZodNullable<z.ZodLiteral<3>>;
364
+ }, "strict", z.ZodTypeAny, {
365
+ date: string;
366
+ net_worth: number | null;
367
+ cash: number | null;
368
+ debt: number | null;
369
+ income: number | null;
370
+ expenses: number | null;
371
+ cash_flow: number | null;
372
+ savings_rate: number | null;
373
+ investments: number | null;
374
+ assets: number | null;
375
+ health_score: number | null;
376
+ health_score_model_version: 3 | null;
377
+ }, {
378
+ date: string;
379
+ net_worth: number | null;
380
+ cash: number | null;
381
+ debt: number | null;
382
+ income: number | null;
383
+ expenses: number | null;
384
+ cash_flow: number | null;
385
+ savings_rate: number | null;
386
+ investments: number | null;
387
+ assets: number | null;
388
+ health_score: number | null;
389
+ health_score_model_version: 3 | null;
390
+ }>, "many">;
391
+ liabilities: z.ZodArray<z.ZodObject<{
392
+ account_id: z.ZodNullable<z.ZodString>;
393
+ type: z.ZodNullable<z.ZodEnum<["credit", "student", "mortgage", "other"]>>;
394
+ balance: z.ZodNullable<z.ZodNumber>;
395
+ minimum_payment: z.ZodNullable<z.ZodNumber>;
396
+ due_date: z.ZodNullable<z.ZodString>;
397
+ interest_rate: z.ZodNullable<z.ZodNumber>;
398
+ rate_type: z.ZodNullable<z.ZodEnum<["fixed", "variable"]>>;
399
+ overdue: z.ZodNullable<z.ZodBoolean>;
400
+ }, "strict", z.ZodTypeAny, {
401
+ account_id: string | null;
402
+ type: "credit" | "mortgage" | "other" | "student" | null;
403
+ balance: number | null;
404
+ minimum_payment: number | null;
405
+ due_date: string | null;
406
+ interest_rate: number | null;
407
+ rate_type: "fixed" | "variable" | null;
408
+ overdue: boolean | null;
409
+ }, {
410
+ account_id: string | null;
411
+ type: "credit" | "mortgage" | "other" | "student" | null;
412
+ balance: number | null;
413
+ minimum_payment: number | null;
414
+ due_date: string | null;
415
+ interest_rate: number | null;
416
+ rate_type: "fixed" | "variable" | null;
417
+ overdue: boolean | null;
418
+ }>, "many">;
419
+ holdings: z.ZodArray<z.ZodObject<{
420
+ account_id: z.ZodNullable<z.ZodString>;
421
+ symbol: z.ZodNullable<z.ZodString>;
422
+ name: z.ZodNullable<z.ZodString>;
423
+ type: z.ZodNullable<z.ZodEnum<["cash", "derivative", "equity", "etf", "fixed_income", "mutual_fund", "other"]>>;
424
+ quantity: z.ZodNullable<z.ZodNumber>;
425
+ value: z.ZodNullable<z.ZodNumber>;
426
+ cost_basis: z.ZodNullable<z.ZodNumber>;
427
+ }, "strict", z.ZodTypeAny, {
428
+ account_id: string | null;
429
+ symbol: string | null;
430
+ name: string | null;
431
+ type: "cash" | "derivative" | "equity" | "etf" | "fixed_income" | "mutual_fund" | "other" | null;
432
+ quantity: number | null;
433
+ value: number | null;
434
+ cost_basis: number | null;
435
+ }, {
436
+ account_id: string | null;
437
+ symbol: string | null;
438
+ name: string | null;
439
+ type: "cash" | "derivative" | "equity" | "etf" | "fixed_income" | "mutual_fund" | "other" | null;
440
+ quantity: number | null;
441
+ value: number | null;
442
+ cost_basis: number | null;
443
+ }>, "many">;
444
+ health: z.ZodNullable<z.ZodObject<{
445
+ score: z.ZodNumber;
446
+ model_version: z.ZodLiteral<3>;
447
+ record_count: z.ZodNumber;
448
+ label: z.ZodEnum<["Needs Attention", "Good", "Strong"]>;
449
+ level: z.ZodEnum<["strong", "good", "fair", "poor", "critical"]>;
450
+ summary: z.ZodString;
451
+ data_completeness: z.ZodNumber;
452
+ pillars: z.ZodNullable<z.ZodObject<{
453
+ spend: z.ZodNullable<z.ZodNumber>;
454
+ save: z.ZodNullable<z.ZodNumber>;
455
+ borrow: z.ZodNullable<z.ZodNumber>;
456
+ build: z.ZodNullable<z.ZodNumber>;
457
+ }, "strict", z.ZodTypeAny, {
458
+ spend: number | null;
459
+ save: number | null;
460
+ borrow: number | null;
461
+ build: number | null;
462
+ }, {
463
+ spend: number | null;
464
+ save: number | null;
465
+ borrow: number | null;
466
+ build: number | null;
467
+ }>>;
468
+ }, "strict", z.ZodTypeAny, {
469
+ score: number;
470
+ model_version: 3;
471
+ record_count: number;
472
+ label: "Good" | "Needs Attention" | "Strong";
473
+ level: "critical" | "fair" | "good" | "poor" | "strong";
474
+ summary: string;
475
+ data_completeness: number;
476
+ pillars: {
477
+ spend: number | null;
478
+ save: number | null;
479
+ borrow: number | null;
480
+ build: number | null;
481
+ } | null;
482
+ }, {
483
+ score: number;
484
+ model_version: 3;
485
+ record_count: number;
486
+ label: "Good" | "Needs Attention" | "Strong";
487
+ level: "critical" | "fair" | "good" | "poor" | "strong";
488
+ summary: string;
489
+ data_completeness: number;
490
+ pillars: {
491
+ spend: number | null;
492
+ save: number | null;
493
+ borrow: number | null;
494
+ build: number | null;
495
+ } | null;
496
+ }>>;
497
+ }, "strict", z.ZodTypeAny, {
498
+ version: "v1";
499
+ updated_at: string;
500
+ currency: "USD";
501
+ status: {
502
+ position: {
503
+ date: string | null;
504
+ net_worth: number | null;
505
+ cash: number | null;
506
+ debt: number | null;
507
+ investments: number | null;
508
+ other_assets: number | null;
509
+ total_assets: number | null;
510
+ } | null;
511
+ accounts: {
512
+ id: string;
513
+ name: string;
514
+ source: "csv_import" | "manual" | "plaid" | null;
515
+ type: "brokerage" | "credit" | "depository" | "investment" | "loan" | "other";
516
+ subtype: string | null;
517
+ group: "cash" | "debt" | "investments" | "other" | null;
518
+ institution: string | null;
519
+ mask: string | null;
520
+ balance: number | null;
521
+ available: number | null;
522
+ currency: string | null;
523
+ updated_at: string | null;
524
+ }[];
525
+ };
526
+ transactions: {
527
+ total: number;
528
+ months: {
529
+ month: string;
530
+ count: number;
531
+ }[];
532
+ };
533
+ recurring: {
534
+ id: string;
535
+ account_id: string | null;
536
+ direction: "inflow" | "outflow" | null;
537
+ frequency: "ANNUALLY" | "BIWEEKLY" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUALLY" | "WEEKLY" | null;
538
+ status: "active" | "dismissed" | "inactive" | null;
539
+ merchant: string | null;
540
+ amount: number | null;
541
+ next_date: string | null;
542
+ excluded_from_subscriptions?: boolean | undefined;
543
+ }[];
544
+ budgets: {
545
+ id: string;
546
+ name: string;
547
+ type: "category" | "merchant";
548
+ period: "biweekly" | "monthly" | "weekly";
549
+ status: "over" | "under" | "warning";
550
+ amount: number;
551
+ spent: number;
552
+ remaining: number;
553
+ used_percent: number;
554
+ }[];
555
+ goals: {
556
+ id: string;
557
+ name: string;
558
+ category: string;
559
+ status: "behind" | "completed" | "in_progress" | "not_started" | "on_track";
560
+ target: number;
561
+ current: number;
562
+ progress_percent: number;
563
+ target_date: string | null;
564
+ }[];
565
+ snapshots: {
566
+ date: string;
567
+ net_worth: number | null;
568
+ cash: number | null;
569
+ debt: number | null;
570
+ income: number | null;
571
+ expenses: number | null;
572
+ cash_flow: number | null;
573
+ savings_rate: number | null;
574
+ investments: number | null;
575
+ assets: number | null;
576
+ health_score: number | null;
577
+ health_score_model_version: 3 | null;
578
+ }[];
579
+ liabilities: {
580
+ account_id: string | null;
581
+ type: "credit" | "mortgage" | "other" | "student" | null;
582
+ balance: number | null;
583
+ minimum_payment: number | null;
584
+ due_date: string | null;
585
+ interest_rate: number | null;
586
+ rate_type: "fixed" | "variable" | null;
587
+ overdue: boolean | null;
588
+ }[];
589
+ holdings: {
590
+ account_id: string | null;
591
+ symbol: string | null;
592
+ name: string | null;
593
+ type: "cash" | "derivative" | "equity" | "etf" | "fixed_income" | "mutual_fund" | "other" | null;
594
+ quantity: number | null;
595
+ value: number | null;
596
+ cost_basis: number | null;
597
+ }[];
598
+ health: {
599
+ score: number;
600
+ model_version: 3;
601
+ record_count: number;
602
+ label: "Good" | "Needs Attention" | "Strong";
603
+ level: "critical" | "fair" | "good" | "poor" | "strong";
604
+ summary: string;
605
+ data_completeness: number;
606
+ pillars: {
607
+ spend: number | null;
608
+ save: number | null;
609
+ borrow: number | null;
610
+ build: number | null;
611
+ } | null;
612
+ } | null;
613
+ }, {
614
+ version: "v1";
615
+ updated_at: string;
616
+ currency: "USD";
617
+ status: {
618
+ position: {
619
+ date: string | null;
620
+ net_worth: number | null;
621
+ cash: number | null;
622
+ debt: number | null;
623
+ investments: number | null;
624
+ other_assets: number | null;
625
+ total_assets: number | null;
626
+ } | null;
627
+ accounts: {
628
+ id: string;
629
+ name: string;
630
+ source: "csv_import" | "manual" | "plaid" | null;
631
+ type: "brokerage" | "credit" | "depository" | "investment" | "loan" | "other";
632
+ subtype: string | null;
633
+ group: "cash" | "debt" | "investments" | "other" | null;
634
+ institution: string | null;
635
+ mask: string | null;
636
+ balance: number | null;
637
+ available: number | null;
638
+ currency: string | null;
639
+ updated_at: string | null;
640
+ }[];
641
+ };
642
+ transactions: {
643
+ total: number;
644
+ months: {
645
+ month: string;
646
+ count: number;
647
+ }[];
648
+ };
649
+ recurring: {
650
+ id: string;
651
+ account_id: string | null;
652
+ direction: "inflow" | "outflow" | null;
653
+ frequency: "ANNUALLY" | "BIWEEKLY" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUALLY" | "WEEKLY" | null;
654
+ status: "active" | "dismissed" | "inactive" | null;
655
+ merchant: string | null;
656
+ amount: number | null;
657
+ next_date: string | null;
658
+ excluded_from_subscriptions?: boolean | undefined;
659
+ }[];
660
+ budgets: {
661
+ id: string;
662
+ name: string;
663
+ type: "category" | "merchant";
664
+ period: "biweekly" | "monthly" | "weekly";
665
+ status: "over" | "under" | "warning";
666
+ amount: number;
667
+ spent: number;
668
+ remaining: number;
669
+ used_percent: number;
670
+ }[];
671
+ goals: {
672
+ id: string;
673
+ name: string;
674
+ category: string;
675
+ status: "behind" | "completed" | "in_progress" | "not_started" | "on_track";
676
+ target: number;
677
+ current: number;
678
+ progress_percent: number;
679
+ target_date: string | null;
680
+ }[];
681
+ snapshots: {
682
+ date: string;
683
+ net_worth: number | null;
684
+ cash: number | null;
685
+ debt: number | null;
686
+ income: number | null;
687
+ expenses: number | null;
688
+ cash_flow: number | null;
689
+ savings_rate: number | null;
690
+ investments: number | null;
691
+ assets: number | null;
692
+ health_score: number | null;
693
+ health_score_model_version: 3 | null;
694
+ }[];
695
+ liabilities: {
696
+ account_id: string | null;
697
+ type: "credit" | "mortgage" | "other" | "student" | null;
698
+ balance: number | null;
699
+ minimum_payment: number | null;
700
+ due_date: string | null;
701
+ interest_rate: number | null;
702
+ rate_type: "fixed" | "variable" | null;
703
+ overdue: boolean | null;
704
+ }[];
705
+ holdings: {
706
+ account_id: string | null;
707
+ symbol: string | null;
708
+ name: string | null;
709
+ type: "cash" | "derivative" | "equity" | "etf" | "fixed_income" | "mutual_fund" | "other" | null;
710
+ quantity: number | null;
711
+ value: number | null;
712
+ cost_basis: number | null;
713
+ }[];
714
+ health: {
715
+ score: number;
716
+ model_version: 3;
717
+ record_count: number;
718
+ label: "Good" | "Needs Attention" | "Strong";
719
+ level: "critical" | "fair" | "good" | "poor" | "strong";
720
+ summary: string;
721
+ data_completeness: number;
722
+ pillars: {
723
+ spend: number | null;
724
+ save: number | null;
725
+ borrow: number | null;
726
+ build: number | null;
727
+ } | null;
728
+ } | null;
729
+ }>;
730
+ months: z.ZodArray<z.ZodObject<{
731
+ month: z.ZodString;
732
+ start_date: z.ZodString;
733
+ end_date: z.ZodString;
734
+ count: z.ZodNumber;
735
+ items: z.ZodArray<z.ZodObject<{
736
+ id: z.ZodString;
737
+ account_id: z.ZodNullable<z.ZodString>;
738
+ date: z.ZodNullable<z.ZodString>;
739
+ amount: z.ZodNumber;
740
+ merchant: z.ZodNullable<z.ZodString>;
741
+ name: z.ZodNullable<z.ZodString>;
742
+ category: z.ZodNullable<z.ZodString>;
743
+ subcategory: z.ZodNullable<z.ZodString>;
744
+ pending: z.ZodNullable<z.ZodBoolean>;
745
+ currency: z.ZodNullable<z.ZodString>;
746
+ is_internal_transfer: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
747
+ transfer_pair_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
748
+ transfers_interpretation_version: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
749
+ merchants_interpretation_version: z.ZodOptional<z.ZodLiteral<0>>;
750
+ }, "strict", z.ZodTypeAny, {
751
+ id: string;
752
+ account_id: string | null;
753
+ date: string | null;
754
+ amount: number;
755
+ merchant: string | null;
756
+ name: string | null;
757
+ category: string | null;
758
+ subcategory: string | null;
759
+ pending: boolean | null;
760
+ currency: string | null;
761
+ is_internal_transfer?: boolean | null | undefined;
762
+ transfer_pair_id?: string | null | undefined;
763
+ transfers_interpretation_version?: 0 | 1 | undefined;
764
+ merchants_interpretation_version?: 0 | undefined;
765
+ }, {
766
+ id: string;
767
+ account_id: string | null;
768
+ date: string | null;
769
+ amount: number;
770
+ merchant: string | null;
771
+ name: string | null;
772
+ category: string | null;
773
+ subcategory: string | null;
774
+ pending: boolean | null;
775
+ currency: string | null;
776
+ is_internal_transfer?: boolean | null | undefined;
777
+ transfer_pair_id?: string | null | undefined;
778
+ transfers_interpretation_version?: 0 | 1 | undefined;
779
+ merchants_interpretation_version?: 0 | undefined;
780
+ }>, "many">;
781
+ }, "strict", z.ZodTypeAny, {
782
+ month: string;
783
+ start_date: string;
784
+ end_date: string;
785
+ count: number;
786
+ items: {
787
+ id: string;
788
+ account_id: string | null;
789
+ date: string | null;
790
+ amount: number;
791
+ merchant: string | null;
792
+ name: string | null;
793
+ category: string | null;
794
+ subcategory: string | null;
795
+ pending: boolean | null;
796
+ currency: string | null;
797
+ is_internal_transfer?: boolean | null | undefined;
798
+ transfer_pair_id?: string | null | undefined;
799
+ transfers_interpretation_version?: 0 | 1 | undefined;
800
+ merchants_interpretation_version?: 0 | undefined;
801
+ }[];
802
+ }, {
803
+ month: string;
804
+ start_date: string;
805
+ end_date: string;
806
+ count: number;
807
+ items: {
808
+ id: string;
809
+ account_id: string | null;
810
+ date: string | null;
811
+ amount: number;
812
+ merchant: string | null;
813
+ name: string | null;
814
+ category: string | null;
815
+ subcategory: string | null;
816
+ pending: boolean | null;
817
+ currency: string | null;
818
+ is_internal_transfer?: boolean | null | undefined;
819
+ transfer_pair_id?: string | null | undefined;
820
+ transfers_interpretation_version?: 0 | 1 | undefined;
821
+ merchants_interpretation_version?: 0 | undefined;
822
+ }[];
823
+ }>, "many">;
824
+ interpretation: z.ZodOptional<z.ZodObject<{
825
+ transfers: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
826
+ merchants: z.ZodLiteral<0>;
827
+ }, "strict", z.ZodTypeAny, {
828
+ transfers: 0 | 1;
829
+ merchants: 0;
830
+ }, {
831
+ transfers: 0 | 1;
832
+ merchants: 0;
833
+ }>>;
834
+ }, "strict", z.ZodTypeAny, {
835
+ user_id: string;
836
+ access_epoch: {
837
+ user_revision: string;
838
+ household: {
839
+ id: string;
840
+ revision: string;
841
+ } | null;
842
+ };
843
+ context: {
844
+ version: "v1";
845
+ updated_at: string;
846
+ currency: "USD";
847
+ status: {
848
+ position: {
849
+ date: string | null;
850
+ net_worth: number | null;
851
+ cash: number | null;
852
+ debt: number | null;
853
+ investments: number | null;
854
+ other_assets: number | null;
855
+ total_assets: number | null;
856
+ } | null;
857
+ accounts: {
858
+ id: string;
859
+ name: string;
860
+ source: "csv_import" | "manual" | "plaid" | null;
861
+ type: "brokerage" | "credit" | "depository" | "investment" | "loan" | "other";
862
+ subtype: string | null;
863
+ group: "cash" | "debt" | "investments" | "other" | null;
864
+ institution: string | null;
865
+ mask: string | null;
866
+ balance: number | null;
867
+ available: number | null;
868
+ currency: string | null;
869
+ updated_at: string | null;
870
+ }[];
871
+ };
872
+ transactions: {
873
+ total: number;
874
+ months: {
875
+ month: string;
876
+ count: number;
877
+ }[];
878
+ };
879
+ recurring: {
880
+ id: string;
881
+ account_id: string | null;
882
+ direction: "inflow" | "outflow" | null;
883
+ frequency: "ANNUALLY" | "BIWEEKLY" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUALLY" | "WEEKLY" | null;
884
+ status: "active" | "dismissed" | "inactive" | null;
885
+ merchant: string | null;
886
+ amount: number | null;
887
+ next_date: string | null;
888
+ excluded_from_subscriptions?: boolean | undefined;
889
+ }[];
890
+ budgets: {
891
+ id: string;
892
+ name: string;
893
+ type: "category" | "merchant";
894
+ period: "biweekly" | "monthly" | "weekly";
895
+ status: "over" | "under" | "warning";
896
+ amount: number;
897
+ spent: number;
898
+ remaining: number;
899
+ used_percent: number;
900
+ }[];
901
+ goals: {
902
+ id: string;
903
+ name: string;
904
+ category: string;
905
+ status: "behind" | "completed" | "in_progress" | "not_started" | "on_track";
906
+ target: number;
907
+ current: number;
908
+ progress_percent: number;
909
+ target_date: string | null;
910
+ }[];
911
+ snapshots: {
912
+ date: string;
913
+ net_worth: number | null;
914
+ cash: number | null;
915
+ debt: number | null;
916
+ income: number | null;
917
+ expenses: number | null;
918
+ cash_flow: number | null;
919
+ savings_rate: number | null;
920
+ investments: number | null;
921
+ assets: number | null;
922
+ health_score: number | null;
923
+ health_score_model_version: 3 | null;
924
+ }[];
925
+ liabilities: {
926
+ account_id: string | null;
927
+ type: "credit" | "mortgage" | "other" | "student" | null;
928
+ balance: number | null;
929
+ minimum_payment: number | null;
930
+ due_date: string | null;
931
+ interest_rate: number | null;
932
+ rate_type: "fixed" | "variable" | null;
933
+ overdue: boolean | null;
934
+ }[];
935
+ holdings: {
936
+ account_id: string | null;
937
+ symbol: string | null;
938
+ name: string | null;
939
+ type: "cash" | "derivative" | "equity" | "etf" | "fixed_income" | "mutual_fund" | "other" | null;
940
+ quantity: number | null;
941
+ value: number | null;
942
+ cost_basis: number | null;
943
+ }[];
944
+ health: {
945
+ score: number;
946
+ model_version: 3;
947
+ record_count: number;
948
+ label: "Good" | "Needs Attention" | "Strong";
949
+ level: "critical" | "fair" | "good" | "poor" | "strong";
950
+ summary: string;
951
+ data_completeness: number;
952
+ pillars: {
953
+ spend: number | null;
954
+ save: number | null;
955
+ borrow: number | null;
956
+ build: number | null;
957
+ } | null;
958
+ } | null;
959
+ };
960
+ months: {
961
+ month: string;
962
+ start_date: string;
963
+ end_date: string;
964
+ count: number;
965
+ items: {
966
+ id: string;
967
+ account_id: string | null;
968
+ date: string | null;
969
+ amount: number;
970
+ merchant: string | null;
971
+ name: string | null;
972
+ category: string | null;
973
+ subcategory: string | null;
974
+ pending: boolean | null;
975
+ currency: string | null;
976
+ is_internal_transfer?: boolean | null | undefined;
977
+ transfer_pair_id?: string | null | undefined;
978
+ transfers_interpretation_version?: 0 | 1 | undefined;
979
+ merchants_interpretation_version?: 0 | undefined;
980
+ }[];
981
+ }[];
982
+ interpretation?: {
983
+ transfers: 0 | 1;
984
+ merchants: 0;
985
+ } | undefined;
986
+ }, {
987
+ user_id: string;
988
+ access_epoch: {
989
+ user_revision: string;
990
+ household: {
991
+ id: string;
992
+ revision: string;
993
+ } | null;
994
+ };
995
+ context: {
996
+ version: "v1";
997
+ updated_at: string;
998
+ currency: "USD";
999
+ status: {
1000
+ position: {
1001
+ date: string | null;
1002
+ net_worth: number | null;
1003
+ cash: number | null;
1004
+ debt: number | null;
1005
+ investments: number | null;
1006
+ other_assets: number | null;
1007
+ total_assets: number | null;
1008
+ } | null;
1009
+ accounts: {
1010
+ id: string;
1011
+ name: string;
1012
+ source: "csv_import" | "manual" | "plaid" | null;
1013
+ type: "brokerage" | "credit" | "depository" | "investment" | "loan" | "other";
1014
+ subtype: string | null;
1015
+ group: "cash" | "debt" | "investments" | "other" | null;
1016
+ institution: string | null;
1017
+ mask: string | null;
1018
+ balance: number | null;
1019
+ available: number | null;
1020
+ currency: string | null;
1021
+ updated_at: string | null;
1022
+ }[];
1023
+ };
1024
+ transactions: {
1025
+ total: number;
1026
+ months: {
1027
+ month: string;
1028
+ count: number;
1029
+ }[];
1030
+ };
1031
+ recurring: {
1032
+ id: string;
1033
+ account_id: string | null;
1034
+ direction: "inflow" | "outflow" | null;
1035
+ frequency: "ANNUALLY" | "BIWEEKLY" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUALLY" | "WEEKLY" | null;
1036
+ status: "active" | "dismissed" | "inactive" | null;
1037
+ merchant: string | null;
1038
+ amount: number | null;
1039
+ next_date: string | null;
1040
+ excluded_from_subscriptions?: boolean | undefined;
1041
+ }[];
1042
+ budgets: {
1043
+ id: string;
1044
+ name: string;
1045
+ type: "category" | "merchant";
1046
+ period: "biweekly" | "monthly" | "weekly";
1047
+ status: "over" | "under" | "warning";
1048
+ amount: number;
1049
+ spent: number;
1050
+ remaining: number;
1051
+ used_percent: number;
1052
+ }[];
1053
+ goals: {
1054
+ id: string;
1055
+ name: string;
1056
+ category: string;
1057
+ status: "behind" | "completed" | "in_progress" | "not_started" | "on_track";
1058
+ target: number;
1059
+ current: number;
1060
+ progress_percent: number;
1061
+ target_date: string | null;
1062
+ }[];
1063
+ snapshots: {
1064
+ date: string;
1065
+ net_worth: number | null;
1066
+ cash: number | null;
1067
+ debt: number | null;
1068
+ income: number | null;
1069
+ expenses: number | null;
1070
+ cash_flow: number | null;
1071
+ savings_rate: number | null;
1072
+ investments: number | null;
1073
+ assets: number | null;
1074
+ health_score: number | null;
1075
+ health_score_model_version: 3 | null;
1076
+ }[];
1077
+ liabilities: {
1078
+ account_id: string | null;
1079
+ type: "credit" | "mortgage" | "other" | "student" | null;
1080
+ balance: number | null;
1081
+ minimum_payment: number | null;
1082
+ due_date: string | null;
1083
+ interest_rate: number | null;
1084
+ rate_type: "fixed" | "variable" | null;
1085
+ overdue: boolean | null;
1086
+ }[];
1087
+ holdings: {
1088
+ account_id: string | null;
1089
+ symbol: string | null;
1090
+ name: string | null;
1091
+ type: "cash" | "derivative" | "equity" | "etf" | "fixed_income" | "mutual_fund" | "other" | null;
1092
+ quantity: number | null;
1093
+ value: number | null;
1094
+ cost_basis: number | null;
1095
+ }[];
1096
+ health: {
1097
+ score: number;
1098
+ model_version: 3;
1099
+ record_count: number;
1100
+ label: "Good" | "Needs Attention" | "Strong";
1101
+ level: "critical" | "fair" | "good" | "poor" | "strong";
1102
+ summary: string;
1103
+ data_completeness: number;
1104
+ pillars: {
1105
+ spend: number | null;
1106
+ save: number | null;
1107
+ borrow: number | null;
1108
+ build: number | null;
1109
+ } | null;
1110
+ } | null;
1111
+ };
1112
+ months: {
1113
+ month: string;
1114
+ start_date: string;
1115
+ end_date: string;
1116
+ count: number;
1117
+ items: {
1118
+ id: string;
1119
+ account_id: string | null;
1120
+ date: string | null;
1121
+ amount: number;
1122
+ merchant: string | null;
1123
+ name: string | null;
1124
+ category: string | null;
1125
+ subcategory: string | null;
1126
+ pending: boolean | null;
1127
+ currency: string | null;
1128
+ is_internal_transfer?: boolean | null | undefined;
1129
+ transfer_pair_id?: string | null | undefined;
1130
+ transfers_interpretation_version?: 0 | 1 | undefined;
1131
+ merchants_interpretation_version?: 0 | undefined;
1132
+ }[];
1133
+ }[];
1134
+ interpretation?: {
1135
+ transfers: 0 | 1;
1136
+ merchants: 0;
1137
+ } | undefined;
1138
+ }>, {
1139
+ user_id: string;
1140
+ access_epoch: {
1141
+ user_revision: string;
1142
+ household: {
1143
+ id: string;
1144
+ revision: string;
1145
+ } | null;
1146
+ };
1147
+ context: {
1148
+ version: "v1";
1149
+ updated_at: string;
1150
+ currency: "USD";
1151
+ status: {
1152
+ position: {
1153
+ date: string | null;
1154
+ net_worth: number | null;
1155
+ cash: number | null;
1156
+ debt: number | null;
1157
+ investments: number | null;
1158
+ other_assets: number | null;
1159
+ total_assets: number | null;
1160
+ } | null;
1161
+ accounts: {
1162
+ id: string;
1163
+ name: string;
1164
+ source: "csv_import" | "manual" | "plaid" | null;
1165
+ type: "brokerage" | "credit" | "depository" | "investment" | "loan" | "other";
1166
+ subtype: string | null;
1167
+ group: "cash" | "debt" | "investments" | "other" | null;
1168
+ institution: string | null;
1169
+ mask: string | null;
1170
+ balance: number | null;
1171
+ available: number | null;
1172
+ currency: string | null;
1173
+ updated_at: string | null;
1174
+ }[];
1175
+ };
1176
+ transactions: {
1177
+ total: number;
1178
+ months: {
1179
+ month: string;
1180
+ count: number;
1181
+ }[];
1182
+ };
1183
+ recurring: {
1184
+ id: string;
1185
+ account_id: string | null;
1186
+ direction: "inflow" | "outflow" | null;
1187
+ frequency: "ANNUALLY" | "BIWEEKLY" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUALLY" | "WEEKLY" | null;
1188
+ status: "active" | "dismissed" | "inactive" | null;
1189
+ merchant: string | null;
1190
+ amount: number | null;
1191
+ next_date: string | null;
1192
+ excluded_from_subscriptions?: boolean | undefined;
1193
+ }[];
1194
+ budgets: {
1195
+ id: string;
1196
+ name: string;
1197
+ type: "category" | "merchant";
1198
+ period: "biweekly" | "monthly" | "weekly";
1199
+ status: "over" | "under" | "warning";
1200
+ amount: number;
1201
+ spent: number;
1202
+ remaining: number;
1203
+ used_percent: number;
1204
+ }[];
1205
+ goals: {
1206
+ id: string;
1207
+ name: string;
1208
+ category: string;
1209
+ status: "behind" | "completed" | "in_progress" | "not_started" | "on_track";
1210
+ target: number;
1211
+ current: number;
1212
+ progress_percent: number;
1213
+ target_date: string | null;
1214
+ }[];
1215
+ snapshots: {
1216
+ date: string;
1217
+ net_worth: number | null;
1218
+ cash: number | null;
1219
+ debt: number | null;
1220
+ income: number | null;
1221
+ expenses: number | null;
1222
+ cash_flow: number | null;
1223
+ savings_rate: number | null;
1224
+ investments: number | null;
1225
+ assets: number | null;
1226
+ health_score: number | null;
1227
+ health_score_model_version: 3 | null;
1228
+ }[];
1229
+ liabilities: {
1230
+ account_id: string | null;
1231
+ type: "credit" | "mortgage" | "other" | "student" | null;
1232
+ balance: number | null;
1233
+ minimum_payment: number | null;
1234
+ due_date: string | null;
1235
+ interest_rate: number | null;
1236
+ rate_type: "fixed" | "variable" | null;
1237
+ overdue: boolean | null;
1238
+ }[];
1239
+ holdings: {
1240
+ account_id: string | null;
1241
+ symbol: string | null;
1242
+ name: string | null;
1243
+ type: "cash" | "derivative" | "equity" | "etf" | "fixed_income" | "mutual_fund" | "other" | null;
1244
+ quantity: number | null;
1245
+ value: number | null;
1246
+ cost_basis: number | null;
1247
+ }[];
1248
+ health: {
1249
+ score: number;
1250
+ model_version: 3;
1251
+ record_count: number;
1252
+ label: "Good" | "Needs Attention" | "Strong";
1253
+ level: "critical" | "fair" | "good" | "poor" | "strong";
1254
+ summary: string;
1255
+ data_completeness: number;
1256
+ pillars: {
1257
+ spend: number | null;
1258
+ save: number | null;
1259
+ borrow: number | null;
1260
+ build: number | null;
1261
+ } | null;
1262
+ } | null;
1263
+ };
1264
+ months: {
1265
+ month: string;
1266
+ start_date: string;
1267
+ end_date: string;
1268
+ count: number;
1269
+ items: {
1270
+ id: string;
1271
+ account_id: string | null;
1272
+ date: string | null;
1273
+ amount: number;
1274
+ merchant: string | null;
1275
+ name: string | null;
1276
+ category: string | null;
1277
+ subcategory: string | null;
1278
+ pending: boolean | null;
1279
+ currency: string | null;
1280
+ is_internal_transfer?: boolean | null | undefined;
1281
+ transfer_pair_id?: string | null | undefined;
1282
+ transfers_interpretation_version?: 0 | 1 | undefined;
1283
+ merchants_interpretation_version?: 0 | undefined;
1284
+ }[];
1285
+ }[];
1286
+ interpretation?: {
1287
+ transfers: 0 | 1;
1288
+ merchants: 0;
1289
+ } | undefined;
1290
+ }, {
82
1291
  user_id: string;
83
- access_epoch: FinancialContextAccessEpoch;
84
- context: z.infer<typeof financialContextSchema>;
85
- months: Array<z.infer<typeof transactionMonthSchema>>;
86
- };
1292
+ access_epoch: {
1293
+ user_revision: string;
1294
+ household: {
1295
+ id: string;
1296
+ revision: string;
1297
+ } | null;
1298
+ };
1299
+ context: {
1300
+ version: "v1";
1301
+ updated_at: string;
1302
+ currency: "USD";
1303
+ status: {
1304
+ position: {
1305
+ date: string | null;
1306
+ net_worth: number | null;
1307
+ cash: number | null;
1308
+ debt: number | null;
1309
+ investments: number | null;
1310
+ other_assets: number | null;
1311
+ total_assets: number | null;
1312
+ } | null;
1313
+ accounts: {
1314
+ id: string;
1315
+ name: string;
1316
+ source: "csv_import" | "manual" | "plaid" | null;
1317
+ type: "brokerage" | "credit" | "depository" | "investment" | "loan" | "other";
1318
+ subtype: string | null;
1319
+ group: "cash" | "debt" | "investments" | "other" | null;
1320
+ institution: string | null;
1321
+ mask: string | null;
1322
+ balance: number | null;
1323
+ available: number | null;
1324
+ currency: string | null;
1325
+ updated_at: string | null;
1326
+ }[];
1327
+ };
1328
+ transactions: {
1329
+ total: number;
1330
+ months: {
1331
+ month: string;
1332
+ count: number;
1333
+ }[];
1334
+ };
1335
+ recurring: {
1336
+ id: string;
1337
+ account_id: string | null;
1338
+ direction: "inflow" | "outflow" | null;
1339
+ frequency: "ANNUALLY" | "BIWEEKLY" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUALLY" | "WEEKLY" | null;
1340
+ status: "active" | "dismissed" | "inactive" | null;
1341
+ merchant: string | null;
1342
+ amount: number | null;
1343
+ next_date: string | null;
1344
+ excluded_from_subscriptions?: boolean | undefined;
1345
+ }[];
1346
+ budgets: {
1347
+ id: string;
1348
+ name: string;
1349
+ type: "category" | "merchant";
1350
+ period: "biweekly" | "monthly" | "weekly";
1351
+ status: "over" | "under" | "warning";
1352
+ amount: number;
1353
+ spent: number;
1354
+ remaining: number;
1355
+ used_percent: number;
1356
+ }[];
1357
+ goals: {
1358
+ id: string;
1359
+ name: string;
1360
+ category: string;
1361
+ status: "behind" | "completed" | "in_progress" | "not_started" | "on_track";
1362
+ target: number;
1363
+ current: number;
1364
+ progress_percent: number;
1365
+ target_date: string | null;
1366
+ }[];
1367
+ snapshots: {
1368
+ date: string;
1369
+ net_worth: number | null;
1370
+ cash: number | null;
1371
+ debt: number | null;
1372
+ income: number | null;
1373
+ expenses: number | null;
1374
+ cash_flow: number | null;
1375
+ savings_rate: number | null;
1376
+ investments: number | null;
1377
+ assets: number | null;
1378
+ health_score: number | null;
1379
+ health_score_model_version: 3 | null;
1380
+ }[];
1381
+ liabilities: {
1382
+ account_id: string | null;
1383
+ type: "credit" | "mortgage" | "other" | "student" | null;
1384
+ balance: number | null;
1385
+ minimum_payment: number | null;
1386
+ due_date: string | null;
1387
+ interest_rate: number | null;
1388
+ rate_type: "fixed" | "variable" | null;
1389
+ overdue: boolean | null;
1390
+ }[];
1391
+ holdings: {
1392
+ account_id: string | null;
1393
+ symbol: string | null;
1394
+ name: string | null;
1395
+ type: "cash" | "derivative" | "equity" | "etf" | "fixed_income" | "mutual_fund" | "other" | null;
1396
+ quantity: number | null;
1397
+ value: number | null;
1398
+ cost_basis: number | null;
1399
+ }[];
1400
+ health: {
1401
+ score: number;
1402
+ model_version: 3;
1403
+ record_count: number;
1404
+ label: "Good" | "Needs Attention" | "Strong";
1405
+ level: "critical" | "fair" | "good" | "poor" | "strong";
1406
+ summary: string;
1407
+ data_completeness: number;
1408
+ pillars: {
1409
+ spend: number | null;
1410
+ save: number | null;
1411
+ borrow: number | null;
1412
+ build: number | null;
1413
+ } | null;
1414
+ } | null;
1415
+ };
1416
+ months: {
1417
+ month: string;
1418
+ start_date: string;
1419
+ end_date: string;
1420
+ count: number;
1421
+ items: {
1422
+ id: string;
1423
+ account_id: string | null;
1424
+ date: string | null;
1425
+ amount: number;
1426
+ merchant: string | null;
1427
+ name: string | null;
1428
+ category: string | null;
1429
+ subcategory: string | null;
1430
+ pending: boolean | null;
1431
+ currency: string | null;
1432
+ is_internal_transfer?: boolean | null | undefined;
1433
+ transfer_pair_id?: string | null | undefined;
1434
+ transfers_interpretation_version?: 0 | 1 | undefined;
1435
+ merchants_interpretation_version?: 0 | undefined;
1436
+ }[];
1437
+ }[];
1438
+ interpretation?: {
1439
+ transfers: 0 | 1;
1440
+ merchants: 0;
1441
+ } | undefined;
1442
+ }>;
87
1443
  export declare const financialContextArtifactEnvelopeSchema: z.ZodEffects<z.ZodObject<{
88
1444
  protocol_version: z.ZodLiteral<2>;
89
1445
  user_id: z.ZodString;
@@ -741,6 +2097,10 @@ export declare const financialContextArtifactEnvelopeSchema: z.ZodEffects<z.ZodO
741
2097
  subcategory: z.ZodNullable<z.ZodString>;
742
2098
  pending: z.ZodNullable<z.ZodBoolean>;
743
2099
  currency: z.ZodNullable<z.ZodString>;
2100
+ is_internal_transfer: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2101
+ transfer_pair_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2102
+ transfers_interpretation_version: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
2103
+ merchants_interpretation_version: z.ZodOptional<z.ZodLiteral<0>>;
744
2104
  }, "strict", z.ZodTypeAny, {
745
2105
  id: string;
746
2106
  account_id: string | null;
@@ -752,6 +2112,10 @@ export declare const financialContextArtifactEnvelopeSchema: z.ZodEffects<z.ZodO
752
2112
  subcategory: string | null;
753
2113
  pending: boolean | null;
754
2114
  currency: string | null;
2115
+ is_internal_transfer?: boolean | null | undefined;
2116
+ transfer_pair_id?: string | null | undefined;
2117
+ transfers_interpretation_version?: 0 | 1 | undefined;
2118
+ merchants_interpretation_version?: 0 | undefined;
755
2119
  }, {
756
2120
  id: string;
757
2121
  account_id: string | null;
@@ -763,6 +2127,10 @@ export declare const financialContextArtifactEnvelopeSchema: z.ZodEffects<z.ZodO
763
2127
  subcategory: string | null;
764
2128
  pending: boolean | null;
765
2129
  currency: string | null;
2130
+ is_internal_transfer?: boolean | null | undefined;
2131
+ transfer_pair_id?: string | null | undefined;
2132
+ transfers_interpretation_version?: 0 | 1 | undefined;
2133
+ merchants_interpretation_version?: 0 | undefined;
766
2134
  }>, "many">;
767
2135
  }, "strict", z.ZodTypeAny, {
768
2136
  month: string;
@@ -780,6 +2148,10 @@ export declare const financialContextArtifactEnvelopeSchema: z.ZodEffects<z.ZodO
780
2148
  subcategory: string | null;
781
2149
  pending: boolean | null;
782
2150
  currency: string | null;
2151
+ is_internal_transfer?: boolean | null | undefined;
2152
+ transfer_pair_id?: string | null | undefined;
2153
+ transfers_interpretation_version?: 0 | 1 | undefined;
2154
+ merchants_interpretation_version?: 0 | undefined;
783
2155
  }[];
784
2156
  }, {
785
2157
  month: string;
@@ -797,8 +2169,22 @@ export declare const financialContextArtifactEnvelopeSchema: z.ZodEffects<z.ZodO
797
2169
  subcategory: string | null;
798
2170
  pending: boolean | null;
799
2171
  currency: string | null;
2172
+ is_internal_transfer?: boolean | null | undefined;
2173
+ transfer_pair_id?: string | null | undefined;
2174
+ transfers_interpretation_version?: 0 | 1 | undefined;
2175
+ merchants_interpretation_version?: 0 | undefined;
800
2176
  }[];
801
2177
  }>, "many">;
2178
+ interpretation: z.ZodOptional<z.ZodObject<{
2179
+ transfers: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
2180
+ merchants: z.ZodLiteral<0>;
2181
+ }, "strict", z.ZodTypeAny, {
2182
+ transfers: 0 | 1;
2183
+ merchants: 0;
2184
+ }, {
2185
+ transfers: 0 | 1;
2186
+ merchants: 0;
2187
+ }>>;
802
2188
  meta: z.ZodObject<{
803
2189
  version: z.ZodEnum<["v1"]>;
804
2190
  user_id: z.ZodString;
@@ -996,8 +2382,16 @@ export declare const financialContextArtifactEnvelopeSchema: z.ZodEffects<z.ZodO
996
2382
  subcategory: string | null;
997
2383
  pending: boolean | null;
998
2384
  currency: string | null;
2385
+ is_internal_transfer?: boolean | null | undefined;
2386
+ transfer_pair_id?: string | null | undefined;
2387
+ transfers_interpretation_version?: 0 | 1 | undefined;
2388
+ merchants_interpretation_version?: 0 | undefined;
999
2389
  }[];
1000
2390
  }[];
2391
+ interpretation?: {
2392
+ transfers: 0 | 1;
2393
+ merchants: 0;
2394
+ } | undefined;
1001
2395
  meta: {
1002
2396
  version: "v1";
1003
2397
  user_id: string;
@@ -1157,8 +2551,16 @@ export declare const financialContextArtifactEnvelopeSchema: z.ZodEffects<z.ZodO
1157
2551
  subcategory: string | null;
1158
2552
  pending: boolean | null;
1159
2553
  currency: string | null;
2554
+ is_internal_transfer?: boolean | null | undefined;
2555
+ transfer_pair_id?: string | null | undefined;
2556
+ transfers_interpretation_version?: 0 | 1 | undefined;
2557
+ merchants_interpretation_version?: 0 | undefined;
1160
2558
  }[];
1161
2559
  }[];
2560
+ interpretation?: {
2561
+ transfers: 0 | 1;
2562
+ merchants: 0;
2563
+ } | undefined;
1162
2564
  meta: {
1163
2565
  version: "v1";
1164
2566
  user_id: string;
@@ -1318,8 +2720,16 @@ export declare const financialContextArtifactEnvelopeSchema: z.ZodEffects<z.ZodO
1318
2720
  subcategory: string | null;
1319
2721
  pending: boolean | null;
1320
2722
  currency: string | null;
2723
+ is_internal_transfer?: boolean | null | undefined;
2724
+ transfer_pair_id?: string | null | undefined;
2725
+ transfers_interpretation_version?: 0 | 1 | undefined;
2726
+ merchants_interpretation_version?: 0 | undefined;
1321
2727
  }[];
1322
2728
  }[];
2729
+ interpretation?: {
2730
+ transfers: 0 | 1;
2731
+ merchants: 0;
2732
+ } | undefined;
1323
2733
  meta: {
1324
2734
  version: "v1";
1325
2735
  user_id: string;
@@ -1479,8 +2889,16 @@ export declare const financialContextArtifactEnvelopeSchema: z.ZodEffects<z.ZodO
1479
2889
  subcategory: string | null;
1480
2890
  pending: boolean | null;
1481
2891
  currency: string | null;
2892
+ is_internal_transfer?: boolean | null | undefined;
2893
+ transfer_pair_id?: string | null | undefined;
2894
+ transfers_interpretation_version?: 0 | 1 | undefined;
2895
+ merchants_interpretation_version?: 0 | undefined;
1482
2896
  }[];
1483
2897
  }[];
2898
+ interpretation?: {
2899
+ transfers: 0 | 1;
2900
+ merchants: 0;
2901
+ } | undefined;
1484
2902
  meta: {
1485
2903
  version: "v1";
1486
2904
  user_id: string;
@@ -1499,7 +2917,7 @@ export declare const financialContextArtifactEnvelopeSchema: z.ZodEffects<z.ZodO
1499
2917
  status?: "rebuilt" | undefined;
1500
2918
  }>;
1501
2919
  export type FinancialContextArtifactEnvelope = z.infer<typeof financialContextArtifactEnvelopeSchema>;
1502
- export type FinancialContextArtifactHashInput = FinancialContextArtifactHashContent;
2920
+ export type FinancialContextArtifactHashInput = z.infer<typeof financialContextArtifactHashInputSchema>;
1503
2921
  export declare function compareFinancialContextAccessEpochs(left: FinancialContextAccessEpoch, right: FinancialContextAccessEpoch): FinancialContextAccessEpochComparison;
1504
2922
  export declare function financialContextAccessEpochsEqual(left: FinancialContextAccessEpoch, right: FinancialContextAccessEpoch): boolean;
1505
2923
  export declare function canonicalFinancialContextArtifactJson(input: FinancialContextArtifactHashInput): string;