@burdenoff/microfe-brainyrich 2026.716.1 → 2026.730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  import { useBrainyRich as e } from "../providers/BrainyRichProvider.js";
2
2
  import { errorMessage as t, notify as n } from "../components/notify.js";
3
3
  import { useInfiniteQuery as r, useMutation as i, useQuery as a, useQueryClient as o } from "@tanstack/react-query";
4
- import { graphqlFetch as ee } from "@burdenoff/fe-libs/shared/graphql";
4
+ import { graphqlFetch as s } from "@burdenoff/fe-libs/shared/graphql";
5
5
  //#region src/brainyrich/hooks/useBrainyRichApi.ts
6
- var te = () => {
6
+ var ee = () => {
7
7
  let e = globalThis;
8
8
  e.__graphqlFetchResponseCache?.clear(), e.__graphqlFetchPendingResponses?.clear(), e.__boffGraphQLResponseCache?.clear();
9
- }, s = async (e, t, n, r) => {
10
- let i = await ee({
9
+ }, c = async (e, t, n, r) => {
10
+ let i = await s({
11
11
  gateway: "workspace",
12
12
  baseUrl: n,
13
13
  query: e,
@@ -18,11 +18,11 @@ var te = () => {
18
18
  if (i.errors?.length) throw Error(i.errors[0]?.message ?? "GraphQL request failed");
19
19
  if (!i.data) throw Error("GraphQL response did not include data");
20
20
  return i.data;
21
- }, c = async (e, t, n) => {
22
- let r = await s(e, t, n, { suppressGlobalError: !0 });
23
- return te(), r;
21
+ }, l = async (e, t, n) => {
22
+ let r = await c(e, t, n, { suppressGlobalError: !0 });
23
+ return ee(), r;
24
24
  };
25
- function l(e) {
25
+ function u(e) {
26
26
  return {
27
27
  onSuccess: (t, r) => {
28
28
  e.onSuccess?.(t, r), e.success && n.success(typeof e.success == "function" ? e.success(t, r) : e.success);
@@ -30,7 +30,7 @@ function l(e) {
30
30
  onError: (e) => n.error(t(e))
31
31
  };
32
32
  }
33
- var u = {
33
+ var d = {
34
34
  netWorth: ["brainyrich", "net-worth"],
35
35
  accounts: ["brainyrich", "accounts"],
36
36
  account: (e) => [
@@ -74,29 +74,39 @@ var u = {
74
74
  "insight",
75
75
  e
76
76
  ],
77
+ riskSignals: (e) => [
78
+ "brainyrich",
79
+ "risk-signals",
80
+ e
81
+ ],
82
+ riskSummary: (e) => [
83
+ "brainyrich",
84
+ "risk-summary",
85
+ e
86
+ ],
77
87
  transactions: ["brainyrich", "transactions"],
78
88
  rebalances: ["brainyrich", "rebalance-proposals"],
79
89
  health: ["brainyrich", "health"]
80
- }, d = { limit: 50 }, f = "\n id workspaceId accountId portfolioId symbol name assetClass quantity lastPrice\n costBasis marketValue currency asOf createdAt updatedAt\n", p = "\n id workspaceId accountId holdingId type symbol quantity price amount fee currency\n tradeDate settleDate notes createdAt updatedAt\n", m = "\n id workspaceId ownerId householdId name type status institution accountMask\n cashBalance currency isManual createdAt updatedAt\n", h = "\n id workspaceId ownerId householdId name description status baseCurrency\n modelPortfolioId driftThresholdPct targetAllocation tags createdAt updatedAt\n", g = "\n id workspaceId modelPortfolioId assetClass targetPct createdAt updatedAt\n", _ = "\n id workspaceId name description riskProfile baseCurrency isActive createdAt updatedAt\n", v = "\n id workspaceId goalId accountId allocationPct fixedAmount createdAt updatedAt\n", y = "\n id workspaceId ownerId householdId name type status projection targetAmount\n targetDate monthlyContribution priority currency notes tags createdAt updatedAt\n", b = "\n id workspaceId name status riskProfile advisorId aum currency primaryContactName\n primaryContactEmail notes tags createdAt updatedAt\n", x = "\n id workspaceId ownerId type severity status title detail metrics subjectId\n subjectType acknowledgedById resolvedAt createdAt updatedAt\n", S = "\n id workspaceId portfolioId householdId status driftPct rationale trades\n proposedById approvedById executedAt createdAt updatedAt\n", ne = "\n workspaceId ownerId totalNetWorth totalMarketValue totalCash accountCount currency\n byAssetClass { assetClass marketValue }\n", re = (t) => {
90
+ }, f = { limit: 50 }, p = "\n id workspaceId accountId portfolioId symbol name assetClass quantity lastPrice\n costBasis marketValue currency asOf createdAt updatedAt\n", m = "\n id workspaceId accountId holdingId type symbol quantity price amount fee currency\n tradeDate settleDate notes createdAt updatedAt\n", h = "\n id workspaceId ownerId householdId name type status institution accountMask\n cashBalance currency isManual createdAt updatedAt\n", g = "\n id workspaceId ownerId householdId name description status baseCurrency\n modelPortfolioId driftThresholdPct targetAllocation tags createdAt updatedAt\n", _ = "\n id workspaceId modelPortfolioId assetClass targetPct createdAt updatedAt\n", te = "\n id workspaceId name description riskProfile baseCurrency isActive createdAt updatedAt\n", v = "\n id workspaceId goalId accountId allocationPct fixedAmount createdAt updatedAt\n", y = "\n id workspaceId ownerId householdId name type status projection targetAmount\n targetDate monthlyContribution priority currency notes tags createdAt updatedAt\n", b = "\n id workspaceId name status riskProfile advisorId aum currency primaryContactName\n primaryContactEmail notes tags createdAt updatedAt\n", x = "\n id workspaceId ownerId type severity status title detail metrics subjectId\n subjectType acknowledgedById resolvedAt createdAt updatedAt\n", S = "\n id workspaceId portfolioId householdId status driftPct rationale trades\n proposedById approvedById executedAt createdAt updatedAt\n", ne = "\n workspaceId ownerId totalNetWorth totalMarketValue totalCash accountCount currency\n byAssetClass { assetClass marketValue }\n", re = (t) => {
81
91
  let { apiGatewayUrl: n } = e();
82
92
  return a({
83
- queryKey: [...u.netWorth, t ?? "me"],
84
- queryFn: async () => (await s(`query BraNetWorthSummary($ownerId: ID) {
93
+ queryKey: [...d.netWorth, t ?? "me"],
94
+ queryFn: async () => (await c(`query BraNetWorthSummary($ownerId: ID) {
85
95
  braNetWorthSummary(ownerId: $ownerId) { ${ne} }
86
96
  }`, { ownerId: t }, n)).braNetWorthSummary
87
97
  });
88
- }, C = (t = {}) => {
98
+ }, ie = (t = {}) => {
89
99
  let { apiGatewayUrl: n } = e(), r = a({
90
- queryKey: [...u.accounts, t],
91
- queryFn: async () => (await s(`query BraListAccounts($householdId: ID, $status: BraAccountStatus, $pagination: PaginationInput) {
100
+ queryKey: [...d.accounts, t],
101
+ queryFn: async () => (await c(`query BraListAccounts($householdId: ID, $status: BraAccountStatus, $pagination: PaginationInput) {
92
102
  braListAccounts(householdId: $householdId, status: $status, pagination: $pagination) {
93
- items { ${m} }
103
+ items { ${h} }
94
104
  pageInfo { cursor hasMore }
95
105
  }
96
106
  }`, {
97
107
  householdId: t.householdId,
98
108
  status: t.status,
99
- pagination: t.pagination ?? d
109
+ pagination: t.pagination ?? f
100
110
  }, n)).braListAccounts
101
111
  });
102
112
  return {
@@ -104,68 +114,77 @@ var u = {
104
114
  data: r.data?.items ?? [],
105
115
  pageInfo: r.data?.pageInfo
106
116
  };
107
- }, w = (t) => {
117
+ }, C = (t) => {
108
118
  let { apiGatewayUrl: n } = e();
109
119
  return a({
110
- queryKey: u.account(t ?? ""),
120
+ queryKey: d.account(t ?? ""),
111
121
  enabled: !!t,
112
- queryFn: async () => (await s(`query BraAccount($id: ID!) {
122
+ queryFn: async () => {
123
+ let e = await c(`query BraAccount($id: ID!) {
113
124
  braAccount(id: $id) {
114
- ${m}
115
- holdings { ${f} }
116
- transactions { ${p} }
125
+ ${h}
126
+ holdings { items { ${p} } pageInfo { cursor hasMore } }
127
+ transactions { items { ${m} } pageInfo { cursor hasMore } }
117
128
  }
118
- }`, { id: t }, n)).braAccount
129
+ }`, { id: t }, n);
130
+ if (!e.braAccount) return null;
131
+ let { holdings: r, transactions: i, ...a } = e.braAccount;
132
+ return {
133
+ ...a,
134
+ holdings: r.items,
135
+ transactions: i.items
136
+ };
137
+ }
119
138
  });
120
- }, T = () => {
139
+ }, w = () => {
121
140
  let { apiGatewayUrl: t } = e(), n = o();
122
141
  return i({
123
- mutationFn: async (e) => (await c(`mutation BraCreateAccount($input: BraCreateAccountInput!) {
124
- braCreateAccount(input: $input) { ${m} }
142
+ mutationFn: async (e) => (await l(`mutation BraCreateAccount($input: BraCreateAccountInput!) {
143
+ braCreateAccount(input: $input) { ${h} }
125
144
  }`, { input: e }, t)).braCreateAccount,
126
- ...l({
145
+ ...u({
127
146
  success: "Account created",
128
147
  onSuccess: () => {
129
- n.invalidateQueries({ queryKey: u.accounts }), n.invalidateQueries({ queryKey: u.netWorth });
148
+ n.invalidateQueries({ queryKey: d.accounts }), n.invalidateQueries({ queryKey: d.netWorth });
130
149
  }
131
150
  })
132
151
  });
133
- }, E = () => {
152
+ }, T = () => {
134
153
  let { apiGatewayUrl: t } = e(), n = o();
135
154
  return i({
136
- mutationFn: async (e) => (await c(`mutation BraUpdateAccount($id: ID!, $input: BraUpdateAccountInput!) {
137
- braUpdateAccount(id: $id, input: $input) { ${m} }
155
+ mutationFn: async (e) => (await l(`mutation BraUpdateAccount($id: ID!, $input: BraUpdateAccountInput!) {
156
+ braUpdateAccount(id: $id, input: $input) { ${h} }
138
157
  }`, e, t)).braUpdateAccount,
139
- ...l({
158
+ ...u({
140
159
  success: "Account updated",
141
160
  onSuccess: (e) => {
142
- n.invalidateQueries({ queryKey: u.accounts }), n.invalidateQueries({ queryKey: u.account(e.id) }), n.invalidateQueries({ queryKey: u.netWorth });
161
+ n.invalidateQueries({ queryKey: d.accounts }), n.invalidateQueries({ queryKey: d.account(e.id) }), n.invalidateQueries({ queryKey: d.netWorth });
143
162
  }
144
163
  })
145
164
  });
146
- }, D = () => {
165
+ }, E = () => {
147
166
  let { apiGatewayUrl: t } = e(), n = o();
148
167
  return i({
149
- mutationFn: async (e) => (await c("mutation BraArchiveAccount($id: ID!) { braArchiveAccount(id: $id) }", { id: e }, t)).braArchiveAccount,
150
- ...l({
168
+ mutationFn: async (e) => (await l("mutation BraArchiveAccount($id: ID!) { braArchiveAccount(id: $id) }", { id: e }, t)).braArchiveAccount,
169
+ ...u({
151
170
  success: "Account archived",
152
171
  onSuccess: () => {
153
- n.invalidateQueries({ queryKey: u.accounts }), n.invalidateQueries({ queryKey: u.netWorth });
172
+ n.invalidateQueries({ queryKey: d.accounts }), n.invalidateQueries({ queryKey: d.netWorth });
154
173
  }
155
174
  })
156
175
  });
157
- }, O = (t = {}) => {
176
+ }, D = (t = {}) => {
158
177
  let { apiGatewayUrl: n } = e(), r = a({
159
- queryKey: [...u.portfolios, t],
160
- queryFn: async () => (await s(`query BraListPortfolios($householdId: ID, $status: BraPortfolioStatus, $pagination: PaginationInput) {
178
+ queryKey: [...d.portfolios, t],
179
+ queryFn: async () => (await c(`query BraListPortfolios($householdId: ID, $status: BraPortfolioStatus, $pagination: PaginationInput) {
161
180
  braListPortfolios(householdId: $householdId, status: $status, pagination: $pagination) {
162
- items { ${h} }
181
+ items { ${g} }
163
182
  pageInfo { cursor hasMore }
164
183
  }
165
184
  }`, {
166
185
  householdId: t.householdId,
167
186
  status: t.status,
168
- pagination: t.pagination ?? d
187
+ pagination: t.pagination ?? f
169
188
  }, n)).braListPortfolios
170
189
  });
171
190
  return {
@@ -173,147 +192,165 @@ var u = {
173
192
  data: r.data?.items ?? [],
174
193
  pageInfo: r.data?.pageInfo
175
194
  };
176
- }, k = (t) => {
195
+ }, O = (t) => {
177
196
  let { apiGatewayUrl: n } = e();
178
197
  return a({
179
- queryKey: u.portfolio(t ?? ""),
198
+ queryKey: d.portfolio(t ?? ""),
180
199
  enabled: !!t,
181
- queryFn: async () => (await s(`query BraPortfolio($id: ID!) {
200
+ queryFn: async () => {
201
+ let e = await c(`query BraPortfolio($id: ID!) {
182
202
  braPortfolio(id: $id) {
183
- ${h}
184
- holdings { ${f} }
203
+ ${g}
204
+ holdings { items { ${p} } pageInfo { cursor hasMore } }
185
205
  }
186
- }`, { id: t }, n)).braPortfolio
206
+ }`, { id: t }, n);
207
+ if (!e.braPortfolio) return null;
208
+ let { holdings: r, ...i } = e.braPortfolio;
209
+ return {
210
+ ...i,
211
+ holdings: r.items
212
+ };
213
+ }
187
214
  });
188
- }, A = () => {
215
+ }, k = () => {
189
216
  let { apiGatewayUrl: t } = e(), n = o();
190
217
  return i({
191
- mutationFn: async (e) => (await c(`mutation BraCreatePortfolio($input: BraCreatePortfolioInput!) {
192
- braCreatePortfolio(input: $input) { ${h} }
218
+ mutationFn: async (e) => (await l(`mutation BraCreatePortfolio($input: BraCreatePortfolioInput!) {
219
+ braCreatePortfolio(input: $input) { ${g} }
193
220
  }`, { input: e }, t)).braCreatePortfolio,
194
- ...l({
221
+ ...u({
195
222
  success: "Portfolio created",
196
- onSuccess: () => n.invalidateQueries({ queryKey: u.portfolios })
223
+ onSuccess: () => n.invalidateQueries({ queryKey: d.portfolios })
197
224
  })
198
225
  });
199
- }, j = () => {
226
+ }, A = () => {
200
227
  let { apiGatewayUrl: t } = e(), n = o();
201
228
  return i({
202
- mutationFn: async (e) => (await c(`mutation BraUpdatePortfolio($id: ID!, $input: BraUpdatePortfolioInput!) {
203
- braUpdatePortfolio(id: $id, input: $input) { ${h} }
229
+ mutationFn: async (e) => (await l(`mutation BraUpdatePortfolio($id: ID!, $input: BraUpdatePortfolioInput!) {
230
+ braUpdatePortfolio(id: $id, input: $input) { ${g} }
204
231
  }`, e, t)).braUpdatePortfolio,
205
- ...l({
232
+ ...u({
206
233
  success: "Portfolio updated",
207
234
  onSuccess: (e) => {
208
- n.invalidateQueries({ queryKey: u.portfolios }), n.invalidateQueries({ queryKey: u.portfolio(e.id) });
235
+ n.invalidateQueries({ queryKey: d.portfolios }), n.invalidateQueries({ queryKey: d.portfolio(e.id) });
209
236
  }
210
237
  })
211
238
  });
212
- }, M = () => {
239
+ }, j = () => {
213
240
  let { apiGatewayUrl: t } = e(), n = o();
214
241
  return i({
215
- mutationFn: async (e) => (await c("mutation BraArchivePortfolio($id: ID!) { braArchivePortfolio(id: $id) }", { id: e }, t)).braArchivePortfolio,
216
- ...l({
242
+ mutationFn: async (e) => (await l("mutation BraArchivePortfolio($id: ID!) { braArchivePortfolio(id: $id) }", { id: e }, t)).braArchivePortfolio,
243
+ ...u({
217
244
  success: "Portfolio archived",
218
- onSuccess: () => n.invalidateQueries({ queryKey: u.portfolios })
245
+ onSuccess: () => n.invalidateQueries({ queryKey: d.portfolios })
219
246
  })
220
247
  });
221
- }, N = (t) => {
248
+ }, M = (t) => {
222
249
  let { apiGatewayUrl: n } = e(), r = a({
223
- queryKey: [...u.holdings, t],
250
+ queryKey: [...d.holdings, t],
224
251
  enabled: !!(t.accountId || t.portfolioId),
225
- queryFn: async () => (await s(`query BraListHoldings($accountId: ID, $portfolioId: ID) {
226
- braListHoldings(accountId: $accountId, portfolioId: $portfolioId) { ${f} }
252
+ queryFn: async () => (await c(`query BraListHoldings($accountId: ID, $portfolioId: ID) {
253
+ braListHoldings(accountId: $accountId, portfolioId: $portfolioId) {
254
+ items { ${p} }
255
+ pageInfo { cursor hasMore }
256
+ }
227
257
  }`, {
228
258
  accountId: t.accountId,
229
259
  portfolioId: t.portfolioId
230
- }, n)).braListHoldings
260
+ }, n)).braListHoldings.items
231
261
  });
232
262
  return {
233
263
  ...r,
234
264
  data: r.data ?? []
235
265
  };
236
- }, P = () => {
266
+ }, N = () => {
237
267
  let { apiGatewayUrl: t } = e(), n = o();
238
268
  return i({
239
- mutationFn: async (e) => (await c(`mutation BraCreateHolding($input: BraCreateHoldingInput!) {
240
- braCreateHolding(input: $input) { ${f} }
269
+ mutationFn: async (e) => (await l(`mutation BraCreateHolding($input: BraCreateHoldingInput!) {
270
+ braCreateHolding(input: $input) { ${p} }
241
271
  }`, { input: e }, t)).braCreateHolding,
242
- ...l({
272
+ ...u({
243
273
  success: "Holding added",
244
274
  onSuccess: (e) => {
245
- n.invalidateQueries({ queryKey: u.holdings }), n.invalidateQueries({ queryKey: u.account(e.accountId) }), e.portfolioId && n.invalidateQueries({ queryKey: u.portfolio(e.portfolioId) }), n.invalidateQueries({ queryKey: u.netWorth });
275
+ n.invalidateQueries({ queryKey: d.holdings }), n.invalidateQueries({ queryKey: d.account(e.accountId) }), e.portfolioId && n.invalidateQueries({ queryKey: d.portfolio(e.portfolioId) }), n.invalidateQueries({ queryKey: d.netWorth });
246
276
  }
247
277
  })
248
278
  });
249
- }, F = () => {
279
+ }, P = () => {
250
280
  let { apiGatewayUrl: t } = e(), n = o();
251
281
  return i({
252
- mutationFn: async (e) => (await c(`mutation BraUpdateHolding($id: ID!, $input: BraUpdateHoldingInput!) {
253
- braUpdateHolding(id: $id, input: $input) { ${f} }
282
+ mutationFn: async (e) => (await l(`mutation BraUpdateHolding($id: ID!, $input: BraUpdateHoldingInput!) {
283
+ braUpdateHolding(id: $id, input: $input) { ${p} }
254
284
  }`, e, t)).braUpdateHolding,
255
- ...l({
285
+ ...u({
256
286
  success: "Holding updated",
257
287
  onSuccess: (e) => {
258
- n.invalidateQueries({ queryKey: u.holdings }), n.invalidateQueries({ queryKey: u.account(e.accountId) }), e.portfolioId && n.invalidateQueries({ queryKey: u.portfolio(e.portfolioId) }), n.invalidateQueries({ queryKey: u.netWorth });
288
+ n.invalidateQueries({ queryKey: d.holdings }), n.invalidateQueries({ queryKey: d.account(e.accountId) }), e.portfolioId && n.invalidateQueries({ queryKey: d.portfolio(e.portfolioId) }), n.invalidateQueries({ queryKey: d.netWorth });
259
289
  }
260
290
  })
261
291
  });
262
- }, I = () => {
292
+ }, F = () => {
263
293
  let { apiGatewayUrl: t } = e(), n = o();
264
294
  return i({
265
- mutationFn: async (e) => (await c("mutation BraDeleteHolding($id: ID!) { braDeleteHolding(id: $id) }", { id: e }, t)).braDeleteHolding,
266
- ...l({
295
+ mutationFn: async (e) => (await l("mutation BraDeleteHolding($id: ID!) { braDeleteHolding(id: $id) }", { id: e }, t)).braDeleteHolding,
296
+ ...u({
267
297
  success: "Holding removed",
268
298
  onSuccess: () => {
269
- n.invalidateQueries({ queryKey: u.holdings }), n.invalidateQueries({ queryKey: u.accounts }), n.invalidateQueries({ queryKey: u.portfolios }), n.invalidateQueries({ queryKey: u.netWorth });
299
+ n.invalidateQueries({ queryKey: d.holdings }), n.invalidateQueries({ queryKey: d.accounts }), n.invalidateQueries({ queryKey: d.portfolios }), n.invalidateQueries({ queryKey: d.netWorth });
270
300
  }
271
301
  })
272
302
  });
273
- }, L = () => {
303
+ }, I = `
304
+ ${te}
305
+ allocations { items { ${_} } pageInfo { cursor hasMore } }
306
+ `, L = (e) => ({
307
+ ...e,
308
+ allocations: e.allocations.items
309
+ }), R = () => {
274
310
  let { apiGatewayUrl: t } = e(), n = a({
275
- queryKey: u.modelPortfolios,
276
- queryFn: async () => (await s(`query BraListModelPortfolios {
311
+ queryKey: d.modelPortfolios,
312
+ queryFn: async () => (await c(`query BraListModelPortfolios {
277
313
  braListModelPortfolios {
278
- ${_}
279
- allocations { ${g} }
314
+ items { ${I} }
315
+ pageInfo { cursor hasMore }
280
316
  }
281
- }`, {}, t)).braListModelPortfolios
317
+ }`, {}, t)).braListModelPortfolios.items.map(L)
282
318
  });
283
319
  return {
284
320
  ...n,
285
321
  data: n.data ?? []
286
322
  };
287
- }, R = (t) => {
323
+ }, z = (t) => {
288
324
  let { apiGatewayUrl: n } = e();
289
325
  return a({
290
- queryKey: u.modelPortfolio(t ?? ""),
326
+ queryKey: d.modelPortfolio(t ?? ""),
291
327
  enabled: !!t,
292
- queryFn: async () => (await s(`query BraModelPortfolio($id: ID!) {
328
+ queryFn: async () => {
329
+ let e = await c(`query BraModelPortfolio($id: ID!) {
293
330
  braModelPortfolio(id: $id) {
294
- ${_}
295
- allocations { ${g} }
331
+ ${I}
296
332
  }
297
- }`, { id: t }, n)).braModelPortfolio
333
+ }`, { id: t }, n);
334
+ return e.braModelPortfolio ? L(e.braModelPortfolio) : null;
335
+ }
298
336
  });
299
- }, z = () => {
337
+ }, B = () => {
300
338
  let { apiGatewayUrl: t } = e(), n = o();
301
339
  return i({
302
- mutationFn: async (e) => (await c(`mutation BraCreateModelPortfolio($input: BraCreateModelPortfolioInput!) {
340
+ mutationFn: async (e) => L((await l(`mutation BraCreateModelPortfolio($input: BraCreateModelPortfolioInput!) {
303
341
  braCreateModelPortfolio(input: $input) {
304
- ${_}
305
- allocations { ${g} }
342
+ ${I}
306
343
  }
307
- }`, { input: e }, t)).braCreateModelPortfolio,
308
- ...l({
344
+ }`, { input: e }, t)).braCreateModelPortfolio),
345
+ ...u({
309
346
  success: "Model portfolio created",
310
- onSuccess: () => n.invalidateQueries({ queryKey: u.modelPortfolios })
347
+ onSuccess: () => n.invalidateQueries({ queryKey: d.modelPortfolios })
311
348
  })
312
349
  });
313
- }, B = (t = {}) => {
350
+ }, V = (t = {}) => {
314
351
  let { apiGatewayUrl: n } = e(), r = a({
315
- queryKey: [...u.goals, t],
316
- queryFn: async () => (await s(`query BraListGoals($householdId: ID, $status: BraGoalStatus, $pagination: PaginationInput) {
352
+ queryKey: [...d.goals, t],
353
+ queryFn: async () => (await c(`query BraListGoals($householdId: ID, $status: BraGoalStatus, $pagination: PaginationInput) {
317
354
  braListGoals(householdId: $householdId, status: $status, pagination: $pagination) {
318
355
  items { ${y} }
319
356
  pageInfo { cursor hasMore }
@@ -321,7 +358,7 @@ var u = {
321
358
  }`, {
322
359
  householdId: t.householdId,
323
360
  status: t.status,
324
- pagination: t.pagination ?? d
361
+ pagination: t.pagination ?? f
325
362
  }, n)).braListGoals
326
363
  });
327
364
  return {
@@ -329,111 +366,122 @@ var u = {
329
366
  data: r.data?.items ?? [],
330
367
  pageInfo: r.data?.pageInfo
331
368
  };
332
- }, V = (t) => {
369
+ }, H = (t) => {
333
370
  let { apiGatewayUrl: n } = e();
334
371
  return a({
335
- queryKey: u.goal(t ?? ""),
372
+ queryKey: d.goal(t ?? ""),
336
373
  enabled: !!t,
337
- queryFn: async () => (await s(`query BraGoal($id: ID!) {
374
+ queryFn: async () => {
375
+ let e = await c(`query BraGoal($id: ID!) {
338
376
  braGoal(id: $id) {
339
377
  ${y}
340
- fundings { ${v} }
378
+ fundings { items { ${v} } pageInfo { cursor hasMore } }
341
379
  }
342
- }`, { id: t }, n)).braGoal
380
+ }`, { id: t }, n);
381
+ if (!e.braGoal) return null;
382
+ let { fundings: r, ...i } = e.braGoal;
383
+ return {
384
+ ...i,
385
+ fundings: r.items
386
+ };
387
+ }
343
388
  });
344
- }, H = (t) => {
389
+ }, U = (t) => {
345
390
  let { apiGatewayUrl: n } = e(), r = a({
346
- queryKey: u.goalFundings(t ?? ""),
391
+ queryKey: d.goalFundings(t ?? ""),
347
392
  enabled: !!t,
348
- queryFn: async () => (await s(`query BraListGoalFundings($goalId: ID!) {
349
- braListGoalFundings(goalId: $goalId) { ${v} }
350
- }`, { goalId: t }, n)).braListGoalFundings
393
+ queryFn: async () => (await c(`query BraListGoalFundings($goalId: ID!) {
394
+ braListGoalFundings(goalId: $goalId) {
395
+ items { ${v} }
396
+ pageInfo { cursor hasMore }
397
+ }
398
+ }`, { goalId: t }, n)).braListGoalFundings.items
351
399
  });
352
400
  return {
353
401
  ...r,
354
402
  data: r.data ?? []
355
403
  };
356
- }, U = () => {
404
+ }, W = () => {
357
405
  let { apiGatewayUrl: t } = e(), n = o();
358
406
  return i({
359
- mutationFn: async (e) => (await c(`mutation BraCreateGoal($input: BraCreateGoalInput!) {
407
+ mutationFn: async (e) => (await l(`mutation BraCreateGoal($input: BraCreateGoalInput!) {
360
408
  braCreateGoal(input: $input) { ${y} }
361
409
  }`, { input: e }, t)).braCreateGoal,
362
- ...l({
410
+ ...u({
363
411
  success: "Goal created",
364
- onSuccess: () => n.invalidateQueries({ queryKey: u.goals })
412
+ onSuccess: () => n.invalidateQueries({ queryKey: d.goals })
365
413
  })
366
414
  });
367
- }, W = () => {
415
+ }, G = () => {
368
416
  let { apiGatewayUrl: t } = e(), n = o();
369
417
  return i({
370
- mutationFn: async (e) => (await c(`mutation BraUpdateGoal($id: ID!, $input: BraUpdateGoalInput!) {
418
+ mutationFn: async (e) => (await l(`mutation BraUpdateGoal($id: ID!, $input: BraUpdateGoalInput!) {
371
419
  braUpdateGoal(id: $id, input: $input) { ${y} }
372
420
  }`, e, t)).braUpdateGoal,
373
- ...l({
421
+ ...u({
374
422
  success: "Goal updated",
375
423
  onSuccess: (e) => {
376
- n.invalidateQueries({ queryKey: u.goals }), n.invalidateQueries({ queryKey: u.goal(e.id) });
424
+ n.invalidateQueries({ queryKey: d.goals }), n.invalidateQueries({ queryKey: d.goal(e.id) });
377
425
  }
378
426
  })
379
427
  });
380
- }, G = () => {
428
+ }, K = () => {
381
429
  let { apiGatewayUrl: t } = e(), n = o();
382
430
  return i({
383
- mutationFn: async (e) => (await c("mutation BraArchiveGoal($id: ID!) { braArchiveGoal(id: $id) }", { id: e }, t)).braArchiveGoal,
384
- ...l({
431
+ mutationFn: async (e) => (await l("mutation BraArchiveGoal($id: ID!) { braArchiveGoal(id: $id) }", { id: e }, t)).braArchiveGoal,
432
+ ...u({
385
433
  success: "Goal archived",
386
- onSuccess: () => n.invalidateQueries({ queryKey: u.goals })
434
+ onSuccess: () => n.invalidateQueries({ queryKey: d.goals })
387
435
  })
388
436
  });
389
- }, K = () => {
437
+ }, q = () => {
390
438
  let { apiGatewayUrl: t } = e(), n = o();
391
439
  return i({
392
- mutationFn: async (e) => (await c(`mutation BraRecalcGoalProjection($id: ID!, $fundedAmount: Float!) {
440
+ mutationFn: async (e) => (await l(`mutation BraRecalcGoalProjection($id: ID!, $fundedAmount: Float!) {
393
441
  braRecalcGoalProjection(id: $id, fundedAmount: $fundedAmount) { ${y} }
394
442
  }`, e, t)).braRecalcGoalProjection,
395
- ...l({
443
+ ...u({
396
444
  success: "Projection recalculated",
397
445
  onSuccess: (e) => {
398
- n.invalidateQueries({ queryKey: u.goals }), n.invalidateQueries({ queryKey: u.goal(e.id) });
446
+ n.invalidateQueries({ queryKey: d.goals }), n.invalidateQueries({ queryKey: d.goal(e.id) });
399
447
  }
400
448
  })
401
449
  });
402
- }, ie = () => {
450
+ }, J = () => {
403
451
  let { apiGatewayUrl: t } = e(), n = o();
404
452
  return i({
405
- mutationFn: async (e) => (await c(`mutation BraLinkGoalFunding($input: BraLinkGoalFundingInput!) {
453
+ mutationFn: async (e) => (await l(`mutation BraLinkGoalFunding($input: BraLinkGoalFundingInput!) {
406
454
  braLinkGoalFunding(input: $input) { ${v} }
407
455
  }`, { input: e }, t)).braLinkGoalFunding,
408
- ...l({
456
+ ...u({
409
457
  success: "Funding linked",
410
458
  onSuccess: (e) => {
411
- n.invalidateQueries({ queryKey: u.goalFundings(e.goalId) }), n.invalidateQueries({ queryKey: u.goal(e.goalId) });
459
+ n.invalidateQueries({ queryKey: d.goalFundings(e.goalId) }), n.invalidateQueries({ queryKey: d.goal(e.goalId) });
412
460
  }
413
461
  })
414
462
  });
415
- }, q = () => {
463
+ }, Y = () => {
416
464
  let { apiGatewayUrl: t } = e(), n = o();
417
465
  return i({
418
- mutationFn: async (e) => (await c("mutation BraUnlinkGoalFunding($id: ID!) { braUnlinkGoalFunding(id: $id) }", { id: e }, t)).braUnlinkGoalFunding,
419
- ...l({
466
+ mutationFn: async (e) => (await l("mutation BraUnlinkGoalFunding($id: ID!) { braUnlinkGoalFunding(id: $id) }", { id: e }, t)).braUnlinkGoalFunding,
467
+ ...u({
420
468
  success: "Funding unlinked",
421
469
  onSuccess: () => {
422
- n.invalidateQueries({ queryKey: u.goals }), n.invalidateQueries({ queryKey: [...u.goals] }), n.invalidateQueries({ queryKey: ["brainyrich", "goal-fundings"] }), n.invalidateQueries({ queryKey: ["brainyrich", "goal"] });
470
+ n.invalidateQueries({ queryKey: d.goals }), n.invalidateQueries({ queryKey: [...d.goals] }), n.invalidateQueries({ queryKey: ["brainyrich", "goal-fundings"] }), n.invalidateQueries({ queryKey: ["brainyrich", "goal"] });
423
471
  }
424
472
  })
425
473
  });
426
- }, J = (t = {}) => {
474
+ }, ae = (t = {}) => {
427
475
  let { apiGatewayUrl: n } = e(), r = a({
428
- queryKey: [...u.households, t],
429
- queryFn: async () => (await s(`query BraListHouseholds($status: BraHouseholdStatus, $pagination: PaginationInput) {
476
+ queryKey: [...d.households, t],
477
+ queryFn: async () => (await c(`query BraListHouseholds($status: BraHouseholdStatus, $pagination: PaginationInput) {
430
478
  braListHouseholds(status: $status, pagination: $pagination) {
431
479
  items { ${b} }
432
480
  pageInfo { cursor hasMore }
433
481
  }
434
482
  }`, {
435
483
  status: t.status,
436
- pagination: t.pagination ?? d
484
+ pagination: t.pagination ?? f
437
485
  }, n)).braListHouseholds
438
486
  });
439
487
  return {
@@ -441,52 +489,52 @@ var u = {
441
489
  data: r.data?.items ?? [],
442
490
  pageInfo: r.data?.pageInfo
443
491
  };
444
- }, Y = (t) => {
492
+ }, oe = (t) => {
445
493
  let { apiGatewayUrl: n } = e();
446
494
  return a({
447
- queryKey: u.household(t ?? ""),
495
+ queryKey: d.household(t ?? ""),
448
496
  enabled: !!t,
449
- queryFn: async () => (await s(`query BraHousehold($id: ID!) {
497
+ queryFn: async () => (await c(`query BraHousehold($id: ID!) {
450
498
  braHousehold(id: $id) { ${b} }
451
499
  }`, { id: t }, n)).braHousehold
452
500
  });
453
- }, ae = () => {
501
+ }, se = () => {
454
502
  let { apiGatewayUrl: t } = e(), n = o();
455
503
  return i({
456
- mutationFn: async (e) => (await c(`mutation BraCreateHousehold($input: BraCreateHouseholdInput!) {
504
+ mutationFn: async (e) => (await l(`mutation BraCreateHousehold($input: BraCreateHouseholdInput!) {
457
505
  braCreateHousehold(input: $input) { ${b} }
458
506
  }`, { input: e }, t)).braCreateHousehold,
459
- ...l({
507
+ ...u({
460
508
  success: "Household created",
461
- onSuccess: () => n.invalidateQueries({ queryKey: u.households })
509
+ onSuccess: () => n.invalidateQueries({ queryKey: d.households })
462
510
  })
463
511
  });
464
- }, oe = () => {
512
+ }, ce = () => {
465
513
  let { apiGatewayUrl: t } = e(), n = o();
466
514
  return i({
467
- mutationFn: async (e) => (await c(`mutation BraUpdateHousehold($id: ID!, $input: BraUpdateHouseholdInput!) {
515
+ mutationFn: async (e) => (await l(`mutation BraUpdateHousehold($id: ID!, $input: BraUpdateHouseholdInput!) {
468
516
  braUpdateHousehold(id: $id, input: $input) { ${b} }
469
517
  }`, e, t)).braUpdateHousehold,
470
- ...l({
518
+ ...u({
471
519
  success: "Household updated",
472
520
  onSuccess: (e) => {
473
- n.invalidateQueries({ queryKey: u.households }), n.invalidateQueries({ queryKey: u.household(e.id) });
521
+ n.invalidateQueries({ queryKey: d.households }), n.invalidateQueries({ queryKey: d.household(e.id) });
474
522
  }
475
523
  })
476
524
  });
477
- }, se = () => {
525
+ }, le = () => {
478
526
  let { apiGatewayUrl: t } = e(), n = o();
479
527
  return i({
480
- mutationFn: async (e) => (await c("mutation BraArchiveHousehold($id: ID!) { braArchiveHousehold(id: $id) }", { id: e }, t)).braArchiveHousehold,
481
- ...l({
528
+ mutationFn: async (e) => (await l("mutation BraArchiveHousehold($id: ID!) { braArchiveHousehold(id: $id) }", { id: e }, t)).braArchiveHousehold,
529
+ ...u({
482
530
  success: "Household archived",
483
- onSuccess: () => n.invalidateQueries({ queryKey: u.households })
531
+ onSuccess: () => n.invalidateQueries({ queryKey: d.households })
484
532
  })
485
533
  });
486
- }, ce = (t = {}) => {
534
+ }, ue = (t = {}) => {
487
535
  let { apiGatewayUrl: n } = e(), r = a({
488
- queryKey: [...u.insights, t],
489
- queryFn: async () => (await s(`query BraListInsights($severity: BraInsightSeverity, $status: BraInsightStatus, $subjectId: ID, $subjectType: String, $pagination: PaginationInput) {
536
+ queryKey: [...d.insights, t],
537
+ queryFn: async () => (await c(`query BraListInsights($severity: BraInsightSeverity, $status: BraInsightStatus, $subjectId: ID, $subjectType: String, $pagination: PaginationInput) {
490
538
  braListInsights(severity: $severity, status: $status, subjectId: $subjectId, subjectType: $subjectType, pagination: $pagination) {
491
539
  items { ${x} }
492
540
  pageInfo { cursor hasMore }
@@ -496,7 +544,7 @@ var u = {
496
544
  status: t.status,
497
545
  subjectId: t.subjectId,
498
546
  subjectType: t.subjectType,
499
- pagination: t.pagination ?? d
547
+ pagination: t.pagination ?? f
500
548
  }, n)).braListInsights
501
549
  });
502
550
  return {
@@ -504,111 +552,144 @@ var u = {
504
552
  data: r.data?.items ?? [],
505
553
  pageInfo: r.data?.pageInfo
506
554
  };
507
- }, le = () => {
555
+ }, de = () => {
508
556
  let { apiGatewayUrl: t } = e(), n = o();
509
557
  return i({
510
- mutationFn: async (e) => (await c(`mutation BraCreateInsight($input: BraCreateInsightInput!) {
558
+ mutationFn: async (e) => (await l(`mutation BraCreateInsight($input: BraCreateInsightInput!) {
511
559
  braCreateInsight(input: $input) { ${x} }
512
560
  }`, { input: e }, t)).braCreateInsight,
513
- ...l({
561
+ ...u({
514
562
  success: "Insight created",
515
- onSuccess: () => n.invalidateQueries({ queryKey: u.insights })
563
+ onSuccess: () => n.invalidateQueries({ queryKey: d.insights })
516
564
  })
517
565
  });
518
- }, ue = () => {
566
+ }, fe = () => {
519
567
  let { apiGatewayUrl: t } = e(), n = o();
520
568
  return i({
521
- mutationFn: async (e) => (await c(`mutation BraAcknowledgeInsight($id: ID!) {
569
+ mutationFn: async (e) => (await l(`mutation BraAcknowledgeInsight($id: ID!) {
522
570
  braAcknowledgeInsight(id: $id) { ${x} }
523
571
  }`, { id: e }, t)).braAcknowledgeInsight,
524
- ...l({
572
+ ...u({
525
573
  success: "Insight acknowledged",
526
574
  onSuccess: (e) => {
527
- n.invalidateQueries({ queryKey: u.insights }), n.invalidateQueries({ queryKey: u.insight(e.id) });
575
+ n.invalidateQueries({ queryKey: d.insights }), n.invalidateQueries({ queryKey: d.insight(e.id) });
528
576
  }
529
577
  })
530
578
  });
531
- }, de = () => {
579
+ }, pe = () => {
532
580
  let { apiGatewayUrl: t } = e(), n = o();
533
581
  return i({
534
- mutationFn: async (e) => (await c(`mutation BraDismissInsight($id: ID!) {
582
+ mutationFn: async (e) => (await l(`mutation BraDismissInsight($id: ID!) {
535
583
  braDismissInsight(id: $id) { ${x} }
536
584
  }`, { id: e }, t)).braDismissInsight,
537
- ...l({
585
+ ...u({
538
586
  success: "Insight dismissed",
539
587
  onSuccess: (e) => {
540
- n.invalidateQueries({ queryKey: u.insights }), n.invalidateQueries({ queryKey: u.insight(e.id) });
588
+ n.invalidateQueries({ queryKey: d.insights }), n.invalidateQueries({ queryKey: d.insight(e.id) });
541
589
  }
542
590
  })
543
591
  });
544
- }, fe = () => {
592
+ }, me = () => {
545
593
  let { apiGatewayUrl: t } = e(), n = o();
546
594
  return i({
547
- mutationFn: async (e) => (await c(`mutation BraResolveInsight($id: ID!) {
595
+ mutationFn: async (e) => (await l(`mutation BraResolveInsight($id: ID!) {
548
596
  braResolveInsight(id: $id) { ${x} }
549
597
  }`, { id: e }, t)).braResolveInsight,
550
- ...l({
598
+ ...u({
551
599
  success: "Insight resolved",
552
600
  onSuccess: (e) => {
553
- n.invalidateQueries({ queryKey: u.insights }), n.invalidateQueries({ queryKey: u.insight(e.id) });
601
+ n.invalidateQueries({ queryKey: d.insights }), n.invalidateQueries({ queryKey: d.insight(e.id) });
554
602
  }
555
603
  })
556
604
  });
557
- }, pe = () => {
605
+ }, he = "kind insightType severity title detail metrics", ge = (t) => {
606
+ let { apiGatewayUrl: n } = e();
607
+ return a({
608
+ queryKey: d.riskSignals(t ?? ""),
609
+ enabled: !!t,
610
+ queryFn: async () => (await c(`query BraPortfolioRiskSignals($portfolioId: ID!) {
611
+ braPortfolioRiskSignals(portfolioId: $portfolioId) {
612
+ portfolioId workspaceId asOf totalValue holdingsConsidered
613
+ signals { ${he} }
614
+ }
615
+ }`, { portfolioId: t }, n)).braPortfolioRiskSignals
616
+ });
617
+ }, _e = () => {
558
618
  let { apiGatewayUrl: t } = e(), n = o();
559
619
  return i({
560
- mutationFn: async (e) => (await c(`mutation BraRecordTransaction($input: BraCreateTransactionInput!) {
561
- braRecordTransaction(input: $input) { ${p} }
620
+ mutationFn: async (e) => (await l(`mutation BraGenerateRiskInsights($portfolioId: ID!) {
621
+ braGenerateRiskInsights(portfolioId: $portfolioId) { ${x} }
622
+ }`, { portfolioId: e }, t)).braGenerateRiskInsights,
623
+ ...u({
624
+ success: (e) => `${e.length} risk insight${e.length === 1 ? "" : "s"} recorded`,
625
+ onSuccess: (e, t) => {
626
+ n.invalidateQueries({ queryKey: d.insights }), n.invalidateQueries({ queryKey: d.riskSignals(t) });
627
+ }
628
+ })
629
+ });
630
+ }, ve = (t) => {
631
+ let { apiGatewayUrl: n } = e();
632
+ return a({
633
+ queryKey: d.riskSummary(t ?? ""),
634
+ enabled: !1,
635
+ queryFn: async () => (await c("query BraPortfolioRiskSummary($portfolioId: ID!) {\n braPortfolioRiskSummary(portfolioId: $portfolioId) {\n generated summary provider reason signalsConsidered\n }\n }", { portfolioId: t }, n)).braPortfolioRiskSummary
636
+ });
637
+ }, ye = () => {
638
+ let { apiGatewayUrl: t } = e(), n = o();
639
+ return i({
640
+ mutationFn: async (e) => (await l(`mutation BraRecordTransaction($input: BraCreateTransactionInput!) {
641
+ braRecordTransaction(input: $input) { ${m} }
562
642
  }`, { input: e }, t)).braRecordTransaction,
563
- ...l({
643
+ ...u({
564
644
  success: "Transaction recorded",
565
645
  onSuccess: (e) => {
566
- n.invalidateQueries({ queryKey: u.transactions }), n.invalidateQueries({ queryKey: u.account(e.accountId) }), n.invalidateQueries({ queryKey: u.netWorth });
646
+ n.invalidateQueries({ queryKey: d.transactions }), n.invalidateQueries({ queryKey: d.account(e.accountId) }), n.invalidateQueries({ queryKey: d.netWorth });
567
647
  }
568
648
  })
569
649
  });
570
- }, me = (t = {}) => {
650
+ }, be = (t = {}) => {
571
651
  let { apiGatewayUrl: n } = e(), r = a({
572
- queryKey: [...u.rebalances, t],
573
- queryFn: async () => (await s(`query BraListRebalanceProposals($householdId: ID, $portfolioId: ID, $status: BraRebalanceStatus) {
652
+ queryKey: [...d.rebalances, t],
653
+ queryFn: async () => (await c(`query BraListRebalanceProposals($householdId: ID, $portfolioId: ID, $status: BraRebalanceStatus) {
574
654
  braListRebalanceProposals(householdId: $householdId, portfolioId: $portfolioId, status: $status) {
575
- ${S}
655
+ items { ${S} }
656
+ pageInfo { cursor hasMore }
576
657
  }
577
658
  }`, {
578
659
  householdId: t.householdId,
579
660
  portfolioId: t.portfolioId,
580
661
  status: t.status
581
- }, n)).braListRebalanceProposals
662
+ }, n)).braListRebalanceProposals.items
582
663
  });
583
664
  return {
584
665
  ...r,
585
666
  data: r.data ?? []
586
667
  };
587
- }, he = () => {
668
+ }, xe = () => {
588
669
  let { apiGatewayUrl: t } = e(), n = o();
589
670
  return i({
590
- mutationFn: async (e) => (await c(`mutation BraCreateRebalanceProposal($input: BraCreateRebalanceProposalInput!) {
671
+ mutationFn: async (e) => (await l(`mutation BraCreateRebalanceProposal($input: BraCreateRebalanceProposalInput!) {
591
672
  braCreateRebalanceProposal(input: $input) { ${S} }
592
673
  }`, { input: e }, t)).braCreateRebalanceProposal,
593
- ...l({
674
+ ...u({
594
675
  success: "Rebalance proposal created",
595
- onSuccess: () => n.invalidateQueries({ queryKey: u.rebalances })
676
+ onSuccess: () => n.invalidateQueries({ queryKey: d.rebalances })
596
677
  })
597
678
  });
598
- }, ge = () => {
679
+ }, Se = () => {
599
680
  let { apiGatewayUrl: t } = e(), n = o();
600
681
  return i({
601
- mutationFn: async (e) => (await c(`mutation BraTransitionRebalanceProposal($id: ID!, $status: BraRebalanceStatus!) {
682
+ mutationFn: async (e) => (await l(`mutation BraTransitionRebalanceProposal($id: ID!, $status: BraRebalanceStatus!) {
602
683
  braTransitionRebalanceProposal(id: $id, status: $status) { ${S} }
603
684
  }`, e, t)).braTransitionRebalanceProposal,
604
- ...l({
685
+ ...u({
605
686
  success: (e) => `Rebalance ${e.status.toLowerCase()}`,
606
- onSuccess: () => n.invalidateQueries({ queryKey: u.rebalances })
687
+ onSuccess: () => n.invalidateQueries({ queryKey: d.rebalances })
607
688
  })
608
689
  });
609
690
  };
610
691
  function X(t) {
611
- let { apiGatewayUrl: n } = e(), i = t.pageSize ?? d.limit ?? 100, a = r({
692
+ let { apiGatewayUrl: n } = e(), i = t.pageSize ?? f.limit ?? 100, a = r({
612
693
  queryKey: t.queryKey,
613
694
  enabled: t.enabled ?? !0,
614
695
  initialPageParam: null,
@@ -616,7 +697,7 @@ function X(t) {
616
697
  let r = e ? {
617
698
  limit: i,
618
699
  cursor: e
619
- } : { limit: i }, a = await s(t.query, t.buildVariables(r), n);
700
+ } : { limit: i }, a = await c(t.query, t.buildVariables(r), n);
620
701
  return t.select(a);
621
702
  },
622
703
  getNextPageParam: (e) => e.pageInfo.hasMore && e.pageInfo.cursor ? e.pageInfo.cursor : void 0
@@ -635,15 +716,15 @@ function X(t) {
635
716
  }
636
717
  };
637
718
  }
638
- var _e = (e = {}) => X({
719
+ var Z = (e = {}) => X({
639
720
  queryKey: [
640
- ...u.accounts,
721
+ ...d.accounts,
641
722
  "paged",
642
723
  e
643
724
  ],
644
725
  query: `query BraListAccounts($householdId: ID, $status: BraAccountStatus, $pagination: PaginationInput) {
645
726
  braListAccounts(householdId: $householdId, status: $status, pagination: $pagination) {
646
- items { ${m} }
727
+ items { ${h} }
647
728
  pageInfo { cursor hasMore }
648
729
  }
649
730
  }`,
@@ -653,15 +734,15 @@ var _e = (e = {}) => X({
653
734
  pagination: t
654
735
  }),
655
736
  select: (e) => e.braListAccounts
656
- }), ve = (e = {}) => X({
737
+ }), Ce = (e = {}) => X({
657
738
  queryKey: [
658
- ...u.portfolios,
739
+ ...d.portfolios,
659
740
  "paged",
660
741
  e
661
742
  ],
662
743
  query: `query BraListPortfolios($householdId: ID, $status: BraPortfolioStatus, $pagination: PaginationInput) {
663
744
  braListPortfolios(householdId: $householdId, status: $status, pagination: $pagination) {
664
- items { ${h} }
745
+ items { ${g} }
665
746
  pageInfo { cursor hasMore }
666
747
  }
667
748
  }`,
@@ -671,9 +752,9 @@ var _e = (e = {}) => X({
671
752
  pagination: t
672
753
  }),
673
754
  select: (e) => e.braListPortfolios
674
- }), Z = (e = {}) => X({
755
+ }), we = (e = {}) => X({
675
756
  queryKey: [
676
- ...u.goals,
757
+ ...d.goals,
677
758
  "paged",
678
759
  e
679
760
  ],
@@ -689,9 +770,9 @@ var _e = (e = {}) => X({
689
770
  pagination: t
690
771
  }),
691
772
  select: (e) => e.braListGoals
692
- }), ye = (e = {}) => X({
773
+ }), Te = (e = {}) => X({
693
774
  queryKey: [
694
- ...u.households,
775
+ ...d.households,
695
776
  "paged",
696
777
  e
697
778
  ],
@@ -706,9 +787,9 @@ var _e = (e = {}) => X({
706
787
  pagination: t
707
788
  }),
708
789
  select: (e) => e.braListHouseholds
709
- }), be = (e = {}) => X({
790
+ }), Ee = (e = {}) => X({
710
791
  queryKey: [
711
- ...u.insights,
792
+ ...d.insights,
712
793
  "paged",
713
794
  e
714
795
  ],
@@ -726,15 +807,15 @@ var _e = (e = {}) => X({
726
807
  pagination: t
727
808
  }),
728
809
  select: (e) => e.braListInsights
729
- }), xe = (e = {}) => X({
810
+ }), De = (e = {}) => X({
730
811
  queryKey: [
731
- ...u.transactions,
812
+ ...d.transactions,
732
813
  "paged",
733
814
  e
734
815
  ],
735
816
  query: `query BraListTransactions($accountId: ID, $type: BraTransactionType, $pagination: PaginationInput) {
736
817
  braListTransactions(accountId: $accountId, type: $type, pagination: $pagination) {
737
- items { ${p} }
818
+ items { ${m} }
738
819
  pageInfo { cursor hasMore }
739
820
  }
740
821
  }`,
@@ -757,10 +838,10 @@ async function Q(e, t = 200, n = 500) {
757
838
  }
758
839
  return r;
759
840
  }
760
- async function Se(e, t = {}, n = 200) {
761
- return Q(async (n) => (await s(`query BraListTransactions($accountId: ID, $type: BraTransactionType, $pagination: PaginationInput) {
841
+ async function Oe(e, t = {}, n = 200) {
842
+ return Q(async (n) => (await c(`query BraListTransactions($accountId: ID, $type: BraTransactionType, $pagination: PaginationInput) {
762
843
  braListTransactions(accountId: $accountId, type: $type, pagination: $pagination) {
763
- items { ${p} }
844
+ items { ${m} }
764
845
  pageInfo { cursor hasMore }
765
846
  }
766
847
  }`, {
@@ -769,14 +850,26 @@ async function Se(e, t = {}, n = 200) {
769
850
  pagination: n
770
851
  }, e)).braListTransactions, n);
771
852
  }
772
- var Ce = (t = {}) => {
853
+ async function ke(e, t = {}, n = 200) {
854
+ return Q(async (n) => (await c(`query BraListHoldings($accountId: ID, $portfolioId: ID, $pagination: PaginationInput) {
855
+ braListHoldings(accountId: $accountId, portfolioId: $portfolioId, pagination: $pagination) {
856
+ items { ${p} }
857
+ pageInfo { cursor hasMore }
858
+ }
859
+ }`, {
860
+ accountId: t.accountId,
861
+ portfolioId: t.portfolioId,
862
+ pagination: n
863
+ }, e)).braListHoldings, n);
864
+ }
865
+ var Ae = (t = {}) => {
773
866
  let { apiGatewayUrl: n } = e(), r = a({
774
867
  queryKey: [
775
- ...u.transactions,
868
+ ...d.transactions,
776
869
  "all",
777
870
  t
778
871
  ],
779
- queryFn: () => Se(n, t)
872
+ queryFn: () => Oe(n, t)
780
873
  });
781
874
  return {
782
875
  ...r,
@@ -784,9 +877,9 @@ var Ce = (t = {}) => {
784
877
  };
785
878
  };
786
879
  async function $(e, t = {}, n = 200) {
787
- return Q(async (n) => (await s(`query BraListAccounts($householdId: ID, $status: BraAccountStatus, $pagination: PaginationInput) {
880
+ return Q(async (n) => (await c(`query BraListAccounts($householdId: ID, $status: BraAccountStatus, $pagination: PaginationInput) {
788
881
  braListAccounts(householdId: $householdId, status: $status, pagination: $pagination) {
789
- items { ${m} }
882
+ items { ${h} }
790
883
  pageInfo { cursor hasMore }
791
884
  }
792
885
  }`, {
@@ -795,10 +888,10 @@ async function $(e, t = {}, n = 200) {
795
888
  pagination: n
796
889
  }, e)).braListAccounts, n);
797
890
  }
798
- var we = (t = {}) => {
891
+ var je = (t = {}) => {
799
892
  let { apiGatewayUrl: n } = e(), r = a({
800
893
  queryKey: [
801
- ...u.accounts,
894
+ ...d.accounts,
802
895
  "all",
803
896
  t
804
897
  ],
@@ -810,6 +903,6 @@ var we = (t = {}) => {
810
903
  };
811
904
  };
812
905
  //#endregion
813
- export { $ as fetchAllAccounts, w as useAccount, C as useAccounts, ue as useAcknowledgeInsight, we as useAllAccounts, Ce as useAllTransactions, D as useArchiveAccount, G as useArchiveGoal, se as useArchiveHousehold, M as useArchivePortfolio, T as useCreateAccount, U as useCreateGoal, P as useCreateHolding, ae as useCreateHousehold, le as useCreateInsight, z as useCreateModelPortfolio, A as useCreatePortfolio, he as useCreateRebalanceProposal, I as useDeleteHolding, de as useDismissInsight, V as useGoal, H as useGoalFundings, B as useGoals, N as useHoldings, Y as useHousehold, J as useHouseholds, ce as useInsights, ie as useLinkGoalFunding, R as useModelPortfolio, L as useModelPortfolios, re as useNetWorthSummary, _e as usePagedAccounts, Z as usePagedGoals, ye as usePagedHouseholds, be as usePagedInsights, ve as usePagedPortfolios, xe as usePagedTransactions, k as usePortfolio, O as usePortfolios, me as useRebalanceProposals, K as useRecalcGoalProjection, pe as useRecordTransaction, fe as useResolveInsight, ge as useTransitionRebalanceProposal, q as useUnlinkGoalFunding, E as useUpdateAccount, W as useUpdateGoal, F as useUpdateHolding, oe as useUpdateHousehold, j as useUpdatePortfolio };
906
+ export { $ as fetchAllAccounts, ke as fetchAllHoldings, C as useAccount, ie as useAccounts, fe as useAcknowledgeInsight, je as useAllAccounts, Ae as useAllTransactions, E as useArchiveAccount, K as useArchiveGoal, le as useArchiveHousehold, j as useArchivePortfolio, w as useCreateAccount, W as useCreateGoal, N as useCreateHolding, se as useCreateHousehold, de as useCreateInsight, B as useCreateModelPortfolio, k as useCreatePortfolio, xe as useCreateRebalanceProposal, F as useDeleteHolding, pe as useDismissInsight, _e as useGenerateRiskInsights, H as useGoal, U as useGoalFundings, V as useGoals, M as useHoldings, oe as useHousehold, ae as useHouseholds, ue as useInsights, J as useLinkGoalFunding, z as useModelPortfolio, R as useModelPortfolios, re as useNetWorthSummary, Z as usePagedAccounts, we as usePagedGoals, Te as usePagedHouseholds, Ee as usePagedInsights, Ce as usePagedPortfolios, De as usePagedTransactions, O as usePortfolio, ge as usePortfolioRiskSignals, ve as usePortfolioRiskSummary, D as usePortfolios, be as useRebalanceProposals, q as useRecalcGoalProjection, ye as useRecordTransaction, me as useResolveInsight, Se as useTransitionRebalanceProposal, Y as useUnlinkGoalFunding, T as useUpdateAccount, G as useUpdateGoal, P as useUpdateHolding, ce as useUpdateHousehold, A as useUpdatePortfolio };
814
907
 
815
908
  //# sourceMappingURL=useBrainyRichApi.js.map