@burdenoff/microfe-brainyrich 2026.713.1 → 2026.720.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) => [
@@ -77,26 +77,26 @@ var u = {
77
77
  transactions: ["brainyrich", "transactions"],
78
78
  rebalances: ["brainyrich", "rebalance-proposals"],
79
79
  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) => {
80
+ }, 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
81
  let { apiGatewayUrl: n } = e();
82
82
  return a({
83
- queryKey: [...u.netWorth, t ?? "me"],
84
- queryFn: async () => (await s(`query BraNetWorthSummary($ownerId: ID) {
83
+ queryKey: [...d.netWorth, t ?? "me"],
84
+ queryFn: async () => (await c(`query BraNetWorthSummary($ownerId: ID) {
85
85
  braNetWorthSummary(ownerId: $ownerId) { ${ne} }
86
86
  }`, { ownerId: t }, n)).braNetWorthSummary
87
87
  });
88
88
  }, C = (t = {}) => {
89
89
  let { apiGatewayUrl: n } = e(), r = a({
90
- queryKey: [...u.accounts, t],
91
- queryFn: async () => (await s(`query BraListAccounts($householdId: ID, $status: BraAccountStatus, $pagination: PaginationInput) {
90
+ queryKey: [...d.accounts, t],
91
+ queryFn: async () => (await c(`query BraListAccounts($householdId: ID, $status: BraAccountStatus, $pagination: PaginationInput) {
92
92
  braListAccounts(householdId: $householdId, status: $status, pagination: $pagination) {
93
- items { ${m} }
93
+ items { ${h} }
94
94
  pageInfo { cursor hasMore }
95
95
  }
96
96
  }`, {
97
97
  householdId: t.householdId,
98
98
  status: t.status,
99
- pagination: t.pagination ?? d
99
+ pagination: t.pagination ?? f
100
100
  }, n)).braListAccounts
101
101
  });
102
102
  return {
@@ -107,65 +107,74 @@ var u = {
107
107
  }, w = (t) => {
108
108
  let { apiGatewayUrl: n } = e();
109
109
  return a({
110
- queryKey: u.account(t ?? ""),
110
+ queryKey: d.account(t ?? ""),
111
111
  enabled: !!t,
112
- queryFn: async () => (await s(`query BraAccount($id: ID!) {
112
+ queryFn: async () => {
113
+ let e = await c(`query BraAccount($id: ID!) {
113
114
  braAccount(id: $id) {
114
- ${m}
115
- holdings { ${f} }
116
- transactions { ${p} }
115
+ ${h}
116
+ holdings { items { ${p} } pageInfo { cursor hasMore } }
117
+ transactions { items { ${m} } pageInfo { cursor hasMore } }
117
118
  }
118
- }`, { id: t }, n)).braAccount
119
+ }`, { id: t }, n);
120
+ if (!e.braAccount) return null;
121
+ let { holdings: r, transactions: i, ...a } = e.braAccount;
122
+ return {
123
+ ...a,
124
+ holdings: r.items,
125
+ transactions: i.items
126
+ };
127
+ }
119
128
  });
120
129
  }, T = () => {
121
130
  let { apiGatewayUrl: t } = e(), n = o();
122
131
  return i({
123
- mutationFn: async (e) => (await c(`mutation BraCreateAccount($input: BraCreateAccountInput!) {
124
- braCreateAccount(input: $input) { ${m} }
132
+ mutationFn: async (e) => (await l(`mutation BraCreateAccount($input: BraCreateAccountInput!) {
133
+ braCreateAccount(input: $input) { ${h} }
125
134
  }`, { input: e }, t)).braCreateAccount,
126
- ...l({
135
+ ...u({
127
136
  success: "Account created",
128
137
  onSuccess: () => {
129
- n.invalidateQueries({ queryKey: u.accounts }), n.invalidateQueries({ queryKey: u.netWorth });
138
+ n.invalidateQueries({ queryKey: d.accounts }), n.invalidateQueries({ queryKey: d.netWorth });
130
139
  }
131
140
  })
132
141
  });
133
142
  }, E = () => {
134
143
  let { apiGatewayUrl: t } = e(), n = o();
135
144
  return i({
136
- mutationFn: async (e) => (await c(`mutation BraUpdateAccount($id: ID!, $input: BraUpdateAccountInput!) {
137
- braUpdateAccount(id: $id, input: $input) { ${m} }
145
+ mutationFn: async (e) => (await l(`mutation BraUpdateAccount($id: ID!, $input: BraUpdateAccountInput!) {
146
+ braUpdateAccount(id: $id, input: $input) { ${h} }
138
147
  }`, e, t)).braUpdateAccount,
139
- ...l({
148
+ ...u({
140
149
  success: "Account updated",
141
150
  onSuccess: (e) => {
142
- n.invalidateQueries({ queryKey: u.accounts }), n.invalidateQueries({ queryKey: u.account(e.id) }), n.invalidateQueries({ queryKey: u.netWorth });
151
+ n.invalidateQueries({ queryKey: d.accounts }), n.invalidateQueries({ queryKey: d.account(e.id) }), n.invalidateQueries({ queryKey: d.netWorth });
143
152
  }
144
153
  })
145
154
  });
146
155
  }, D = () => {
147
156
  let { apiGatewayUrl: t } = e(), n = o();
148
157
  return i({
149
- mutationFn: async (e) => (await c("mutation BraArchiveAccount($id: ID!) { braArchiveAccount(id: $id) }", { id: e }, t)).braArchiveAccount,
150
- ...l({
158
+ mutationFn: async (e) => (await l("mutation BraArchiveAccount($id: ID!) { braArchiveAccount(id: $id) }", { id: e }, t)).braArchiveAccount,
159
+ ...u({
151
160
  success: "Account archived",
152
161
  onSuccess: () => {
153
- n.invalidateQueries({ queryKey: u.accounts }), n.invalidateQueries({ queryKey: u.netWorth });
162
+ n.invalidateQueries({ queryKey: d.accounts }), n.invalidateQueries({ queryKey: d.netWorth });
154
163
  }
155
164
  })
156
165
  });
157
166
  }, O = (t = {}) => {
158
167
  let { apiGatewayUrl: n } = e(), r = a({
159
- queryKey: [...u.portfolios, t],
160
- queryFn: async () => (await s(`query BraListPortfolios($householdId: ID, $status: BraPortfolioStatus, $pagination: PaginationInput) {
168
+ queryKey: [...d.portfolios, t],
169
+ queryFn: async () => (await c(`query BraListPortfolios($householdId: ID, $status: BraPortfolioStatus, $pagination: PaginationInput) {
161
170
  braListPortfolios(householdId: $householdId, status: $status, pagination: $pagination) {
162
- items { ${h} }
171
+ items { ${g} }
163
172
  pageInfo { cursor hasMore }
164
173
  }
165
174
  }`, {
166
175
  householdId: t.householdId,
167
176
  status: t.status,
168
- pagination: t.pagination ?? d
177
+ pagination: t.pagination ?? f
169
178
  }, n)).braListPortfolios
170
179
  });
171
180
  return {
@@ -176,58 +185,69 @@ var u = {
176
185
  }, k = (t) => {
177
186
  let { apiGatewayUrl: n } = e();
178
187
  return a({
179
- queryKey: u.portfolio(t ?? ""),
188
+ queryKey: d.portfolio(t ?? ""),
180
189
  enabled: !!t,
181
- queryFn: async () => (await s(`query BraPortfolio($id: ID!) {
190
+ queryFn: async () => {
191
+ let e = await c(`query BraPortfolio($id: ID!) {
182
192
  braPortfolio(id: $id) {
183
- ${h}
184
- holdings { ${f} }
193
+ ${g}
194
+ holdings { items { ${p} } pageInfo { cursor hasMore } }
185
195
  }
186
- }`, { id: t }, n)).braPortfolio
196
+ }`, { id: t }, n);
197
+ if (!e.braPortfolio) return null;
198
+ let { holdings: r, ...i } = e.braPortfolio;
199
+ return {
200
+ ...i,
201
+ holdings: r.items
202
+ };
203
+ }
187
204
  });
188
205
  }, A = () => {
189
206
  let { apiGatewayUrl: t } = e(), n = o();
190
207
  return i({
191
- mutationFn: async (e) => (await c(`mutation BraCreatePortfolio($input: BraCreatePortfolioInput!) {
192
- braCreatePortfolio(input: $input) { ${h} }
208
+ mutationFn: async (e) => (await l(`mutation BraCreatePortfolio($input: BraCreatePortfolioInput!) {
209
+ braCreatePortfolio(input: $input) { ${g} }
193
210
  }`, { input: e }, t)).braCreatePortfolio,
194
- ...l({
211
+ ...u({
195
212
  success: "Portfolio created",
196
- onSuccess: () => n.invalidateQueries({ queryKey: u.portfolios })
213
+ onSuccess: () => n.invalidateQueries({ queryKey: d.portfolios })
197
214
  })
198
215
  });
199
216
  }, j = () => {
200
217
  let { apiGatewayUrl: t } = e(), n = o();
201
218
  return i({
202
- mutationFn: async (e) => (await c(`mutation BraUpdatePortfolio($id: ID!, $input: BraUpdatePortfolioInput!) {
203
- braUpdatePortfolio(id: $id, input: $input) { ${h} }
219
+ mutationFn: async (e) => (await l(`mutation BraUpdatePortfolio($id: ID!, $input: BraUpdatePortfolioInput!) {
220
+ braUpdatePortfolio(id: $id, input: $input) { ${g} }
204
221
  }`, e, t)).braUpdatePortfolio,
205
- ...l({
222
+ ...u({
206
223
  success: "Portfolio updated",
207
224
  onSuccess: (e) => {
208
- n.invalidateQueries({ queryKey: u.portfolios }), n.invalidateQueries({ queryKey: u.portfolio(e.id) });
225
+ n.invalidateQueries({ queryKey: d.portfolios }), n.invalidateQueries({ queryKey: d.portfolio(e.id) });
209
226
  }
210
227
  })
211
228
  });
212
229
  }, M = () => {
213
230
  let { apiGatewayUrl: t } = e(), n = o();
214
231
  return i({
215
- mutationFn: async (e) => (await c("mutation BraArchivePortfolio($id: ID!) { braArchivePortfolio(id: $id) }", { id: e }, t)).braArchivePortfolio,
216
- ...l({
232
+ mutationFn: async (e) => (await l("mutation BraArchivePortfolio($id: ID!) { braArchivePortfolio(id: $id) }", { id: e }, t)).braArchivePortfolio,
233
+ ...u({
217
234
  success: "Portfolio archived",
218
- onSuccess: () => n.invalidateQueries({ queryKey: u.portfolios })
235
+ onSuccess: () => n.invalidateQueries({ queryKey: d.portfolios })
219
236
  })
220
237
  });
221
238
  }, N = (t) => {
222
239
  let { apiGatewayUrl: n } = e(), r = a({
223
- queryKey: [...u.holdings, t],
240
+ queryKey: [...d.holdings, t],
224
241
  enabled: !!(t.accountId || t.portfolioId),
225
- queryFn: async () => (await s(`query BraListHoldings($accountId: ID, $portfolioId: ID) {
226
- braListHoldings(accountId: $accountId, portfolioId: $portfolioId) { ${f} }
242
+ queryFn: async () => (await c(`query BraListHoldings($accountId: ID, $portfolioId: ID) {
243
+ braListHoldings(accountId: $accountId, portfolioId: $portfolioId) {
244
+ items { ${p} }
245
+ pageInfo { cursor hasMore }
246
+ }
227
247
  }`, {
228
248
  accountId: t.accountId,
229
249
  portfolioId: t.portfolioId
230
- }, n)).braListHoldings
250
+ }, n)).braListHoldings.items
231
251
  });
232
252
  return {
233
253
  ...r,
@@ -236,84 +256,91 @@ var u = {
236
256
  }, P = () => {
237
257
  let { apiGatewayUrl: t } = e(), n = o();
238
258
  return i({
239
- mutationFn: async (e) => (await c(`mutation BraCreateHolding($input: BraCreateHoldingInput!) {
240
- braCreateHolding(input: $input) { ${f} }
259
+ mutationFn: async (e) => (await l(`mutation BraCreateHolding($input: BraCreateHoldingInput!) {
260
+ braCreateHolding(input: $input) { ${p} }
241
261
  }`, { input: e }, t)).braCreateHolding,
242
- ...l({
262
+ ...u({
243
263
  success: "Holding added",
244
264
  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 });
265
+ 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
266
  }
247
267
  })
248
268
  });
249
269
  }, F = () => {
250
270
  let { apiGatewayUrl: t } = e(), n = o();
251
271
  return i({
252
- mutationFn: async (e) => (await c(`mutation BraUpdateHolding($id: ID!, $input: BraUpdateHoldingInput!) {
253
- braUpdateHolding(id: $id, input: $input) { ${f} }
272
+ mutationFn: async (e) => (await l(`mutation BraUpdateHolding($id: ID!, $input: BraUpdateHoldingInput!) {
273
+ braUpdateHolding(id: $id, input: $input) { ${p} }
254
274
  }`, e, t)).braUpdateHolding,
255
- ...l({
275
+ ...u({
256
276
  success: "Holding updated",
257
277
  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 });
278
+ 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
279
  }
260
280
  })
261
281
  });
262
282
  }, I = () => {
263
283
  let { apiGatewayUrl: t } = e(), n = o();
264
284
  return i({
265
- mutationFn: async (e) => (await c("mutation BraDeleteHolding($id: ID!) { braDeleteHolding(id: $id) }", { id: e }, t)).braDeleteHolding,
266
- ...l({
285
+ mutationFn: async (e) => (await l("mutation BraDeleteHolding($id: ID!) { braDeleteHolding(id: $id) }", { id: e }, t)).braDeleteHolding,
286
+ ...u({
267
287
  success: "Holding removed",
268
288
  onSuccess: () => {
269
- n.invalidateQueries({ queryKey: u.holdings }), n.invalidateQueries({ queryKey: u.accounts }), n.invalidateQueries({ queryKey: u.portfolios }), n.invalidateQueries({ queryKey: u.netWorth });
289
+ n.invalidateQueries({ queryKey: d.holdings }), n.invalidateQueries({ queryKey: d.accounts }), n.invalidateQueries({ queryKey: d.portfolios }), n.invalidateQueries({ queryKey: d.netWorth });
270
290
  }
271
291
  })
272
292
  });
273
- }, L = () => {
293
+ }, L = `
294
+ ${te}
295
+ allocations { items { ${_} } pageInfo { cursor hasMore } }
296
+ `, R = (e) => ({
297
+ ...e,
298
+ allocations: e.allocations.items
299
+ }), z = () => {
274
300
  let { apiGatewayUrl: t } = e(), n = a({
275
- queryKey: u.modelPortfolios,
276
- queryFn: async () => (await s(`query BraListModelPortfolios {
301
+ queryKey: d.modelPortfolios,
302
+ queryFn: async () => (await c(`query BraListModelPortfolios {
277
303
  braListModelPortfolios {
278
- ${_}
279
- allocations { ${g} }
304
+ items { ${L} }
305
+ pageInfo { cursor hasMore }
280
306
  }
281
- }`, {}, t)).braListModelPortfolios
307
+ }`, {}, t)).braListModelPortfolios.items.map(R)
282
308
  });
283
309
  return {
284
310
  ...n,
285
311
  data: n.data ?? []
286
312
  };
287
- }, R = (t) => {
313
+ }, B = (t) => {
288
314
  let { apiGatewayUrl: n } = e();
289
315
  return a({
290
- queryKey: u.modelPortfolio(t ?? ""),
316
+ queryKey: d.modelPortfolio(t ?? ""),
291
317
  enabled: !!t,
292
- queryFn: async () => (await s(`query BraModelPortfolio($id: ID!) {
318
+ queryFn: async () => {
319
+ let e = await c(`query BraModelPortfolio($id: ID!) {
293
320
  braModelPortfolio(id: $id) {
294
- ${_}
295
- allocations { ${g} }
321
+ ${L}
296
322
  }
297
- }`, { id: t }, n)).braModelPortfolio
323
+ }`, { id: t }, n);
324
+ return e.braModelPortfolio ? R(e.braModelPortfolio) : null;
325
+ }
298
326
  });
299
- }, z = () => {
327
+ }, V = () => {
300
328
  let { apiGatewayUrl: t } = e(), n = o();
301
329
  return i({
302
- mutationFn: async (e) => (await c(`mutation BraCreateModelPortfolio($input: BraCreateModelPortfolioInput!) {
330
+ mutationFn: async (e) => R((await l(`mutation BraCreateModelPortfolio($input: BraCreateModelPortfolioInput!) {
303
331
  braCreateModelPortfolio(input: $input) {
304
- ${_}
305
- allocations { ${g} }
332
+ ${L}
306
333
  }
307
- }`, { input: e }, t)).braCreateModelPortfolio,
308
- ...l({
334
+ }`, { input: e }, t)).braCreateModelPortfolio),
335
+ ...u({
309
336
  success: "Model portfolio created",
310
- onSuccess: () => n.invalidateQueries({ queryKey: u.modelPortfolios })
337
+ onSuccess: () => n.invalidateQueries({ queryKey: d.modelPortfolios })
311
338
  })
312
339
  });
313
- }, B = (t = {}) => {
340
+ }, H = (t = {}) => {
314
341
  let { apiGatewayUrl: n } = e(), r = a({
315
- queryKey: [...u.goals, t],
316
- queryFn: async () => (await s(`query BraListGoals($householdId: ID, $status: BraGoalStatus, $pagination: PaginationInput) {
342
+ queryKey: [...d.goals, t],
343
+ queryFn: async () => (await c(`query BraListGoals($householdId: ID, $status: BraGoalStatus, $pagination: PaginationInput) {
317
344
  braListGoals(householdId: $householdId, status: $status, pagination: $pagination) {
318
345
  items { ${y} }
319
346
  pageInfo { cursor hasMore }
@@ -321,7 +348,7 @@ var u = {
321
348
  }`, {
322
349
  householdId: t.householdId,
323
350
  status: t.status,
324
- pagination: t.pagination ?? d
351
+ pagination: t.pagination ?? f
325
352
  }, n)).braListGoals
326
353
  });
327
354
  return {
@@ -329,111 +356,122 @@ var u = {
329
356
  data: r.data?.items ?? [],
330
357
  pageInfo: r.data?.pageInfo
331
358
  };
332
- }, V = (t) => {
359
+ }, U = (t) => {
333
360
  let { apiGatewayUrl: n } = e();
334
361
  return a({
335
- queryKey: u.goal(t ?? ""),
362
+ queryKey: d.goal(t ?? ""),
336
363
  enabled: !!t,
337
- queryFn: async () => (await s(`query BraGoal($id: ID!) {
364
+ queryFn: async () => {
365
+ let e = await c(`query BraGoal($id: ID!) {
338
366
  braGoal(id: $id) {
339
367
  ${y}
340
- fundings { ${v} }
368
+ fundings { items { ${v} } pageInfo { cursor hasMore } }
341
369
  }
342
- }`, { id: t }, n)).braGoal
370
+ }`, { id: t }, n);
371
+ if (!e.braGoal) return null;
372
+ let { fundings: r, ...i } = e.braGoal;
373
+ return {
374
+ ...i,
375
+ fundings: r.items
376
+ };
377
+ }
343
378
  });
344
- }, H = (t) => {
379
+ }, W = (t) => {
345
380
  let { apiGatewayUrl: n } = e(), r = a({
346
- queryKey: u.goalFundings(t ?? ""),
381
+ queryKey: d.goalFundings(t ?? ""),
347
382
  enabled: !!t,
348
- queryFn: async () => (await s(`query BraListGoalFundings($goalId: ID!) {
349
- braListGoalFundings(goalId: $goalId) { ${v} }
350
- }`, { goalId: t }, n)).braListGoalFundings
383
+ queryFn: async () => (await c(`query BraListGoalFundings($goalId: ID!) {
384
+ braListGoalFundings(goalId: $goalId) {
385
+ items { ${v} }
386
+ pageInfo { cursor hasMore }
387
+ }
388
+ }`, { goalId: t }, n)).braListGoalFundings.items
351
389
  });
352
390
  return {
353
391
  ...r,
354
392
  data: r.data ?? []
355
393
  };
356
- }, U = () => {
394
+ }, G = () => {
357
395
  let { apiGatewayUrl: t } = e(), n = o();
358
396
  return i({
359
- mutationFn: async (e) => (await c(`mutation BraCreateGoal($input: BraCreateGoalInput!) {
397
+ mutationFn: async (e) => (await l(`mutation BraCreateGoal($input: BraCreateGoalInput!) {
360
398
  braCreateGoal(input: $input) { ${y} }
361
399
  }`, { input: e }, t)).braCreateGoal,
362
- ...l({
400
+ ...u({
363
401
  success: "Goal created",
364
- onSuccess: () => n.invalidateQueries({ queryKey: u.goals })
402
+ onSuccess: () => n.invalidateQueries({ queryKey: d.goals })
365
403
  })
366
404
  });
367
- }, W = () => {
405
+ }, K = () => {
368
406
  let { apiGatewayUrl: t } = e(), n = o();
369
407
  return i({
370
- mutationFn: async (e) => (await c(`mutation BraUpdateGoal($id: ID!, $input: BraUpdateGoalInput!) {
408
+ mutationFn: async (e) => (await l(`mutation BraUpdateGoal($id: ID!, $input: BraUpdateGoalInput!) {
371
409
  braUpdateGoal(id: $id, input: $input) { ${y} }
372
410
  }`, e, t)).braUpdateGoal,
373
- ...l({
411
+ ...u({
374
412
  success: "Goal updated",
375
413
  onSuccess: (e) => {
376
- n.invalidateQueries({ queryKey: u.goals }), n.invalidateQueries({ queryKey: u.goal(e.id) });
414
+ n.invalidateQueries({ queryKey: d.goals }), n.invalidateQueries({ queryKey: d.goal(e.id) });
377
415
  }
378
416
  })
379
417
  });
380
- }, G = () => {
418
+ }, ie = () => {
381
419
  let { apiGatewayUrl: t } = e(), n = o();
382
420
  return i({
383
- mutationFn: async (e) => (await c("mutation BraArchiveGoal($id: ID!) { braArchiveGoal(id: $id) }", { id: e }, t)).braArchiveGoal,
384
- ...l({
421
+ mutationFn: async (e) => (await l("mutation BraArchiveGoal($id: ID!) { braArchiveGoal(id: $id) }", { id: e }, t)).braArchiveGoal,
422
+ ...u({
385
423
  success: "Goal archived",
386
- onSuccess: () => n.invalidateQueries({ queryKey: u.goals })
424
+ onSuccess: () => n.invalidateQueries({ queryKey: d.goals })
387
425
  })
388
426
  });
389
- }, K = () => {
427
+ }, q = () => {
390
428
  let { apiGatewayUrl: t } = e(), n = o();
391
429
  return i({
392
- mutationFn: async (e) => (await c(`mutation BraRecalcGoalProjection($id: ID!, $fundedAmount: Float!) {
430
+ mutationFn: async (e) => (await l(`mutation BraRecalcGoalProjection($id: ID!, $fundedAmount: Float!) {
393
431
  braRecalcGoalProjection(id: $id, fundedAmount: $fundedAmount) { ${y} }
394
432
  }`, e, t)).braRecalcGoalProjection,
395
- ...l({
433
+ ...u({
396
434
  success: "Projection recalculated",
397
435
  onSuccess: (e) => {
398
- n.invalidateQueries({ queryKey: u.goals }), n.invalidateQueries({ queryKey: u.goal(e.id) });
436
+ n.invalidateQueries({ queryKey: d.goals }), n.invalidateQueries({ queryKey: d.goal(e.id) });
399
437
  }
400
438
  })
401
439
  });
402
- }, ie = () => {
440
+ }, J = () => {
403
441
  let { apiGatewayUrl: t } = e(), n = o();
404
442
  return i({
405
- mutationFn: async (e) => (await c(`mutation BraLinkGoalFunding($input: BraLinkGoalFundingInput!) {
443
+ mutationFn: async (e) => (await l(`mutation BraLinkGoalFunding($input: BraLinkGoalFundingInput!) {
406
444
  braLinkGoalFunding(input: $input) { ${v} }
407
445
  }`, { input: e }, t)).braLinkGoalFunding,
408
- ...l({
446
+ ...u({
409
447
  success: "Funding linked",
410
448
  onSuccess: (e) => {
411
- n.invalidateQueries({ queryKey: u.goalFundings(e.goalId) }), n.invalidateQueries({ queryKey: u.goal(e.goalId) });
449
+ n.invalidateQueries({ queryKey: d.goalFundings(e.goalId) }), n.invalidateQueries({ queryKey: d.goal(e.goalId) });
412
450
  }
413
451
  })
414
452
  });
415
- }, q = () => {
453
+ }, Y = () => {
416
454
  let { apiGatewayUrl: t } = e(), n = o();
417
455
  return i({
418
- mutationFn: async (e) => (await c("mutation BraUnlinkGoalFunding($id: ID!) { braUnlinkGoalFunding(id: $id) }", { id: e }, t)).braUnlinkGoalFunding,
419
- ...l({
456
+ mutationFn: async (e) => (await l("mutation BraUnlinkGoalFunding($id: ID!) { braUnlinkGoalFunding(id: $id) }", { id: e }, t)).braUnlinkGoalFunding,
457
+ ...u({
420
458
  success: "Funding unlinked",
421
459
  onSuccess: () => {
422
- n.invalidateQueries({ queryKey: u.goals }), n.invalidateQueries({ queryKey: [...u.goals] }), n.invalidateQueries({ queryKey: ["brainyrich", "goal-fundings"] }), n.invalidateQueries({ queryKey: ["brainyrich", "goal"] });
460
+ n.invalidateQueries({ queryKey: d.goals }), n.invalidateQueries({ queryKey: [...d.goals] }), n.invalidateQueries({ queryKey: ["brainyrich", "goal-fundings"] }), n.invalidateQueries({ queryKey: ["brainyrich", "goal"] });
423
461
  }
424
462
  })
425
463
  });
426
- }, J = (t = {}) => {
464
+ }, ae = (t = {}) => {
427
465
  let { apiGatewayUrl: n } = e(), r = a({
428
- queryKey: [...u.households, t],
429
- queryFn: async () => (await s(`query BraListHouseholds($status: BraHouseholdStatus, $pagination: PaginationInput) {
466
+ queryKey: [...d.households, t],
467
+ queryFn: async () => (await c(`query BraListHouseholds($status: BraHouseholdStatus, $pagination: PaginationInput) {
430
468
  braListHouseholds(status: $status, pagination: $pagination) {
431
469
  items { ${b} }
432
470
  pageInfo { cursor hasMore }
433
471
  }
434
472
  }`, {
435
473
  status: t.status,
436
- pagination: t.pagination ?? d
474
+ pagination: t.pagination ?? f
437
475
  }, n)).braListHouseholds
438
476
  });
439
477
  return {
@@ -441,52 +479,52 @@ var u = {
441
479
  data: r.data?.items ?? [],
442
480
  pageInfo: r.data?.pageInfo
443
481
  };
444
- }, Y = (t) => {
482
+ }, oe = (t) => {
445
483
  let { apiGatewayUrl: n } = e();
446
484
  return a({
447
- queryKey: u.household(t ?? ""),
485
+ queryKey: d.household(t ?? ""),
448
486
  enabled: !!t,
449
- queryFn: async () => (await s(`query BraHousehold($id: ID!) {
487
+ queryFn: async () => (await c(`query BraHousehold($id: ID!) {
450
488
  braHousehold(id: $id) { ${b} }
451
489
  }`, { id: t }, n)).braHousehold
452
490
  });
453
- }, ae = () => {
491
+ }, se = () => {
454
492
  let { apiGatewayUrl: t } = e(), n = o();
455
493
  return i({
456
- mutationFn: async (e) => (await c(`mutation BraCreateHousehold($input: BraCreateHouseholdInput!) {
494
+ mutationFn: async (e) => (await l(`mutation BraCreateHousehold($input: BraCreateHouseholdInput!) {
457
495
  braCreateHousehold(input: $input) { ${b} }
458
496
  }`, { input: e }, t)).braCreateHousehold,
459
- ...l({
497
+ ...u({
460
498
  success: "Household created",
461
- onSuccess: () => n.invalidateQueries({ queryKey: u.households })
499
+ onSuccess: () => n.invalidateQueries({ queryKey: d.households })
462
500
  })
463
501
  });
464
- }, oe = () => {
502
+ }, ce = () => {
465
503
  let { apiGatewayUrl: t } = e(), n = o();
466
504
  return i({
467
- mutationFn: async (e) => (await c(`mutation BraUpdateHousehold($id: ID!, $input: BraUpdateHouseholdInput!) {
505
+ mutationFn: async (e) => (await l(`mutation BraUpdateHousehold($id: ID!, $input: BraUpdateHouseholdInput!) {
468
506
  braUpdateHousehold(id: $id, input: $input) { ${b} }
469
507
  }`, e, t)).braUpdateHousehold,
470
- ...l({
508
+ ...u({
471
509
  success: "Household updated",
472
510
  onSuccess: (e) => {
473
- n.invalidateQueries({ queryKey: u.households }), n.invalidateQueries({ queryKey: u.household(e.id) });
511
+ n.invalidateQueries({ queryKey: d.households }), n.invalidateQueries({ queryKey: d.household(e.id) });
474
512
  }
475
513
  })
476
514
  });
477
- }, se = () => {
515
+ }, le = () => {
478
516
  let { apiGatewayUrl: t } = e(), n = o();
479
517
  return i({
480
- mutationFn: async (e) => (await c("mutation BraArchiveHousehold($id: ID!) { braArchiveHousehold(id: $id) }", { id: e }, t)).braArchiveHousehold,
481
- ...l({
518
+ mutationFn: async (e) => (await l("mutation BraArchiveHousehold($id: ID!) { braArchiveHousehold(id: $id) }", { id: e }, t)).braArchiveHousehold,
519
+ ...u({
482
520
  success: "Household archived",
483
- onSuccess: () => n.invalidateQueries({ queryKey: u.households })
521
+ onSuccess: () => n.invalidateQueries({ queryKey: d.households })
484
522
  })
485
523
  });
486
- }, ce = (t = {}) => {
524
+ }, ue = (t = {}) => {
487
525
  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) {
526
+ queryKey: [...d.insights, t],
527
+ queryFn: async () => (await c(`query BraListInsights($severity: BraInsightSeverity, $status: BraInsightStatus, $subjectId: ID, $subjectType: String, $pagination: PaginationInput) {
490
528
  braListInsights(severity: $severity, status: $status, subjectId: $subjectId, subjectType: $subjectType, pagination: $pagination) {
491
529
  items { ${x} }
492
530
  pageInfo { cursor hasMore }
@@ -496,7 +534,7 @@ var u = {
496
534
  status: t.status,
497
535
  subjectId: t.subjectId,
498
536
  subjectType: t.subjectType,
499
- pagination: t.pagination ?? d
537
+ pagination: t.pagination ?? f
500
538
  }, n)).braListInsights
501
539
  });
502
540
  return {
@@ -504,111 +542,112 @@ var u = {
504
542
  data: r.data?.items ?? [],
505
543
  pageInfo: r.data?.pageInfo
506
544
  };
507
- }, le = () => {
545
+ }, de = () => {
508
546
  let { apiGatewayUrl: t } = e(), n = o();
509
547
  return i({
510
- mutationFn: async (e) => (await c(`mutation BraCreateInsight($input: BraCreateInsightInput!) {
548
+ mutationFn: async (e) => (await l(`mutation BraCreateInsight($input: BraCreateInsightInput!) {
511
549
  braCreateInsight(input: $input) { ${x} }
512
550
  }`, { input: e }, t)).braCreateInsight,
513
- ...l({
551
+ ...u({
514
552
  success: "Insight created",
515
- onSuccess: () => n.invalidateQueries({ queryKey: u.insights })
553
+ onSuccess: () => n.invalidateQueries({ queryKey: d.insights })
516
554
  })
517
555
  });
518
- }, ue = () => {
556
+ }, fe = () => {
519
557
  let { apiGatewayUrl: t } = e(), n = o();
520
558
  return i({
521
- mutationFn: async (e) => (await c(`mutation BraAcknowledgeInsight($id: ID!) {
559
+ mutationFn: async (e) => (await l(`mutation BraAcknowledgeInsight($id: ID!) {
522
560
  braAcknowledgeInsight(id: $id) { ${x} }
523
561
  }`, { id: e }, t)).braAcknowledgeInsight,
524
- ...l({
562
+ ...u({
525
563
  success: "Insight acknowledged",
526
564
  onSuccess: (e) => {
527
- n.invalidateQueries({ queryKey: u.insights }), n.invalidateQueries({ queryKey: u.insight(e.id) });
565
+ n.invalidateQueries({ queryKey: d.insights }), n.invalidateQueries({ queryKey: d.insight(e.id) });
528
566
  }
529
567
  })
530
568
  });
531
- }, de = () => {
569
+ }, pe = () => {
532
570
  let { apiGatewayUrl: t } = e(), n = o();
533
571
  return i({
534
- mutationFn: async (e) => (await c(`mutation BraDismissInsight($id: ID!) {
572
+ mutationFn: async (e) => (await l(`mutation BraDismissInsight($id: ID!) {
535
573
  braDismissInsight(id: $id) { ${x} }
536
574
  }`, { id: e }, t)).braDismissInsight,
537
- ...l({
575
+ ...u({
538
576
  success: "Insight dismissed",
539
577
  onSuccess: (e) => {
540
- n.invalidateQueries({ queryKey: u.insights }), n.invalidateQueries({ queryKey: u.insight(e.id) });
578
+ n.invalidateQueries({ queryKey: d.insights }), n.invalidateQueries({ queryKey: d.insight(e.id) });
541
579
  }
542
580
  })
543
581
  });
544
- }, fe = () => {
582
+ }, me = () => {
545
583
  let { apiGatewayUrl: t } = e(), n = o();
546
584
  return i({
547
- mutationFn: async (e) => (await c(`mutation BraResolveInsight($id: ID!) {
585
+ mutationFn: async (e) => (await l(`mutation BraResolveInsight($id: ID!) {
548
586
  braResolveInsight(id: $id) { ${x} }
549
587
  }`, { id: e }, t)).braResolveInsight,
550
- ...l({
588
+ ...u({
551
589
  success: "Insight resolved",
552
590
  onSuccess: (e) => {
553
- n.invalidateQueries({ queryKey: u.insights }), n.invalidateQueries({ queryKey: u.insight(e.id) });
591
+ n.invalidateQueries({ queryKey: d.insights }), n.invalidateQueries({ queryKey: d.insight(e.id) });
554
592
  }
555
593
  })
556
594
  });
557
- }, pe = () => {
595
+ }, he = () => {
558
596
  let { apiGatewayUrl: t } = e(), n = o();
559
597
  return i({
560
- mutationFn: async (e) => (await c(`mutation BraRecordTransaction($input: BraCreateTransactionInput!) {
561
- braRecordTransaction(input: $input) { ${p} }
598
+ mutationFn: async (e) => (await l(`mutation BraRecordTransaction($input: BraCreateTransactionInput!) {
599
+ braRecordTransaction(input: $input) { ${m} }
562
600
  }`, { input: e }, t)).braRecordTransaction,
563
- ...l({
601
+ ...u({
564
602
  success: "Transaction recorded",
565
603
  onSuccess: (e) => {
566
- n.invalidateQueries({ queryKey: u.transactions }), n.invalidateQueries({ queryKey: u.account(e.accountId) }), n.invalidateQueries({ queryKey: u.netWorth });
604
+ n.invalidateQueries({ queryKey: d.transactions }), n.invalidateQueries({ queryKey: d.account(e.accountId) }), n.invalidateQueries({ queryKey: d.netWorth });
567
605
  }
568
606
  })
569
607
  });
570
- }, me = (t = {}) => {
608
+ }, ge = (t = {}) => {
571
609
  let { apiGatewayUrl: n } = e(), r = a({
572
- queryKey: [...u.rebalances, t],
573
- queryFn: async () => (await s(`query BraListRebalanceProposals($householdId: ID, $portfolioId: ID, $status: BraRebalanceStatus) {
610
+ queryKey: [...d.rebalances, t],
611
+ queryFn: async () => (await c(`query BraListRebalanceProposals($householdId: ID, $portfolioId: ID, $status: BraRebalanceStatus) {
574
612
  braListRebalanceProposals(householdId: $householdId, portfolioId: $portfolioId, status: $status) {
575
- ${S}
613
+ items { ${S} }
614
+ pageInfo { cursor hasMore }
576
615
  }
577
616
  }`, {
578
617
  householdId: t.householdId,
579
618
  portfolioId: t.portfolioId,
580
619
  status: t.status
581
- }, n)).braListRebalanceProposals
620
+ }, n)).braListRebalanceProposals.items
582
621
  });
583
622
  return {
584
623
  ...r,
585
624
  data: r.data ?? []
586
625
  };
587
- }, he = () => {
626
+ }, _e = () => {
588
627
  let { apiGatewayUrl: t } = e(), n = o();
589
628
  return i({
590
- mutationFn: async (e) => (await c(`mutation BraCreateRebalanceProposal($input: BraCreateRebalanceProposalInput!) {
629
+ mutationFn: async (e) => (await l(`mutation BraCreateRebalanceProposal($input: BraCreateRebalanceProposalInput!) {
591
630
  braCreateRebalanceProposal(input: $input) { ${S} }
592
631
  }`, { input: e }, t)).braCreateRebalanceProposal,
593
- ...l({
632
+ ...u({
594
633
  success: "Rebalance proposal created",
595
- onSuccess: () => n.invalidateQueries({ queryKey: u.rebalances })
634
+ onSuccess: () => n.invalidateQueries({ queryKey: d.rebalances })
596
635
  })
597
636
  });
598
- }, ge = () => {
637
+ }, ve = () => {
599
638
  let { apiGatewayUrl: t } = e(), n = o();
600
639
  return i({
601
- mutationFn: async (e) => (await c(`mutation BraTransitionRebalanceProposal($id: ID!, $status: BraRebalanceStatus!) {
640
+ mutationFn: async (e) => (await l(`mutation BraTransitionRebalanceProposal($id: ID!, $status: BraRebalanceStatus!) {
602
641
  braTransitionRebalanceProposal(id: $id, status: $status) { ${S} }
603
642
  }`, e, t)).braTransitionRebalanceProposal,
604
- ...l({
643
+ ...u({
605
644
  success: (e) => `Rebalance ${e.status.toLowerCase()}`,
606
- onSuccess: () => n.invalidateQueries({ queryKey: u.rebalances })
645
+ onSuccess: () => n.invalidateQueries({ queryKey: d.rebalances })
607
646
  })
608
647
  });
609
648
  };
610
649
  function X(t) {
611
- let { apiGatewayUrl: n } = e(), i = t.pageSize ?? d.limit ?? 100, a = r({
650
+ let { apiGatewayUrl: n } = e(), i = t.pageSize ?? f.limit ?? 100, a = r({
612
651
  queryKey: t.queryKey,
613
652
  enabled: t.enabled ?? !0,
614
653
  initialPageParam: null,
@@ -616,7 +655,7 @@ function X(t) {
616
655
  let r = e ? {
617
656
  limit: i,
618
657
  cursor: e
619
- } : { limit: i }, a = await s(t.query, t.buildVariables(r), n);
658
+ } : { limit: i }, a = await c(t.query, t.buildVariables(r), n);
620
659
  return t.select(a);
621
660
  },
622
661
  getNextPageParam: (e) => e.pageInfo.hasMore && e.pageInfo.cursor ? e.pageInfo.cursor : void 0
@@ -635,15 +674,15 @@ function X(t) {
635
674
  }
636
675
  };
637
676
  }
638
- var _e = (e = {}) => X({
677
+ var ye = (e = {}) => X({
639
678
  queryKey: [
640
- ...u.accounts,
679
+ ...d.accounts,
641
680
  "paged",
642
681
  e
643
682
  ],
644
683
  query: `query BraListAccounts($householdId: ID, $status: BraAccountStatus, $pagination: PaginationInput) {
645
684
  braListAccounts(householdId: $householdId, status: $status, pagination: $pagination) {
646
- items { ${m} }
685
+ items { ${h} }
647
686
  pageInfo { cursor hasMore }
648
687
  }
649
688
  }`,
@@ -653,15 +692,15 @@ var _e = (e = {}) => X({
653
692
  pagination: t
654
693
  }),
655
694
  select: (e) => e.braListAccounts
656
- }), ve = (e = {}) => X({
695
+ }), be = (e = {}) => X({
657
696
  queryKey: [
658
- ...u.portfolios,
697
+ ...d.portfolios,
659
698
  "paged",
660
699
  e
661
700
  ],
662
701
  query: `query BraListPortfolios($householdId: ID, $status: BraPortfolioStatus, $pagination: PaginationInput) {
663
702
  braListPortfolios(householdId: $householdId, status: $status, pagination: $pagination) {
664
- items { ${h} }
703
+ items { ${g} }
665
704
  pageInfo { cursor hasMore }
666
705
  }
667
706
  }`,
@@ -671,9 +710,9 @@ var _e = (e = {}) => X({
671
710
  pagination: t
672
711
  }),
673
712
  select: (e) => e.braListPortfolios
674
- }), Z = (e = {}) => X({
713
+ }), xe = (e = {}) => X({
675
714
  queryKey: [
676
- ...u.goals,
715
+ ...d.goals,
677
716
  "paged",
678
717
  e
679
718
  ],
@@ -689,9 +728,9 @@ var _e = (e = {}) => X({
689
728
  pagination: t
690
729
  }),
691
730
  select: (e) => e.braListGoals
692
- }), ye = (e = {}) => X({
731
+ }), Se = (e = {}) => X({
693
732
  queryKey: [
694
- ...u.households,
733
+ ...d.households,
695
734
  "paged",
696
735
  e
697
736
  ],
@@ -706,9 +745,9 @@ var _e = (e = {}) => X({
706
745
  pagination: t
707
746
  }),
708
747
  select: (e) => e.braListHouseholds
709
- }), be = (e = {}) => X({
748
+ }), Z = (e = {}) => X({
710
749
  queryKey: [
711
- ...u.insights,
750
+ ...d.insights,
712
751
  "paged",
713
752
  e
714
753
  ],
@@ -726,15 +765,15 @@ var _e = (e = {}) => X({
726
765
  pagination: t
727
766
  }),
728
767
  select: (e) => e.braListInsights
729
- }), xe = (e = {}) => X({
768
+ }), Ce = (e = {}) => X({
730
769
  queryKey: [
731
- ...u.transactions,
770
+ ...d.transactions,
732
771
  "paged",
733
772
  e
734
773
  ],
735
774
  query: `query BraListTransactions($accountId: ID, $type: BraTransactionType, $pagination: PaginationInput) {
736
775
  braListTransactions(accountId: $accountId, type: $type, pagination: $pagination) {
737
- items { ${p} }
776
+ items { ${m} }
738
777
  pageInfo { cursor hasMore }
739
778
  }
740
779
  }`,
@@ -757,10 +796,10 @@ async function Q(e, t = 200, n = 500) {
757
796
  }
758
797
  return r;
759
798
  }
760
- async function Se(e, t = {}, n = 200) {
761
- return Q(async (n) => (await s(`query BraListTransactions($accountId: ID, $type: BraTransactionType, $pagination: PaginationInput) {
799
+ async function we(e, t = {}, n = 200) {
800
+ return Q(async (n) => (await c(`query BraListTransactions($accountId: ID, $type: BraTransactionType, $pagination: PaginationInput) {
762
801
  braListTransactions(accountId: $accountId, type: $type, pagination: $pagination) {
763
- items { ${p} }
802
+ items { ${m} }
764
803
  pageInfo { cursor hasMore }
765
804
  }
766
805
  }`, {
@@ -769,14 +808,26 @@ async function Se(e, t = {}, n = 200) {
769
808
  pagination: n
770
809
  }, e)).braListTransactions, n);
771
810
  }
772
- var Ce = (t = {}) => {
811
+ async function Te(e, t = {}, n = 200) {
812
+ return Q(async (n) => (await c(`query BraListHoldings($accountId: ID, $portfolioId: ID, $pagination: PaginationInput) {
813
+ braListHoldings(accountId: $accountId, portfolioId: $portfolioId, pagination: $pagination) {
814
+ items { ${p} }
815
+ pageInfo { cursor hasMore }
816
+ }
817
+ }`, {
818
+ accountId: t.accountId,
819
+ portfolioId: t.portfolioId,
820
+ pagination: n
821
+ }, e)).braListHoldings, n);
822
+ }
823
+ var Ee = (t = {}) => {
773
824
  let { apiGatewayUrl: n } = e(), r = a({
774
825
  queryKey: [
775
- ...u.transactions,
826
+ ...d.transactions,
776
827
  "all",
777
828
  t
778
829
  ],
779
- queryFn: () => Se(n, t)
830
+ queryFn: () => we(n, t)
780
831
  });
781
832
  return {
782
833
  ...r,
@@ -784,9 +835,9 @@ var Ce = (t = {}) => {
784
835
  };
785
836
  };
786
837
  async function $(e, t = {}, n = 200) {
787
- return Q(async (n) => (await s(`query BraListAccounts($householdId: ID, $status: BraAccountStatus, $pagination: PaginationInput) {
838
+ return Q(async (n) => (await c(`query BraListAccounts($householdId: ID, $status: BraAccountStatus, $pagination: PaginationInput) {
788
839
  braListAccounts(householdId: $householdId, status: $status, pagination: $pagination) {
789
- items { ${m} }
840
+ items { ${h} }
790
841
  pageInfo { cursor hasMore }
791
842
  }
792
843
  }`, {
@@ -795,10 +846,10 @@ async function $(e, t = {}, n = 200) {
795
846
  pagination: n
796
847
  }, e)).braListAccounts, n);
797
848
  }
798
- var we = (t = {}) => {
849
+ var De = (t = {}) => {
799
850
  let { apiGatewayUrl: n } = e(), r = a({
800
851
  queryKey: [
801
- ...u.accounts,
852
+ ...d.accounts,
802
853
  "all",
803
854
  t
804
855
  ],
@@ -810,6 +861,6 @@ var we = (t = {}) => {
810
861
  };
811
862
  };
812
863
  //#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 };
864
+ export { $ as fetchAllAccounts, Te as fetchAllHoldings, w as useAccount, C as useAccounts, fe as useAcknowledgeInsight, De as useAllAccounts, Ee as useAllTransactions, D as useArchiveAccount, ie as useArchiveGoal, le as useArchiveHousehold, M as useArchivePortfolio, T as useCreateAccount, G as useCreateGoal, P as useCreateHolding, se as useCreateHousehold, de as useCreateInsight, V as useCreateModelPortfolio, A as useCreatePortfolio, _e as useCreateRebalanceProposal, I as useDeleteHolding, pe as useDismissInsight, U as useGoal, W as useGoalFundings, H as useGoals, N as useHoldings, oe as useHousehold, ae as useHouseholds, ue as useInsights, J as useLinkGoalFunding, B as useModelPortfolio, z as useModelPortfolios, re as useNetWorthSummary, ye as usePagedAccounts, xe as usePagedGoals, Se as usePagedHouseholds, Z as usePagedInsights, be as usePagedPortfolios, Ce as usePagedTransactions, k as usePortfolio, O as usePortfolios, ge as useRebalanceProposals, q as useRecalcGoalProjection, he as useRecordTransaction, me as useResolveInsight, ve as useTransitionRebalanceProposal, Y as useUnlinkGoalFunding, E as useUpdateAccount, K as useUpdateGoal, F as useUpdateHolding, ce as useUpdateHousehold, j as useUpdatePortfolio };
814
865
 
815
866
  //# sourceMappingURL=useBrainyRichApi.js.map