@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.
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts +34 -5
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.js +317 -224
- package/dist/brainyrich/hooks/useBrainyRichApi.js.map +1 -1
- package/dist/brainyrich/pages/ReportsPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/ReportsPage.js +306 -318
- package/dist/brainyrich/pages/ReportsPage.js.map +1 -1
- package/dist/brainyrich/pages/RiskPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/RiskPage.js +433 -213
- package/dist/brainyrich/pages/RiskPage.js.map +1 -1
- package/dist/brainyrich/types/bra.d.ts +27 -0
- package/dist/brainyrich/types/bra.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
4
|
+
import { graphqlFetch as s } from "@burdenoff/fe-libs/shared/graphql";
|
|
5
5
|
//#region src/brainyrich/hooks/useBrainyRichApi.ts
|
|
6
|
-
var
|
|
6
|
+
var ee = () => {
|
|
7
7
|
let e = globalThis;
|
|
8
8
|
e.__graphqlFetchResponseCache?.clear(), e.__graphqlFetchPendingResponses?.clear(), e.__boffGraphQLResponseCache?.clear();
|
|
9
|
-
},
|
|
10
|
-
let i = await
|
|
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
|
-
},
|
|
22
|
-
let r = await
|
|
23
|
-
return
|
|
21
|
+
}, l = async (e, t, n) => {
|
|
22
|
+
let r = await c(e, t, n, { suppressGlobalError: !0 });
|
|
23
|
+
return ee(), r;
|
|
24
24
|
};
|
|
25
|
-
function
|
|
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
|
|
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
|
-
},
|
|
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: [...
|
|
84
|
-
queryFn: async () => (await
|
|
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
|
-
},
|
|
98
|
+
}, ie = (t = {}) => {
|
|
89
99
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
90
|
-
queryKey: [...
|
|
91
|
-
queryFn: async () => (await
|
|
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 { ${
|
|
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 ??
|
|
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
|
-
},
|
|
117
|
+
}, C = (t) => {
|
|
108
118
|
let { apiGatewayUrl: n } = e();
|
|
109
119
|
return a({
|
|
110
|
-
queryKey:
|
|
120
|
+
queryKey: d.account(t ?? ""),
|
|
111
121
|
enabled: !!t,
|
|
112
|
-
queryFn: async () =>
|
|
122
|
+
queryFn: async () => {
|
|
123
|
+
let e = await c(`query BraAccount($id: ID!) {
|
|
113
124
|
braAccount(id: $id) {
|
|
114
|
-
${
|
|
115
|
-
holdings { ${
|
|
116
|
-
transactions { ${
|
|
125
|
+
${h}
|
|
126
|
+
holdings { items { ${p} } pageInfo { cursor hasMore } }
|
|
127
|
+
transactions { items { ${m} } pageInfo { cursor hasMore } }
|
|
117
128
|
}
|
|
118
|
-
}`, { id: t }, n)
|
|
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
|
-
},
|
|
139
|
+
}, w = () => {
|
|
121
140
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
122
141
|
return i({
|
|
123
|
-
mutationFn: async (e) => (await
|
|
124
|
-
braCreateAccount(input: $input) { ${
|
|
142
|
+
mutationFn: async (e) => (await l(`mutation BraCreateAccount($input: BraCreateAccountInput!) {
|
|
143
|
+
braCreateAccount(input: $input) { ${h} }
|
|
125
144
|
}`, { input: e }, t)).braCreateAccount,
|
|
126
|
-
...
|
|
145
|
+
...u({
|
|
127
146
|
success: "Account created",
|
|
128
147
|
onSuccess: () => {
|
|
129
|
-
n.invalidateQueries({ queryKey:
|
|
148
|
+
n.invalidateQueries({ queryKey: d.accounts }), n.invalidateQueries({ queryKey: d.netWorth });
|
|
130
149
|
}
|
|
131
150
|
})
|
|
132
151
|
});
|
|
133
|
-
},
|
|
152
|
+
}, T = () => {
|
|
134
153
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
135
154
|
return i({
|
|
136
|
-
mutationFn: async (e) => (await
|
|
137
|
-
braUpdateAccount(id: $id, input: $input) { ${
|
|
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
|
-
...
|
|
158
|
+
...u({
|
|
140
159
|
success: "Account updated",
|
|
141
160
|
onSuccess: (e) => {
|
|
142
|
-
n.invalidateQueries({ queryKey:
|
|
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
|
-
},
|
|
165
|
+
}, E = () => {
|
|
147
166
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
148
167
|
return i({
|
|
149
|
-
mutationFn: async (e) => (await
|
|
150
|
-
...
|
|
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:
|
|
172
|
+
n.invalidateQueries({ queryKey: d.accounts }), n.invalidateQueries({ queryKey: d.netWorth });
|
|
154
173
|
}
|
|
155
174
|
})
|
|
156
175
|
});
|
|
157
|
-
},
|
|
176
|
+
}, D = (t = {}) => {
|
|
158
177
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
159
|
-
queryKey: [...
|
|
160
|
-
queryFn: async () => (await
|
|
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 { ${
|
|
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 ??
|
|
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
|
-
},
|
|
195
|
+
}, O = (t) => {
|
|
177
196
|
let { apiGatewayUrl: n } = e();
|
|
178
197
|
return a({
|
|
179
|
-
queryKey:
|
|
198
|
+
queryKey: d.portfolio(t ?? ""),
|
|
180
199
|
enabled: !!t,
|
|
181
|
-
queryFn: async () =>
|
|
200
|
+
queryFn: async () => {
|
|
201
|
+
let e = await c(`query BraPortfolio($id: ID!) {
|
|
182
202
|
braPortfolio(id: $id) {
|
|
183
|
-
${
|
|
184
|
-
holdings { ${
|
|
203
|
+
${g}
|
|
204
|
+
holdings { items { ${p} } pageInfo { cursor hasMore } }
|
|
185
205
|
}
|
|
186
|
-
}`, { id: t }, n)
|
|
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
|
-
},
|
|
215
|
+
}, k = () => {
|
|
189
216
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
190
217
|
return i({
|
|
191
|
-
mutationFn: async (e) => (await
|
|
192
|
-
braCreatePortfolio(input: $input) { ${
|
|
218
|
+
mutationFn: async (e) => (await l(`mutation BraCreatePortfolio($input: BraCreatePortfolioInput!) {
|
|
219
|
+
braCreatePortfolio(input: $input) { ${g} }
|
|
193
220
|
}`, { input: e }, t)).braCreatePortfolio,
|
|
194
|
-
...
|
|
221
|
+
...u({
|
|
195
222
|
success: "Portfolio created",
|
|
196
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
223
|
+
onSuccess: () => n.invalidateQueries({ queryKey: d.portfolios })
|
|
197
224
|
})
|
|
198
225
|
});
|
|
199
|
-
},
|
|
226
|
+
}, A = () => {
|
|
200
227
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
201
228
|
return i({
|
|
202
|
-
mutationFn: async (e) => (await
|
|
203
|
-
braUpdatePortfolio(id: $id, input: $input) { ${
|
|
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
|
-
...
|
|
232
|
+
...u({
|
|
206
233
|
success: "Portfolio updated",
|
|
207
234
|
onSuccess: (e) => {
|
|
208
|
-
n.invalidateQueries({ queryKey:
|
|
235
|
+
n.invalidateQueries({ queryKey: d.portfolios }), n.invalidateQueries({ queryKey: d.portfolio(e.id) });
|
|
209
236
|
}
|
|
210
237
|
})
|
|
211
238
|
});
|
|
212
|
-
},
|
|
239
|
+
}, j = () => {
|
|
213
240
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
214
241
|
return i({
|
|
215
|
-
mutationFn: async (e) => (await
|
|
216
|
-
...
|
|
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:
|
|
245
|
+
onSuccess: () => n.invalidateQueries({ queryKey: d.portfolios })
|
|
219
246
|
})
|
|
220
247
|
});
|
|
221
|
-
},
|
|
248
|
+
}, M = (t) => {
|
|
222
249
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
223
|
-
queryKey: [...
|
|
250
|
+
queryKey: [...d.holdings, t],
|
|
224
251
|
enabled: !!(t.accountId || t.portfolioId),
|
|
225
|
-
queryFn: async () => (await
|
|
226
|
-
braListHoldings(accountId: $accountId, portfolioId: $portfolioId) {
|
|
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
|
-
},
|
|
266
|
+
}, N = () => {
|
|
237
267
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
238
268
|
return i({
|
|
239
|
-
mutationFn: async (e) => (await
|
|
240
|
-
braCreateHolding(input: $input) { ${
|
|
269
|
+
mutationFn: async (e) => (await l(`mutation BraCreateHolding($input: BraCreateHoldingInput!) {
|
|
270
|
+
braCreateHolding(input: $input) { ${p} }
|
|
241
271
|
}`, { input: e }, t)).braCreateHolding,
|
|
242
|
-
...
|
|
272
|
+
...u({
|
|
243
273
|
success: "Holding added",
|
|
244
274
|
onSuccess: (e) => {
|
|
245
|
-
n.invalidateQueries({ queryKey:
|
|
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
|
-
},
|
|
279
|
+
}, P = () => {
|
|
250
280
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
251
281
|
return i({
|
|
252
|
-
mutationFn: async (e) => (await
|
|
253
|
-
braUpdateHolding(id: $id, input: $input) { ${
|
|
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
|
-
...
|
|
285
|
+
...u({
|
|
256
286
|
success: "Holding updated",
|
|
257
287
|
onSuccess: (e) => {
|
|
258
|
-
n.invalidateQueries({ queryKey:
|
|
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
|
-
},
|
|
292
|
+
}, F = () => {
|
|
263
293
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
264
294
|
return i({
|
|
265
|
-
mutationFn: async (e) => (await
|
|
266
|
-
...
|
|
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:
|
|
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
|
-
},
|
|
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:
|
|
276
|
-
queryFn: async () => (await
|
|
311
|
+
queryKey: d.modelPortfolios,
|
|
312
|
+
queryFn: async () => (await c(`query BraListModelPortfolios {
|
|
277
313
|
braListModelPortfolios {
|
|
278
|
-
${
|
|
279
|
-
|
|
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
|
-
},
|
|
323
|
+
}, z = (t) => {
|
|
288
324
|
let { apiGatewayUrl: n } = e();
|
|
289
325
|
return a({
|
|
290
|
-
queryKey:
|
|
326
|
+
queryKey: d.modelPortfolio(t ?? ""),
|
|
291
327
|
enabled: !!t,
|
|
292
|
-
queryFn: async () =>
|
|
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)
|
|
333
|
+
}`, { id: t }, n);
|
|
334
|
+
return e.braModelPortfolio ? L(e.braModelPortfolio) : null;
|
|
335
|
+
}
|
|
298
336
|
});
|
|
299
|
-
},
|
|
337
|
+
}, B = () => {
|
|
300
338
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
301
339
|
return i({
|
|
302
|
-
mutationFn: async (e) => (await
|
|
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
|
-
...
|
|
344
|
+
}`, { input: e }, t)).braCreateModelPortfolio),
|
|
345
|
+
...u({
|
|
309
346
|
success: "Model portfolio created",
|
|
310
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
347
|
+
onSuccess: () => n.invalidateQueries({ queryKey: d.modelPortfolios })
|
|
311
348
|
})
|
|
312
349
|
});
|
|
313
|
-
},
|
|
350
|
+
}, V = (t = {}) => {
|
|
314
351
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
315
|
-
queryKey: [...
|
|
316
|
-
queryFn: async () => (await
|
|
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 ??
|
|
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
|
-
},
|
|
369
|
+
}, H = (t) => {
|
|
333
370
|
let { apiGatewayUrl: n } = e();
|
|
334
371
|
return a({
|
|
335
|
-
queryKey:
|
|
372
|
+
queryKey: d.goal(t ?? ""),
|
|
336
373
|
enabled: !!t,
|
|
337
|
-
queryFn: async () =>
|
|
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)
|
|
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
|
-
},
|
|
389
|
+
}, U = (t) => {
|
|
345
390
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
346
|
-
queryKey:
|
|
391
|
+
queryKey: d.goalFundings(t ?? ""),
|
|
347
392
|
enabled: !!t,
|
|
348
|
-
queryFn: async () => (await
|
|
349
|
-
braListGoalFundings(goalId: $goalId) {
|
|
350
|
-
|
|
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
|
-
},
|
|
404
|
+
}, W = () => {
|
|
357
405
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
358
406
|
return i({
|
|
359
|
-
mutationFn: async (e) => (await
|
|
407
|
+
mutationFn: async (e) => (await l(`mutation BraCreateGoal($input: BraCreateGoalInput!) {
|
|
360
408
|
braCreateGoal(input: $input) { ${y} }
|
|
361
409
|
}`, { input: e }, t)).braCreateGoal,
|
|
362
|
-
...
|
|
410
|
+
...u({
|
|
363
411
|
success: "Goal created",
|
|
364
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
412
|
+
onSuccess: () => n.invalidateQueries({ queryKey: d.goals })
|
|
365
413
|
})
|
|
366
414
|
});
|
|
367
|
-
},
|
|
415
|
+
}, G = () => {
|
|
368
416
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
369
417
|
return i({
|
|
370
|
-
mutationFn: async (e) => (await
|
|
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
|
-
...
|
|
421
|
+
...u({
|
|
374
422
|
success: "Goal updated",
|
|
375
423
|
onSuccess: (e) => {
|
|
376
|
-
n.invalidateQueries({ queryKey:
|
|
424
|
+
n.invalidateQueries({ queryKey: d.goals }), n.invalidateQueries({ queryKey: d.goal(e.id) });
|
|
377
425
|
}
|
|
378
426
|
})
|
|
379
427
|
});
|
|
380
|
-
},
|
|
428
|
+
}, K = () => {
|
|
381
429
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
382
430
|
return i({
|
|
383
|
-
mutationFn: async (e) => (await
|
|
384
|
-
...
|
|
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:
|
|
434
|
+
onSuccess: () => n.invalidateQueries({ queryKey: d.goals })
|
|
387
435
|
})
|
|
388
436
|
});
|
|
389
|
-
},
|
|
437
|
+
}, q = () => {
|
|
390
438
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
391
439
|
return i({
|
|
392
|
-
mutationFn: async (e) => (await
|
|
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
|
-
...
|
|
443
|
+
...u({
|
|
396
444
|
success: "Projection recalculated",
|
|
397
445
|
onSuccess: (e) => {
|
|
398
|
-
n.invalidateQueries({ queryKey:
|
|
446
|
+
n.invalidateQueries({ queryKey: d.goals }), n.invalidateQueries({ queryKey: d.goal(e.id) });
|
|
399
447
|
}
|
|
400
448
|
})
|
|
401
449
|
});
|
|
402
|
-
},
|
|
450
|
+
}, J = () => {
|
|
403
451
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
404
452
|
return i({
|
|
405
|
-
mutationFn: async (e) => (await
|
|
453
|
+
mutationFn: async (e) => (await l(`mutation BraLinkGoalFunding($input: BraLinkGoalFundingInput!) {
|
|
406
454
|
braLinkGoalFunding(input: $input) { ${v} }
|
|
407
455
|
}`, { input: e }, t)).braLinkGoalFunding,
|
|
408
|
-
...
|
|
456
|
+
...u({
|
|
409
457
|
success: "Funding linked",
|
|
410
458
|
onSuccess: (e) => {
|
|
411
|
-
n.invalidateQueries({ queryKey:
|
|
459
|
+
n.invalidateQueries({ queryKey: d.goalFundings(e.goalId) }), n.invalidateQueries({ queryKey: d.goal(e.goalId) });
|
|
412
460
|
}
|
|
413
461
|
})
|
|
414
462
|
});
|
|
415
|
-
},
|
|
463
|
+
}, Y = () => {
|
|
416
464
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
417
465
|
return i({
|
|
418
|
-
mutationFn: async (e) => (await
|
|
419
|
-
...
|
|
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:
|
|
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
|
-
},
|
|
474
|
+
}, ae = (t = {}) => {
|
|
427
475
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
428
|
-
queryKey: [...
|
|
429
|
-
queryFn: async () => (await
|
|
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 ??
|
|
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
|
-
},
|
|
492
|
+
}, oe = (t) => {
|
|
445
493
|
let { apiGatewayUrl: n } = e();
|
|
446
494
|
return a({
|
|
447
|
-
queryKey:
|
|
495
|
+
queryKey: d.household(t ?? ""),
|
|
448
496
|
enabled: !!t,
|
|
449
|
-
queryFn: async () => (await
|
|
497
|
+
queryFn: async () => (await c(`query BraHousehold($id: ID!) {
|
|
450
498
|
braHousehold(id: $id) { ${b} }
|
|
451
499
|
}`, { id: t }, n)).braHousehold
|
|
452
500
|
});
|
|
453
|
-
},
|
|
501
|
+
}, se = () => {
|
|
454
502
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
455
503
|
return i({
|
|
456
|
-
mutationFn: async (e) => (await
|
|
504
|
+
mutationFn: async (e) => (await l(`mutation BraCreateHousehold($input: BraCreateHouseholdInput!) {
|
|
457
505
|
braCreateHousehold(input: $input) { ${b} }
|
|
458
506
|
}`, { input: e }, t)).braCreateHousehold,
|
|
459
|
-
...
|
|
507
|
+
...u({
|
|
460
508
|
success: "Household created",
|
|
461
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
509
|
+
onSuccess: () => n.invalidateQueries({ queryKey: d.households })
|
|
462
510
|
})
|
|
463
511
|
});
|
|
464
|
-
},
|
|
512
|
+
}, ce = () => {
|
|
465
513
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
466
514
|
return i({
|
|
467
|
-
mutationFn: async (e) => (await
|
|
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
|
-
...
|
|
518
|
+
...u({
|
|
471
519
|
success: "Household updated",
|
|
472
520
|
onSuccess: (e) => {
|
|
473
|
-
n.invalidateQueries({ queryKey:
|
|
521
|
+
n.invalidateQueries({ queryKey: d.households }), n.invalidateQueries({ queryKey: d.household(e.id) });
|
|
474
522
|
}
|
|
475
523
|
})
|
|
476
524
|
});
|
|
477
|
-
},
|
|
525
|
+
}, le = () => {
|
|
478
526
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
479
527
|
return i({
|
|
480
|
-
mutationFn: async (e) => (await
|
|
481
|
-
...
|
|
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:
|
|
531
|
+
onSuccess: () => n.invalidateQueries({ queryKey: d.households })
|
|
484
532
|
})
|
|
485
533
|
});
|
|
486
|
-
},
|
|
534
|
+
}, ue = (t = {}) => {
|
|
487
535
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
488
|
-
queryKey: [...
|
|
489
|
-
queryFn: async () => (await
|
|
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 ??
|
|
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
|
-
},
|
|
555
|
+
}, de = () => {
|
|
508
556
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
509
557
|
return i({
|
|
510
|
-
mutationFn: async (e) => (await
|
|
558
|
+
mutationFn: async (e) => (await l(`mutation BraCreateInsight($input: BraCreateInsightInput!) {
|
|
511
559
|
braCreateInsight(input: $input) { ${x} }
|
|
512
560
|
}`, { input: e }, t)).braCreateInsight,
|
|
513
|
-
...
|
|
561
|
+
...u({
|
|
514
562
|
success: "Insight created",
|
|
515
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
563
|
+
onSuccess: () => n.invalidateQueries({ queryKey: d.insights })
|
|
516
564
|
})
|
|
517
565
|
});
|
|
518
|
-
},
|
|
566
|
+
}, fe = () => {
|
|
519
567
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
520
568
|
return i({
|
|
521
|
-
mutationFn: async (e) => (await
|
|
569
|
+
mutationFn: async (e) => (await l(`mutation BraAcknowledgeInsight($id: ID!) {
|
|
522
570
|
braAcknowledgeInsight(id: $id) { ${x} }
|
|
523
571
|
}`, { id: e }, t)).braAcknowledgeInsight,
|
|
524
|
-
...
|
|
572
|
+
...u({
|
|
525
573
|
success: "Insight acknowledged",
|
|
526
574
|
onSuccess: (e) => {
|
|
527
|
-
n.invalidateQueries({ queryKey:
|
|
575
|
+
n.invalidateQueries({ queryKey: d.insights }), n.invalidateQueries({ queryKey: d.insight(e.id) });
|
|
528
576
|
}
|
|
529
577
|
})
|
|
530
578
|
});
|
|
531
|
-
},
|
|
579
|
+
}, pe = () => {
|
|
532
580
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
533
581
|
return i({
|
|
534
|
-
mutationFn: async (e) => (await
|
|
582
|
+
mutationFn: async (e) => (await l(`mutation BraDismissInsight($id: ID!) {
|
|
535
583
|
braDismissInsight(id: $id) { ${x} }
|
|
536
584
|
}`, { id: e }, t)).braDismissInsight,
|
|
537
|
-
...
|
|
585
|
+
...u({
|
|
538
586
|
success: "Insight dismissed",
|
|
539
587
|
onSuccess: (e) => {
|
|
540
|
-
n.invalidateQueries({ queryKey:
|
|
588
|
+
n.invalidateQueries({ queryKey: d.insights }), n.invalidateQueries({ queryKey: d.insight(e.id) });
|
|
541
589
|
}
|
|
542
590
|
})
|
|
543
591
|
});
|
|
544
|
-
},
|
|
592
|
+
}, me = () => {
|
|
545
593
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
546
594
|
return i({
|
|
547
|
-
mutationFn: async (e) => (await
|
|
595
|
+
mutationFn: async (e) => (await l(`mutation BraResolveInsight($id: ID!) {
|
|
548
596
|
braResolveInsight(id: $id) { ${x} }
|
|
549
597
|
}`, { id: e }, t)).braResolveInsight,
|
|
550
|
-
...
|
|
598
|
+
...u({
|
|
551
599
|
success: "Insight resolved",
|
|
552
600
|
onSuccess: (e) => {
|
|
553
|
-
n.invalidateQueries({ queryKey:
|
|
601
|
+
n.invalidateQueries({ queryKey: d.insights }), n.invalidateQueries({ queryKey: d.insight(e.id) });
|
|
554
602
|
}
|
|
555
603
|
})
|
|
556
604
|
});
|
|
557
|
-
},
|
|
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
|
|
561
|
-
|
|
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
|
-
...
|
|
643
|
+
...u({
|
|
564
644
|
success: "Transaction recorded",
|
|
565
645
|
onSuccess: (e) => {
|
|
566
|
-
n.invalidateQueries({ queryKey:
|
|
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
|
-
},
|
|
650
|
+
}, be = (t = {}) => {
|
|
571
651
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
572
|
-
queryKey: [...
|
|
573
|
-
queryFn: async () => (await
|
|
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
|
-
},
|
|
668
|
+
}, xe = () => {
|
|
588
669
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
589
670
|
return i({
|
|
590
|
-
mutationFn: async (e) => (await
|
|
671
|
+
mutationFn: async (e) => (await l(`mutation BraCreateRebalanceProposal($input: BraCreateRebalanceProposalInput!) {
|
|
591
672
|
braCreateRebalanceProposal(input: $input) { ${S} }
|
|
592
673
|
}`, { input: e }, t)).braCreateRebalanceProposal,
|
|
593
|
-
...
|
|
674
|
+
...u({
|
|
594
675
|
success: "Rebalance proposal created",
|
|
595
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
676
|
+
onSuccess: () => n.invalidateQueries({ queryKey: d.rebalances })
|
|
596
677
|
})
|
|
597
678
|
});
|
|
598
|
-
},
|
|
679
|
+
}, Se = () => {
|
|
599
680
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
600
681
|
return i({
|
|
601
|
-
mutationFn: async (e) => (await
|
|
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
|
-
...
|
|
685
|
+
...u({
|
|
605
686
|
success: (e) => `Rebalance ${e.status.toLowerCase()}`,
|
|
606
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
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 ??
|
|
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
|
|
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
|
|
719
|
+
var Z = (e = {}) => X({
|
|
639
720
|
queryKey: [
|
|
640
|
-
...
|
|
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 { ${
|
|
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
|
-
}),
|
|
737
|
+
}), Ce = (e = {}) => X({
|
|
657
738
|
queryKey: [
|
|
658
|
-
...
|
|
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 { ${
|
|
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
|
-
}),
|
|
755
|
+
}), we = (e = {}) => X({
|
|
675
756
|
queryKey: [
|
|
676
|
-
...
|
|
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
|
-
}),
|
|
773
|
+
}), Te = (e = {}) => X({
|
|
693
774
|
queryKey: [
|
|
694
|
-
...
|
|
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
|
-
}),
|
|
790
|
+
}), Ee = (e = {}) => X({
|
|
710
791
|
queryKey: [
|
|
711
|
-
...
|
|
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
|
-
}),
|
|
810
|
+
}), De = (e = {}) => X({
|
|
730
811
|
queryKey: [
|
|
731
|
-
...
|
|
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 { ${
|
|
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
|
|
761
|
-
return Q(async (n) => (await
|
|
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 { ${
|
|
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
|
-
|
|
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
|
-
...
|
|
868
|
+
...d.transactions,
|
|
776
869
|
"all",
|
|
777
870
|
t
|
|
778
871
|
],
|
|
779
|
-
queryFn: () =>
|
|
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
|
|
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 { ${
|
|
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
|
|
891
|
+
var je = (t = {}) => {
|
|
799
892
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
800
893
|
queryKey: [
|
|
801
|
-
...
|
|
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,
|
|
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
|