@pfm-platform/shared 0.1.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/dist/index.cjs +1469 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2758 -0
- package/dist/index.d.ts +2758 -0
- package/dist/index.js +1311 -0
- package/dist/index.js.map +1 -0
- package/package.json +68 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2758 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { Theme } from '@mui/material/styles';
|
|
6
|
+
import { Variants, Transition } from 'framer-motion';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Application mode type
|
|
10
|
+
*
|
|
11
|
+
* - `admin`: Test data creation mode with relaxed validation
|
|
12
|
+
* - `user`: Production mode with full business rules
|
|
13
|
+
*/
|
|
14
|
+
type AppMode = 'admin' | 'user';
|
|
15
|
+
/**
|
|
16
|
+
* App Mode Context value interface
|
|
17
|
+
*/
|
|
18
|
+
interface AppModeContextValue {
|
|
19
|
+
/** Current application mode */
|
|
20
|
+
mode: AppMode;
|
|
21
|
+
/** Function to change application mode */
|
|
22
|
+
setMode: (mode: AppMode) => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* App Mode Context
|
|
26
|
+
*
|
|
27
|
+
* Default context with 'user' mode
|
|
28
|
+
*/
|
|
29
|
+
declare const AppModeContext: react.Context<AppModeContextValue>;
|
|
30
|
+
/**
|
|
31
|
+
* Props for AppModeProvider
|
|
32
|
+
*/
|
|
33
|
+
interface AppModeProviderProps {
|
|
34
|
+
/** Child components */
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
/** Initial mode (default: 'user') */
|
|
37
|
+
initialMode?: AppMode;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* App Mode Provider Component
|
|
41
|
+
*
|
|
42
|
+
* Provides application mode context to all child components.
|
|
43
|
+
* Wrap your application root with this provider.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* // Admin/Test application
|
|
48
|
+
* <AppModeProvider initialMode="admin">
|
|
49
|
+
* <ComponentDemo />
|
|
50
|
+
* </AppModeProvider>
|
|
51
|
+
*
|
|
52
|
+
* // Production application
|
|
53
|
+
* <AppModeProvider initialMode="user">
|
|
54
|
+
* <ProductionApp />
|
|
55
|
+
* </AppModeProvider>
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
declare function AppModeProvider({ children, initialMode, }: AppModeProviderProps): react_jsx_runtime.JSX.Element;
|
|
59
|
+
/**
|
|
60
|
+
* Hook to access App Mode context
|
|
61
|
+
*
|
|
62
|
+
* Must be used within AppModeProvider
|
|
63
|
+
*
|
|
64
|
+
* @returns Current app mode and setter function
|
|
65
|
+
* @throws Error if used outside AppModeProvider
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* function MyComponent() {
|
|
70
|
+
* const { mode, setMode } = useAppMode();
|
|
71
|
+
*
|
|
72
|
+
* return (
|
|
73
|
+
* <div>
|
|
74
|
+
* <p>Current mode: {mode}</p>
|
|
75
|
+
* {mode === 'admin' && <AdminPanel />}
|
|
76
|
+
* <button onClick={() => setMode('admin')}>
|
|
77
|
+
* Switch to Admin
|
|
78
|
+
* </button>
|
|
79
|
+
* </div>
|
|
80
|
+
* );
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
declare function useAppMode(): AppModeContextValue;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Account types from legacy API
|
|
88
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/accounts.json
|
|
89
|
+
* Note: 15 values, not the 7 we assumed in Session 1
|
|
90
|
+
*/
|
|
91
|
+
declare const AccountTypeSchema: z.ZodEnum<{
|
|
92
|
+
checking: "checking";
|
|
93
|
+
savings: "savings";
|
|
94
|
+
cards: "cards";
|
|
95
|
+
student_loans: "student_loans";
|
|
96
|
+
bill: "bill";
|
|
97
|
+
autos: "autos";
|
|
98
|
+
home: "home";
|
|
99
|
+
investment: "investment";
|
|
100
|
+
loan: "loan";
|
|
101
|
+
asset: "asset";
|
|
102
|
+
cd: "cd";
|
|
103
|
+
money_market: "money_market";
|
|
104
|
+
certificates: "certificates";
|
|
105
|
+
commercial: "commercial";
|
|
106
|
+
creditline: "creditline";
|
|
107
|
+
}>;
|
|
108
|
+
/**
|
|
109
|
+
* Account state from legacy API
|
|
110
|
+
* Source: ~/code/pfm-platform/services/validator/specs/openapi-spec/components/schemas/Account.yaml
|
|
111
|
+
*/
|
|
112
|
+
declare const AccountStateSchema: z.ZodEnum<{
|
|
113
|
+
active: "active";
|
|
114
|
+
closed: "closed";
|
|
115
|
+
archived: "archived";
|
|
116
|
+
pending_deletion: "pending_deletion";
|
|
117
|
+
}>;
|
|
118
|
+
/**
|
|
119
|
+
* Aggregation type from legacy API
|
|
120
|
+
*/
|
|
121
|
+
declare const AggregationTypeSchema: z.ZodEnum<{
|
|
122
|
+
finicity: "finicity";
|
|
123
|
+
cashedge: "cashedge";
|
|
124
|
+
partner: "partner";
|
|
125
|
+
}>;
|
|
126
|
+
/**
|
|
127
|
+
* Preferred balance type from legacy API
|
|
128
|
+
*/
|
|
129
|
+
declare const PreferredBalanceTypeSchema: z.ZodEnum<{
|
|
130
|
+
Available: "Available";
|
|
131
|
+
Current: "Current";
|
|
132
|
+
Outstanding: "Outstanding";
|
|
133
|
+
}>;
|
|
134
|
+
/**
|
|
135
|
+
* Financial institution reference
|
|
136
|
+
* Note: Exists in API response but not in Prisma (JOINed in route handler)
|
|
137
|
+
*/
|
|
138
|
+
declare const FinancialInstitutionSchema: z.ZodNullable<z.ZodObject<{
|
|
139
|
+
id: z.ZodNumber;
|
|
140
|
+
name: z.ZodString;
|
|
141
|
+
}, z.core.$strip>>;
|
|
142
|
+
/**
|
|
143
|
+
* CashEdge account type mapping
|
|
144
|
+
* Note: Exists in API response but not in Prisma
|
|
145
|
+
*/
|
|
146
|
+
declare const CashEdgeAccountTypeSchema: z.ZodNullable<z.ZodObject<{
|
|
147
|
+
name: z.ZodString;
|
|
148
|
+
acct_type: z.ZodString;
|
|
149
|
+
ext_type: z.ZodString;
|
|
150
|
+
group: z.ZodString;
|
|
151
|
+
}, z.core.$strip>>;
|
|
152
|
+
/**
|
|
153
|
+
* Account error information
|
|
154
|
+
* Note: Exists in API response but not in Prisma
|
|
155
|
+
*/
|
|
156
|
+
declare const AccountErrorSchema: z.ZodNullable<z.ZodObject<{
|
|
157
|
+
message: z.ZodString;
|
|
158
|
+
code: z.ZodString;
|
|
159
|
+
actionable: z.ZodBoolean;
|
|
160
|
+
description: z.ZodOptional<z.ZodString>;
|
|
161
|
+
}, z.core.$strip>>;
|
|
162
|
+
/**
|
|
163
|
+
* Other balance information
|
|
164
|
+
*/
|
|
165
|
+
declare const OtherBalanceSchema: z.ZodObject<{
|
|
166
|
+
balance_type: z.ZodString;
|
|
167
|
+
balance: z.ZodString;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
/**
|
|
170
|
+
* Account schema matching legacy API response structure
|
|
171
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/accounts.json
|
|
172
|
+
*
|
|
173
|
+
* CRITICAL: This matches the ACTUAL API response, not assumptions
|
|
174
|
+
* - IDs are integers (e.g., 41), NOT UUIDs
|
|
175
|
+
* - Balance is string "13172.66", NOT number
|
|
176
|
+
* - Field names are account_type and state, NOT type and status
|
|
177
|
+
* - Nested objects (fi, cashedge_account_type, error) included
|
|
178
|
+
*/
|
|
179
|
+
declare const AccountSchema: z.ZodObject<{
|
|
180
|
+
id: z.ZodNumber;
|
|
181
|
+
name: z.ZodString;
|
|
182
|
+
balance: z.ZodString;
|
|
183
|
+
locked_balance: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
184
|
+
preferred_balance_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
185
|
+
Available: "Available";
|
|
186
|
+
Current: "Current";
|
|
187
|
+
Outstanding: "Outstanding";
|
|
188
|
+
}>>>;
|
|
189
|
+
account_type: z.ZodEnum<{
|
|
190
|
+
checking: "checking";
|
|
191
|
+
savings: "savings";
|
|
192
|
+
cards: "cards";
|
|
193
|
+
student_loans: "student_loans";
|
|
194
|
+
bill: "bill";
|
|
195
|
+
autos: "autos";
|
|
196
|
+
home: "home";
|
|
197
|
+
investment: "investment";
|
|
198
|
+
loan: "loan";
|
|
199
|
+
asset: "asset";
|
|
200
|
+
cd: "cd";
|
|
201
|
+
money_market: "money_market";
|
|
202
|
+
certificates: "certificates";
|
|
203
|
+
commercial: "commercial";
|
|
204
|
+
creditline: "creditline";
|
|
205
|
+
}>;
|
|
206
|
+
display_account_type: z.ZodOptional<z.ZodString>;
|
|
207
|
+
state: z.ZodEnum<{
|
|
208
|
+
active: "active";
|
|
209
|
+
closed: "closed";
|
|
210
|
+
archived: "archived";
|
|
211
|
+
pending_deletion: "pending_deletion";
|
|
212
|
+
}>;
|
|
213
|
+
aggregation_type: z.ZodEnum<{
|
|
214
|
+
finicity: "finicity";
|
|
215
|
+
cashedge: "cashedge";
|
|
216
|
+
partner: "partner";
|
|
217
|
+
}>;
|
|
218
|
+
reference_id: z.ZodOptional<z.ZodString>;
|
|
219
|
+
harvest_updated_at: z.ZodNullable<z.ZodString>;
|
|
220
|
+
include_in_expenses: z.ZodBoolean;
|
|
221
|
+
include_in_budget: z.ZodBoolean;
|
|
222
|
+
include_in_cashflow: z.ZodBoolean;
|
|
223
|
+
include_in_dashboard: z.ZodBoolean;
|
|
224
|
+
include_in_goals: z.ZodBoolean;
|
|
225
|
+
include_in_networth: z.ZodBoolean;
|
|
226
|
+
fi: z.ZodNullable<z.ZodObject<{
|
|
227
|
+
id: z.ZodNumber;
|
|
228
|
+
name: z.ZodString;
|
|
229
|
+
}, z.core.$strip>>;
|
|
230
|
+
cashedge_account_type: z.ZodNullable<z.ZodObject<{
|
|
231
|
+
name: z.ZodString;
|
|
232
|
+
acct_type: z.ZodString;
|
|
233
|
+
ext_type: z.ZodString;
|
|
234
|
+
group: z.ZodString;
|
|
235
|
+
}, z.core.$strip>>;
|
|
236
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
237
|
+
message: z.ZodString;
|
|
238
|
+
code: z.ZodString;
|
|
239
|
+
actionable: z.ZodBoolean;
|
|
240
|
+
description: z.ZodOptional<z.ZodString>;
|
|
241
|
+
}, z.core.$strip>>>;
|
|
242
|
+
other_balances: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
243
|
+
balance_type: z.ZodString;
|
|
244
|
+
balance: z.ZodString;
|
|
245
|
+
}, z.core.$strip>>>;
|
|
246
|
+
}, z.core.$strip>;
|
|
247
|
+
/**
|
|
248
|
+
* Accounts list response schema
|
|
249
|
+
* Used for GET /users/{userId}/accounts/all endpoint
|
|
250
|
+
*/
|
|
251
|
+
declare const AccountsResponseSchema: z.ZodObject<{
|
|
252
|
+
accounts: z.ZodArray<z.ZodObject<{
|
|
253
|
+
id: z.ZodNumber;
|
|
254
|
+
name: z.ZodString;
|
|
255
|
+
balance: z.ZodString;
|
|
256
|
+
locked_balance: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
257
|
+
preferred_balance_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
258
|
+
Available: "Available";
|
|
259
|
+
Current: "Current";
|
|
260
|
+
Outstanding: "Outstanding";
|
|
261
|
+
}>>>;
|
|
262
|
+
account_type: z.ZodEnum<{
|
|
263
|
+
checking: "checking";
|
|
264
|
+
savings: "savings";
|
|
265
|
+
cards: "cards";
|
|
266
|
+
student_loans: "student_loans";
|
|
267
|
+
bill: "bill";
|
|
268
|
+
autos: "autos";
|
|
269
|
+
home: "home";
|
|
270
|
+
investment: "investment";
|
|
271
|
+
loan: "loan";
|
|
272
|
+
asset: "asset";
|
|
273
|
+
cd: "cd";
|
|
274
|
+
money_market: "money_market";
|
|
275
|
+
certificates: "certificates";
|
|
276
|
+
commercial: "commercial";
|
|
277
|
+
creditline: "creditline";
|
|
278
|
+
}>;
|
|
279
|
+
display_account_type: z.ZodOptional<z.ZodString>;
|
|
280
|
+
state: z.ZodEnum<{
|
|
281
|
+
active: "active";
|
|
282
|
+
closed: "closed";
|
|
283
|
+
archived: "archived";
|
|
284
|
+
pending_deletion: "pending_deletion";
|
|
285
|
+
}>;
|
|
286
|
+
aggregation_type: z.ZodEnum<{
|
|
287
|
+
finicity: "finicity";
|
|
288
|
+
cashedge: "cashedge";
|
|
289
|
+
partner: "partner";
|
|
290
|
+
}>;
|
|
291
|
+
reference_id: z.ZodOptional<z.ZodString>;
|
|
292
|
+
harvest_updated_at: z.ZodNullable<z.ZodString>;
|
|
293
|
+
include_in_expenses: z.ZodBoolean;
|
|
294
|
+
include_in_budget: z.ZodBoolean;
|
|
295
|
+
include_in_cashflow: z.ZodBoolean;
|
|
296
|
+
include_in_dashboard: z.ZodBoolean;
|
|
297
|
+
include_in_goals: z.ZodBoolean;
|
|
298
|
+
include_in_networth: z.ZodBoolean;
|
|
299
|
+
fi: z.ZodNullable<z.ZodObject<{
|
|
300
|
+
id: z.ZodNumber;
|
|
301
|
+
name: z.ZodString;
|
|
302
|
+
}, z.core.$strip>>;
|
|
303
|
+
cashedge_account_type: z.ZodNullable<z.ZodObject<{
|
|
304
|
+
name: z.ZodString;
|
|
305
|
+
acct_type: z.ZodString;
|
|
306
|
+
ext_type: z.ZodString;
|
|
307
|
+
group: z.ZodString;
|
|
308
|
+
}, z.core.$strip>>;
|
|
309
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
310
|
+
message: z.ZodString;
|
|
311
|
+
code: z.ZodString;
|
|
312
|
+
actionable: z.ZodBoolean;
|
|
313
|
+
description: z.ZodOptional<z.ZodString>;
|
|
314
|
+
}, z.core.$strip>>>;
|
|
315
|
+
other_balances: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
316
|
+
balance_type: z.ZodString;
|
|
317
|
+
balance: z.ZodString;
|
|
318
|
+
}, z.core.$strip>>>;
|
|
319
|
+
}, z.core.$strip>>;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
/**
|
|
322
|
+
* Account creation schema - Admin mode
|
|
323
|
+
* Minimal validation for test data creation
|
|
324
|
+
* Allows creating accounts with basic required fields only
|
|
325
|
+
*/
|
|
326
|
+
declare const AccountCreateSchemaAdmin: z.ZodObject<{
|
|
327
|
+
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
328
|
+
balance: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
329
|
+
account_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
330
|
+
checking: "checking";
|
|
331
|
+
savings: "savings";
|
|
332
|
+
cards: "cards";
|
|
333
|
+
student_loans: "student_loans";
|
|
334
|
+
bill: "bill";
|
|
335
|
+
autos: "autos";
|
|
336
|
+
home: "home";
|
|
337
|
+
investment: "investment";
|
|
338
|
+
loan: "loan";
|
|
339
|
+
asset: "asset";
|
|
340
|
+
cd: "cd";
|
|
341
|
+
money_market: "money_market";
|
|
342
|
+
certificates: "certificates";
|
|
343
|
+
commercial: "commercial";
|
|
344
|
+
creditline: "creditline";
|
|
345
|
+
}>>>;
|
|
346
|
+
state: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
347
|
+
active: "active";
|
|
348
|
+
closed: "closed";
|
|
349
|
+
archived: "archived";
|
|
350
|
+
pending_deletion: "pending_deletion";
|
|
351
|
+
}>>>;
|
|
352
|
+
aggregation_type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
353
|
+
finicity: "finicity";
|
|
354
|
+
cashedge: "cashedge";
|
|
355
|
+
partner: "partner";
|
|
356
|
+
}>>>;
|
|
357
|
+
include_in_expenses: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
358
|
+
include_in_budget: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
359
|
+
include_in_cashflow: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
360
|
+
include_in_dashboard: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
361
|
+
include_in_goals: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
362
|
+
include_in_networth: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
363
|
+
locked_balance: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
364
|
+
preferred_balance_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
365
|
+
Available: "Available";
|
|
366
|
+
Current: "Current";
|
|
367
|
+
Outstanding: "Outstanding";
|
|
368
|
+
}>>>;
|
|
369
|
+
display_account_type: z.ZodOptional<z.ZodString>;
|
|
370
|
+
reference_id: z.ZodOptional<z.ZodString>;
|
|
371
|
+
harvest_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
372
|
+
other_balances: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
373
|
+
balance_type: z.ZodString;
|
|
374
|
+
balance: z.ZodString;
|
|
375
|
+
}, z.core.$strip>>>>;
|
|
376
|
+
fi: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
377
|
+
id: z.ZodNumber;
|
|
378
|
+
name: z.ZodString;
|
|
379
|
+
}, z.core.$strip>>>;
|
|
380
|
+
cashedge_account_type: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
381
|
+
name: z.ZodString;
|
|
382
|
+
acct_type: z.ZodString;
|
|
383
|
+
ext_type: z.ZodString;
|
|
384
|
+
group: z.ZodString;
|
|
385
|
+
}, z.core.$strip>>>;
|
|
386
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
387
|
+
message: z.ZodString;
|
|
388
|
+
code: z.ZodString;
|
|
389
|
+
actionable: z.ZodBoolean;
|
|
390
|
+
description: z.ZodOptional<z.ZodString>;
|
|
391
|
+
}, z.core.$strip>>>;
|
|
392
|
+
}, z.core.$strict>;
|
|
393
|
+
/**
|
|
394
|
+
* Account creation schema - User mode
|
|
395
|
+
* Full validation with business rules for production use
|
|
396
|
+
* Note: Legacy API doesn't expose id in request body (server-generated)
|
|
397
|
+
* Using .strict() to prevent unknown fields (discovered in Session 1)
|
|
398
|
+
*/
|
|
399
|
+
declare const AccountCreateSchemaUser: z.ZodObject<{
|
|
400
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
401
|
+
message: z.ZodString;
|
|
402
|
+
code: z.ZodString;
|
|
403
|
+
actionable: z.ZodBoolean;
|
|
404
|
+
description: z.ZodOptional<z.ZodString>;
|
|
405
|
+
}, z.core.$strip>>>;
|
|
406
|
+
name: z.ZodString;
|
|
407
|
+
balance: z.ZodString;
|
|
408
|
+
account_type: z.ZodEnum<{
|
|
409
|
+
checking: "checking";
|
|
410
|
+
savings: "savings";
|
|
411
|
+
cards: "cards";
|
|
412
|
+
student_loans: "student_loans";
|
|
413
|
+
bill: "bill";
|
|
414
|
+
autos: "autos";
|
|
415
|
+
home: "home";
|
|
416
|
+
investment: "investment";
|
|
417
|
+
loan: "loan";
|
|
418
|
+
asset: "asset";
|
|
419
|
+
cd: "cd";
|
|
420
|
+
money_market: "money_market";
|
|
421
|
+
certificates: "certificates";
|
|
422
|
+
commercial: "commercial";
|
|
423
|
+
creditline: "creditline";
|
|
424
|
+
}>;
|
|
425
|
+
state: z.ZodEnum<{
|
|
426
|
+
active: "active";
|
|
427
|
+
closed: "closed";
|
|
428
|
+
archived: "archived";
|
|
429
|
+
pending_deletion: "pending_deletion";
|
|
430
|
+
}>;
|
|
431
|
+
aggregation_type: z.ZodEnum<{
|
|
432
|
+
finicity: "finicity";
|
|
433
|
+
cashedge: "cashedge";
|
|
434
|
+
partner: "partner";
|
|
435
|
+
}>;
|
|
436
|
+
fi: z.ZodNullable<z.ZodObject<{
|
|
437
|
+
id: z.ZodNumber;
|
|
438
|
+
name: z.ZodString;
|
|
439
|
+
}, z.core.$strip>>;
|
|
440
|
+
cashedge_account_type: z.ZodNullable<z.ZodObject<{
|
|
441
|
+
name: z.ZodString;
|
|
442
|
+
acct_type: z.ZodString;
|
|
443
|
+
ext_type: z.ZodString;
|
|
444
|
+
group: z.ZodString;
|
|
445
|
+
}, z.core.$strip>>;
|
|
446
|
+
locked_balance: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
447
|
+
preferred_balance_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
448
|
+
Available: "Available";
|
|
449
|
+
Current: "Current";
|
|
450
|
+
Outstanding: "Outstanding";
|
|
451
|
+
}>>>;
|
|
452
|
+
display_account_type: z.ZodOptional<z.ZodString>;
|
|
453
|
+
reference_id: z.ZodOptional<z.ZodString>;
|
|
454
|
+
harvest_updated_at: z.ZodNullable<z.ZodString>;
|
|
455
|
+
include_in_expenses: z.ZodBoolean;
|
|
456
|
+
include_in_budget: z.ZodBoolean;
|
|
457
|
+
include_in_cashflow: z.ZodBoolean;
|
|
458
|
+
include_in_dashboard: z.ZodBoolean;
|
|
459
|
+
include_in_goals: z.ZodBoolean;
|
|
460
|
+
include_in_networth: z.ZodBoolean;
|
|
461
|
+
other_balances: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
462
|
+
balance_type: z.ZodString;
|
|
463
|
+
balance: z.ZodString;
|
|
464
|
+
}, z.core.$strip>>>;
|
|
465
|
+
}, z.core.$strict>;
|
|
466
|
+
declare const AccountCreateSchema: z.ZodObject<{
|
|
467
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
468
|
+
message: z.ZodString;
|
|
469
|
+
code: z.ZodString;
|
|
470
|
+
actionable: z.ZodBoolean;
|
|
471
|
+
description: z.ZodOptional<z.ZodString>;
|
|
472
|
+
}, z.core.$strip>>>;
|
|
473
|
+
name: z.ZodString;
|
|
474
|
+
balance: z.ZodString;
|
|
475
|
+
account_type: z.ZodEnum<{
|
|
476
|
+
checking: "checking";
|
|
477
|
+
savings: "savings";
|
|
478
|
+
cards: "cards";
|
|
479
|
+
student_loans: "student_loans";
|
|
480
|
+
bill: "bill";
|
|
481
|
+
autos: "autos";
|
|
482
|
+
home: "home";
|
|
483
|
+
investment: "investment";
|
|
484
|
+
loan: "loan";
|
|
485
|
+
asset: "asset";
|
|
486
|
+
cd: "cd";
|
|
487
|
+
money_market: "money_market";
|
|
488
|
+
certificates: "certificates";
|
|
489
|
+
commercial: "commercial";
|
|
490
|
+
creditline: "creditline";
|
|
491
|
+
}>;
|
|
492
|
+
state: z.ZodEnum<{
|
|
493
|
+
active: "active";
|
|
494
|
+
closed: "closed";
|
|
495
|
+
archived: "archived";
|
|
496
|
+
pending_deletion: "pending_deletion";
|
|
497
|
+
}>;
|
|
498
|
+
aggregation_type: z.ZodEnum<{
|
|
499
|
+
finicity: "finicity";
|
|
500
|
+
cashedge: "cashedge";
|
|
501
|
+
partner: "partner";
|
|
502
|
+
}>;
|
|
503
|
+
fi: z.ZodNullable<z.ZodObject<{
|
|
504
|
+
id: z.ZodNumber;
|
|
505
|
+
name: z.ZodString;
|
|
506
|
+
}, z.core.$strip>>;
|
|
507
|
+
cashedge_account_type: z.ZodNullable<z.ZodObject<{
|
|
508
|
+
name: z.ZodString;
|
|
509
|
+
acct_type: z.ZodString;
|
|
510
|
+
ext_type: z.ZodString;
|
|
511
|
+
group: z.ZodString;
|
|
512
|
+
}, z.core.$strip>>;
|
|
513
|
+
locked_balance: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
514
|
+
preferred_balance_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
515
|
+
Available: "Available";
|
|
516
|
+
Current: "Current";
|
|
517
|
+
Outstanding: "Outstanding";
|
|
518
|
+
}>>>;
|
|
519
|
+
display_account_type: z.ZodOptional<z.ZodString>;
|
|
520
|
+
reference_id: z.ZodOptional<z.ZodString>;
|
|
521
|
+
harvest_updated_at: z.ZodNullable<z.ZodString>;
|
|
522
|
+
include_in_expenses: z.ZodBoolean;
|
|
523
|
+
include_in_budget: z.ZodBoolean;
|
|
524
|
+
include_in_cashflow: z.ZodBoolean;
|
|
525
|
+
include_in_dashboard: z.ZodBoolean;
|
|
526
|
+
include_in_goals: z.ZodBoolean;
|
|
527
|
+
include_in_networth: z.ZodBoolean;
|
|
528
|
+
other_balances: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
529
|
+
balance_type: z.ZodString;
|
|
530
|
+
balance: z.ZodString;
|
|
531
|
+
}, z.core.$strip>>>;
|
|
532
|
+
}, z.core.$strict>;
|
|
533
|
+
/**
|
|
534
|
+
* Account update schema
|
|
535
|
+
* Note: Legacy API requires id, all other fields optional
|
|
536
|
+
*/
|
|
537
|
+
declare const AccountUpdateSchema: z.ZodObject<{
|
|
538
|
+
id: z.ZodNonOptional<z.ZodOptional<z.ZodNumber>>;
|
|
539
|
+
name: z.ZodOptional<z.ZodString>;
|
|
540
|
+
balance: z.ZodOptional<z.ZodString>;
|
|
541
|
+
locked_balance: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
542
|
+
preferred_balance_type: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
543
|
+
Available: "Available";
|
|
544
|
+
Current: "Current";
|
|
545
|
+
Outstanding: "Outstanding";
|
|
546
|
+
}>>>>;
|
|
547
|
+
account_type: z.ZodOptional<z.ZodEnum<{
|
|
548
|
+
checking: "checking";
|
|
549
|
+
savings: "savings";
|
|
550
|
+
cards: "cards";
|
|
551
|
+
student_loans: "student_loans";
|
|
552
|
+
bill: "bill";
|
|
553
|
+
autos: "autos";
|
|
554
|
+
home: "home";
|
|
555
|
+
investment: "investment";
|
|
556
|
+
loan: "loan";
|
|
557
|
+
asset: "asset";
|
|
558
|
+
cd: "cd";
|
|
559
|
+
money_market: "money_market";
|
|
560
|
+
certificates: "certificates";
|
|
561
|
+
commercial: "commercial";
|
|
562
|
+
creditline: "creditline";
|
|
563
|
+
}>>;
|
|
564
|
+
display_account_type: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
565
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
566
|
+
active: "active";
|
|
567
|
+
closed: "closed";
|
|
568
|
+
archived: "archived";
|
|
569
|
+
pending_deletion: "pending_deletion";
|
|
570
|
+
}>>;
|
|
571
|
+
aggregation_type: z.ZodOptional<z.ZodEnum<{
|
|
572
|
+
finicity: "finicity";
|
|
573
|
+
cashedge: "cashedge";
|
|
574
|
+
partner: "partner";
|
|
575
|
+
}>>;
|
|
576
|
+
reference_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
577
|
+
harvest_updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
578
|
+
include_in_expenses: z.ZodOptional<z.ZodBoolean>;
|
|
579
|
+
include_in_budget: z.ZodOptional<z.ZodBoolean>;
|
|
580
|
+
include_in_cashflow: z.ZodOptional<z.ZodBoolean>;
|
|
581
|
+
include_in_dashboard: z.ZodOptional<z.ZodBoolean>;
|
|
582
|
+
include_in_goals: z.ZodOptional<z.ZodBoolean>;
|
|
583
|
+
include_in_networth: z.ZodOptional<z.ZodBoolean>;
|
|
584
|
+
fi: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
585
|
+
id: z.ZodNumber;
|
|
586
|
+
name: z.ZodString;
|
|
587
|
+
}, z.core.$strip>>>;
|
|
588
|
+
cashedge_account_type: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
589
|
+
name: z.ZodString;
|
|
590
|
+
acct_type: z.ZodString;
|
|
591
|
+
ext_type: z.ZodString;
|
|
592
|
+
group: z.ZodString;
|
|
593
|
+
}, z.core.$strip>>>;
|
|
594
|
+
error: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
595
|
+
message: z.ZodString;
|
|
596
|
+
code: z.ZodString;
|
|
597
|
+
actionable: z.ZodBoolean;
|
|
598
|
+
description: z.ZodOptional<z.ZodString>;
|
|
599
|
+
}, z.core.$strip>>>>;
|
|
600
|
+
other_balances: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
601
|
+
balance_type: z.ZodString;
|
|
602
|
+
balance: z.ZodString;
|
|
603
|
+
}, z.core.$strip>>>>;
|
|
604
|
+
}, z.core.$strip>;
|
|
605
|
+
/**
|
|
606
|
+
* Account delete schema
|
|
607
|
+
* Endpoint: DELETE /users/{userId}/accounts/{id}
|
|
608
|
+
* Simple id-only schema (id comes from URL path)
|
|
609
|
+
*/
|
|
610
|
+
declare const AccountDeleteSchema: z.ZodObject<{
|
|
611
|
+
id: z.ZodNumber;
|
|
612
|
+
}, z.core.$strip>;
|
|
613
|
+
/**
|
|
614
|
+
* Account archive schema
|
|
615
|
+
* Endpoint: PUT /users/{userId}/accounts/{id}/archive
|
|
616
|
+
* Simple id-only schema (id comes from URL path)
|
|
617
|
+
*/
|
|
618
|
+
declare const AccountArchiveSchema: z.ZodObject<{
|
|
619
|
+
id: z.ZodNumber;
|
|
620
|
+
}, z.core.$strip>;
|
|
621
|
+
/**
|
|
622
|
+
* Pending account schema
|
|
623
|
+
* Returned after aggregation when accounts need classification
|
|
624
|
+
*/
|
|
625
|
+
declare const PendingAccountSchema: z.ZodObject<{
|
|
626
|
+
account_ids: z.ZodArray<z.ZodNumber>;
|
|
627
|
+
institution_id: z.ZodNumber;
|
|
628
|
+
}, z.core.$strip>;
|
|
629
|
+
/**
|
|
630
|
+
* Pending accounts response
|
|
631
|
+
* Endpoint: GET /users/{userId}/pending_accounts
|
|
632
|
+
*/
|
|
633
|
+
declare const PendingAccountsResponseSchema: z.ZodObject<{
|
|
634
|
+
pending_accounts: z.ZodArray<z.ZodObject<{
|
|
635
|
+
account_ids: z.ZodArray<z.ZodNumber>;
|
|
636
|
+
institution_id: z.ZodNumber;
|
|
637
|
+
}, z.core.$strip>>;
|
|
638
|
+
}, z.core.$strip>;
|
|
639
|
+
/**
|
|
640
|
+
* Delete pending account schema
|
|
641
|
+
* Endpoint: DELETE /users/{userId}/pending_accounts/{accountId}
|
|
642
|
+
* Simple id-only schema (id comes from URL path)
|
|
643
|
+
*/
|
|
644
|
+
declare const PendingAccountDeleteSchema: z.ZodObject<{
|
|
645
|
+
accountId: z.ZodNumber;
|
|
646
|
+
}, z.core.$strip>;
|
|
647
|
+
/**
|
|
648
|
+
* Investment holding schema
|
|
649
|
+
* Individual security/position in investment account
|
|
650
|
+
* Note: Structure based on typical investment account responses
|
|
651
|
+
*/
|
|
652
|
+
declare const InvestmentHoldingSchema: z.ZodObject<{
|
|
653
|
+
symbol: z.ZodString;
|
|
654
|
+
description: z.ZodOptional<z.ZodString>;
|
|
655
|
+
quantity: z.ZodNumber;
|
|
656
|
+
price: z.ZodNumber;
|
|
657
|
+
value: z.ZodString;
|
|
658
|
+
cost_basis: z.ZodOptional<z.ZodString>;
|
|
659
|
+
unrealized_gain_loss: z.ZodOptional<z.ZodString>;
|
|
660
|
+
}, z.core.$strip>;
|
|
661
|
+
/**
|
|
662
|
+
* Investment schema
|
|
663
|
+
* Container for investment holdings
|
|
664
|
+
*/
|
|
665
|
+
declare const InvestmentSchema: z.ZodObject<{
|
|
666
|
+
account_id: z.ZodNumber;
|
|
667
|
+
holdings: z.ZodArray<z.ZodObject<{
|
|
668
|
+
symbol: z.ZodString;
|
|
669
|
+
description: z.ZodOptional<z.ZodString>;
|
|
670
|
+
quantity: z.ZodNumber;
|
|
671
|
+
price: z.ZodNumber;
|
|
672
|
+
value: z.ZodString;
|
|
673
|
+
cost_basis: z.ZodOptional<z.ZodString>;
|
|
674
|
+
unrealized_gain_loss: z.ZodOptional<z.ZodString>;
|
|
675
|
+
}, z.core.$strip>>;
|
|
676
|
+
total_value: z.ZodString;
|
|
677
|
+
}, z.core.$strip>;
|
|
678
|
+
/**
|
|
679
|
+
* Investments response schema
|
|
680
|
+
* Endpoint: GET /users/{userId}/accounts/{id}/investments
|
|
681
|
+
*/
|
|
682
|
+
declare const InvestmentsResponseSchema: z.ZodObject<{
|
|
683
|
+
investments: z.ZodArray<z.ZodObject<{
|
|
684
|
+
account_id: z.ZodNumber;
|
|
685
|
+
holdings: z.ZodArray<z.ZodObject<{
|
|
686
|
+
symbol: z.ZodString;
|
|
687
|
+
description: z.ZodOptional<z.ZodString>;
|
|
688
|
+
quantity: z.ZodNumber;
|
|
689
|
+
price: z.ZodNumber;
|
|
690
|
+
value: z.ZodString;
|
|
691
|
+
cost_basis: z.ZodOptional<z.ZodString>;
|
|
692
|
+
unrealized_gain_loss: z.ZodOptional<z.ZodString>;
|
|
693
|
+
}, z.core.$strip>>;
|
|
694
|
+
total_value: z.ZodString;
|
|
695
|
+
}, z.core.$strip>>;
|
|
696
|
+
}, z.core.$strip>;
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Type exports for Account domain
|
|
700
|
+
* Source: Inferred from Zod schemas matching legacy API
|
|
701
|
+
*/
|
|
702
|
+
type Account = z.infer<typeof AccountSchema>;
|
|
703
|
+
type AccountsResponse = z.infer<typeof AccountsResponseSchema>;
|
|
704
|
+
type AccountCreate = z.infer<typeof AccountCreateSchema>;
|
|
705
|
+
type AccountUpdate = z.infer<typeof AccountUpdateSchema>;
|
|
706
|
+
type AccountDelete = z.infer<typeof AccountDeleteSchema>;
|
|
707
|
+
type AccountArchive = z.infer<typeof AccountArchiveSchema>;
|
|
708
|
+
type AccountType = z.infer<typeof AccountTypeSchema>;
|
|
709
|
+
type AccountState = z.infer<typeof AccountStateSchema>;
|
|
710
|
+
type AggregationType = z.infer<typeof AggregationTypeSchema>;
|
|
711
|
+
type PreferredBalanceType = z.infer<typeof PreferredBalanceTypeSchema>;
|
|
712
|
+
type FinancialInstitution = z.infer<typeof FinancialInstitutionSchema>;
|
|
713
|
+
type CashEdgeAccountType = z.infer<typeof CashEdgeAccountTypeSchema>;
|
|
714
|
+
type AccountError = z.infer<typeof AccountErrorSchema>;
|
|
715
|
+
type OtherBalance = z.infer<typeof OtherBalanceSchema>;
|
|
716
|
+
type PendingAccount = z.infer<typeof PendingAccountSchema>;
|
|
717
|
+
type PendingAccountsResponse = z.infer<typeof PendingAccountsResponseSchema>;
|
|
718
|
+
type PendingAccountDelete = z.infer<typeof PendingAccountDeleteSchema>;
|
|
719
|
+
type Investment = z.infer<typeof InvestmentSchema>;
|
|
720
|
+
type InvestmentHolding = z.infer<typeof InvestmentHoldingSchema>;
|
|
721
|
+
type InvestmentsResponse = z.infer<typeof InvestmentsResponseSchema>;
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* Transaction type from legacy API
|
|
725
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/accountTransactions.json
|
|
726
|
+
*/
|
|
727
|
+
declare const TransactionTypeSchema: z.ZodEnum<{
|
|
728
|
+
Debit: "Debit";
|
|
729
|
+
Credit: "Credit";
|
|
730
|
+
}>;
|
|
731
|
+
/**
|
|
732
|
+
* Transaction tag (category) with split amount
|
|
733
|
+
* Tags allow transactions to be categorized, with support for split transactions
|
|
734
|
+
*/
|
|
735
|
+
declare const TransactionTagSchema: z.ZodObject<{
|
|
736
|
+
name: z.ZodString;
|
|
737
|
+
balance: z.ZodNumber;
|
|
738
|
+
}, z.core.$strip>;
|
|
739
|
+
/**
|
|
740
|
+
* Links to related resources
|
|
741
|
+
*/
|
|
742
|
+
declare const TransactionLinksSchema: z.ZodObject<{
|
|
743
|
+
account: z.ZodNumber;
|
|
744
|
+
}, z.core.$strip>;
|
|
745
|
+
/**
|
|
746
|
+
* Transaction schema matching legacy API response structure
|
|
747
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/accountTransactions.json
|
|
748
|
+
*
|
|
749
|
+
* CRITICAL DIFFERENCES FROM ACCOUNT SCHEMA:
|
|
750
|
+
* - ID is string format "YYYY_MM_DD_referenceId_accountId" (NOT integer)
|
|
751
|
+
* - balance is NUMBER (NOT string) - unlike Account schema
|
|
752
|
+
* - OpenAPI spec shows string but legacy data uses number - following legacy (PRIMARY source)
|
|
753
|
+
*/
|
|
754
|
+
declare const TransactionSchema: z.ZodObject<{
|
|
755
|
+
id: z.ZodString;
|
|
756
|
+
reference_id: z.ZodString;
|
|
757
|
+
transaction_type: z.ZodEnum<{
|
|
758
|
+
Debit: "Debit";
|
|
759
|
+
Credit: "Credit";
|
|
760
|
+
}>;
|
|
761
|
+
memo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
762
|
+
balance: z.ZodNumber;
|
|
763
|
+
posted_at: z.ZodString;
|
|
764
|
+
created_at: z.ZodString;
|
|
765
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
766
|
+
nickname: z.ZodString;
|
|
767
|
+
original_name: z.ZodString;
|
|
768
|
+
check_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
769
|
+
tags: z.ZodArray<z.ZodObject<{
|
|
770
|
+
name: z.ZodString;
|
|
771
|
+
balance: z.ZodNumber;
|
|
772
|
+
}, z.core.$strip>>;
|
|
773
|
+
links: z.ZodObject<{
|
|
774
|
+
account: z.ZodNumber;
|
|
775
|
+
}, z.core.$strip>;
|
|
776
|
+
}, z.core.$strip>;
|
|
777
|
+
/**
|
|
778
|
+
* Transactions response schema - array of transactions
|
|
779
|
+
* Used by search endpoint: GET /users/:userId/transactions/search
|
|
780
|
+
*/
|
|
781
|
+
declare const TransactionsResponseSchema: z.ZodObject<{
|
|
782
|
+
transactions: z.ZodArray<z.ZodObject<{
|
|
783
|
+
id: z.ZodString;
|
|
784
|
+
reference_id: z.ZodString;
|
|
785
|
+
transaction_type: z.ZodEnum<{
|
|
786
|
+
Debit: "Debit";
|
|
787
|
+
Credit: "Credit";
|
|
788
|
+
}>;
|
|
789
|
+
memo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
790
|
+
balance: z.ZodNumber;
|
|
791
|
+
posted_at: z.ZodString;
|
|
792
|
+
created_at: z.ZodString;
|
|
793
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
794
|
+
nickname: z.ZodString;
|
|
795
|
+
original_name: z.ZodString;
|
|
796
|
+
check_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
797
|
+
tags: z.ZodArray<z.ZodObject<{
|
|
798
|
+
name: z.ZodString;
|
|
799
|
+
balance: z.ZodNumber;
|
|
800
|
+
}, z.core.$strip>>;
|
|
801
|
+
links: z.ZodObject<{
|
|
802
|
+
account: z.ZodNumber;
|
|
803
|
+
}, z.core.$strip>;
|
|
804
|
+
}, z.core.$strip>>;
|
|
805
|
+
}, z.core.$strip>;
|
|
806
|
+
/**
|
|
807
|
+
* Transaction creation schema - Admin mode
|
|
808
|
+
* Minimal validation for test data creation
|
|
809
|
+
* Allows creating transactions with basic required fields
|
|
810
|
+
*/
|
|
811
|
+
declare const TransactionCreateSchemaAdmin: z.ZodObject<{
|
|
812
|
+
reference_id: z.ZodString;
|
|
813
|
+
transaction_type: z.ZodEnum<{
|
|
814
|
+
Debit: "Debit";
|
|
815
|
+
Credit: "Credit";
|
|
816
|
+
}>;
|
|
817
|
+
balance: z.ZodNumber;
|
|
818
|
+
posted_at: z.ZodString;
|
|
819
|
+
nickname: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
820
|
+
original_name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
821
|
+
memo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
822
|
+
check_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
823
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
824
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
825
|
+
name: z.ZodString;
|
|
826
|
+
balance: z.ZodNumber;
|
|
827
|
+
}, z.core.$strip>>>>;
|
|
828
|
+
links: z.ZodObject<{
|
|
829
|
+
account: z.ZodNumber;
|
|
830
|
+
}, z.core.$strip>;
|
|
831
|
+
}, z.core.$strict>;
|
|
832
|
+
/**
|
|
833
|
+
* Transaction creation schema - User mode
|
|
834
|
+
* Full validation with business rules for production use
|
|
835
|
+
* Note: id is server-generated, created_at is server-generated
|
|
836
|
+
* Using .strict() to prevent unknown fields (Session 1 pattern)
|
|
837
|
+
*/
|
|
838
|
+
declare const TransactionCreateSchemaUser: z.ZodObject<{
|
|
839
|
+
balance: z.ZodNumber;
|
|
840
|
+
reference_id: z.ZodString;
|
|
841
|
+
transaction_type: z.ZodEnum<{
|
|
842
|
+
Debit: "Debit";
|
|
843
|
+
Credit: "Credit";
|
|
844
|
+
}>;
|
|
845
|
+
links: z.ZodObject<{
|
|
846
|
+
account: z.ZodNumber;
|
|
847
|
+
}, z.core.$strip>;
|
|
848
|
+
memo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
849
|
+
posted_at: z.ZodString;
|
|
850
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
851
|
+
nickname: z.ZodString;
|
|
852
|
+
original_name: z.ZodString;
|
|
853
|
+
check_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
854
|
+
tags: z.ZodArray<z.ZodObject<{
|
|
855
|
+
name: z.ZodString;
|
|
856
|
+
balance: z.ZodNumber;
|
|
857
|
+
}, z.core.$strip>>;
|
|
858
|
+
}, z.core.$strict>;
|
|
859
|
+
declare const TransactionCreateSchema: z.ZodObject<{
|
|
860
|
+
balance: z.ZodNumber;
|
|
861
|
+
reference_id: z.ZodString;
|
|
862
|
+
transaction_type: z.ZodEnum<{
|
|
863
|
+
Debit: "Debit";
|
|
864
|
+
Credit: "Credit";
|
|
865
|
+
}>;
|
|
866
|
+
links: z.ZodObject<{
|
|
867
|
+
account: z.ZodNumber;
|
|
868
|
+
}, z.core.$strip>;
|
|
869
|
+
memo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
870
|
+
posted_at: z.ZodString;
|
|
871
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
872
|
+
nickname: z.ZodString;
|
|
873
|
+
original_name: z.ZodString;
|
|
874
|
+
check_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
875
|
+
tags: z.ZodArray<z.ZodObject<{
|
|
876
|
+
name: z.ZodString;
|
|
877
|
+
balance: z.ZodNumber;
|
|
878
|
+
}, z.core.$strip>>;
|
|
879
|
+
}, z.core.$strict>;
|
|
880
|
+
/**
|
|
881
|
+
* Transaction update schema
|
|
882
|
+
* Note: Partial update with required id
|
|
883
|
+
* Based on legacy API updateTransaction function - only nickname and tags can be updated
|
|
884
|
+
* Using .strict() to prevent unknown fields (Session 1 pattern)
|
|
885
|
+
*/
|
|
886
|
+
declare const TransactionUpdateSchema: z.ZodObject<{
|
|
887
|
+
id: z.ZodString;
|
|
888
|
+
nickname: z.ZodString;
|
|
889
|
+
tags: z.ZodArray<z.ZodObject<{
|
|
890
|
+
name: z.ZodString;
|
|
891
|
+
balance: z.ZodNumber;
|
|
892
|
+
}, z.core.$strip>>;
|
|
893
|
+
}, z.core.$strict>;
|
|
894
|
+
/**
|
|
895
|
+
* Transaction tagging - Regular (non-split)
|
|
896
|
+
* Applies single or multiple tags to entire transaction
|
|
897
|
+
*/
|
|
898
|
+
declare const TransactionTaggingRegularSchema: z.ZodObject<{
|
|
899
|
+
type: z.ZodLiteral<"regular">;
|
|
900
|
+
repeat: z.ZodBoolean;
|
|
901
|
+
regular: z.ZodArray<z.ZodString>;
|
|
902
|
+
}, z.core.$strip>;
|
|
903
|
+
/**
|
|
904
|
+
* Transaction tagging - Split
|
|
905
|
+
* Splits transaction amount across multiple tags
|
|
906
|
+
*/
|
|
907
|
+
declare const TransactionTaggingSplitItemSchema: z.ZodObject<{
|
|
908
|
+
name: z.ZodString;
|
|
909
|
+
value: z.ZodNumber;
|
|
910
|
+
}, z.core.$strip>;
|
|
911
|
+
declare const TransactionTaggingSplitSchema: z.ZodObject<{
|
|
912
|
+
type: z.ZodLiteral<"split">;
|
|
913
|
+
split: z.ZodArray<z.ZodObject<{
|
|
914
|
+
name: z.ZodString;
|
|
915
|
+
value: z.ZodNumber;
|
|
916
|
+
}, z.core.$strip>>;
|
|
917
|
+
}, z.core.$strip>;
|
|
918
|
+
/**
|
|
919
|
+
* Transaction tagging discriminated union
|
|
920
|
+
* Endpoint: PUT /users/{userId}/transactions/{id}
|
|
921
|
+
*/
|
|
922
|
+
declare const TransactionTaggingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
923
|
+
type: z.ZodLiteral<"regular">;
|
|
924
|
+
repeat: z.ZodBoolean;
|
|
925
|
+
regular: z.ZodArray<z.ZodString>;
|
|
926
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
927
|
+
type: z.ZodLiteral<"split">;
|
|
928
|
+
split: z.ZodArray<z.ZodObject<{
|
|
929
|
+
name: z.ZodString;
|
|
930
|
+
value: z.ZodNumber;
|
|
931
|
+
}, z.core.$strip>>;
|
|
932
|
+
}, z.core.$strip>], "type">;
|
|
933
|
+
/**
|
|
934
|
+
* Transaction search parameters
|
|
935
|
+
* Endpoint: GET /users/{userId}/transactions/search
|
|
936
|
+
*/
|
|
937
|
+
declare const TransactionSearchParamsSchema: z.ZodObject<{
|
|
938
|
+
begin_on: z.ZodString;
|
|
939
|
+
end_on: z.ZodString;
|
|
940
|
+
q: z.ZodOptional<z.ZodString>;
|
|
941
|
+
untagged: z.ZodOptional<z.ZodEnum<{
|
|
942
|
+
0: "0";
|
|
943
|
+
1: "1";
|
|
944
|
+
}>>;
|
|
945
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
946
|
+
}, z.core.$strip>;
|
|
947
|
+
/**
|
|
948
|
+
* Transaction delete schema
|
|
949
|
+
* Endpoint: DELETE /users/{userId}/transactions/{id}
|
|
950
|
+
* Simple id-only schema (id comes from URL path)
|
|
951
|
+
*/
|
|
952
|
+
declare const TransactionDeleteSchema: z.ZodObject<{
|
|
953
|
+
id: z.ZodString;
|
|
954
|
+
}, z.core.$strip>;
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* Type exports for Transaction domain
|
|
958
|
+
* Source: Inferred from Zod schemas matching legacy API
|
|
959
|
+
*/
|
|
960
|
+
type Transaction = z.infer<typeof TransactionSchema>;
|
|
961
|
+
type TransactionCreate = z.infer<typeof TransactionCreateSchema>;
|
|
962
|
+
type TransactionUpdate = z.infer<typeof TransactionUpdateSchema>;
|
|
963
|
+
type TransactionDelete = z.infer<typeof TransactionDeleteSchema>;
|
|
964
|
+
type TransactionsResponse = z.infer<typeof TransactionsResponseSchema>;
|
|
965
|
+
type TransactionType = z.infer<typeof TransactionTypeSchema>;
|
|
966
|
+
type TransactionTag = z.infer<typeof TransactionTagSchema>;
|
|
967
|
+
type TransactionLinks = z.infer<typeof TransactionLinksSchema>;
|
|
968
|
+
type TransactionTagging = z.infer<typeof TransactionTaggingSchema>;
|
|
969
|
+
type TransactionTaggingRegular = z.infer<typeof TransactionTaggingRegularSchema>;
|
|
970
|
+
type TransactionTaggingSplit = z.infer<typeof TransactionTaggingSplitSchema>;
|
|
971
|
+
type TransactionTaggingSplitItem = z.infer<typeof TransactionTaggingSplitItemSchema>;
|
|
972
|
+
type TransactionSearchParams = z.infer<typeof TransactionSearchParamsSchema>;
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Cashflow event type - Bill (outflow) or Income (inflow)
|
|
976
|
+
*/
|
|
977
|
+
declare const CashflowEventTypeSchema: z.ZodEnum<{
|
|
978
|
+
bill: "bill";
|
|
979
|
+
income: "income";
|
|
980
|
+
}>;
|
|
981
|
+
/**
|
|
982
|
+
* Recurrence frequency
|
|
983
|
+
*/
|
|
984
|
+
declare const RecurrenceFrequencySchema: z.ZodEnum<{
|
|
985
|
+
once: "once";
|
|
986
|
+
weekly: "weekly";
|
|
987
|
+
biweekly: "biweekly";
|
|
988
|
+
monthly: "monthly";
|
|
989
|
+
quarterly: "quarterly";
|
|
990
|
+
yearly: "yearly";
|
|
991
|
+
}>;
|
|
992
|
+
/**
|
|
993
|
+
* Cashflow Event schema for upcoming bills and recurring income
|
|
994
|
+
*
|
|
995
|
+
* Represents scheduled transactions that haven't occurred yet:
|
|
996
|
+
* - Bills to be paid
|
|
997
|
+
* - Income to be received
|
|
998
|
+
* - Recurring/one-time events
|
|
999
|
+
*
|
|
1000
|
+
* Design Notes:
|
|
1001
|
+
* - Lightweight schema for MVP cashflow tracking
|
|
1002
|
+
* - Extends transaction concept with scheduling
|
|
1003
|
+
* - Supports recurring patterns
|
|
1004
|
+
*/
|
|
1005
|
+
declare const CashflowEventSchema: z.ZodObject<{
|
|
1006
|
+
id: z.ZodString;
|
|
1007
|
+
event_id: z.ZodString;
|
|
1008
|
+
name: z.ZodString;
|
|
1009
|
+
amount: z.ZodNumber;
|
|
1010
|
+
memo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1011
|
+
scheduled_date: z.ZodString;
|
|
1012
|
+
event_type: z.ZodEnum<{
|
|
1013
|
+
bill: "bill";
|
|
1014
|
+
income: "income";
|
|
1015
|
+
}>;
|
|
1016
|
+
is_paid: z.ZodDefault<z.ZodBoolean>;
|
|
1017
|
+
is_recurring: z.ZodDefault<z.ZodBoolean>;
|
|
1018
|
+
recurrence_frequency: z.ZodOptional<z.ZodEnum<{
|
|
1019
|
+
once: "once";
|
|
1020
|
+
weekly: "weekly";
|
|
1021
|
+
biweekly: "biweekly";
|
|
1022
|
+
monthly: "monthly";
|
|
1023
|
+
quarterly: "quarterly";
|
|
1024
|
+
yearly: "yearly";
|
|
1025
|
+
}>>;
|
|
1026
|
+
created_at: z.ZodString;
|
|
1027
|
+
updated_at: z.ZodString;
|
|
1028
|
+
account_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1029
|
+
transaction_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1030
|
+
}, z.core.$strip>;
|
|
1031
|
+
/**
|
|
1032
|
+
* Create cashflow event schema
|
|
1033
|
+
* Server generates: id, created_at, updated_at
|
|
1034
|
+
*/
|
|
1035
|
+
declare const CashflowEventCreateSchema: z.ZodObject<{
|
|
1036
|
+
name: z.ZodString;
|
|
1037
|
+
account_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1038
|
+
memo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1039
|
+
event_type: z.ZodEnum<{
|
|
1040
|
+
bill: "bill";
|
|
1041
|
+
income: "income";
|
|
1042
|
+
}>;
|
|
1043
|
+
event_id: z.ZodString;
|
|
1044
|
+
amount: z.ZodNumber;
|
|
1045
|
+
scheduled_date: z.ZodString;
|
|
1046
|
+
is_paid: z.ZodDefault<z.ZodBoolean>;
|
|
1047
|
+
is_recurring: z.ZodDefault<z.ZodBoolean>;
|
|
1048
|
+
recurrence_frequency: z.ZodOptional<z.ZodEnum<{
|
|
1049
|
+
once: "once";
|
|
1050
|
+
weekly: "weekly";
|
|
1051
|
+
biweekly: "biweekly";
|
|
1052
|
+
monthly: "monthly";
|
|
1053
|
+
quarterly: "quarterly";
|
|
1054
|
+
yearly: "yearly";
|
|
1055
|
+
}>>;
|
|
1056
|
+
}, z.core.$strict>;
|
|
1057
|
+
/**
|
|
1058
|
+
* Update cashflow event schema
|
|
1059
|
+
* Allows updating event details and payment status
|
|
1060
|
+
*/
|
|
1061
|
+
declare const CashflowEventUpdateSchema: z.ZodObject<{
|
|
1062
|
+
id: z.ZodString;
|
|
1063
|
+
name: z.ZodString;
|
|
1064
|
+
memo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1065
|
+
amount: z.ZodNumber;
|
|
1066
|
+
scheduled_date: z.ZodString;
|
|
1067
|
+
is_paid: z.ZodDefault<z.ZodBoolean>;
|
|
1068
|
+
}, z.core.$strict>;
|
|
1069
|
+
/**
|
|
1070
|
+
* Filter cashflow events by date range and type
|
|
1071
|
+
*/
|
|
1072
|
+
declare const CashflowEventFilterSchema: z.ZodObject<{
|
|
1073
|
+
start_date: z.ZodString;
|
|
1074
|
+
end_date: z.ZodString;
|
|
1075
|
+
event_type: z.ZodDefault<z.ZodEnum<{
|
|
1076
|
+
bill: "bill";
|
|
1077
|
+
income: "income";
|
|
1078
|
+
all: "all";
|
|
1079
|
+
}>>;
|
|
1080
|
+
include_paid: z.ZodDefault<z.ZodBoolean>;
|
|
1081
|
+
}, z.core.$strip>;
|
|
1082
|
+
/**
|
|
1083
|
+
* Cashflow events response - array of events
|
|
1084
|
+
*/
|
|
1085
|
+
declare const CashflowEventsResponseSchema: z.ZodObject<{
|
|
1086
|
+
events: z.ZodArray<z.ZodObject<{
|
|
1087
|
+
id: z.ZodString;
|
|
1088
|
+
event_id: z.ZodString;
|
|
1089
|
+
name: z.ZodString;
|
|
1090
|
+
amount: z.ZodNumber;
|
|
1091
|
+
memo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1092
|
+
scheduled_date: z.ZodString;
|
|
1093
|
+
event_type: z.ZodEnum<{
|
|
1094
|
+
bill: "bill";
|
|
1095
|
+
income: "income";
|
|
1096
|
+
}>;
|
|
1097
|
+
is_paid: z.ZodDefault<z.ZodBoolean>;
|
|
1098
|
+
is_recurring: z.ZodDefault<z.ZodBoolean>;
|
|
1099
|
+
recurrence_frequency: z.ZodOptional<z.ZodEnum<{
|
|
1100
|
+
once: "once";
|
|
1101
|
+
weekly: "weekly";
|
|
1102
|
+
biweekly: "biweekly";
|
|
1103
|
+
monthly: "monthly";
|
|
1104
|
+
quarterly: "quarterly";
|
|
1105
|
+
yearly: "yearly";
|
|
1106
|
+
}>>;
|
|
1107
|
+
created_at: z.ZodString;
|
|
1108
|
+
updated_at: z.ZodString;
|
|
1109
|
+
account_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1110
|
+
transaction_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1111
|
+
}, z.core.$strip>>;
|
|
1112
|
+
}, z.core.$strip>;
|
|
1113
|
+
|
|
1114
|
+
type CashflowEvent = z.infer<typeof CashflowEventSchema>;
|
|
1115
|
+
type CashflowEventCreate = z.infer<typeof CashflowEventCreateSchema>;
|
|
1116
|
+
type CashflowEventUpdate = z.infer<typeof CashflowEventUpdateSchema>;
|
|
1117
|
+
type CashflowEventFilter = z.infer<typeof CashflowEventFilterSchema>;
|
|
1118
|
+
type CashflowEventsResponse = z.infer<typeof CashflowEventsResponseSchema>;
|
|
1119
|
+
type CashflowEventType = z.infer<typeof CashflowEventTypeSchema>;
|
|
1120
|
+
type RecurrenceFrequency = z.infer<typeof RecurrenceFrequencySchema>;
|
|
1121
|
+
|
|
1122
|
+
/**
|
|
1123
|
+
* Budget state based on spending progress
|
|
1124
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/budgets.js
|
|
1125
|
+
*/
|
|
1126
|
+
declare const BudgetStateSchema: z.ZodEnum<{
|
|
1127
|
+
under: "under";
|
|
1128
|
+
risk: "risk";
|
|
1129
|
+
over: "over";
|
|
1130
|
+
}>;
|
|
1131
|
+
/**
|
|
1132
|
+
* Links to related resources
|
|
1133
|
+
*/
|
|
1134
|
+
declare const BudgetLinksSchema: z.ZodObject<{
|
|
1135
|
+
accounts: z.ZodArray<z.ZodNumber>;
|
|
1136
|
+
budget_histories: z.ZodArray<z.ZodNumber>;
|
|
1137
|
+
}, z.core.$strip>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Budget schema matching legacy API response structure
|
|
1140
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/budgets.js
|
|
1141
|
+
*
|
|
1142
|
+
* CRITICAL DIFFERENCES FROM OPENAPI:
|
|
1143
|
+
* - spent is NUMBER (NOT string) - legacy data shows integers
|
|
1144
|
+
* - budget_amount is NUMBER (NOT string) - legacy data shows integers
|
|
1145
|
+
* - OpenAPI shows oneOf (integer OR string) but legacy only uses integers
|
|
1146
|
+
*/
|
|
1147
|
+
declare const BudgetSchema: z.ZodObject<{
|
|
1148
|
+
id: z.ZodNumber;
|
|
1149
|
+
month: z.ZodNumber;
|
|
1150
|
+
year: z.ZodNumber;
|
|
1151
|
+
name: z.ZodString;
|
|
1152
|
+
state: z.ZodEnum<{
|
|
1153
|
+
under: "under";
|
|
1154
|
+
risk: "risk";
|
|
1155
|
+
over: "over";
|
|
1156
|
+
}>;
|
|
1157
|
+
spent: z.ZodNumber;
|
|
1158
|
+
budget_amount: z.ZodNumber;
|
|
1159
|
+
tag_names: z.ZodArray<z.ZodString>;
|
|
1160
|
+
links: z.ZodObject<{
|
|
1161
|
+
accounts: z.ZodArray<z.ZodNumber>;
|
|
1162
|
+
budget_histories: z.ZodArray<z.ZodNumber>;
|
|
1163
|
+
}, z.core.$strip>;
|
|
1164
|
+
}, z.core.$strip>;
|
|
1165
|
+
/**
|
|
1166
|
+
* Budgets response schema - array of budgets
|
|
1167
|
+
* Used by list endpoint: GET /users/:userId/budgets
|
|
1168
|
+
*/
|
|
1169
|
+
declare const BudgetsResponseSchema: z.ZodObject<{
|
|
1170
|
+
budgets: z.ZodArray<z.ZodObject<{
|
|
1171
|
+
id: z.ZodNumber;
|
|
1172
|
+
month: z.ZodNumber;
|
|
1173
|
+
year: z.ZodNumber;
|
|
1174
|
+
name: z.ZodString;
|
|
1175
|
+
state: z.ZodEnum<{
|
|
1176
|
+
under: "under";
|
|
1177
|
+
risk: "risk";
|
|
1178
|
+
over: "over";
|
|
1179
|
+
}>;
|
|
1180
|
+
spent: z.ZodNumber;
|
|
1181
|
+
budget_amount: z.ZodNumber;
|
|
1182
|
+
tag_names: z.ZodArray<z.ZodString>;
|
|
1183
|
+
links: z.ZodObject<{
|
|
1184
|
+
accounts: z.ZodArray<z.ZodNumber>;
|
|
1185
|
+
budget_histories: z.ZodArray<z.ZodNumber>;
|
|
1186
|
+
}, z.core.$strip>;
|
|
1187
|
+
}, z.core.$strip>>;
|
|
1188
|
+
}, z.core.$strip>;
|
|
1189
|
+
/**
|
|
1190
|
+
* Budget creation schema
|
|
1191
|
+
* Note: id is server-generated, month/year/spent/state calculated by server
|
|
1192
|
+
* Based on legacy API asBudgetJson function - only these fields sent to server
|
|
1193
|
+
* Using .strict() to prevent unknown fields (Session 1 pattern)
|
|
1194
|
+
*/
|
|
1195
|
+
declare const BudgetCreateSchema: z.ZodObject<{
|
|
1196
|
+
name: z.ZodString;
|
|
1197
|
+
budget_amount: z.ZodNumber;
|
|
1198
|
+
tag_names: z.ZodArray<z.ZodString>;
|
|
1199
|
+
account_list: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1200
|
+
show_on_dashboard: z.ZodOptional<z.ZodBoolean>;
|
|
1201
|
+
other: z.ZodOptional<z.ZodBoolean>;
|
|
1202
|
+
}, z.core.$strict>;
|
|
1203
|
+
/**
|
|
1204
|
+
* Budget update schema
|
|
1205
|
+
* Note: Same fields as create per asBudgetJson function
|
|
1206
|
+
* Using .strict() to prevent unknown fields (Session 1 pattern)
|
|
1207
|
+
*/
|
|
1208
|
+
declare const BudgetUpdateSchema: z.ZodObject<{
|
|
1209
|
+
id: z.ZodNumber;
|
|
1210
|
+
name: z.ZodString;
|
|
1211
|
+
budget_amount: z.ZodNumber;
|
|
1212
|
+
tag_names: z.ZodArray<z.ZodString>;
|
|
1213
|
+
account_list: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1214
|
+
show_on_dashboard: z.ZodOptional<z.ZodBoolean>;
|
|
1215
|
+
other: z.ZodOptional<z.ZodBoolean>;
|
|
1216
|
+
}, z.core.$strict>;
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
* Type exports for Budget domain
|
|
1220
|
+
* Source: Inferred from Zod schemas matching legacy API
|
|
1221
|
+
*/
|
|
1222
|
+
type Budget = z.infer<typeof BudgetSchema>;
|
|
1223
|
+
type BudgetCreate = z.infer<typeof BudgetCreateSchema>;
|
|
1224
|
+
type BudgetUpdate = z.infer<typeof BudgetUpdateSchema>;
|
|
1225
|
+
type BudgetsResponse = z.infer<typeof BudgetsResponseSchema>;
|
|
1226
|
+
type BudgetState = z.infer<typeof BudgetStateSchema>;
|
|
1227
|
+
type BudgetLinks = z.infer<typeof BudgetLinksSchema>;
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* Goal state
|
|
1231
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/goals.js
|
|
1232
|
+
*/
|
|
1233
|
+
declare const GoalStateSchema: z.ZodEnum<{
|
|
1234
|
+
active: "active";
|
|
1235
|
+
archived: "archived";
|
|
1236
|
+
completed: "completed";
|
|
1237
|
+
}>;
|
|
1238
|
+
/**
|
|
1239
|
+
* Goal status based on progress
|
|
1240
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/goals.js
|
|
1241
|
+
*/
|
|
1242
|
+
declare const GoalStatusSchema: z.ZodEnum<{
|
|
1243
|
+
under: "under";
|
|
1244
|
+
risk: "risk";
|
|
1245
|
+
over: "over";
|
|
1246
|
+
complete: "complete";
|
|
1247
|
+
}>;
|
|
1248
|
+
/**
|
|
1249
|
+
* Links to related resources
|
|
1250
|
+
*/
|
|
1251
|
+
declare const GoalLinksSchema: z.ZodObject<{
|
|
1252
|
+
accounts: z.ZodArray<z.ZodNumber>;
|
|
1253
|
+
}, z.core.$strip>;
|
|
1254
|
+
/**
|
|
1255
|
+
* Savings goal schema matching legacy API response structure
|
|
1256
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/goals.js
|
|
1257
|
+
*
|
|
1258
|
+
* Savings goals save TO a target amount (building up savings)
|
|
1259
|
+
*/
|
|
1260
|
+
declare const SavingsGoalSchema: z.ZodObject<{
|
|
1261
|
+
id: z.ZodNumber;
|
|
1262
|
+
name: z.ZodString;
|
|
1263
|
+
state: z.ZodEnum<{
|
|
1264
|
+
active: "active";
|
|
1265
|
+
archived: "archived";
|
|
1266
|
+
completed: "completed";
|
|
1267
|
+
}>;
|
|
1268
|
+
status: z.ZodEnum<{
|
|
1269
|
+
under: "under";
|
|
1270
|
+
risk: "risk";
|
|
1271
|
+
over: "over";
|
|
1272
|
+
complete: "complete";
|
|
1273
|
+
}>;
|
|
1274
|
+
image_name: z.ZodString;
|
|
1275
|
+
image_url: z.ZodString;
|
|
1276
|
+
percent_complete: z.ZodNumber;
|
|
1277
|
+
complete: z.ZodBoolean;
|
|
1278
|
+
initial_value: z.ZodString;
|
|
1279
|
+
current_value: z.ZodString;
|
|
1280
|
+
target_value: z.ZodString;
|
|
1281
|
+
monthly_contribution: z.ZodString;
|
|
1282
|
+
remaining_monthly_contribution: z.ZodString;
|
|
1283
|
+
current_progress: z.ZodOptional<z.ZodString>;
|
|
1284
|
+
target_contribution: z.ZodOptional<z.ZodString>;
|
|
1285
|
+
target_completion_on: z.ZodString;
|
|
1286
|
+
created_at: z.ZodString;
|
|
1287
|
+
updated_at: z.ZodString;
|
|
1288
|
+
links: z.ZodObject<{
|
|
1289
|
+
accounts: z.ZodArray<z.ZodNumber>;
|
|
1290
|
+
}, z.core.$strip>;
|
|
1291
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1292
|
+
}, z.core.$strip>;
|
|
1293
|
+
/**
|
|
1294
|
+
* Payoff goal schema matching legacy API response structure
|
|
1295
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/goals.js
|
|
1296
|
+
*
|
|
1297
|
+
* Payoff goals pay DOWN from an initial balance (paying off debt)
|
|
1298
|
+
*/
|
|
1299
|
+
declare const PayoffGoalSchema: z.ZodObject<{
|
|
1300
|
+
id: z.ZodNumber;
|
|
1301
|
+
name: z.ZodString;
|
|
1302
|
+
state: z.ZodEnum<{
|
|
1303
|
+
active: "active";
|
|
1304
|
+
archived: "archived";
|
|
1305
|
+
completed: "completed";
|
|
1306
|
+
}>;
|
|
1307
|
+
status: z.ZodEnum<{
|
|
1308
|
+
under: "under";
|
|
1309
|
+
risk: "risk";
|
|
1310
|
+
over: "over";
|
|
1311
|
+
complete: "complete";
|
|
1312
|
+
}>;
|
|
1313
|
+
image_name: z.ZodString;
|
|
1314
|
+
image_url: z.ZodString;
|
|
1315
|
+
percent_complete: z.ZodNumber;
|
|
1316
|
+
complete: z.ZodBoolean;
|
|
1317
|
+
initial_value: z.ZodString;
|
|
1318
|
+
current_value: z.ZodString;
|
|
1319
|
+
target_value: z.ZodString;
|
|
1320
|
+
monthly_contribution: z.ZodString;
|
|
1321
|
+
remaining_monthly_contribution: z.ZodString;
|
|
1322
|
+
current_progress: z.ZodOptional<z.ZodString>;
|
|
1323
|
+
target_contribution: z.ZodOptional<z.ZodString>;
|
|
1324
|
+
target_completion_on: z.ZodString;
|
|
1325
|
+
created_at: z.ZodString;
|
|
1326
|
+
updated_at: z.ZodString;
|
|
1327
|
+
links: z.ZodObject<{
|
|
1328
|
+
accounts: z.ZodArray<z.ZodNumber>;
|
|
1329
|
+
}, z.core.$strip>;
|
|
1330
|
+
}, z.core.$strip>;
|
|
1331
|
+
/**
|
|
1332
|
+
* Goal creation schema (shared for both types)
|
|
1333
|
+
* Note: id, timestamps, progress fields are server-generated
|
|
1334
|
+
* Based on legacy API createGoal function - removes id from payload
|
|
1335
|
+
* Using .strict() to prevent unknown fields (Session 1 pattern)
|
|
1336
|
+
*/
|
|
1337
|
+
declare const GoalCreateSchema: z.ZodObject<{
|
|
1338
|
+
name: z.ZodString;
|
|
1339
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
1340
|
+
active: "active";
|
|
1341
|
+
archived: "archived";
|
|
1342
|
+
completed: "completed";
|
|
1343
|
+
}>>;
|
|
1344
|
+
image_name: z.ZodString;
|
|
1345
|
+
target_value: z.ZodString;
|
|
1346
|
+
target_completion_on: z.ZodOptional<z.ZodString>;
|
|
1347
|
+
target_contribution: z.ZodOptional<z.ZodString>;
|
|
1348
|
+
account_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1349
|
+
}, z.core.$strict>;
|
|
1350
|
+
/**
|
|
1351
|
+
* Goal update schema
|
|
1352
|
+
* Note: Same fields as create per updateGoal function (removes id from payload)
|
|
1353
|
+
* Using .strict() to prevent unknown fields (Session 1 pattern)
|
|
1354
|
+
*/
|
|
1355
|
+
declare const GoalUpdateSchema: z.ZodObject<{
|
|
1356
|
+
id: z.ZodNumber;
|
|
1357
|
+
name: z.ZodString;
|
|
1358
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
1359
|
+
active: "active";
|
|
1360
|
+
archived: "archived";
|
|
1361
|
+
completed: "completed";
|
|
1362
|
+
}>>;
|
|
1363
|
+
image_name: z.ZodString;
|
|
1364
|
+
target_value: z.ZodString;
|
|
1365
|
+
target_completion_on: z.ZodOptional<z.ZodString>;
|
|
1366
|
+
target_contribution: z.ZodOptional<z.ZodString>;
|
|
1367
|
+
account_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1368
|
+
}, z.core.$strict>;
|
|
1369
|
+
/**
|
|
1370
|
+
* Savings goals response schema - array of savings goals
|
|
1371
|
+
* Used by list endpoint: GET /users/:userId/savings_goals
|
|
1372
|
+
*/
|
|
1373
|
+
declare const SavingsGoalsResponseSchema: z.ZodObject<{
|
|
1374
|
+
savings_goals: z.ZodArray<z.ZodObject<{
|
|
1375
|
+
id: z.ZodNumber;
|
|
1376
|
+
name: z.ZodString;
|
|
1377
|
+
state: z.ZodEnum<{
|
|
1378
|
+
active: "active";
|
|
1379
|
+
archived: "archived";
|
|
1380
|
+
completed: "completed";
|
|
1381
|
+
}>;
|
|
1382
|
+
status: z.ZodEnum<{
|
|
1383
|
+
under: "under";
|
|
1384
|
+
risk: "risk";
|
|
1385
|
+
over: "over";
|
|
1386
|
+
complete: "complete";
|
|
1387
|
+
}>;
|
|
1388
|
+
image_name: z.ZodString;
|
|
1389
|
+
image_url: z.ZodString;
|
|
1390
|
+
percent_complete: z.ZodNumber;
|
|
1391
|
+
complete: z.ZodBoolean;
|
|
1392
|
+
initial_value: z.ZodString;
|
|
1393
|
+
current_value: z.ZodString;
|
|
1394
|
+
target_value: z.ZodString;
|
|
1395
|
+
monthly_contribution: z.ZodString;
|
|
1396
|
+
remaining_monthly_contribution: z.ZodString;
|
|
1397
|
+
current_progress: z.ZodOptional<z.ZodString>;
|
|
1398
|
+
target_contribution: z.ZodOptional<z.ZodString>;
|
|
1399
|
+
target_completion_on: z.ZodString;
|
|
1400
|
+
created_at: z.ZodString;
|
|
1401
|
+
updated_at: z.ZodString;
|
|
1402
|
+
links: z.ZodObject<{
|
|
1403
|
+
accounts: z.ZodArray<z.ZodNumber>;
|
|
1404
|
+
}, z.core.$strip>;
|
|
1405
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1406
|
+
}, z.core.$strip>>;
|
|
1407
|
+
}, z.core.$strip>;
|
|
1408
|
+
/**
|
|
1409
|
+
* Payoff goals response schema - array of payoff goals
|
|
1410
|
+
* Used by list endpoint: GET /users/:userId/payoff_goals
|
|
1411
|
+
*/
|
|
1412
|
+
declare const PayoffGoalsResponseSchema: z.ZodObject<{
|
|
1413
|
+
payoff_goals: z.ZodArray<z.ZodObject<{
|
|
1414
|
+
id: z.ZodNumber;
|
|
1415
|
+
name: z.ZodString;
|
|
1416
|
+
state: z.ZodEnum<{
|
|
1417
|
+
active: "active";
|
|
1418
|
+
archived: "archived";
|
|
1419
|
+
completed: "completed";
|
|
1420
|
+
}>;
|
|
1421
|
+
status: z.ZodEnum<{
|
|
1422
|
+
under: "under";
|
|
1423
|
+
risk: "risk";
|
|
1424
|
+
over: "over";
|
|
1425
|
+
complete: "complete";
|
|
1426
|
+
}>;
|
|
1427
|
+
image_name: z.ZodString;
|
|
1428
|
+
image_url: z.ZodString;
|
|
1429
|
+
percent_complete: z.ZodNumber;
|
|
1430
|
+
complete: z.ZodBoolean;
|
|
1431
|
+
initial_value: z.ZodString;
|
|
1432
|
+
current_value: z.ZodString;
|
|
1433
|
+
target_value: z.ZodString;
|
|
1434
|
+
monthly_contribution: z.ZodString;
|
|
1435
|
+
remaining_monthly_contribution: z.ZodString;
|
|
1436
|
+
current_progress: z.ZodOptional<z.ZodString>;
|
|
1437
|
+
target_contribution: z.ZodOptional<z.ZodString>;
|
|
1438
|
+
target_completion_on: z.ZodString;
|
|
1439
|
+
created_at: z.ZodString;
|
|
1440
|
+
updated_at: z.ZodString;
|
|
1441
|
+
links: z.ZodObject<{
|
|
1442
|
+
accounts: z.ZodArray<z.ZodNumber>;
|
|
1443
|
+
}, z.core.$strip>;
|
|
1444
|
+
}, z.core.$strip>>;
|
|
1445
|
+
}, z.core.$strip>;
|
|
1446
|
+
/**
|
|
1447
|
+
* Goal images response schema - array of image metadata
|
|
1448
|
+
* Used by catalog endpoints: GET /savings_goals, GET /payoff_goals
|
|
1449
|
+
*/
|
|
1450
|
+
declare const GoalImagesResponseSchema: z.ZodObject<{
|
|
1451
|
+
images: z.ZodArray<z.ZodObject<{
|
|
1452
|
+
id: z.ZodNumber;
|
|
1453
|
+
name: z.ZodString;
|
|
1454
|
+
url: z.ZodString;
|
|
1455
|
+
}, z.core.$strip>>;
|
|
1456
|
+
}, z.core.$strip>;
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* Type exports for Goal domain
|
|
1460
|
+
* Source: Inferred from Zod schemas matching legacy API
|
|
1461
|
+
*/
|
|
1462
|
+
type SavingsGoal = z.infer<typeof SavingsGoalSchema>;
|
|
1463
|
+
type PayoffGoal = z.infer<typeof PayoffGoalSchema>;
|
|
1464
|
+
type GoalCreate = z.infer<typeof GoalCreateSchema>;
|
|
1465
|
+
type GoalUpdate = z.infer<typeof GoalUpdateSchema>;
|
|
1466
|
+
type SavingsGoalsResponse = z.infer<typeof SavingsGoalsResponseSchema>;
|
|
1467
|
+
type PayoffGoalsResponse = z.infer<typeof PayoffGoalsResponseSchema>;
|
|
1468
|
+
type GoalImagesResponse = z.infer<typeof GoalImagesResponseSchema>;
|
|
1469
|
+
type GoalState = z.infer<typeof GoalStateSchema>;
|
|
1470
|
+
type GoalStatus = z.infer<typeof GoalStatusSchema>;
|
|
1471
|
+
type GoalLinks = z.infer<typeof GoalLinksSchema>;
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* User sex/gender
|
|
1475
|
+
* Source: ~/code/pfm-platform/services/validator/specs/openapi-spec/components/schemas/User.yaml
|
|
1476
|
+
*/
|
|
1477
|
+
declare const UserSexSchema: z.ZodEnum<{
|
|
1478
|
+
Male: "Male";
|
|
1479
|
+
Female: "Female";
|
|
1480
|
+
}>;
|
|
1481
|
+
/**
|
|
1482
|
+
* User schema matching legacy API response structure
|
|
1483
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/users.json
|
|
1484
|
+
*
|
|
1485
|
+
* CRITICAL DATA TYPE NOTES:
|
|
1486
|
+
* - id: STRING (partner customer ID, not integer like Account/Budget)
|
|
1487
|
+
* - login_count: INTEGER (number type)
|
|
1488
|
+
* - birth_year: INTEGER (number type)
|
|
1489
|
+
* - custom_settings: OBJECT with arbitrary key-value pairs
|
|
1490
|
+
* - custom_tags: ARRAY of strings
|
|
1491
|
+
* - last_login_at: STRING (RFC 3339 datetime format)
|
|
1492
|
+
*/
|
|
1493
|
+
declare const UserSchema: z.ZodObject<{
|
|
1494
|
+
id: z.ZodString;
|
|
1495
|
+
login: z.ZodString;
|
|
1496
|
+
email: z.ZodString;
|
|
1497
|
+
login_count: z.ZodNumber;
|
|
1498
|
+
last_login_at: z.ZodString;
|
|
1499
|
+
custom_tags: z.ZodArray<z.ZodString>;
|
|
1500
|
+
custom_settings: z.ZodObject<{}, z.core.$loose>;
|
|
1501
|
+
first_name: z.ZodString;
|
|
1502
|
+
last_name: z.ZodString;
|
|
1503
|
+
postal_code: z.ZodString;
|
|
1504
|
+
birth_year: z.ZodNumber;
|
|
1505
|
+
sex: z.ZodEnum<{
|
|
1506
|
+
Male: "Male";
|
|
1507
|
+
Female: "Female";
|
|
1508
|
+
}>;
|
|
1509
|
+
city: z.ZodOptional<z.ZodString>;
|
|
1510
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1511
|
+
}, z.core.$strip>;
|
|
1512
|
+
/**
|
|
1513
|
+
* User creation schema - Admin mode
|
|
1514
|
+
* Minimal validation for test data creation
|
|
1515
|
+
* Allows creating users with basic required fields only
|
|
1516
|
+
*/
|
|
1517
|
+
declare const UserCreateSchemaAdmin: z.ZodObject<{
|
|
1518
|
+
login: z.ZodString;
|
|
1519
|
+
email: z.ZodString;
|
|
1520
|
+
first_name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1521
|
+
last_name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1522
|
+
postal_code: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1523
|
+
birth_year: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1524
|
+
sex: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1525
|
+
Male: "Male";
|
|
1526
|
+
Female: "Female";
|
|
1527
|
+
}>>>;
|
|
1528
|
+
custom_tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1529
|
+
custom_settings: z.ZodDefault<z.ZodOptional<z.ZodObject<{}, z.core.$loose>>>;
|
|
1530
|
+
city: z.ZodOptional<z.ZodString>;
|
|
1531
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1532
|
+
}, z.core.$strict>;
|
|
1533
|
+
/**
|
|
1534
|
+
* User creation schema - User mode
|
|
1535
|
+
* Full validation with business rules for production use
|
|
1536
|
+
* Based on legacy API createUser function - sends user object
|
|
1537
|
+
* Using .strict() to prevent unknown fields (Session 1 pattern)
|
|
1538
|
+
* Note: id, login_count, last_login_at are server-generated
|
|
1539
|
+
*/
|
|
1540
|
+
declare const UserCreateSchemaUser: z.ZodObject<{
|
|
1541
|
+
login: z.ZodString;
|
|
1542
|
+
email: z.ZodString;
|
|
1543
|
+
first_name: z.ZodString;
|
|
1544
|
+
last_name: z.ZodString;
|
|
1545
|
+
postal_code: z.ZodString;
|
|
1546
|
+
birth_year: z.ZodNumber;
|
|
1547
|
+
sex: z.ZodEnum<{
|
|
1548
|
+
Male: "Male";
|
|
1549
|
+
Female: "Female";
|
|
1550
|
+
}>;
|
|
1551
|
+
custom_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1552
|
+
custom_settings: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
1553
|
+
city: z.ZodOptional<z.ZodString>;
|
|
1554
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1555
|
+
}, z.core.$strict>;
|
|
1556
|
+
declare const UserCreateSchema: z.ZodObject<{
|
|
1557
|
+
login: z.ZodString;
|
|
1558
|
+
email: z.ZodString;
|
|
1559
|
+
first_name: z.ZodString;
|
|
1560
|
+
last_name: z.ZodString;
|
|
1561
|
+
postal_code: z.ZodString;
|
|
1562
|
+
birth_year: z.ZodNumber;
|
|
1563
|
+
sex: z.ZodEnum<{
|
|
1564
|
+
Male: "Male";
|
|
1565
|
+
Female: "Female";
|
|
1566
|
+
}>;
|
|
1567
|
+
custom_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1568
|
+
custom_settings: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
1569
|
+
city: z.ZodOptional<z.ZodString>;
|
|
1570
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1571
|
+
}, z.core.$strict>;
|
|
1572
|
+
/**
|
|
1573
|
+
* User update schema - Admin mode
|
|
1574
|
+
* Minimal validation for test data updates
|
|
1575
|
+
*/
|
|
1576
|
+
declare const UserUpdateSchemaAdmin: z.ZodObject<{
|
|
1577
|
+
email: z.ZodOptional<z.ZodString>;
|
|
1578
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
1579
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
1580
|
+
postal_code: z.ZodOptional<z.ZodString>;
|
|
1581
|
+
birth_year: z.ZodOptional<z.ZodNumber>;
|
|
1582
|
+
sex: z.ZodOptional<z.ZodEnum<{
|
|
1583
|
+
Male: "Male";
|
|
1584
|
+
Female: "Female";
|
|
1585
|
+
}>>;
|
|
1586
|
+
custom_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1587
|
+
custom_settings: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
1588
|
+
city: z.ZodOptional<z.ZodString>;
|
|
1589
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1590
|
+
}, z.core.$strict>;
|
|
1591
|
+
/**
|
|
1592
|
+
* User update schema - User mode
|
|
1593
|
+
* Full validation with business rules for production use
|
|
1594
|
+
* Based on legacy API putCurrentUser function - sends user object
|
|
1595
|
+
* Using .strict() to prevent unknown fields (Session 1 pattern)
|
|
1596
|
+
* Note: id, login, login_count, last_login_at cannot be updated
|
|
1597
|
+
*/
|
|
1598
|
+
declare const UserUpdateSchemaUser: z.ZodObject<{
|
|
1599
|
+
email: z.ZodString;
|
|
1600
|
+
first_name: z.ZodString;
|
|
1601
|
+
last_name: z.ZodString;
|
|
1602
|
+
postal_code: z.ZodString;
|
|
1603
|
+
birth_year: z.ZodNumber;
|
|
1604
|
+
sex: z.ZodEnum<{
|
|
1605
|
+
Male: "Male";
|
|
1606
|
+
Female: "Female";
|
|
1607
|
+
}>;
|
|
1608
|
+
custom_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1609
|
+
custom_settings: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
1610
|
+
city: z.ZodOptional<z.ZodString>;
|
|
1611
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1612
|
+
}, z.core.$strict>;
|
|
1613
|
+
declare const UserUpdateSchema: z.ZodObject<{
|
|
1614
|
+
email: z.ZodString;
|
|
1615
|
+
first_name: z.ZodString;
|
|
1616
|
+
last_name: z.ZodString;
|
|
1617
|
+
postal_code: z.ZodString;
|
|
1618
|
+
birth_year: z.ZodNumber;
|
|
1619
|
+
sex: z.ZodEnum<{
|
|
1620
|
+
Male: "Male";
|
|
1621
|
+
Female: "Female";
|
|
1622
|
+
}>;
|
|
1623
|
+
custom_tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1624
|
+
custom_settings: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
1625
|
+
city: z.ZodOptional<z.ZodString>;
|
|
1626
|
+
state: z.ZodOptional<z.ZodString>;
|
|
1627
|
+
}, z.core.$strict>;
|
|
1628
|
+
|
|
1629
|
+
/**
|
|
1630
|
+
* Type exports for User domain
|
|
1631
|
+
* Source: Inferred from Zod schemas matching legacy API
|
|
1632
|
+
*/
|
|
1633
|
+
type User = z.infer<typeof UserSchema>;
|
|
1634
|
+
type UserCreate = z.infer<typeof UserCreateSchema>;
|
|
1635
|
+
type UserUpdate = z.infer<typeof UserUpdateSchema>;
|
|
1636
|
+
type UserSex = z.infer<typeof UserSexSchema>;
|
|
1637
|
+
|
|
1638
|
+
/**
|
|
1639
|
+
* Tag schemas matching legacy API response structure
|
|
1640
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/tags.json
|
|
1641
|
+
*
|
|
1642
|
+
* CRITICAL NOTES:
|
|
1643
|
+
* - Tags are simple arrays of strings
|
|
1644
|
+
* - Two types: defaultTags (system-provided) and userTags (includes custom tags)
|
|
1645
|
+
* - API endpoints: GET /tags (default), GET /users/:userId/tags (user tags)
|
|
1646
|
+
* - Update: PUT /users/:userId/tags with array of tag names
|
|
1647
|
+
*/
|
|
1648
|
+
/**
|
|
1649
|
+
* User tags response schema
|
|
1650
|
+
* Includes both default tags and user-created custom tags
|
|
1651
|
+
*/
|
|
1652
|
+
declare const UserTagsSchema: z.ZodObject<{
|
|
1653
|
+
userTags: z.ZodArray<z.ZodString>;
|
|
1654
|
+
}, z.core.$strip>;
|
|
1655
|
+
/**
|
|
1656
|
+
* Default tags response schema
|
|
1657
|
+
* System-provided standard tags for transaction categorization
|
|
1658
|
+
*/
|
|
1659
|
+
declare const DefaultTagsSchema: z.ZodObject<{
|
|
1660
|
+
defaultTags: z.ZodArray<z.ZodString>;
|
|
1661
|
+
}, z.core.$strip>;
|
|
1662
|
+
/**
|
|
1663
|
+
* Combined tags response (for complete legacy data structure)
|
|
1664
|
+
*/
|
|
1665
|
+
declare const TagsResponseSchema: z.ZodObject<{
|
|
1666
|
+
userTags: z.ZodArray<z.ZodString>;
|
|
1667
|
+
defaultTags: z.ZodArray<z.ZodString>;
|
|
1668
|
+
}, z.core.$strip>;
|
|
1669
|
+
/**
|
|
1670
|
+
* Tag update schema
|
|
1671
|
+
* Based on legacy API updateTags function - sends array of tag names
|
|
1672
|
+
* Using .strict() to prevent unknown fields (Session 1 pattern)
|
|
1673
|
+
*/
|
|
1674
|
+
declare const TagsUpdateSchema: z.ZodArray<z.ZodString>;
|
|
1675
|
+
/**
|
|
1676
|
+
* Tag create schema - Admin mode
|
|
1677
|
+
* Minimal validation for test data creation
|
|
1678
|
+
*/
|
|
1679
|
+
declare const TagCreateSchemaAdmin: z.ZodObject<{
|
|
1680
|
+
name: z.ZodString;
|
|
1681
|
+
}, z.core.$strip>;
|
|
1682
|
+
/**
|
|
1683
|
+
* Tag create schema - User mode
|
|
1684
|
+
* Full business rules and validation
|
|
1685
|
+
*/
|
|
1686
|
+
declare const TagCreateSchemaUser: z.ZodObject<{
|
|
1687
|
+
name: z.ZodString;
|
|
1688
|
+
}, z.core.$strip>;
|
|
1689
|
+
/**
|
|
1690
|
+
* Tag delete schema
|
|
1691
|
+
* Just requires the tag name to delete
|
|
1692
|
+
*/
|
|
1693
|
+
declare const TagDeleteSchema: z.ZodObject<{
|
|
1694
|
+
name: z.ZodString;
|
|
1695
|
+
}, z.core.$strip>;
|
|
1696
|
+
/**
|
|
1697
|
+
* Tag usage statistics item schema
|
|
1698
|
+
* Represents usage count for a single tag
|
|
1699
|
+
*/
|
|
1700
|
+
declare const TagUsageStatSchema: z.ZodObject<{
|
|
1701
|
+
tag: z.ZodString;
|
|
1702
|
+
count: z.ZodNumber;
|
|
1703
|
+
}, z.core.$strip>;
|
|
1704
|
+
/**
|
|
1705
|
+
* Tag usage statistics response schema
|
|
1706
|
+
* Array of tag usage statistics
|
|
1707
|
+
*/
|
|
1708
|
+
declare const TagUsageStatsSchema: z.ZodObject<{
|
|
1709
|
+
stats: z.ZodArray<z.ZodObject<{
|
|
1710
|
+
tag: z.ZodString;
|
|
1711
|
+
count: z.ZodNumber;
|
|
1712
|
+
}, z.core.$strip>>;
|
|
1713
|
+
}, z.core.$strip>;
|
|
1714
|
+
/**
|
|
1715
|
+
* Tag color schema
|
|
1716
|
+
* Hex color code for tag visual customization
|
|
1717
|
+
*/
|
|
1718
|
+
declare const TagColorSchema: z.ZodObject<{
|
|
1719
|
+
color: z.ZodString;
|
|
1720
|
+
}, z.core.$strip>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Tag usage data point for time series
|
|
1723
|
+
* Represents tag usage count at a specific date
|
|
1724
|
+
*/
|
|
1725
|
+
declare const TagUsageDataPointSchema: z.ZodObject<{
|
|
1726
|
+
date: z.ZodString;
|
|
1727
|
+
count: z.ZodNumber;
|
|
1728
|
+
}, z.core.$strip>;
|
|
1729
|
+
/**
|
|
1730
|
+
* Tag usage report for a single tag
|
|
1731
|
+
* Contains time series data for usage trends
|
|
1732
|
+
*/
|
|
1733
|
+
declare const TagReportItemSchema: z.ZodObject<{
|
|
1734
|
+
tag: z.ZodString;
|
|
1735
|
+
totalCount: z.ZodNumber;
|
|
1736
|
+
dataPoints: z.ZodArray<z.ZodObject<{
|
|
1737
|
+
date: z.ZodString;
|
|
1738
|
+
count: z.ZodNumber;
|
|
1739
|
+
}, z.core.$strip>>;
|
|
1740
|
+
}, z.core.$strip>;
|
|
1741
|
+
/**
|
|
1742
|
+
* Tag usage report response schema
|
|
1743
|
+
* Contains usage data for all tags over time
|
|
1744
|
+
*/
|
|
1745
|
+
declare const TagUsageReportSchema: z.ZodObject<{
|
|
1746
|
+
report: z.ZodArray<z.ZodObject<{
|
|
1747
|
+
tag: z.ZodString;
|
|
1748
|
+
totalCount: z.ZodNumber;
|
|
1749
|
+
dataPoints: z.ZodArray<z.ZodObject<{
|
|
1750
|
+
date: z.ZodString;
|
|
1751
|
+
count: z.ZodNumber;
|
|
1752
|
+
}, z.core.$strip>>;
|
|
1753
|
+
}, z.core.$strip>>;
|
|
1754
|
+
startDate: z.ZodOptional<z.ZodString>;
|
|
1755
|
+
endDate: z.ZodOptional<z.ZodString>;
|
|
1756
|
+
}, z.core.$strip>;
|
|
1757
|
+
|
|
1758
|
+
/**
|
|
1759
|
+
* Type exports for Tag domain
|
|
1760
|
+
* Source: Inferred from Zod schemas matching legacy API
|
|
1761
|
+
*/
|
|
1762
|
+
type UserTags = z.infer<typeof UserTagsSchema>;
|
|
1763
|
+
type DefaultTags = z.infer<typeof DefaultTagsSchema>;
|
|
1764
|
+
type TagsResponse = z.infer<typeof TagsResponseSchema>;
|
|
1765
|
+
type TagsUpdate = z.infer<typeof TagsUpdateSchema>;
|
|
1766
|
+
type TagUsageStat = z.infer<typeof TagUsageStatSchema>;
|
|
1767
|
+
type TagUsageStats = z.infer<typeof TagUsageStatsSchema>;
|
|
1768
|
+
type TagColor = z.infer<typeof TagColorSchema>;
|
|
1769
|
+
type TagUsageDataPoint = z.infer<typeof TagUsageDataPointSchema>;
|
|
1770
|
+
type TagReportItem = z.infer<typeof TagReportItemSchema>;
|
|
1771
|
+
type TagUsageReport = z.infer<typeof TagUsageReportSchema>;
|
|
1772
|
+
|
|
1773
|
+
/**
|
|
1774
|
+
* Alert type enum
|
|
1775
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/alerts.js (routeMapping)
|
|
1776
|
+
*/
|
|
1777
|
+
declare const AlertTypeSchema: z.ZodEnum<{
|
|
1778
|
+
AccountThresholdAlert: "AccountThresholdAlert";
|
|
1779
|
+
GoalAlert: "GoalAlert";
|
|
1780
|
+
MerchantNameAlert: "MerchantNameAlert";
|
|
1781
|
+
SpendingTargetAlert: "SpendingTargetAlert";
|
|
1782
|
+
TransactionLimitAlert: "TransactionLimitAlert";
|
|
1783
|
+
UpcomingBillAlert: "UpcomingBillAlert";
|
|
1784
|
+
}>;
|
|
1785
|
+
/**
|
|
1786
|
+
* Alert source type enum
|
|
1787
|
+
* Source: ~/code/pfm-platform/services/validator/specs/openapi-spec/components/schemas/Alert.yaml
|
|
1788
|
+
*/
|
|
1789
|
+
declare const AlertSourceTypeSchema: z.ZodNullable<z.ZodEnum<{
|
|
1790
|
+
Account: "Account";
|
|
1791
|
+
Budget: "Budget";
|
|
1792
|
+
CashflowTransaction: "CashflowTransaction";
|
|
1793
|
+
PayoffGoal: "PayoffGoal";
|
|
1794
|
+
SavingsGoal: "SavingsGoal";
|
|
1795
|
+
}>>;
|
|
1796
|
+
/**
|
|
1797
|
+
* Alert destinations schema
|
|
1798
|
+
* Source: ~/code/pfm-platform/services/validator/specs/openapi-spec/components/schemas/AlertDestinations.yaml
|
|
1799
|
+
*/
|
|
1800
|
+
declare const AlertDestinationsSchema: z.ZodObject<{
|
|
1801
|
+
email_address: z.ZodNullable<z.ZodString>;
|
|
1802
|
+
sms_number: z.ZodNullable<z.ZodString>;
|
|
1803
|
+
partner_sms_enabled: z.ZodBoolean;
|
|
1804
|
+
}, z.core.$strip>;
|
|
1805
|
+
/**
|
|
1806
|
+
* Alert schema matching legacy API response structure
|
|
1807
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/alerts.json
|
|
1808
|
+
*
|
|
1809
|
+
* CRITICAL NOTES:
|
|
1810
|
+
* - id: INTEGER (internal DB ID)
|
|
1811
|
+
* - source_id: STRING in legacy data (e.g., "41"), not integer like OpenAPI suggests
|
|
1812
|
+
* - options: Dynamic object with alert-specific config (use .passthrough())
|
|
1813
|
+
* - source: Full nested object (Account, Goal, Budget, etc.) - keeping as unknown for flexibility
|
|
1814
|
+
* - Legacy data shows source can be deeply nested with full object structure
|
|
1815
|
+
*/
|
|
1816
|
+
declare const AlertSchema: z.ZodObject<{
|
|
1817
|
+
id: z.ZodNumber;
|
|
1818
|
+
type: z.ZodEnum<{
|
|
1819
|
+
AccountThresholdAlert: "AccountThresholdAlert";
|
|
1820
|
+
GoalAlert: "GoalAlert";
|
|
1821
|
+
MerchantNameAlert: "MerchantNameAlert";
|
|
1822
|
+
SpendingTargetAlert: "SpendingTargetAlert";
|
|
1823
|
+
TransactionLimitAlert: "TransactionLimitAlert";
|
|
1824
|
+
UpcomingBillAlert: "UpcomingBillAlert";
|
|
1825
|
+
}>;
|
|
1826
|
+
options: z.ZodObject<{}, z.core.$loose>;
|
|
1827
|
+
email_delivery: z.ZodBoolean;
|
|
1828
|
+
sms_delivery: z.ZodBoolean;
|
|
1829
|
+
source_type: z.ZodNullable<z.ZodEnum<{
|
|
1830
|
+
Account: "Account";
|
|
1831
|
+
Budget: "Budget";
|
|
1832
|
+
CashflowTransaction: "CashflowTransaction";
|
|
1833
|
+
PayoffGoal: "PayoffGoal";
|
|
1834
|
+
SavingsGoal: "SavingsGoal";
|
|
1835
|
+
}>>;
|
|
1836
|
+
source_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1837
|
+
source: z.ZodOptional<z.ZodUnknown>;
|
|
1838
|
+
}, z.core.$strip>;
|
|
1839
|
+
/**
|
|
1840
|
+
* Alert creation schema
|
|
1841
|
+
* Based on legacy API createAlert function - uses toJson() which removes id and type
|
|
1842
|
+
* Type is determined by route, id is server-generated
|
|
1843
|
+
* Using .strict() to prevent unknown fields (Session 1 pattern)
|
|
1844
|
+
*/
|
|
1845
|
+
declare const AlertCreateSchema: z.ZodObject<{
|
|
1846
|
+
options: z.ZodObject<{}, z.core.$loose>;
|
|
1847
|
+
email_delivery: z.ZodBoolean;
|
|
1848
|
+
sms_delivery: z.ZodBoolean;
|
|
1849
|
+
source_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1850
|
+
Account: "Account";
|
|
1851
|
+
Budget: "Budget";
|
|
1852
|
+
CashflowTransaction: "CashflowTransaction";
|
|
1853
|
+
PayoffGoal: "PayoffGoal";
|
|
1854
|
+
SavingsGoal: "SavingsGoal";
|
|
1855
|
+
}>>>;
|
|
1856
|
+
source_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1857
|
+
}, z.core.$strict>;
|
|
1858
|
+
/**
|
|
1859
|
+
* Alert update schema
|
|
1860
|
+
* Based on legacy API updateAlert function - uses toJson() which removes id and type
|
|
1861
|
+
* Using .strict() to prevent unknown fields (Session 1 pattern)
|
|
1862
|
+
*/
|
|
1863
|
+
declare const AlertUpdateSchema: z.ZodObject<{
|
|
1864
|
+
options: z.ZodObject<{}, z.core.$loose>;
|
|
1865
|
+
email_delivery: z.ZodBoolean;
|
|
1866
|
+
sms_delivery: z.ZodBoolean;
|
|
1867
|
+
source_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1868
|
+
Account: "Account";
|
|
1869
|
+
Budget: "Budget";
|
|
1870
|
+
CashflowTransaction: "CashflowTransaction";
|
|
1871
|
+
PayoffGoal: "PayoffGoal";
|
|
1872
|
+
SavingsGoal: "SavingsGoal";
|
|
1873
|
+
}>>>;
|
|
1874
|
+
source_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1875
|
+
}, z.core.$strict>;
|
|
1876
|
+
/**
|
|
1877
|
+
* Alert destinations update schema
|
|
1878
|
+
* Based on legacy API updateDestinations function
|
|
1879
|
+
*/
|
|
1880
|
+
declare const AlertDestinationsUpdateSchema: z.ZodObject<{
|
|
1881
|
+
email_address: z.ZodNullable<z.ZodString>;
|
|
1882
|
+
sms_number: z.ZodNullable<z.ZodString>;
|
|
1883
|
+
partner_sms_enabled: z.ZodBoolean;
|
|
1884
|
+
}, z.core.$strip>;
|
|
1885
|
+
/**
|
|
1886
|
+
* Alerts response schema - array of alerts
|
|
1887
|
+
* Used by list endpoint: GET /users/:userId/alerts
|
|
1888
|
+
*/
|
|
1889
|
+
declare const AlertsResponseSchema: z.ZodObject<{
|
|
1890
|
+
alerts: z.ZodArray<z.ZodObject<{
|
|
1891
|
+
id: z.ZodNumber;
|
|
1892
|
+
type: z.ZodEnum<{
|
|
1893
|
+
AccountThresholdAlert: "AccountThresholdAlert";
|
|
1894
|
+
GoalAlert: "GoalAlert";
|
|
1895
|
+
MerchantNameAlert: "MerchantNameAlert";
|
|
1896
|
+
SpendingTargetAlert: "SpendingTargetAlert";
|
|
1897
|
+
TransactionLimitAlert: "TransactionLimitAlert";
|
|
1898
|
+
UpcomingBillAlert: "UpcomingBillAlert";
|
|
1899
|
+
}>;
|
|
1900
|
+
options: z.ZodObject<{}, z.core.$loose>;
|
|
1901
|
+
email_delivery: z.ZodBoolean;
|
|
1902
|
+
sms_delivery: z.ZodBoolean;
|
|
1903
|
+
source_type: z.ZodNullable<z.ZodEnum<{
|
|
1904
|
+
Account: "Account";
|
|
1905
|
+
Budget: "Budget";
|
|
1906
|
+
CashflowTransaction: "CashflowTransaction";
|
|
1907
|
+
PayoffGoal: "PayoffGoal";
|
|
1908
|
+
SavingsGoal: "SavingsGoal";
|
|
1909
|
+
}>>;
|
|
1910
|
+
source_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1911
|
+
source: z.ZodOptional<z.ZodUnknown>;
|
|
1912
|
+
}, z.core.$strip>>;
|
|
1913
|
+
}, z.core.$strip>;
|
|
1914
|
+
|
|
1915
|
+
/**
|
|
1916
|
+
* Type exports for Alert domain
|
|
1917
|
+
* Source: Inferred from Zod schemas matching legacy API
|
|
1918
|
+
*/
|
|
1919
|
+
type AlertType = z.infer<typeof AlertTypeSchema>;
|
|
1920
|
+
type AlertSourceType = z.infer<typeof AlertSourceTypeSchema>;
|
|
1921
|
+
type Alert = z.infer<typeof AlertSchema>;
|
|
1922
|
+
type AlertCreate = z.infer<typeof AlertCreateSchema>;
|
|
1923
|
+
type AlertUpdate = z.infer<typeof AlertUpdateSchema>;
|
|
1924
|
+
type AlertDestinations = z.infer<typeof AlertDestinationsSchema>;
|
|
1925
|
+
type AlertDestinationsUpdate = z.infer<typeof AlertDestinationsUpdateSchema>;
|
|
1926
|
+
type AlertsResponse = z.infer<typeof AlertsResponseSchema>;
|
|
1927
|
+
|
|
1928
|
+
/**
|
|
1929
|
+
* Notification schema matching legacy API response structure
|
|
1930
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/notifications.json
|
|
1931
|
+
*
|
|
1932
|
+
* CRITICAL NOTES:
|
|
1933
|
+
* - Notifications are read-only (GET + DELETE endpoints only)
|
|
1934
|
+
* - System-generated based on alert configurations
|
|
1935
|
+
* - alert_type references AlertType enum from alerts domain
|
|
1936
|
+
* - No create/update schemas (notifications generated by system)
|
|
1937
|
+
* - created_at: RFC 3339 datetime string
|
|
1938
|
+
*/
|
|
1939
|
+
declare const NotificationSchema: z.ZodObject<{
|
|
1940
|
+
id: z.ZodNumber;
|
|
1941
|
+
user_id: z.ZodString;
|
|
1942
|
+
alert_id: z.ZodNumber;
|
|
1943
|
+
message: z.ZodString;
|
|
1944
|
+
alert_type: z.ZodEnum<{
|
|
1945
|
+
AccountThresholdAlert: "AccountThresholdAlert";
|
|
1946
|
+
GoalAlert: "GoalAlert";
|
|
1947
|
+
MerchantNameAlert: "MerchantNameAlert";
|
|
1948
|
+
SpendingTargetAlert: "SpendingTargetAlert";
|
|
1949
|
+
TransactionLimitAlert: "TransactionLimitAlert";
|
|
1950
|
+
UpcomingBillAlert: "UpcomingBillAlert";
|
|
1951
|
+
}>;
|
|
1952
|
+
is_read: z.ZodDefault<z.ZodBoolean>;
|
|
1953
|
+
created_at: z.ZodString;
|
|
1954
|
+
}, z.core.$strip>;
|
|
1955
|
+
/**
|
|
1956
|
+
* Notifications list response schema
|
|
1957
|
+
* API returns notifications array wrapper
|
|
1958
|
+
*/
|
|
1959
|
+
declare const NotificationsResponseSchema: z.ZodObject<{
|
|
1960
|
+
notifications: z.ZodArray<z.ZodObject<{
|
|
1961
|
+
id: z.ZodNumber;
|
|
1962
|
+
user_id: z.ZodString;
|
|
1963
|
+
alert_id: z.ZodNumber;
|
|
1964
|
+
message: z.ZodString;
|
|
1965
|
+
alert_type: z.ZodEnum<{
|
|
1966
|
+
AccountThresholdAlert: "AccountThresholdAlert";
|
|
1967
|
+
GoalAlert: "GoalAlert";
|
|
1968
|
+
MerchantNameAlert: "MerchantNameAlert";
|
|
1969
|
+
SpendingTargetAlert: "SpendingTargetAlert";
|
|
1970
|
+
TransactionLimitAlert: "TransactionLimitAlert";
|
|
1971
|
+
UpcomingBillAlert: "UpcomingBillAlert";
|
|
1972
|
+
}>;
|
|
1973
|
+
is_read: z.ZodDefault<z.ZodBoolean>;
|
|
1974
|
+
created_at: z.ZodString;
|
|
1975
|
+
}, z.core.$strip>>;
|
|
1976
|
+
}, z.core.$strip>;
|
|
1977
|
+
/**
|
|
1978
|
+
* Notification create schema - Admin mode
|
|
1979
|
+
* Minimal validation for test data creation
|
|
1980
|
+
* Allows creating notifications manually for testing purposes
|
|
1981
|
+
*/
|
|
1982
|
+
declare const NotificationCreateSchemaAdmin: z.ZodObject<{
|
|
1983
|
+
message: z.ZodString;
|
|
1984
|
+
alert_type: z.ZodEnum<{
|
|
1985
|
+
AccountThresholdAlert: "AccountThresholdAlert";
|
|
1986
|
+
GoalAlert: "GoalAlert";
|
|
1987
|
+
MerchantNameAlert: "MerchantNameAlert";
|
|
1988
|
+
SpendingTargetAlert: "SpendingTargetAlert";
|
|
1989
|
+
TransactionLimitAlert: "TransactionLimitAlert";
|
|
1990
|
+
UpcomingBillAlert: "UpcomingBillAlert";
|
|
1991
|
+
}>;
|
|
1992
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
1993
|
+
}, z.core.$strip>;
|
|
1994
|
+
/**
|
|
1995
|
+
* Notification create schema - User mode
|
|
1996
|
+
* Notifications are system-generated, users cannot create them
|
|
1997
|
+
*/
|
|
1998
|
+
declare const NotificationCreateSchemaUser: z.ZodNever;
|
|
1999
|
+
/**
|
|
2000
|
+
* Notification update schema - Admin mode
|
|
2001
|
+
* Allows updating notification message for testing
|
|
2002
|
+
*/
|
|
2003
|
+
declare const NotificationUpdateSchemaAdmin: z.ZodObject<{
|
|
2004
|
+
message: z.ZodOptional<z.ZodString>;
|
|
2005
|
+
alert_type: z.ZodOptional<z.ZodEnum<{
|
|
2006
|
+
AccountThresholdAlert: "AccountThresholdAlert";
|
|
2007
|
+
GoalAlert: "GoalAlert";
|
|
2008
|
+
MerchantNameAlert: "MerchantNameAlert";
|
|
2009
|
+
SpendingTargetAlert: "SpendingTargetAlert";
|
|
2010
|
+
TransactionLimitAlert: "TransactionLimitAlert";
|
|
2011
|
+
UpcomingBillAlert: "UpcomingBillAlert";
|
|
2012
|
+
}>>;
|
|
2013
|
+
}, z.core.$strip>;
|
|
2014
|
+
/**
|
|
2015
|
+
* Notification update schema - User mode
|
|
2016
|
+
* Users can mark notifications as read/unread
|
|
2017
|
+
*/
|
|
2018
|
+
declare const NotificationUpdateSchemaUser: z.ZodObject<{
|
|
2019
|
+
is_read: z.ZodOptional<z.ZodBoolean>;
|
|
2020
|
+
}, z.core.$strip>;
|
|
2021
|
+
/**
|
|
2022
|
+
* Notification frequency options
|
|
2023
|
+
*/
|
|
2024
|
+
declare const NotificationFrequencySchema: z.ZodEnum<{
|
|
2025
|
+
weekly: "weekly";
|
|
2026
|
+
realtime: "realtime";
|
|
2027
|
+
daily: "daily";
|
|
2028
|
+
}>;
|
|
2029
|
+
type NotificationFrequency = z.infer<typeof NotificationFrequencySchema>;
|
|
2030
|
+
/**
|
|
2031
|
+
* User notification preferences schema
|
|
2032
|
+
*/
|
|
2033
|
+
declare const NotificationPreferencesSchema: z.ZodObject<{
|
|
2034
|
+
emailNotifications: z.ZodBoolean;
|
|
2035
|
+
pushNotifications: z.ZodBoolean;
|
|
2036
|
+
frequency: z.ZodEnum<{
|
|
2037
|
+
weekly: "weekly";
|
|
2038
|
+
realtime: "realtime";
|
|
2039
|
+
daily: "daily";
|
|
2040
|
+
}>;
|
|
2041
|
+
}, z.core.$strip>;
|
|
2042
|
+
type NotificationPreferences = z.infer<typeof NotificationPreferencesSchema>;
|
|
2043
|
+
/**
|
|
2044
|
+
* Notification preferences update schema
|
|
2045
|
+
*/
|
|
2046
|
+
declare const NotificationPreferencesUpdateSchema: z.ZodObject<{
|
|
2047
|
+
emailNotifications: z.ZodOptional<z.ZodBoolean>;
|
|
2048
|
+
pushNotifications: z.ZodOptional<z.ZodBoolean>;
|
|
2049
|
+
frequency: z.ZodOptional<z.ZodEnum<{
|
|
2050
|
+
weekly: "weekly";
|
|
2051
|
+
realtime: "realtime";
|
|
2052
|
+
daily: "daily";
|
|
2053
|
+
}>>;
|
|
2054
|
+
}, z.core.$strip>;
|
|
2055
|
+
|
|
2056
|
+
/**
|
|
2057
|
+
* Type exports for Notification domain
|
|
2058
|
+
* Source: Inferred from Zod schemas matching legacy API
|
|
2059
|
+
*/
|
|
2060
|
+
type Notification = z.infer<typeof NotificationSchema>;
|
|
2061
|
+
type NotificationsResponse = z.infer<typeof NotificationsResponseSchema>;
|
|
2062
|
+
|
|
2063
|
+
/**
|
|
2064
|
+
* Partner schema matching legacy API response structure
|
|
2065
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/partners.json
|
|
2066
|
+
*
|
|
2067
|
+
* CRITICAL NOTES:
|
|
2068
|
+
* - Partners are read-only configuration (GET endpoint only)
|
|
2069
|
+
* - OpenAPI schema has DIFFERENT fields than legacy data (name, logo_url vs product_name, browser_title)
|
|
2070
|
+
* - Legacy is SOURCE OF TRUTH - using actual fields from mock data
|
|
2071
|
+
* - modules: Dynamic nested object with partner-specific configuration
|
|
2072
|
+
* - featured_searches: Array of search configurations (empty in mock)
|
|
2073
|
+
*/
|
|
2074
|
+
declare const PartnerSchema: z.ZodObject<{
|
|
2075
|
+
id: z.ZodNumber;
|
|
2076
|
+
domain: z.ZodString;
|
|
2077
|
+
product_name: z.ZodString;
|
|
2078
|
+
browser_title: z.ZodString;
|
|
2079
|
+
partner_alerts_enabled: z.ZodBoolean;
|
|
2080
|
+
demo: z.ZodBoolean;
|
|
2081
|
+
modules: z.ZodObject<{}, z.core.$loose>;
|
|
2082
|
+
featured_searches: z.ZodArray<z.ZodUnknown>;
|
|
2083
|
+
}, z.core.$strip>;
|
|
2084
|
+
/**
|
|
2085
|
+
* Partners list response schema
|
|
2086
|
+
* API returns partners array wrapper
|
|
2087
|
+
* Note: Typically contains single partner (current partner)
|
|
2088
|
+
*/
|
|
2089
|
+
declare const PartnersResponseSchema: z.ZodObject<{
|
|
2090
|
+
partners: z.ZodArray<z.ZodObject<{
|
|
2091
|
+
id: z.ZodNumber;
|
|
2092
|
+
domain: z.ZodString;
|
|
2093
|
+
product_name: z.ZodString;
|
|
2094
|
+
browser_title: z.ZodString;
|
|
2095
|
+
partner_alerts_enabled: z.ZodBoolean;
|
|
2096
|
+
demo: z.ZodBoolean;
|
|
2097
|
+
modules: z.ZodObject<{}, z.core.$loose>;
|
|
2098
|
+
featured_searches: z.ZodArray<z.ZodUnknown>;
|
|
2099
|
+
}, z.core.$strip>>;
|
|
2100
|
+
}, z.core.$strip>;
|
|
2101
|
+
/**
|
|
2102
|
+
* Partner create schema - Admin mode
|
|
2103
|
+
* Minimal validation for test data creation
|
|
2104
|
+
* Allows creating partner configuration manually for testing purposes
|
|
2105
|
+
*/
|
|
2106
|
+
declare const PartnerCreateSchemaAdmin: z.ZodObject<{
|
|
2107
|
+
domain: z.ZodString;
|
|
2108
|
+
product_name: z.ZodString;
|
|
2109
|
+
browser_title: z.ZodString;
|
|
2110
|
+
partner_alerts_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
2111
|
+
demo: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
2112
|
+
modules: z.ZodDefault<z.ZodOptional<z.ZodObject<{}, z.core.$loose>>>;
|
|
2113
|
+
featured_searches: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodUnknown>>>;
|
|
2114
|
+
}, z.core.$strip>;
|
|
2115
|
+
/**
|
|
2116
|
+
* Partner create schema - User mode
|
|
2117
|
+
* Partners are configuration data, users cannot create them
|
|
2118
|
+
*/
|
|
2119
|
+
declare const PartnerCreateSchemaUser: z.ZodNever;
|
|
2120
|
+
/**
|
|
2121
|
+
* Partner update schema - Admin mode
|
|
2122
|
+
* Allows updating partner configuration for testing
|
|
2123
|
+
*/
|
|
2124
|
+
declare const PartnerUpdateSchemaAdmin: z.ZodObject<{
|
|
2125
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
2126
|
+
product_name: z.ZodOptional<z.ZodString>;
|
|
2127
|
+
browser_title: z.ZodOptional<z.ZodString>;
|
|
2128
|
+
partner_alerts_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
2129
|
+
demo: z.ZodOptional<z.ZodBoolean>;
|
|
2130
|
+
modules: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
2131
|
+
featured_searches: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
2132
|
+
}, z.core.$strip>;
|
|
2133
|
+
/**
|
|
2134
|
+
* Partner update schema - User mode
|
|
2135
|
+
* Partners are configuration data, users cannot update them
|
|
2136
|
+
*/
|
|
2137
|
+
declare const PartnerUpdateSchemaUser: z.ZodNever;
|
|
2138
|
+
/**
|
|
2139
|
+
* Partner delete schema
|
|
2140
|
+
* Requires partner ID for deletion
|
|
2141
|
+
*/
|
|
2142
|
+
declare const PartnerDeleteSchema: z.ZodObject<{
|
|
2143
|
+
id: z.ZodNumber;
|
|
2144
|
+
}, z.core.$strip>;
|
|
2145
|
+
|
|
2146
|
+
/**
|
|
2147
|
+
* Type exports for Partner domain
|
|
2148
|
+
* Source: Inferred from Zod schemas matching legacy API
|
|
2149
|
+
*/
|
|
2150
|
+
type Partner = z.infer<typeof PartnerSchema>;
|
|
2151
|
+
type PartnersResponse = z.infer<typeof PartnersResponseSchema>;
|
|
2152
|
+
|
|
2153
|
+
/**
|
|
2154
|
+
* Expense schema matching legacy API response structure
|
|
2155
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/api/data/expenses.json
|
|
2156
|
+
*
|
|
2157
|
+
* CRITICAL NOTES:
|
|
2158
|
+
* - Expenses are read-only aggregated data (GET endpoint only with date range filters)
|
|
2159
|
+
* - Computed from transaction data grouped by tag
|
|
2160
|
+
* - OpenAPI has additional fields (percentage, transaction_count) NOT in legacy data
|
|
2161
|
+
* - Legacy is SOURCE OF TRUTH - only tag and amount present
|
|
2162
|
+
* - amount: STRING with decimal format (like Account, Goal amounts)
|
|
2163
|
+
* - tag: References tag names from tags domain (but not enforced as enum)
|
|
2164
|
+
*/
|
|
2165
|
+
declare const ExpenseSchema: z.ZodObject<{
|
|
2166
|
+
tag: z.ZodString;
|
|
2167
|
+
amount: z.ZodString;
|
|
2168
|
+
}, z.core.$strip>;
|
|
2169
|
+
/**
|
|
2170
|
+
* Expenses list response schema
|
|
2171
|
+
* API returns expenses array wrapper
|
|
2172
|
+
* Aggregated by tag for the specified date range
|
|
2173
|
+
*/
|
|
2174
|
+
declare const ExpensesResponseSchema: z.ZodObject<{
|
|
2175
|
+
expenses: z.ZodArray<z.ZodObject<{
|
|
2176
|
+
tag: z.ZodString;
|
|
2177
|
+
amount: z.ZodString;
|
|
2178
|
+
}, z.core.$strip>>;
|
|
2179
|
+
}, z.core.$strip>;
|
|
2180
|
+
/**
|
|
2181
|
+
* Expense create schema - Admin mode
|
|
2182
|
+
* Minimal validation for test data creation
|
|
2183
|
+
* Allows creating expense records manually for testing purposes
|
|
2184
|
+
*/
|
|
2185
|
+
declare const ExpenseCreateSchemaAdmin: z.ZodObject<{
|
|
2186
|
+
tag: z.ZodString;
|
|
2187
|
+
amount: z.ZodString;
|
|
2188
|
+
}, z.core.$strip>;
|
|
2189
|
+
/**
|
|
2190
|
+
* Expense create schema - User mode
|
|
2191
|
+
* Expenses are computed from transactions, users cannot create them directly
|
|
2192
|
+
*/
|
|
2193
|
+
declare const ExpenseCreateSchemaUser: z.ZodNever;
|
|
2194
|
+
/**
|
|
2195
|
+
* Expense update schema - Admin mode
|
|
2196
|
+
* Allows updating expense fields for testing
|
|
2197
|
+
*/
|
|
2198
|
+
declare const ExpenseUpdateSchemaAdmin: z.ZodObject<{
|
|
2199
|
+
amount: z.ZodOptional<z.ZodString>;
|
|
2200
|
+
}, z.core.$strip>;
|
|
2201
|
+
/**
|
|
2202
|
+
* Expense update schema - User mode
|
|
2203
|
+
* Expenses are computed from transactions, users cannot update them
|
|
2204
|
+
*/
|
|
2205
|
+
declare const ExpenseUpdateSchemaUser: z.ZodNever;
|
|
2206
|
+
/**
|
|
2207
|
+
* Expense delete schema
|
|
2208
|
+
* Requires expense tag for deletion
|
|
2209
|
+
*/
|
|
2210
|
+
declare const ExpenseDeleteSchema: z.ZodObject<{
|
|
2211
|
+
tag: z.ZodString;
|
|
2212
|
+
}, z.core.$strip>;
|
|
2213
|
+
/**
|
|
2214
|
+
* Expense search parameters
|
|
2215
|
+
* Endpoint: GET /users/{userId}/expenses
|
|
2216
|
+
* Note: All expenses endpoints are read-only (computed from transactions)
|
|
2217
|
+
*/
|
|
2218
|
+
declare const ExpenseSearchParamsSchema: z.ZodObject<{
|
|
2219
|
+
begin_on: z.ZodOptional<z.ZodString>;
|
|
2220
|
+
end_on: z.ZodOptional<z.ZodString>;
|
|
2221
|
+
threshold: z.ZodOptional<z.ZodNumber>;
|
|
2222
|
+
}, z.core.$strip>;
|
|
2223
|
+
|
|
2224
|
+
/**
|
|
2225
|
+
* Type exports for Expense domain
|
|
2226
|
+
* Source: Inferred from Zod schemas matching legacy API
|
|
2227
|
+
*/
|
|
2228
|
+
type Expense = z.infer<typeof ExpenseSchema>;
|
|
2229
|
+
type ExpensesResponse = z.infer<typeof ExpensesResponseSchema>;
|
|
2230
|
+
type ExpenseSearchParams = z.infer<typeof ExpenseSearchParamsSchema>;
|
|
2231
|
+
|
|
2232
|
+
/**
|
|
2233
|
+
* Net Worth schema matching legacy API response structure
|
|
2234
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/stores/netWorthStore.js
|
|
2235
|
+
* Endpoint: GET /users/{userId}/networth
|
|
2236
|
+
*
|
|
2237
|
+
* CRITICAL NOTES:
|
|
2238
|
+
* - Amounts are STRINGS with decimal format (like Account, Expense schemas)
|
|
2239
|
+
* - Meta provides summary totals
|
|
2240
|
+
* - Assets and debts are aggregated from accounts + manual net worth accounts
|
|
2241
|
+
* - History provides monthly snapshots for trending
|
|
2242
|
+
*/
|
|
2243
|
+
/**
|
|
2244
|
+
* Net worth meta (summary totals)
|
|
2245
|
+
* All amounts are strings with decimal format
|
|
2246
|
+
*/
|
|
2247
|
+
declare const NetWorthMetaSchema: z.ZodObject<{
|
|
2248
|
+
net_worth: z.ZodString;
|
|
2249
|
+
net_worth_change: z.ZodString;
|
|
2250
|
+
total_assets: z.ZodString;
|
|
2251
|
+
total_debts: z.ZodString;
|
|
2252
|
+
}, z.core.$strip>;
|
|
2253
|
+
/**
|
|
2254
|
+
* Net worth asset item
|
|
2255
|
+
* Can be from aggregated account OR manual net worth account
|
|
2256
|
+
*/
|
|
2257
|
+
declare const NetWorthAssetSchema: z.ZodObject<{
|
|
2258
|
+
id: z.ZodNumber;
|
|
2259
|
+
name: z.ZodString;
|
|
2260
|
+
balance: z.ZodString;
|
|
2261
|
+
additional_networth_account: z.ZodBoolean;
|
|
2262
|
+
}, z.core.$strip>;
|
|
2263
|
+
/**
|
|
2264
|
+
* Net worth debt item
|
|
2265
|
+
* Can be from aggregated account OR manual net worth account
|
|
2266
|
+
*/
|
|
2267
|
+
declare const NetWorthDebtSchema: z.ZodObject<{
|
|
2268
|
+
id: z.ZodNumber;
|
|
2269
|
+
name: z.ZodString;
|
|
2270
|
+
balance: z.ZodString;
|
|
2271
|
+
additional_networth_account: z.ZodBoolean;
|
|
2272
|
+
}, z.core.$strip>;
|
|
2273
|
+
/**
|
|
2274
|
+
* Net worth history (monthly snapshot)
|
|
2275
|
+
* Provides historical trending data
|
|
2276
|
+
*/
|
|
2277
|
+
declare const NetWorthHistorySchema: z.ZodObject<{
|
|
2278
|
+
total: z.ZodString;
|
|
2279
|
+
total_asset: z.ZodString;
|
|
2280
|
+
total_debt: z.ZodString;
|
|
2281
|
+
month: z.ZodString;
|
|
2282
|
+
year: z.ZodString;
|
|
2283
|
+
since_last_month: z.ZodString;
|
|
2284
|
+
}, z.core.$strip>;
|
|
2285
|
+
/**
|
|
2286
|
+
* Complete net worth response
|
|
2287
|
+
*/
|
|
2288
|
+
declare const NetWorthSchema: z.ZodObject<{
|
|
2289
|
+
meta: z.ZodObject<{
|
|
2290
|
+
net_worth: z.ZodString;
|
|
2291
|
+
net_worth_change: z.ZodString;
|
|
2292
|
+
total_assets: z.ZodString;
|
|
2293
|
+
total_debts: z.ZodString;
|
|
2294
|
+
}, z.core.$strip>;
|
|
2295
|
+
assets: z.ZodArray<z.ZodObject<{
|
|
2296
|
+
id: z.ZodNumber;
|
|
2297
|
+
name: z.ZodString;
|
|
2298
|
+
balance: z.ZodString;
|
|
2299
|
+
additional_networth_account: z.ZodBoolean;
|
|
2300
|
+
}, z.core.$strip>>;
|
|
2301
|
+
debts: z.ZodArray<z.ZodObject<{
|
|
2302
|
+
id: z.ZodNumber;
|
|
2303
|
+
name: z.ZodString;
|
|
2304
|
+
balance: z.ZodString;
|
|
2305
|
+
additional_networth_account: z.ZodBoolean;
|
|
2306
|
+
}, z.core.$strip>>;
|
|
2307
|
+
networth_histories: z.ZodArray<z.ZodObject<{
|
|
2308
|
+
total: z.ZodString;
|
|
2309
|
+
total_asset: z.ZodString;
|
|
2310
|
+
total_debt: z.ZodString;
|
|
2311
|
+
month: z.ZodString;
|
|
2312
|
+
year: z.ZodString;
|
|
2313
|
+
since_last_month: z.ZodString;
|
|
2314
|
+
}, z.core.$strip>>;
|
|
2315
|
+
}, z.core.$strip>;
|
|
2316
|
+
/**
|
|
2317
|
+
* Net worth response wrapper
|
|
2318
|
+
* Note: API returns object directly, not wrapped in array
|
|
2319
|
+
*/
|
|
2320
|
+
declare const NetWorthResponseSchema: z.ZodObject<{
|
|
2321
|
+
meta: z.ZodObject<{
|
|
2322
|
+
net_worth: z.ZodString;
|
|
2323
|
+
net_worth_change: z.ZodString;
|
|
2324
|
+
total_assets: z.ZodString;
|
|
2325
|
+
total_debts: z.ZodString;
|
|
2326
|
+
}, z.core.$strip>;
|
|
2327
|
+
assets: z.ZodArray<z.ZodObject<{
|
|
2328
|
+
id: z.ZodNumber;
|
|
2329
|
+
name: z.ZodString;
|
|
2330
|
+
balance: z.ZodString;
|
|
2331
|
+
additional_networth_account: z.ZodBoolean;
|
|
2332
|
+
}, z.core.$strip>>;
|
|
2333
|
+
debts: z.ZodArray<z.ZodObject<{
|
|
2334
|
+
id: z.ZodNumber;
|
|
2335
|
+
name: z.ZodString;
|
|
2336
|
+
balance: z.ZodString;
|
|
2337
|
+
additional_networth_account: z.ZodBoolean;
|
|
2338
|
+
}, z.core.$strip>>;
|
|
2339
|
+
networth_histories: z.ZodArray<z.ZodObject<{
|
|
2340
|
+
total: z.ZodString;
|
|
2341
|
+
total_asset: z.ZodString;
|
|
2342
|
+
total_debt: z.ZodString;
|
|
2343
|
+
month: z.ZodString;
|
|
2344
|
+
year: z.ZodString;
|
|
2345
|
+
since_last_month: z.ZodString;
|
|
2346
|
+
}, z.core.$strip>>;
|
|
2347
|
+
}, z.core.$strip>;
|
|
2348
|
+
/**
|
|
2349
|
+
* Manual net worth account type
|
|
2350
|
+
* For assets/debts not tracked via aggregation
|
|
2351
|
+
*/
|
|
2352
|
+
declare const NetWorthAccountTypeSchema: z.ZodEnum<{
|
|
2353
|
+
asset: "asset";
|
|
2354
|
+
debt: "debt";
|
|
2355
|
+
}>;
|
|
2356
|
+
/**
|
|
2357
|
+
* Create manual net worth account
|
|
2358
|
+
* Endpoint: POST /users/{userId}/networth/accounts
|
|
2359
|
+
*/
|
|
2360
|
+
declare const NetWorthAccountCreateSchema: z.ZodObject<{
|
|
2361
|
+
networth_account: z.ZodObject<{
|
|
2362
|
+
account_type: z.ZodEnum<{
|
|
2363
|
+
asset: "asset";
|
|
2364
|
+
debt: "debt";
|
|
2365
|
+
}>;
|
|
2366
|
+
balance: z.ZodString;
|
|
2367
|
+
name: z.ZodString;
|
|
2368
|
+
}, z.core.$strip>;
|
|
2369
|
+
}, z.core.$strip>;
|
|
2370
|
+
/**
|
|
2371
|
+
* Update manual net worth account
|
|
2372
|
+
* Endpoint: PUT /users/{userId}/networth/accounts/{id}
|
|
2373
|
+
*/
|
|
2374
|
+
declare const NetWorthAccountUpdateSchema: z.ZodObject<{
|
|
2375
|
+
networth_account: z.ZodObject<{
|
|
2376
|
+
account_type: z.ZodOptional<z.ZodEnum<{
|
|
2377
|
+
asset: "asset";
|
|
2378
|
+
debt: "debt";
|
|
2379
|
+
}>>;
|
|
2380
|
+
balance: z.ZodOptional<z.ZodString>;
|
|
2381
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2382
|
+
}, z.core.$strip>;
|
|
2383
|
+
}, z.core.$strip>;
|
|
2384
|
+
/**
|
|
2385
|
+
* Delete manual net worth account
|
|
2386
|
+
* Endpoint: DELETE /users/{userId}/networth/accounts/{id}
|
|
2387
|
+
* Simple id-only schema (id comes from URL path)
|
|
2388
|
+
*/
|
|
2389
|
+
declare const NetWorthAccountDeleteSchema: z.ZodObject<{
|
|
2390
|
+
id: z.ZodNumber;
|
|
2391
|
+
}, z.core.$strip>;
|
|
2392
|
+
|
|
2393
|
+
type NetWorth = z.infer<typeof NetWorthSchema>;
|
|
2394
|
+
type NetWorthResponse = z.infer<typeof NetWorthResponseSchema>;
|
|
2395
|
+
type NetWorthMeta = z.infer<typeof NetWorthMetaSchema>;
|
|
2396
|
+
type NetWorthAsset = z.infer<typeof NetWorthAssetSchema>;
|
|
2397
|
+
type NetWorthDebt = z.infer<typeof NetWorthDebtSchema>;
|
|
2398
|
+
type NetWorthHistory = z.infer<typeof NetWorthHistorySchema>;
|
|
2399
|
+
type NetWorthAccountType = z.infer<typeof NetWorthAccountTypeSchema>;
|
|
2400
|
+
type NetWorthAccountCreate = z.infer<typeof NetWorthAccountCreateSchema>;
|
|
2401
|
+
type NetWorthAccountUpdate = z.infer<typeof NetWorthAccountUpdateSchema>;
|
|
2402
|
+
type NetWorthAccountDelete = z.infer<typeof NetWorthAccountDeleteSchema>;
|
|
2403
|
+
|
|
2404
|
+
/**
|
|
2405
|
+
* CashEdge and Finicity aggregation schemas
|
|
2406
|
+
* Source: ~/code/pfm-platform/apps/legacy/src/stores/cashedgeStore.js
|
|
2407
|
+
*
|
|
2408
|
+
* CRITICAL NOTES:
|
|
2409
|
+
* - Most requests use application/x-www-form-urlencoded, NOT JSON
|
|
2410
|
+
* - Some endpoints are partner-level (no userId)
|
|
2411
|
+
* - MFA flows require session state management
|
|
2412
|
+
*/
|
|
2413
|
+
/**
|
|
2414
|
+
* Institution login parameter
|
|
2415
|
+
* Defines credential inputs required for institution authentication
|
|
2416
|
+
*/
|
|
2417
|
+
declare const InstitutionLoginParameterSchema: z.ZodObject<{
|
|
2418
|
+
parameter_id: z.ZodString;
|
|
2419
|
+
label: z.ZodString;
|
|
2420
|
+
type: z.ZodString;
|
|
2421
|
+
}, z.core.$strip>;
|
|
2422
|
+
/**
|
|
2423
|
+
* Institution search metadata
|
|
2424
|
+
* Pagination info for institution search results
|
|
2425
|
+
*/
|
|
2426
|
+
declare const InstitutionSearchMetaSchema: z.ZodObject<{
|
|
2427
|
+
page: z.ZodNumber;
|
|
2428
|
+
total_pages: z.ZodNumber;
|
|
2429
|
+
total_results: z.ZodNumber;
|
|
2430
|
+
}, z.core.$strip>;
|
|
2431
|
+
/**
|
|
2432
|
+
* Financial institution schema
|
|
2433
|
+
* Institution available for account aggregation
|
|
2434
|
+
*/
|
|
2435
|
+
declare const InstitutionSchema: z.ZodObject<{
|
|
2436
|
+
id: z.ZodNumber;
|
|
2437
|
+
name: z.ZodString;
|
|
2438
|
+
home_url: z.ZodString;
|
|
2439
|
+
ce_login_parameters: z.ZodArray<z.ZodObject<{
|
|
2440
|
+
parameter_id: z.ZodString;
|
|
2441
|
+
label: z.ZodString;
|
|
2442
|
+
type: z.ZodString;
|
|
2443
|
+
}, z.core.$strip>>;
|
|
2444
|
+
}, z.core.$strip>;
|
|
2445
|
+
/**
|
|
2446
|
+
* Institutions response schema
|
|
2447
|
+
* Endpoint: GET /ce_fis/search?q={query}&scope={scope}&page={page}
|
|
2448
|
+
* Endpoint: GET /ce_fis?page={page}
|
|
2449
|
+
* Endpoint: GET /ce_fis/{id}
|
|
2450
|
+
*/
|
|
2451
|
+
declare const InstitutionsResponseSchema: z.ZodObject<{
|
|
2452
|
+
ce_fis: z.ZodArray<z.ZodObject<{
|
|
2453
|
+
id: z.ZodNumber;
|
|
2454
|
+
name: z.ZodString;
|
|
2455
|
+
home_url: z.ZodString;
|
|
2456
|
+
ce_login_parameters: z.ZodArray<z.ZodObject<{
|
|
2457
|
+
parameter_id: z.ZodString;
|
|
2458
|
+
label: z.ZodString;
|
|
2459
|
+
type: z.ZodString;
|
|
2460
|
+
}, z.core.$strip>>;
|
|
2461
|
+
}, z.core.$strip>>;
|
|
2462
|
+
meta: z.ZodObject<{
|
|
2463
|
+
page: z.ZodNumber;
|
|
2464
|
+
total_pages: z.ZodNumber;
|
|
2465
|
+
total_results: z.ZodNumber;
|
|
2466
|
+
}, z.core.$strip>;
|
|
2467
|
+
}, z.core.$strip>;
|
|
2468
|
+
/**
|
|
2469
|
+
* Authenticate institution request
|
|
2470
|
+
* Endpoint: POST /users/{userId}/ce_fis
|
|
2471
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2472
|
+
*
|
|
2473
|
+
* Note: Legacy uses form encoding, not JSON
|
|
2474
|
+
* Example: id=101939&credentials[login_params][username]=user&credentials[login_params][password]=pass
|
|
2475
|
+
*/
|
|
2476
|
+
declare const AuthenticateRequestSchema: z.ZodObject<{
|
|
2477
|
+
id: z.ZodNumber;
|
|
2478
|
+
credentials: z.ZodObject<{
|
|
2479
|
+
login_params: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2480
|
+
}, z.core.$strip>;
|
|
2481
|
+
}, z.core.$strip>;
|
|
2482
|
+
/**
|
|
2483
|
+
* Authenticate institution response
|
|
2484
|
+
* Returns session IDs for tracking aggregation progress
|
|
2485
|
+
*/
|
|
2486
|
+
declare const AuthenticateResponseSchema: z.ZodObject<{
|
|
2487
|
+
harvest_id: z.ZodString;
|
|
2488
|
+
login_id: z.ZodString;
|
|
2489
|
+
status: z.ZodString;
|
|
2490
|
+
}, z.core.$strip>;
|
|
2491
|
+
/**
|
|
2492
|
+
* MFA (Multi-Factor Authentication) request
|
|
2493
|
+
* Endpoint: PUT /users/{userId}/ce_fis/{institutionId}
|
|
2494
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2495
|
+
*
|
|
2496
|
+
* Example: harvest_id=H123&login_id=L789&session_key=SK123&mfa_responses[code]=123456
|
|
2497
|
+
*/
|
|
2498
|
+
declare const MFARequestSchema: z.ZodObject<{
|
|
2499
|
+
harvest_id: z.ZodString;
|
|
2500
|
+
login_id: z.ZodString;
|
|
2501
|
+
session_key: z.ZodString;
|
|
2502
|
+
mfa_responses: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2503
|
+
}, z.core.$strip>;
|
|
2504
|
+
/**
|
|
2505
|
+
* MFA response
|
|
2506
|
+
*/
|
|
2507
|
+
declare const MFAResponseSchema: z.ZodObject<{
|
|
2508
|
+
status: z.ZodString;
|
|
2509
|
+
message: z.ZodOptional<z.ZodString>;
|
|
2510
|
+
}, z.core.$strip>;
|
|
2511
|
+
/**
|
|
2512
|
+
* Update credentials request
|
|
2513
|
+
* Endpoint: PUT /users/{userId}/accounts/{accountId}/update_credentials
|
|
2514
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2515
|
+
*
|
|
2516
|
+
* Example: id=101939&credentials[login_params][username]=newuser&credentials[login_params][password]=newpass
|
|
2517
|
+
*/
|
|
2518
|
+
declare const UpdateCredentialsRequestSchema: z.ZodObject<{
|
|
2519
|
+
id: z.ZodNumber;
|
|
2520
|
+
credentials: z.ZodObject<{
|
|
2521
|
+
login_params: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2522
|
+
}, z.core.$strip>;
|
|
2523
|
+
}, z.core.$strip>;
|
|
2524
|
+
/**
|
|
2525
|
+
* Update credentials response
|
|
2526
|
+
*/
|
|
2527
|
+
declare const UpdateCredentialsResponseSchema: z.ZodObject<{
|
|
2528
|
+
status: z.ZodString;
|
|
2529
|
+
message: z.ZodOptional<z.ZodString>;
|
|
2530
|
+
}, z.core.$strip>;
|
|
2531
|
+
/**
|
|
2532
|
+
* Classify accounts request
|
|
2533
|
+
* Endpoint: PUT /users/{userId}/accounts/classify
|
|
2534
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
2535
|
+
*
|
|
2536
|
+
* Example: accounts[123][type_code]=DDA,DDA&accounts[456][type_code]=SAV,SAV&accounts[789][type_code]=ignore
|
|
2537
|
+
*
|
|
2538
|
+
* Note: Classifies pending accounts after aggregation
|
|
2539
|
+
* type_code format: "ACCT_TYPE,EXT_TYPE" or "ignore" to skip
|
|
2540
|
+
*/
|
|
2541
|
+
declare const ClassifyAccountsRequestSchema: z.ZodObject<{
|
|
2542
|
+
accounts: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2543
|
+
type_code: z.ZodString;
|
|
2544
|
+
}, z.core.$strip>>;
|
|
2545
|
+
}, z.core.$strip>;
|
|
2546
|
+
/**
|
|
2547
|
+
* CashEdge login session request
|
|
2548
|
+
* Endpoint: POST /users/{userId}/cashedge/login
|
|
2549
|
+
*
|
|
2550
|
+
* Note: Structure unclear from legacy code, needs investigation
|
|
2551
|
+
* Placeholder schema based on typical session patterns
|
|
2552
|
+
*/
|
|
2553
|
+
declare const CashEdgeLoginRequestSchema: z.ZodObject<{
|
|
2554
|
+
session_token: z.ZodOptional<z.ZodString>;
|
|
2555
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2556
|
+
}, z.core.$strip>;
|
|
2557
|
+
/**
|
|
2558
|
+
* CashEdge login session response
|
|
2559
|
+
* Endpoint: GET /users/{userId}/cashedge/login
|
|
2560
|
+
* Endpoint: POST /users/{userId}/cashedge/login
|
|
2561
|
+
*
|
|
2562
|
+
* Note: Structure unclear from legacy code, needs investigation
|
|
2563
|
+
* Placeholder schema based on typical session patterns
|
|
2564
|
+
*/
|
|
2565
|
+
declare const CashEdgeLoginResponseSchema: z.ZodObject<{
|
|
2566
|
+
session_id: z.ZodString;
|
|
2567
|
+
session_token: z.ZodOptional<z.ZodString>;
|
|
2568
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
2569
|
+
status: z.ZodOptional<z.ZodString>;
|
|
2570
|
+
}, z.core.$strip>;
|
|
2571
|
+
|
|
2572
|
+
type Institution = z.infer<typeof InstitutionSchema>;
|
|
2573
|
+
type InstitutionsResponse = z.infer<typeof InstitutionsResponseSchema>;
|
|
2574
|
+
type InstitutionLoginParameter = z.infer<typeof InstitutionLoginParameterSchema>;
|
|
2575
|
+
type InstitutionSearchMeta = z.infer<typeof InstitutionSearchMetaSchema>;
|
|
2576
|
+
type AuthenticateRequest = z.infer<typeof AuthenticateRequestSchema>;
|
|
2577
|
+
type AuthenticateResponse = z.infer<typeof AuthenticateResponseSchema>;
|
|
2578
|
+
type MFARequest = z.infer<typeof MFARequestSchema>;
|
|
2579
|
+
type MFAResponse = z.infer<typeof MFAResponseSchema>;
|
|
2580
|
+
type UpdateCredentialsRequest = z.infer<typeof UpdateCredentialsRequestSchema>;
|
|
2581
|
+
type UpdateCredentialsResponse = z.infer<typeof UpdateCredentialsResponseSchema>;
|
|
2582
|
+
type ClassifyAccountsRequest = z.infer<typeof ClassifyAccountsRequestSchema>;
|
|
2583
|
+
type CashEdgeLoginRequest = z.infer<typeof CashEdgeLoginRequestSchema>;
|
|
2584
|
+
type CashEdgeLoginResponse = z.infer<typeof CashEdgeLoginResponseSchema>;
|
|
2585
|
+
|
|
2586
|
+
/**
|
|
2587
|
+
* Chart Utilities
|
|
2588
|
+
* Shared utilities for MUI X Charts across all domains
|
|
2589
|
+
*/
|
|
2590
|
+
|
|
2591
|
+
/**
|
|
2592
|
+
* Currency formatter for chart axes and tooltips
|
|
2593
|
+
*/
|
|
2594
|
+
declare function formatCurrency(value: number): string;
|
|
2595
|
+
/**
|
|
2596
|
+
* Abbreviated currency formatter for compact displays
|
|
2597
|
+
* E.g., $1,234 → $1.2K, $1,234,567 → $1.2M
|
|
2598
|
+
*/
|
|
2599
|
+
declare function formatCurrencyAbbreviated(value: number): string;
|
|
2600
|
+
/**
|
|
2601
|
+
* Percentage formatter for chart labels
|
|
2602
|
+
*/
|
|
2603
|
+
declare function formatPercentage(value: number): string;
|
|
2604
|
+
/**
|
|
2605
|
+
* Get chart color palette from MUI theme
|
|
2606
|
+
* Returns an array of colors suitable for pie/donut charts
|
|
2607
|
+
*/
|
|
2608
|
+
declare function getChartColors(theme: Theme): string[];
|
|
2609
|
+
/**
|
|
2610
|
+
* Get color by index with wrapping
|
|
2611
|
+
* Ensures we always have a color even for large datasets
|
|
2612
|
+
*/
|
|
2613
|
+
declare function getColorByIndex(colors: string[], index: number): string;
|
|
2614
|
+
/**
|
|
2615
|
+
* Chart dimension constants
|
|
2616
|
+
* Based on legacy D3 component sizes
|
|
2617
|
+
*/
|
|
2618
|
+
declare const CHART_DIMENSIONS: {
|
|
2619
|
+
readonly donut: {
|
|
2620
|
+
readonly width: 200;
|
|
2621
|
+
readonly height: 200;
|
|
2622
|
+
readonly innerRadius: 60;
|
|
2623
|
+
readonly outerRadius: 95;
|
|
2624
|
+
};
|
|
2625
|
+
readonly lineChart: {
|
|
2626
|
+
readonly width: 300;
|
|
2627
|
+
readonly height: 150;
|
|
2628
|
+
readonly margin: {
|
|
2629
|
+
readonly top: 10;
|
|
2630
|
+
readonly right: 20;
|
|
2631
|
+
readonly bottom: 20;
|
|
2632
|
+
readonly left: 50;
|
|
2633
|
+
};
|
|
2634
|
+
};
|
|
2635
|
+
readonly barChart: {
|
|
2636
|
+
readonly width: 300;
|
|
2637
|
+
readonly height: 160;
|
|
2638
|
+
readonly margin: {
|
|
2639
|
+
readonly top: 20;
|
|
2640
|
+
readonly left: 50;
|
|
2641
|
+
readonly bottom: 40;
|
|
2642
|
+
readonly right: 20;
|
|
2643
|
+
};
|
|
2644
|
+
};
|
|
2645
|
+
};
|
|
2646
|
+
/**
|
|
2647
|
+
* Common chart props for consistency
|
|
2648
|
+
*/
|
|
2649
|
+
interface BaseChartData {
|
|
2650
|
+
name: string;
|
|
2651
|
+
value: number;
|
|
2652
|
+
}
|
|
2653
|
+
/**
|
|
2654
|
+
* Chart theming configuration
|
|
2655
|
+
* Provides consistent styling across all charts
|
|
2656
|
+
*/
|
|
2657
|
+
declare function getChartThemeConfig(theme: Theme): {
|
|
2658
|
+
backgroundColor: string;
|
|
2659
|
+
textColor: string;
|
|
2660
|
+
gridColor: string;
|
|
2661
|
+
tooltipBackgroundColor: string;
|
|
2662
|
+
tooltipBorderColor: string;
|
|
2663
|
+
};
|
|
2664
|
+
|
|
2665
|
+
/**
|
|
2666
|
+
* Animation Utilities
|
|
2667
|
+
*
|
|
2668
|
+
* D3-equivalent animation configurations for Framer Motion.
|
|
2669
|
+
* Matches legacy D3 transition timing and easing functions.
|
|
2670
|
+
*/
|
|
2671
|
+
|
|
2672
|
+
/**
|
|
2673
|
+
* D3 Transition Durations (matching legacy)
|
|
2674
|
+
*/
|
|
2675
|
+
declare const ANIMATION_DURATIONS: {
|
|
2676
|
+
/** Arc/pie slice transitions (D3: 1000ms) */
|
|
2677
|
+
readonly arc: 1000;
|
|
2678
|
+
/** Text transitions (D3: 200ms) */
|
|
2679
|
+
readonly text: 200;
|
|
2680
|
+
/** Meter/progress bar (D3: 600ms) */
|
|
2681
|
+
readonly meter: 600;
|
|
2682
|
+
/** Settings panel slide */
|
|
2683
|
+
readonly panel: 300;
|
|
2684
|
+
/** Tooltip/hover states */
|
|
2685
|
+
readonly hover: 150;
|
|
2686
|
+
};
|
|
2687
|
+
/**
|
|
2688
|
+
* Easing functions matching D3 defaults
|
|
2689
|
+
* D3 uses easeInOut by default for most transitions
|
|
2690
|
+
*/
|
|
2691
|
+
declare const ANIMATION_EASING: {
|
|
2692
|
+
/** D3 easeInOut equivalent */
|
|
2693
|
+
readonly default: readonly [0.4, 0, 0.2, 1];
|
|
2694
|
+
/** D3 easeOut equivalent */
|
|
2695
|
+
readonly easeOut: readonly [0, 0, 0.2, 1];
|
|
2696
|
+
/** D3 easeIn equivalent */
|
|
2697
|
+
readonly easeIn: readonly [0.4, 0, 1, 1];
|
|
2698
|
+
/** D3 easeLinear equivalent */
|
|
2699
|
+
readonly linear: readonly [0, 0, 1, 1];
|
|
2700
|
+
};
|
|
2701
|
+
/**
|
|
2702
|
+
* Arc/Pie Slice Animation Variants
|
|
2703
|
+
* Matches D3 arc enter/update/exit pattern with 1000ms duration
|
|
2704
|
+
*/
|
|
2705
|
+
declare const arcVariants: Variants;
|
|
2706
|
+
/**
|
|
2707
|
+
* Text Animation Variants
|
|
2708
|
+
* Matches D3 text transition with 200ms duration
|
|
2709
|
+
*/
|
|
2710
|
+
declare const textVariants: Variants;
|
|
2711
|
+
/**
|
|
2712
|
+
* Panel Slide Animation Variants
|
|
2713
|
+
* For settings panel and card flipper animations
|
|
2714
|
+
*/
|
|
2715
|
+
declare const panelVariants: Variants;
|
|
2716
|
+
/**
|
|
2717
|
+
* Fade Animation Variants
|
|
2718
|
+
* For loading states and empty states
|
|
2719
|
+
*/
|
|
2720
|
+
declare const fadeVariants: Variants;
|
|
2721
|
+
/**
|
|
2722
|
+
* Progress Bar Animation Variants
|
|
2723
|
+
* Matches D3 meter transitions (600ms)
|
|
2724
|
+
*/
|
|
2725
|
+
declare const progressVariants: Variants;
|
|
2726
|
+
/**
|
|
2727
|
+
* List Item Stagger Animation
|
|
2728
|
+
* For breakdown table rows and tag lists
|
|
2729
|
+
*/
|
|
2730
|
+
declare const listContainerVariants: Variants;
|
|
2731
|
+
declare const listItemVariants: Variants;
|
|
2732
|
+
/**
|
|
2733
|
+
* Create custom transition config
|
|
2734
|
+
*/
|
|
2735
|
+
declare function createTransition(duration: number, ease?: readonly number[]): Transition;
|
|
2736
|
+
/**
|
|
2737
|
+
* Spring animation config (alternative to easing)
|
|
2738
|
+
* Useful for interactive elements
|
|
2739
|
+
*/
|
|
2740
|
+
declare const SPRING_CONFIG: {
|
|
2741
|
+
default: {
|
|
2742
|
+
type: "spring";
|
|
2743
|
+
stiffness: number;
|
|
2744
|
+
damping: number;
|
|
2745
|
+
};
|
|
2746
|
+
bouncy: {
|
|
2747
|
+
type: "spring";
|
|
2748
|
+
stiffness: number;
|
|
2749
|
+
damping: number;
|
|
2750
|
+
};
|
|
2751
|
+
slow: {
|
|
2752
|
+
type: "spring";
|
|
2753
|
+
stiffness: number;
|
|
2754
|
+
damping: number;
|
|
2755
|
+
};
|
|
2756
|
+
};
|
|
2757
|
+
|
|
2758
|
+
export { ANIMATION_DURATIONS, ANIMATION_EASING, type Account, type AccountArchive, AccountArchiveSchema, type AccountCreate, AccountCreateSchema, AccountCreateSchemaAdmin, AccountCreateSchemaUser, type AccountDelete, AccountDeleteSchema, type AccountError, AccountErrorSchema, AccountSchema, type AccountState, AccountStateSchema, type AccountType, AccountTypeSchema, type AccountUpdate, AccountUpdateSchema, type AccountsResponse, AccountsResponseSchema, type AggregationType, AggregationTypeSchema, type Alert, type AlertCreate, AlertCreateSchema, type AlertDestinations, AlertDestinationsSchema, type AlertDestinationsUpdate, AlertDestinationsUpdateSchema, AlertSchema, type AlertSourceType, AlertSourceTypeSchema, type AlertType, AlertTypeSchema, type AlertUpdate, AlertUpdateSchema, type AlertsResponse, AlertsResponseSchema, type AppMode, AppModeContext, type AppModeContextValue, AppModeProvider, type AppModeProviderProps, type AuthenticateRequest, AuthenticateRequestSchema, type AuthenticateResponse, AuthenticateResponseSchema, type BaseChartData, type Budget, type BudgetCreate, BudgetCreateSchema, type BudgetLinks, BudgetLinksSchema, BudgetSchema, type BudgetState, BudgetStateSchema, type BudgetUpdate, BudgetUpdateSchema, type BudgetsResponse, BudgetsResponseSchema, CHART_DIMENSIONS, type CashEdgeAccountType, CashEdgeAccountTypeSchema, type CashEdgeLoginRequest, CashEdgeLoginRequestSchema, type CashEdgeLoginResponse, CashEdgeLoginResponseSchema, type CashflowEvent, type CashflowEventCreate, CashflowEventCreateSchema, type CashflowEventFilter, CashflowEventFilterSchema, CashflowEventSchema, type CashflowEventType, CashflowEventTypeSchema, type CashflowEventUpdate, CashflowEventUpdateSchema, type CashflowEventsResponse, CashflowEventsResponseSchema, type ClassifyAccountsRequest, ClassifyAccountsRequestSchema, type DefaultTags, DefaultTagsSchema, type Expense, ExpenseCreateSchemaAdmin, ExpenseCreateSchemaUser, ExpenseDeleteSchema, ExpenseSchema, type ExpenseSearchParams, ExpenseSearchParamsSchema, ExpenseUpdateSchemaAdmin, ExpenseUpdateSchemaUser, type ExpensesResponse, ExpensesResponseSchema, type FinancialInstitution, FinancialInstitutionSchema, type GoalCreate, GoalCreateSchema, type GoalImagesResponse, GoalImagesResponseSchema, type GoalLinks, GoalLinksSchema, type GoalState, GoalStateSchema, type GoalStatus, GoalStatusSchema, type GoalUpdate, GoalUpdateSchema, type Institution, type InstitutionLoginParameter, InstitutionLoginParameterSchema, InstitutionSchema, type InstitutionSearchMeta, InstitutionSearchMetaSchema, type InstitutionsResponse, InstitutionsResponseSchema, type Investment, type InvestmentHolding, InvestmentHoldingSchema, InvestmentSchema, type InvestmentsResponse, InvestmentsResponseSchema, type MFARequest, MFARequestSchema, type MFAResponse, MFAResponseSchema, type NetWorth, type NetWorthAccountCreate, NetWorthAccountCreateSchema, type NetWorthAccountDelete, NetWorthAccountDeleteSchema, type NetWorthAccountType, NetWorthAccountTypeSchema, type NetWorthAccountUpdate, NetWorthAccountUpdateSchema, type NetWorthAsset, NetWorthAssetSchema, type NetWorthDebt, NetWorthDebtSchema, type NetWorthHistory, NetWorthHistorySchema, type NetWorthMeta, NetWorthMetaSchema, type NetWorthResponse, NetWorthResponseSchema, NetWorthSchema, type Notification, NotificationCreateSchemaAdmin, NotificationCreateSchemaUser, type NotificationFrequency, NotificationFrequencySchema, type NotificationPreferences, NotificationPreferencesSchema, NotificationPreferencesUpdateSchema, NotificationSchema, NotificationUpdateSchemaAdmin, NotificationUpdateSchemaUser, type NotificationsResponse, NotificationsResponseSchema, type OtherBalance, OtherBalanceSchema, type Partner, PartnerCreateSchemaAdmin, PartnerCreateSchemaUser, PartnerDeleteSchema, PartnerSchema, PartnerUpdateSchemaAdmin, PartnerUpdateSchemaUser, type PartnersResponse, PartnersResponseSchema, type PayoffGoal, PayoffGoalSchema, type PayoffGoalsResponse, PayoffGoalsResponseSchema, type PendingAccount, type PendingAccountDelete, PendingAccountDeleteSchema, PendingAccountSchema, type PendingAccountsResponse, PendingAccountsResponseSchema, type PreferredBalanceType, PreferredBalanceTypeSchema, type RecurrenceFrequency, RecurrenceFrequencySchema, SPRING_CONFIG, type SavingsGoal, SavingsGoalSchema, type SavingsGoalsResponse, SavingsGoalsResponseSchema, type TagColor, TagColorSchema, TagCreateSchemaAdmin, TagCreateSchemaUser, TagDeleteSchema, type TagReportItem, TagReportItemSchema, type TagUsageDataPoint, TagUsageDataPointSchema, type TagUsageReport, TagUsageReportSchema, type TagUsageStat, TagUsageStatSchema, type TagUsageStats, TagUsageStatsSchema, type TagsResponse, TagsResponseSchema, type TagsUpdate, TagsUpdateSchema, type Transaction, type TransactionCreate, TransactionCreateSchema, TransactionCreateSchemaAdmin, TransactionCreateSchemaUser, type TransactionDelete, TransactionDeleteSchema, type TransactionLinks, TransactionLinksSchema, TransactionSchema, type TransactionSearchParams, TransactionSearchParamsSchema, type TransactionTag, TransactionTagSchema, type TransactionTagging, type TransactionTaggingRegular, TransactionTaggingRegularSchema, TransactionTaggingSchema, type TransactionTaggingSplit, type TransactionTaggingSplitItem, TransactionTaggingSplitItemSchema, TransactionTaggingSplitSchema, type TransactionType, TransactionTypeSchema, type TransactionUpdate, TransactionUpdateSchema, type TransactionsResponse, TransactionsResponseSchema, type UpdateCredentialsRequest, UpdateCredentialsRequestSchema, type UpdateCredentialsResponse, UpdateCredentialsResponseSchema, type User, type UserCreate, UserCreateSchema, UserCreateSchemaAdmin, UserCreateSchemaUser, UserSchema, type UserSex, UserSexSchema, type UserTags, UserTagsSchema, type UserUpdate, UserUpdateSchema, UserUpdateSchemaAdmin, UserUpdateSchemaUser, arcVariants, createTransition, fadeVariants, formatCurrency, formatCurrencyAbbreviated, formatPercentage, getChartColors, getChartThemeConfig, getColorByIndex, listContainerVariants, listItemVariants, panelVariants, progressVariants, textVariants, useAppMode };
|