@burdenoff/microfe-brainyrich 2026.731.2 → 2026.731.4
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/BrainyRichRoot.d.ts.map +1 -1
- package/dist/brainyrich/BrainyRichRoot.js +60 -53
- package/dist/brainyrich/BrainyRichRoot.js.map +1 -1
- package/dist/brainyrich/BrainyRichRoutes.d.ts.map +1 -1
- package/dist/brainyrich/BrainyRichRoutes.js +20 -16
- package/dist/brainyrich/BrainyRichRoutes.js.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts +696 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.js +473 -266
- package/dist/brainyrich/hooks/useBrainyRichApi.js.map +1 -1
- package/dist/brainyrich/pages/FirmPage.d.ts +2 -0
- package/dist/brainyrich/pages/FirmPage.d.ts.map +1 -0
- package/dist/brainyrich/pages/FirmPage.js +255 -0
- package/dist/brainyrich/pages/FirmPage.js.map +1 -0
- package/dist/brainyrich/pages/ReportsPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/ReportsPage.js +606 -331
- 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 +619 -403
- package/dist/brainyrich/pages/RiskPage.js.map +1 -1
- package/dist/brainyrich/types/bra.d.ts +161 -0
- package/dist/brainyrich/types/bra.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3,10 +3,10 @@ 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
4
|
import { graphqlFetch as s } from "@burdenoff/fe-libs/shared/graphql";
|
|
5
5
|
//#region src/brainyrich/hooks/useBrainyRichApi.ts
|
|
6
|
-
var
|
|
6
|
+
var c = () => {
|
|
7
7
|
let e = globalThis;
|
|
8
8
|
e.__graphqlFetchResponseCache?.clear(), e.__graphqlFetchPendingResponses?.clear(), e.__boffGraphQLResponseCache?.clear();
|
|
9
|
-
},
|
|
9
|
+
}, l = async (e, t, n, r) => {
|
|
10
10
|
let i = await s({
|
|
11
11
|
gateway: "workspace",
|
|
12
12
|
baseUrl: n,
|
|
@@ -18,11 +18,11 @@ var ee = () => {
|
|
|
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
|
+
}, u = async (e, t, n) => {
|
|
22
|
+
let r = await l(e, t, n, { suppressGlobalError: !0 });
|
|
23
|
+
return c(), r;
|
|
24
24
|
};
|
|
25
|
-
function
|
|
25
|
+
function d(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 u(e) {
|
|
|
30
30
|
onError: (e) => n.error(t(e))
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
var
|
|
33
|
+
var f = {
|
|
34
34
|
netWorth: ["brainyrich", "net-worth"],
|
|
35
35
|
accounts: ["brainyrich", "accounts"],
|
|
36
36
|
account: (e) => [
|
|
@@ -91,27 +91,49 @@ var d = {
|
|
|
91
91
|
],
|
|
92
92
|
transactions: ["brainyrich", "transactions"],
|
|
93
93
|
rebalances: ["brainyrich", "rebalance-proposals"],
|
|
94
|
-
health: ["brainyrich", "health"]
|
|
95
|
-
|
|
94
|
+
health: ["brainyrich", "health"],
|
|
95
|
+
myAdvisorProfile: ["brainyrich", "my-advisor-profile"],
|
|
96
|
+
advisors: ["brainyrich", "advisors"],
|
|
97
|
+
firmReport: ["brainyrich", "firm-report"],
|
|
98
|
+
myAdvisorBranding: ["brainyrich", "my-advisor-branding"],
|
|
99
|
+
clientPortalSummary: ["brainyrich", "client-portal-summary"],
|
|
100
|
+
scheduledReports: ["brainyrich", "scheduled-reports"],
|
|
101
|
+
reportRuns: (e) => [
|
|
102
|
+
"brainyrich",
|
|
103
|
+
"report-runs",
|
|
104
|
+
e ?? "all"
|
|
105
|
+
],
|
|
106
|
+
marketQuote: (e) => [
|
|
107
|
+
"brainyrich",
|
|
108
|
+
"market-quote",
|
|
109
|
+
e
|
|
110
|
+
],
|
|
111
|
+
tradeInstructions: (e, t) => [
|
|
112
|
+
"brainyrich",
|
|
113
|
+
"trade-instructions",
|
|
114
|
+
e ?? "all",
|
|
115
|
+
t ?? "all"
|
|
116
|
+
]
|
|
117
|
+
}, p = { limit: 50 }, m = "\n id workspaceId accountId portfolioId symbol name assetClass quantity lastPrice\n costBasis marketValue currency asOf createdAt updatedAt\n", h = "\n id workspaceId accountId holdingId type symbol quantity price amount fee currency\n tradeDate settleDate notes createdAt updatedAt\n", g = "\n id workspaceId ownerId householdId name type status institution accountMask\n cashBalance currency isManual createdAt updatedAt\n", _ = "\n id workspaceId ownerId householdId name description status baseCurrency\n modelPortfolioId driftThresholdPct targetAllocation tags createdAt updatedAt\n", v = "\n id workspaceId modelPortfolioId assetClass targetPct createdAt updatedAt\n", y = "\n id workspaceId name description riskProfile baseCurrency isActive createdAt updatedAt\n", b = "\n id workspaceId goalId accountId allocationPct fixedAmount createdAt updatedAt\n", x = "\n id workspaceId ownerId householdId name type status projection targetAmount\n targetDate monthlyContribution priority currency notes tags createdAt updatedAt\n", S = "\n id workspaceId name status riskProfile advisorId aum currency primaryContactName\n primaryContactEmail notes tags createdAt updatedAt\n", C = "\n id workspaceId ownerId type severity status title detail metrics subjectId\n subjectType acknowledgedById resolvedAt createdAt updatedAt\n", w = "\n id workspaceId portfolioId householdId status driftPct rationale trades\n proposedById approvedById executedAt createdAt updatedAt\n", ee = "\n workspaceId ownerId totalNetWorth totalMarketValue totalCash accountCount currency\n byAssetClass { assetClass marketValue }\n", te = (t) => {
|
|
96
118
|
let { apiGatewayUrl: n } = e();
|
|
97
119
|
return a({
|
|
98
|
-
queryKey: [...
|
|
99
|
-
queryFn: async () => (await
|
|
100
|
-
braNetWorthSummary(ownerId: $ownerId) { ${
|
|
120
|
+
queryKey: [...f.netWorth, t ?? "me"],
|
|
121
|
+
queryFn: async () => (await l(`query BraNetWorthSummary($ownerId: ID) {
|
|
122
|
+
braNetWorthSummary(ownerId: $ownerId) { ${ee} }
|
|
101
123
|
}`, { ownerId: t }, n)).braNetWorthSummary
|
|
102
124
|
});
|
|
103
|
-
},
|
|
125
|
+
}, ne = (t = {}) => {
|
|
104
126
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
105
|
-
queryKey: [...
|
|
106
|
-
queryFn: async () => (await
|
|
127
|
+
queryKey: [...f.accounts, t],
|
|
128
|
+
queryFn: async () => (await l(`query BraListAccounts($householdId: ID, $status: BraAccountStatus, $pagination: PaginationInput) {
|
|
107
129
|
braListAccounts(householdId: $householdId, status: $status, pagination: $pagination) {
|
|
108
|
-
items { ${
|
|
130
|
+
items { ${g} }
|
|
109
131
|
pageInfo { cursor hasMore }
|
|
110
132
|
}
|
|
111
133
|
}`, {
|
|
112
134
|
householdId: t.householdId,
|
|
113
135
|
status: t.status,
|
|
114
|
-
pagination: t.pagination ??
|
|
136
|
+
pagination: t.pagination ?? p
|
|
115
137
|
}, n)).braListAccounts
|
|
116
138
|
});
|
|
117
139
|
return {
|
|
@@ -119,17 +141,17 @@ var d = {
|
|
|
119
141
|
data: r.data?.items ?? [],
|
|
120
142
|
pageInfo: r.data?.pageInfo
|
|
121
143
|
};
|
|
122
|
-
},
|
|
144
|
+
}, re = (t) => {
|
|
123
145
|
let { apiGatewayUrl: n } = e();
|
|
124
146
|
return a({
|
|
125
|
-
queryKey:
|
|
147
|
+
queryKey: f.account(t ?? ""),
|
|
126
148
|
enabled: !!t,
|
|
127
149
|
queryFn: async () => {
|
|
128
|
-
let e = await
|
|
150
|
+
let e = await l(`query BraAccount($id: ID!) {
|
|
129
151
|
braAccount(id: $id) {
|
|
130
|
-
${
|
|
131
|
-
holdings { items { ${
|
|
132
|
-
transactions { items { ${
|
|
152
|
+
${g}
|
|
153
|
+
holdings { items { ${m} } pageInfo { cursor hasMore } }
|
|
154
|
+
transactions { items { ${h} } pageInfo { cursor hasMore } }
|
|
133
155
|
}
|
|
134
156
|
}`, { id: t }, n);
|
|
135
157
|
if (!e.braAccount) return null;
|
|
@@ -141,55 +163,55 @@ var d = {
|
|
|
141
163
|
};
|
|
142
164
|
}
|
|
143
165
|
});
|
|
144
|
-
},
|
|
166
|
+
}, ie = () => {
|
|
145
167
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
146
168
|
return i({
|
|
147
|
-
mutationFn: async (e) => (await
|
|
148
|
-
braCreateAccount(input: $input) { ${
|
|
169
|
+
mutationFn: async (e) => (await u(`mutation BraCreateAccount($input: BraCreateAccountInput!) {
|
|
170
|
+
braCreateAccount(input: $input) { ${g} }
|
|
149
171
|
}`, { input: e }, t)).braCreateAccount,
|
|
150
|
-
...
|
|
172
|
+
...d({
|
|
151
173
|
success: "Account created",
|
|
152
174
|
onSuccess: () => {
|
|
153
|
-
n.invalidateQueries({ queryKey:
|
|
175
|
+
n.invalidateQueries({ queryKey: f.accounts }), n.invalidateQueries({ queryKey: f.netWorth });
|
|
154
176
|
}
|
|
155
177
|
})
|
|
156
178
|
});
|
|
157
|
-
},
|
|
179
|
+
}, ae = () => {
|
|
158
180
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
159
181
|
return i({
|
|
160
|
-
mutationFn: async (e) => (await
|
|
161
|
-
braUpdateAccount(id: $id, input: $input) { ${
|
|
182
|
+
mutationFn: async (e) => (await u(`mutation BraUpdateAccount($id: ID!, $input: BraUpdateAccountInput!) {
|
|
183
|
+
braUpdateAccount(id: $id, input: $input) { ${g} }
|
|
162
184
|
}`, e, t)).braUpdateAccount,
|
|
163
|
-
...
|
|
185
|
+
...d({
|
|
164
186
|
success: "Account updated",
|
|
165
187
|
onSuccess: (e) => {
|
|
166
|
-
n.invalidateQueries({ queryKey:
|
|
188
|
+
n.invalidateQueries({ queryKey: f.accounts }), n.invalidateQueries({ queryKey: f.account(e.id) }), n.invalidateQueries({ queryKey: f.netWorth });
|
|
167
189
|
}
|
|
168
190
|
})
|
|
169
191
|
});
|
|
170
|
-
},
|
|
192
|
+
}, oe = () => {
|
|
171
193
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
172
194
|
return i({
|
|
173
|
-
mutationFn: async (e) => (await
|
|
174
|
-
...
|
|
195
|
+
mutationFn: async (e) => (await u("mutation BraArchiveAccount($id: ID!) { braArchiveAccount(id: $id) }", { id: e }, t)).braArchiveAccount,
|
|
196
|
+
...d({
|
|
175
197
|
success: "Account archived",
|
|
176
198
|
onSuccess: () => {
|
|
177
|
-
n.invalidateQueries({ queryKey:
|
|
199
|
+
n.invalidateQueries({ queryKey: f.accounts }), n.invalidateQueries({ queryKey: f.netWorth });
|
|
178
200
|
}
|
|
179
201
|
})
|
|
180
202
|
});
|
|
181
|
-
},
|
|
203
|
+
}, se = (t = {}) => {
|
|
182
204
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
183
|
-
queryKey: [...
|
|
184
|
-
queryFn: async () => (await
|
|
205
|
+
queryKey: [...f.portfolios, t],
|
|
206
|
+
queryFn: async () => (await l(`query BraListPortfolios($householdId: ID, $status: BraPortfolioStatus, $pagination: PaginationInput) {
|
|
185
207
|
braListPortfolios(householdId: $householdId, status: $status, pagination: $pagination) {
|
|
186
|
-
items { ${
|
|
208
|
+
items { ${_} }
|
|
187
209
|
pageInfo { cursor hasMore }
|
|
188
210
|
}
|
|
189
211
|
}`, {
|
|
190
212
|
householdId: t.householdId,
|
|
191
213
|
status: t.status,
|
|
192
|
-
pagination: t.pagination ??
|
|
214
|
+
pagination: t.pagination ?? p
|
|
193
215
|
}, n)).braListPortfolios
|
|
194
216
|
});
|
|
195
217
|
return {
|
|
@@ -197,16 +219,16 @@ var d = {
|
|
|
197
219
|
data: r.data?.items ?? [],
|
|
198
220
|
pageInfo: r.data?.pageInfo
|
|
199
221
|
};
|
|
200
|
-
},
|
|
222
|
+
}, ce = (t) => {
|
|
201
223
|
let { apiGatewayUrl: n } = e();
|
|
202
224
|
return a({
|
|
203
|
-
queryKey:
|
|
225
|
+
queryKey: f.portfolio(t ?? ""),
|
|
204
226
|
enabled: !!t,
|
|
205
227
|
queryFn: async () => {
|
|
206
|
-
let e = await
|
|
228
|
+
let e = await l(`query BraPortfolio($id: ID!) {
|
|
207
229
|
braPortfolio(id: $id) {
|
|
208
|
-
${
|
|
209
|
-
holdings { items { ${
|
|
230
|
+
${_}
|
|
231
|
+
holdings { items { ${m} } pageInfo { cursor hasMore } }
|
|
210
232
|
}
|
|
211
233
|
}`, { id: t }, n);
|
|
212
234
|
if (!e.braPortfolio) return null;
|
|
@@ -217,46 +239,46 @@ var d = {
|
|
|
217
239
|
};
|
|
218
240
|
}
|
|
219
241
|
});
|
|
220
|
-
},
|
|
242
|
+
}, le = () => {
|
|
221
243
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
222
244
|
return i({
|
|
223
|
-
mutationFn: async (e) => (await
|
|
224
|
-
braCreatePortfolio(input: $input) { ${
|
|
245
|
+
mutationFn: async (e) => (await u(`mutation BraCreatePortfolio($input: BraCreatePortfolioInput!) {
|
|
246
|
+
braCreatePortfolio(input: $input) { ${_} }
|
|
225
247
|
}`, { input: e }, t)).braCreatePortfolio,
|
|
226
|
-
...
|
|
248
|
+
...d({
|
|
227
249
|
success: "Portfolio created",
|
|
228
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
250
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.portfolios })
|
|
229
251
|
})
|
|
230
252
|
});
|
|
231
|
-
},
|
|
253
|
+
}, T = () => {
|
|
232
254
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
233
255
|
return i({
|
|
234
|
-
mutationFn: async (e) => (await
|
|
235
|
-
braUpdatePortfolio(id: $id, input: $input) { ${
|
|
256
|
+
mutationFn: async (e) => (await u(`mutation BraUpdatePortfolio($id: ID!, $input: BraUpdatePortfolioInput!) {
|
|
257
|
+
braUpdatePortfolio(id: $id, input: $input) { ${_} }
|
|
236
258
|
}`, e, t)).braUpdatePortfolio,
|
|
237
|
-
...
|
|
259
|
+
...d({
|
|
238
260
|
success: "Portfolio updated",
|
|
239
261
|
onSuccess: (e) => {
|
|
240
|
-
n.invalidateQueries({ queryKey:
|
|
262
|
+
n.invalidateQueries({ queryKey: f.portfolios }), n.invalidateQueries({ queryKey: f.portfolio(e.id) });
|
|
241
263
|
}
|
|
242
264
|
})
|
|
243
265
|
});
|
|
244
|
-
},
|
|
266
|
+
}, E = () => {
|
|
245
267
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
246
268
|
return i({
|
|
247
|
-
mutationFn: async (e) => (await
|
|
248
|
-
...
|
|
269
|
+
mutationFn: async (e) => (await u("mutation BraArchivePortfolio($id: ID!) { braArchivePortfolio(id: $id) }", { id: e }, t)).braArchivePortfolio,
|
|
270
|
+
...d({
|
|
249
271
|
success: "Portfolio archived",
|
|
250
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
272
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.portfolios })
|
|
251
273
|
})
|
|
252
274
|
});
|
|
253
|
-
},
|
|
275
|
+
}, D = (t) => {
|
|
254
276
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
255
|
-
queryKey: [...
|
|
277
|
+
queryKey: [...f.holdings, t],
|
|
256
278
|
enabled: !!(t.accountId || t.portfolioId),
|
|
257
|
-
queryFn: async () => (await
|
|
279
|
+
queryFn: async () => (await l(`query BraListHoldings($accountId: ID, $portfolioId: ID) {
|
|
258
280
|
braListHoldings(accountId: $accountId, portfolioId: $portfolioId) {
|
|
259
|
-
items { ${
|
|
281
|
+
items { ${m} }
|
|
260
282
|
pageInfo { cursor hasMore }
|
|
261
283
|
}
|
|
262
284
|
}`, {
|
|
@@ -268,102 +290,102 @@ var d = {
|
|
|
268
290
|
...r,
|
|
269
291
|
data: r.data ?? []
|
|
270
292
|
};
|
|
271
|
-
},
|
|
293
|
+
}, O = () => {
|
|
272
294
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
273
295
|
return i({
|
|
274
|
-
mutationFn: async (e) => (await
|
|
275
|
-
braCreateHolding(input: $input) { ${
|
|
296
|
+
mutationFn: async (e) => (await u(`mutation BraCreateHolding($input: BraCreateHoldingInput!) {
|
|
297
|
+
braCreateHolding(input: $input) { ${m} }
|
|
276
298
|
}`, { input: e }, t)).braCreateHolding,
|
|
277
|
-
...
|
|
299
|
+
...d({
|
|
278
300
|
success: "Holding added",
|
|
279
301
|
onSuccess: (e) => {
|
|
280
|
-
n.invalidateQueries({ queryKey:
|
|
302
|
+
n.invalidateQueries({ queryKey: f.holdings }), n.invalidateQueries({ queryKey: f.account(e.accountId) }), e.portfolioId && n.invalidateQueries({ queryKey: f.portfolio(e.portfolioId) }), n.invalidateQueries({ queryKey: f.netWorth });
|
|
281
303
|
}
|
|
282
304
|
})
|
|
283
305
|
});
|
|
284
|
-
},
|
|
306
|
+
}, k = () => {
|
|
285
307
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
286
308
|
return i({
|
|
287
|
-
mutationFn: async (e) => (await
|
|
288
|
-
braUpdateHolding(id: $id, input: $input) { ${
|
|
309
|
+
mutationFn: async (e) => (await u(`mutation BraUpdateHolding($id: ID!, $input: BraUpdateHoldingInput!) {
|
|
310
|
+
braUpdateHolding(id: $id, input: $input) { ${m} }
|
|
289
311
|
}`, e, t)).braUpdateHolding,
|
|
290
|
-
...
|
|
312
|
+
...d({
|
|
291
313
|
success: "Holding updated",
|
|
292
314
|
onSuccess: (e) => {
|
|
293
|
-
n.invalidateQueries({ queryKey:
|
|
315
|
+
n.invalidateQueries({ queryKey: f.holdings }), n.invalidateQueries({ queryKey: f.account(e.accountId) }), e.portfolioId && n.invalidateQueries({ queryKey: f.portfolio(e.portfolioId) }), n.invalidateQueries({ queryKey: f.netWorth });
|
|
294
316
|
}
|
|
295
317
|
})
|
|
296
318
|
});
|
|
297
|
-
},
|
|
319
|
+
}, A = () => {
|
|
298
320
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
299
321
|
return i({
|
|
300
|
-
mutationFn: async (e) => (await
|
|
301
|
-
...
|
|
322
|
+
mutationFn: async (e) => (await u("mutation BraDeleteHolding($id: ID!) { braDeleteHolding(id: $id) }", { id: e }, t)).braDeleteHolding,
|
|
323
|
+
...d({
|
|
302
324
|
success: "Holding removed",
|
|
303
325
|
onSuccess: () => {
|
|
304
|
-
n.invalidateQueries({ queryKey:
|
|
326
|
+
n.invalidateQueries({ queryKey: f.holdings }), n.invalidateQueries({ queryKey: f.accounts }), n.invalidateQueries({ queryKey: f.portfolios }), n.invalidateQueries({ queryKey: f.netWorth });
|
|
305
327
|
}
|
|
306
328
|
})
|
|
307
329
|
});
|
|
308
|
-
},
|
|
309
|
-
${
|
|
310
|
-
allocations { items { ${
|
|
311
|
-
`,
|
|
330
|
+
}, j = `
|
|
331
|
+
${y}
|
|
332
|
+
allocations { items { ${v} } pageInfo { cursor hasMore } }
|
|
333
|
+
`, M = (e) => ({
|
|
312
334
|
...e,
|
|
313
335
|
allocations: e.allocations.items
|
|
314
|
-
}),
|
|
336
|
+
}), N = () => {
|
|
315
337
|
let { apiGatewayUrl: t } = e(), n = a({
|
|
316
|
-
queryKey:
|
|
317
|
-
queryFn: async () => (await
|
|
338
|
+
queryKey: f.modelPortfolios,
|
|
339
|
+
queryFn: async () => (await l(`query BraListModelPortfolios {
|
|
318
340
|
braListModelPortfolios {
|
|
319
|
-
items { ${
|
|
341
|
+
items { ${j} }
|
|
320
342
|
pageInfo { cursor hasMore }
|
|
321
343
|
}
|
|
322
|
-
}`, {}, t)).braListModelPortfolios.items.map(
|
|
344
|
+
}`, {}, t)).braListModelPortfolios.items.map(M)
|
|
323
345
|
});
|
|
324
346
|
return {
|
|
325
347
|
...n,
|
|
326
348
|
data: n.data ?? []
|
|
327
349
|
};
|
|
328
|
-
},
|
|
350
|
+
}, P = (t) => {
|
|
329
351
|
let { apiGatewayUrl: n } = e();
|
|
330
352
|
return a({
|
|
331
|
-
queryKey:
|
|
353
|
+
queryKey: f.modelPortfolio(t ?? ""),
|
|
332
354
|
enabled: !!t,
|
|
333
355
|
queryFn: async () => {
|
|
334
|
-
let e = await
|
|
356
|
+
let e = await l(`query BraModelPortfolio($id: ID!) {
|
|
335
357
|
braModelPortfolio(id: $id) {
|
|
336
|
-
${
|
|
358
|
+
${j}
|
|
337
359
|
}
|
|
338
360
|
}`, { id: t }, n);
|
|
339
|
-
return e.braModelPortfolio ?
|
|
361
|
+
return e.braModelPortfolio ? M(e.braModelPortfolio) : null;
|
|
340
362
|
}
|
|
341
363
|
});
|
|
342
|
-
},
|
|
364
|
+
}, F = () => {
|
|
343
365
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
344
366
|
return i({
|
|
345
|
-
mutationFn: async (e) =>
|
|
367
|
+
mutationFn: async (e) => M((await u(`mutation BraCreateModelPortfolio($input: BraCreateModelPortfolioInput!) {
|
|
346
368
|
braCreateModelPortfolio(input: $input) {
|
|
347
|
-
${
|
|
369
|
+
${j}
|
|
348
370
|
}
|
|
349
371
|
}`, { input: e }, t)).braCreateModelPortfolio),
|
|
350
|
-
...
|
|
372
|
+
...d({
|
|
351
373
|
success: "Model portfolio created",
|
|
352
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
374
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.modelPortfolios })
|
|
353
375
|
})
|
|
354
376
|
});
|
|
355
|
-
},
|
|
377
|
+
}, I = (t = {}) => {
|
|
356
378
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
357
|
-
queryKey: [...
|
|
358
|
-
queryFn: async () => (await
|
|
379
|
+
queryKey: [...f.goals, t],
|
|
380
|
+
queryFn: async () => (await l(`query BraListGoals($householdId: ID, $status: BraGoalStatus, $pagination: PaginationInput) {
|
|
359
381
|
braListGoals(householdId: $householdId, status: $status, pagination: $pagination) {
|
|
360
|
-
items { ${
|
|
382
|
+
items { ${x} }
|
|
361
383
|
pageInfo { cursor hasMore }
|
|
362
384
|
}
|
|
363
385
|
}`, {
|
|
364
386
|
householdId: t.householdId,
|
|
365
387
|
status: t.status,
|
|
366
|
-
pagination: t.pagination ??
|
|
388
|
+
pagination: t.pagination ?? p
|
|
367
389
|
}, n)).braListGoals
|
|
368
390
|
});
|
|
369
391
|
return {
|
|
@@ -371,16 +393,16 @@ var d = {
|
|
|
371
393
|
data: r.data?.items ?? [],
|
|
372
394
|
pageInfo: r.data?.pageInfo
|
|
373
395
|
};
|
|
374
|
-
},
|
|
396
|
+
}, L = (t) => {
|
|
375
397
|
let { apiGatewayUrl: n } = e();
|
|
376
398
|
return a({
|
|
377
|
-
queryKey:
|
|
399
|
+
queryKey: f.goal(t ?? ""),
|
|
378
400
|
enabled: !!t,
|
|
379
401
|
queryFn: async () => {
|
|
380
|
-
let e = await
|
|
402
|
+
let e = await l(`query BraGoal($id: ID!) {
|
|
381
403
|
braGoal(id: $id) {
|
|
382
|
-
${
|
|
383
|
-
fundings { items { ${
|
|
404
|
+
${x}
|
|
405
|
+
fundings { items { ${b} } pageInfo { cursor hasMore } }
|
|
384
406
|
}
|
|
385
407
|
}`, { id: t }, n);
|
|
386
408
|
if (!e.braGoal) return null;
|
|
@@ -391,13 +413,13 @@ var d = {
|
|
|
391
413
|
};
|
|
392
414
|
}
|
|
393
415
|
});
|
|
394
|
-
},
|
|
416
|
+
}, R = (t) => {
|
|
395
417
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
396
|
-
queryKey:
|
|
418
|
+
queryKey: f.goalFundings(t ?? ""),
|
|
397
419
|
enabled: !!t,
|
|
398
|
-
queryFn: async () => (await
|
|
420
|
+
queryFn: async () => (await l(`query BraListGoalFundings($goalId: ID!) {
|
|
399
421
|
braListGoalFundings(goalId: $goalId) {
|
|
400
|
-
items { ${
|
|
422
|
+
items { ${b} }
|
|
401
423
|
pageInfo { cursor hasMore }
|
|
402
424
|
}
|
|
403
425
|
}`, { goalId: t }, n)).braListGoalFundings.items
|
|
@@ -406,87 +428,87 @@ var d = {
|
|
|
406
428
|
...r,
|
|
407
429
|
data: r.data ?? []
|
|
408
430
|
};
|
|
409
|
-
},
|
|
431
|
+
}, z = () => {
|
|
410
432
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
411
433
|
return i({
|
|
412
|
-
mutationFn: async (e) => (await
|
|
413
|
-
braCreateGoal(input: $input) { ${
|
|
434
|
+
mutationFn: async (e) => (await u(`mutation BraCreateGoal($input: BraCreateGoalInput!) {
|
|
435
|
+
braCreateGoal(input: $input) { ${x} }
|
|
414
436
|
}`, { input: e }, t)).braCreateGoal,
|
|
415
|
-
...
|
|
437
|
+
...d({
|
|
416
438
|
success: "Goal created",
|
|
417
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
439
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.goals })
|
|
418
440
|
})
|
|
419
441
|
});
|
|
420
|
-
},
|
|
442
|
+
}, B = () => {
|
|
421
443
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
422
444
|
return i({
|
|
423
|
-
mutationFn: async (e) => (await
|
|
424
|
-
braUpdateGoal(id: $id, input: $input) { ${
|
|
445
|
+
mutationFn: async (e) => (await u(`mutation BraUpdateGoal($id: ID!, $input: BraUpdateGoalInput!) {
|
|
446
|
+
braUpdateGoal(id: $id, input: $input) { ${x} }
|
|
425
447
|
}`, e, t)).braUpdateGoal,
|
|
426
|
-
...
|
|
448
|
+
...d({
|
|
427
449
|
success: "Goal updated",
|
|
428
450
|
onSuccess: (e) => {
|
|
429
|
-
n.invalidateQueries({ queryKey:
|
|
451
|
+
n.invalidateQueries({ queryKey: f.goals }), n.invalidateQueries({ queryKey: f.goal(e.id) });
|
|
430
452
|
}
|
|
431
453
|
})
|
|
432
454
|
});
|
|
433
|
-
},
|
|
455
|
+
}, V = () => {
|
|
434
456
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
435
457
|
return i({
|
|
436
|
-
mutationFn: async (e) => (await
|
|
437
|
-
...
|
|
458
|
+
mutationFn: async (e) => (await u("mutation BraArchiveGoal($id: ID!) { braArchiveGoal(id: $id) }", { id: e }, t)).braArchiveGoal,
|
|
459
|
+
...d({
|
|
438
460
|
success: "Goal archived",
|
|
439
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
461
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.goals })
|
|
440
462
|
})
|
|
441
463
|
});
|
|
442
|
-
},
|
|
464
|
+
}, H = () => {
|
|
443
465
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
444
466
|
return i({
|
|
445
|
-
mutationFn: async (e) => (await
|
|
446
|
-
braRecalcGoalProjection(id: $id, fundedAmount: $fundedAmount) { ${
|
|
467
|
+
mutationFn: async (e) => (await u(`mutation BraRecalcGoalProjection($id: ID!, $fundedAmount: Float!) {
|
|
468
|
+
braRecalcGoalProjection(id: $id, fundedAmount: $fundedAmount) { ${x} }
|
|
447
469
|
}`, e, t)).braRecalcGoalProjection,
|
|
448
|
-
...
|
|
470
|
+
...d({
|
|
449
471
|
success: "Projection recalculated",
|
|
450
472
|
onSuccess: (e) => {
|
|
451
|
-
n.invalidateQueries({ queryKey:
|
|
473
|
+
n.invalidateQueries({ queryKey: f.goals }), n.invalidateQueries({ queryKey: f.goal(e.id) });
|
|
452
474
|
}
|
|
453
475
|
})
|
|
454
476
|
});
|
|
455
|
-
},
|
|
477
|
+
}, U = () => {
|
|
456
478
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
457
479
|
return i({
|
|
458
|
-
mutationFn: async (e) => (await
|
|
459
|
-
braLinkGoalFunding(input: $input) { ${
|
|
480
|
+
mutationFn: async (e) => (await u(`mutation BraLinkGoalFunding($input: BraLinkGoalFundingInput!) {
|
|
481
|
+
braLinkGoalFunding(input: $input) { ${b} }
|
|
460
482
|
}`, { input: e }, t)).braLinkGoalFunding,
|
|
461
|
-
...
|
|
483
|
+
...d({
|
|
462
484
|
success: "Funding linked",
|
|
463
485
|
onSuccess: (e) => {
|
|
464
|
-
n.invalidateQueries({ queryKey:
|
|
486
|
+
n.invalidateQueries({ queryKey: f.goalFundings(e.goalId) }), n.invalidateQueries({ queryKey: f.goal(e.goalId) });
|
|
465
487
|
}
|
|
466
488
|
})
|
|
467
489
|
});
|
|
468
|
-
},
|
|
490
|
+
}, W = () => {
|
|
469
491
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
470
492
|
return i({
|
|
471
|
-
mutationFn: async (e) => (await
|
|
472
|
-
...
|
|
493
|
+
mutationFn: async (e) => (await u("mutation BraUnlinkGoalFunding($id: ID!) { braUnlinkGoalFunding(id: $id) }", { id: e }, t)).braUnlinkGoalFunding,
|
|
494
|
+
...d({
|
|
473
495
|
success: "Funding unlinked",
|
|
474
496
|
onSuccess: () => {
|
|
475
|
-
n.invalidateQueries({ queryKey:
|
|
497
|
+
n.invalidateQueries({ queryKey: f.goals }), n.invalidateQueries({ queryKey: [...f.goals] }), n.invalidateQueries({ queryKey: ["brainyrich", "goal-fundings"] }), n.invalidateQueries({ queryKey: ["brainyrich", "goal"] });
|
|
476
498
|
}
|
|
477
499
|
})
|
|
478
500
|
});
|
|
479
|
-
},
|
|
501
|
+
}, ue = (t = {}) => {
|
|
480
502
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
481
|
-
queryKey: [...
|
|
482
|
-
queryFn: async () => (await
|
|
503
|
+
queryKey: [...f.households, t],
|
|
504
|
+
queryFn: async () => (await l(`query BraListHouseholds($status: BraHouseholdStatus, $pagination: PaginationInput) {
|
|
483
505
|
braListHouseholds(status: $status, pagination: $pagination) {
|
|
484
|
-
items { ${
|
|
506
|
+
items { ${S} }
|
|
485
507
|
pageInfo { cursor hasMore }
|
|
486
508
|
}
|
|
487
509
|
}`, {
|
|
488
510
|
status: t.status,
|
|
489
|
-
pagination: t.pagination ??
|
|
511
|
+
pagination: t.pagination ?? p
|
|
490
512
|
}, n)).braListHouseholds
|
|
491
513
|
});
|
|
492
514
|
return {
|
|
@@ -494,54 +516,54 @@ var d = {
|
|
|
494
516
|
data: r.data?.items ?? [],
|
|
495
517
|
pageInfo: r.data?.pageInfo
|
|
496
518
|
};
|
|
497
|
-
},
|
|
519
|
+
}, de = (t) => {
|
|
498
520
|
let { apiGatewayUrl: n } = e();
|
|
499
521
|
return a({
|
|
500
|
-
queryKey:
|
|
522
|
+
queryKey: f.household(t ?? ""),
|
|
501
523
|
enabled: !!t,
|
|
502
|
-
queryFn: async () => (await
|
|
503
|
-
braHousehold(id: $id) { ${
|
|
524
|
+
queryFn: async () => (await l(`query BraHousehold($id: ID!) {
|
|
525
|
+
braHousehold(id: $id) { ${S} }
|
|
504
526
|
}`, { id: t }, n)).braHousehold
|
|
505
527
|
});
|
|
506
|
-
},
|
|
528
|
+
}, fe = () => {
|
|
507
529
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
508
530
|
return i({
|
|
509
|
-
mutationFn: async (e) => (await
|
|
510
|
-
braCreateHousehold(input: $input) { ${
|
|
531
|
+
mutationFn: async (e) => (await u(`mutation BraCreateHousehold($input: BraCreateHouseholdInput!) {
|
|
532
|
+
braCreateHousehold(input: $input) { ${S} }
|
|
511
533
|
}`, { input: e }, t)).braCreateHousehold,
|
|
512
|
-
...
|
|
534
|
+
...d({
|
|
513
535
|
success: "Household created",
|
|
514
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
536
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.households })
|
|
515
537
|
})
|
|
516
538
|
});
|
|
517
|
-
},
|
|
539
|
+
}, pe = () => {
|
|
518
540
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
519
541
|
return i({
|
|
520
|
-
mutationFn: async (e) => (await
|
|
521
|
-
braUpdateHousehold(id: $id, input: $input) { ${
|
|
542
|
+
mutationFn: async (e) => (await u(`mutation BraUpdateHousehold($id: ID!, $input: BraUpdateHouseholdInput!) {
|
|
543
|
+
braUpdateHousehold(id: $id, input: $input) { ${S} }
|
|
522
544
|
}`, e, t)).braUpdateHousehold,
|
|
523
|
-
...
|
|
545
|
+
...d({
|
|
524
546
|
success: "Household updated",
|
|
525
547
|
onSuccess: (e) => {
|
|
526
|
-
n.invalidateQueries({ queryKey:
|
|
548
|
+
n.invalidateQueries({ queryKey: f.households }), n.invalidateQueries({ queryKey: f.household(e.id) });
|
|
527
549
|
}
|
|
528
550
|
})
|
|
529
551
|
});
|
|
530
|
-
},
|
|
552
|
+
}, me = () => {
|
|
531
553
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
532
554
|
return i({
|
|
533
|
-
mutationFn: async (e) => (await
|
|
534
|
-
...
|
|
555
|
+
mutationFn: async (e) => (await u("mutation BraArchiveHousehold($id: ID!) { braArchiveHousehold(id: $id) }", { id: e }, t)).braArchiveHousehold,
|
|
556
|
+
...d({
|
|
535
557
|
success: "Household archived",
|
|
536
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
558
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.households })
|
|
537
559
|
})
|
|
538
560
|
});
|
|
539
|
-
},
|
|
561
|
+
}, he = (t = {}) => {
|
|
540
562
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
541
|
-
queryKey: [...
|
|
542
|
-
queryFn: async () => (await
|
|
563
|
+
queryKey: [...f.insights, t],
|
|
564
|
+
queryFn: async () => (await l(`query BraListInsights($severity: BraInsightSeverity, $status: BraInsightStatus, $subjectId: ID, $subjectType: String, $pagination: PaginationInput) {
|
|
543
565
|
braListInsights(severity: $severity, status: $status, subjectId: $subjectId, subjectType: $subjectType, pagination: $pagination) {
|
|
544
|
-
items { ${
|
|
566
|
+
items { ${C} }
|
|
545
567
|
pageInfo { cursor hasMore }
|
|
546
568
|
}
|
|
547
569
|
}`, {
|
|
@@ -549,7 +571,7 @@ var d = {
|
|
|
549
571
|
status: t.status,
|
|
550
572
|
subjectId: t.subjectId,
|
|
551
573
|
subjectType: t.subjectType,
|
|
552
|
-
pagination: t.pagination ??
|
|
574
|
+
pagination: t.pagination ?? p
|
|
553
575
|
}, n)).braListInsights
|
|
554
576
|
});
|
|
555
577
|
return {
|
|
@@ -557,139 +579,139 @@ var d = {
|
|
|
557
579
|
data: r.data?.items ?? [],
|
|
558
580
|
pageInfo: r.data?.pageInfo
|
|
559
581
|
};
|
|
560
|
-
},
|
|
582
|
+
}, ge = () => {
|
|
561
583
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
562
584
|
return i({
|
|
563
|
-
mutationFn: async (e) => (await
|
|
564
|
-
braCreateInsight(input: $input) { ${
|
|
585
|
+
mutationFn: async (e) => (await u(`mutation BraCreateInsight($input: BraCreateInsightInput!) {
|
|
586
|
+
braCreateInsight(input: $input) { ${C} }
|
|
565
587
|
}`, { input: e }, t)).braCreateInsight,
|
|
566
|
-
...
|
|
588
|
+
...d({
|
|
567
589
|
success: "Insight created",
|
|
568
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
590
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.insights })
|
|
569
591
|
})
|
|
570
592
|
});
|
|
571
|
-
},
|
|
593
|
+
}, _e = () => {
|
|
572
594
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
573
595
|
return i({
|
|
574
|
-
mutationFn: async (e) => (await
|
|
575
|
-
braAcknowledgeInsight(id: $id) { ${
|
|
596
|
+
mutationFn: async (e) => (await u(`mutation BraAcknowledgeInsight($id: ID!) {
|
|
597
|
+
braAcknowledgeInsight(id: $id) { ${C} }
|
|
576
598
|
}`, { id: e }, t)).braAcknowledgeInsight,
|
|
577
|
-
...
|
|
599
|
+
...d({
|
|
578
600
|
success: "Insight acknowledged",
|
|
579
601
|
onSuccess: (e) => {
|
|
580
|
-
n.invalidateQueries({ queryKey:
|
|
602
|
+
n.invalidateQueries({ queryKey: f.insights }), n.invalidateQueries({ queryKey: f.insight(e.id) });
|
|
581
603
|
}
|
|
582
604
|
})
|
|
583
605
|
});
|
|
584
|
-
},
|
|
606
|
+
}, ve = () => {
|
|
585
607
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
586
608
|
return i({
|
|
587
|
-
mutationFn: async (e) => (await
|
|
588
|
-
braDismissInsight(id: $id) { ${
|
|
609
|
+
mutationFn: async (e) => (await u(`mutation BraDismissInsight($id: ID!) {
|
|
610
|
+
braDismissInsight(id: $id) { ${C} }
|
|
589
611
|
}`, { id: e }, t)).braDismissInsight,
|
|
590
|
-
...
|
|
612
|
+
...d({
|
|
591
613
|
success: "Insight dismissed",
|
|
592
614
|
onSuccess: (e) => {
|
|
593
|
-
n.invalidateQueries({ queryKey:
|
|
615
|
+
n.invalidateQueries({ queryKey: f.insights }), n.invalidateQueries({ queryKey: f.insight(e.id) });
|
|
594
616
|
}
|
|
595
617
|
})
|
|
596
618
|
});
|
|
597
|
-
},
|
|
619
|
+
}, ye = () => {
|
|
598
620
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
599
621
|
return i({
|
|
600
|
-
mutationFn: async (e) => (await
|
|
601
|
-
braResolveInsight(id: $id) { ${
|
|
622
|
+
mutationFn: async (e) => (await u(`mutation BraResolveInsight($id: ID!) {
|
|
623
|
+
braResolveInsight(id: $id) { ${C} }
|
|
602
624
|
}`, { id: e }, t)).braResolveInsight,
|
|
603
|
-
...
|
|
625
|
+
...d({
|
|
604
626
|
success: "Insight resolved",
|
|
605
627
|
onSuccess: (e) => {
|
|
606
|
-
n.invalidateQueries({ queryKey:
|
|
628
|
+
n.invalidateQueries({ queryKey: f.insights }), n.invalidateQueries({ queryKey: f.insight(e.id) });
|
|
607
629
|
}
|
|
608
630
|
})
|
|
609
631
|
});
|
|
610
|
-
},
|
|
632
|
+
}, be = "kind insightType severity title detail metrics", xe = (t) => {
|
|
611
633
|
let { apiGatewayUrl: n } = e();
|
|
612
634
|
return a({
|
|
613
|
-
queryKey:
|
|
635
|
+
queryKey: f.riskSignals(t ?? ""),
|
|
614
636
|
enabled: !!t,
|
|
615
|
-
queryFn: async () => (await
|
|
637
|
+
queryFn: async () => (await l(`query BraPortfolioRiskSignals($portfolioId: ID!) {
|
|
616
638
|
braPortfolioRiskSignals(portfolioId: $portfolioId) {
|
|
617
639
|
portfolioId workspaceId asOf totalValue holdingsConsidered
|
|
618
|
-
signals { ${
|
|
640
|
+
signals { ${be} }
|
|
619
641
|
}
|
|
620
642
|
}`, { portfolioId: t }, n)).braPortfolioRiskSignals
|
|
621
643
|
});
|
|
622
|
-
},
|
|
644
|
+
}, Se = () => {
|
|
623
645
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
624
646
|
return i({
|
|
625
|
-
mutationFn: async (e) => (await
|
|
626
|
-
braGenerateRiskInsights(portfolioId: $portfolioId) { ${
|
|
647
|
+
mutationFn: async (e) => (await u(`mutation BraGenerateRiskInsights($portfolioId: ID!) {
|
|
648
|
+
braGenerateRiskInsights(portfolioId: $portfolioId) { ${C} }
|
|
627
649
|
}`, { portfolioId: e }, t)).braGenerateRiskInsights,
|
|
628
|
-
...
|
|
650
|
+
...d({
|
|
629
651
|
success: (e) => `${e.length} risk insight${e.length === 1 ? "" : "s"} recorded`,
|
|
630
652
|
onSuccess: (e, t) => {
|
|
631
|
-
n.invalidateQueries({ queryKey:
|
|
653
|
+
n.invalidateQueries({ queryKey: f.insights }), n.invalidateQueries({ queryKey: f.riskSignals(t) });
|
|
632
654
|
}
|
|
633
655
|
})
|
|
634
656
|
});
|
|
635
|
-
},
|
|
657
|
+
}, Ce = (t) => {
|
|
636
658
|
let { apiGatewayUrl: n } = e();
|
|
637
659
|
return a({
|
|
638
|
-
queryKey:
|
|
660
|
+
queryKey: f.riskSummary(t ?? ""),
|
|
639
661
|
enabled: !1,
|
|
640
|
-
queryFn: async () => (await
|
|
662
|
+
queryFn: async () => (await l("query BraPortfolioRiskSummary($portfolioId: ID!) {\n braPortfolioRiskSummary(portfolioId: $portfolioId) {\n generated summary provider reason signalsConsidered\n }\n }", { portfolioId: t }, n)).braPortfolioRiskSummary
|
|
641
663
|
});
|
|
642
|
-
},
|
|
664
|
+
}, we = "symbol marketValue costBasis unrealizedLoss lossPctOfPortfolio severity washSaleRisk washSaleReason metrics", Te = (t, n) => {
|
|
643
665
|
let { apiGatewayUrl: r } = e();
|
|
644
666
|
return a({
|
|
645
|
-
queryKey: [...
|
|
667
|
+
queryKey: [...f.taxLossOpportunities(t ?? ""), n],
|
|
646
668
|
enabled: !!t,
|
|
647
|
-
queryFn: async () => (await
|
|
669
|
+
queryFn: async () => (await l(`query BraTaxLossOpportunities($portfolioId: ID!, $thresholds: BraTaxLossThresholdInput) {
|
|
648
670
|
braTaxLossOpportunities(portfolioId: $portfolioId, thresholds: $thresholds) {
|
|
649
671
|
portfolioId workspaceId asOf
|
|
650
672
|
thresholds { minLossAmount minLossPct }
|
|
651
|
-
opportunities { ${
|
|
673
|
+
opportunities { ${we} }
|
|
652
674
|
}
|
|
653
675
|
}`, {
|
|
654
676
|
portfolioId: t,
|
|
655
677
|
thresholds: n ?? null
|
|
656
678
|
}, r)).braTaxLossOpportunities
|
|
657
679
|
});
|
|
658
|
-
},
|
|
680
|
+
}, Ee = () => {
|
|
659
681
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
660
682
|
return i({
|
|
661
|
-
mutationFn: async ({ portfolioId: e, thresholds: n }) => (await
|
|
662
|
-
braHarvestTaxLossInsights(portfolioId: $portfolioId, thresholds: $thresholds) { ${
|
|
683
|
+
mutationFn: async ({ portfolioId: e, thresholds: n }) => (await u(`mutation BraHarvestTaxLossInsights($portfolioId: ID!, $thresholds: BraTaxLossThresholdInput) {
|
|
684
|
+
braHarvestTaxLossInsights(portfolioId: $portfolioId, thresholds: $thresholds) { ${C} }
|
|
663
685
|
}`, {
|
|
664
686
|
portfolioId: e,
|
|
665
687
|
thresholds: n ?? null
|
|
666
688
|
}, t)).braHarvestTaxLossInsights,
|
|
667
|
-
...
|
|
689
|
+
...d({
|
|
668
690
|
success: (e) => `${e.length} tax-loss insight${e.length === 1 ? "" : "s"} recorded`,
|
|
669
691
|
onSuccess: (e, t) => {
|
|
670
|
-
n.invalidateQueries({ queryKey:
|
|
692
|
+
n.invalidateQueries({ queryKey: f.insights }), n.invalidateQueries({ queryKey: f.taxLossOpportunities(t.portfolioId) });
|
|
671
693
|
}
|
|
672
694
|
})
|
|
673
695
|
});
|
|
674
|
-
},
|
|
696
|
+
}, De = () => {
|
|
675
697
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
676
698
|
return i({
|
|
677
|
-
mutationFn: async (e) => (await
|
|
678
|
-
braRecordTransaction(input: $input) { ${
|
|
699
|
+
mutationFn: async (e) => (await u(`mutation BraRecordTransaction($input: BraCreateTransactionInput!) {
|
|
700
|
+
braRecordTransaction(input: $input) { ${h} }
|
|
679
701
|
}`, { input: e }, t)).braRecordTransaction,
|
|
680
|
-
...
|
|
702
|
+
...d({
|
|
681
703
|
success: "Transaction recorded",
|
|
682
704
|
onSuccess: (e) => {
|
|
683
|
-
n.invalidateQueries({ queryKey:
|
|
705
|
+
n.invalidateQueries({ queryKey: f.transactions }), n.invalidateQueries({ queryKey: f.account(e.accountId) }), n.invalidateQueries({ queryKey: f.netWorth });
|
|
684
706
|
}
|
|
685
707
|
})
|
|
686
708
|
});
|
|
687
|
-
},
|
|
709
|
+
}, Oe = (t = {}) => {
|
|
688
710
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
689
|
-
queryKey: [...
|
|
690
|
-
queryFn: async () => (await
|
|
711
|
+
queryKey: [...f.rebalances, t],
|
|
712
|
+
queryFn: async () => (await l(`query BraListRebalanceProposals($householdId: ID, $portfolioId: ID, $status: BraRebalanceStatus) {
|
|
691
713
|
braListRebalanceProposals(householdId: $householdId, portfolioId: $portfolioId, status: $status) {
|
|
692
|
-
items { ${
|
|
714
|
+
items { ${w} }
|
|
693
715
|
pageInfo { cursor hasMore }
|
|
694
716
|
}
|
|
695
717
|
}`, {
|
|
@@ -702,31 +724,31 @@ var d = {
|
|
|
702
724
|
...r,
|
|
703
725
|
data: r.data ?? []
|
|
704
726
|
};
|
|
705
|
-
},
|
|
727
|
+
}, ke = () => {
|
|
706
728
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
707
729
|
return i({
|
|
708
|
-
mutationFn: async (e) => (await
|
|
709
|
-
braCreateRebalanceProposal(input: $input) { ${
|
|
730
|
+
mutationFn: async (e) => (await u(`mutation BraCreateRebalanceProposal($input: BraCreateRebalanceProposalInput!) {
|
|
731
|
+
braCreateRebalanceProposal(input: $input) { ${w} }
|
|
710
732
|
}`, { input: e }, t)).braCreateRebalanceProposal,
|
|
711
|
-
...
|
|
733
|
+
...d({
|
|
712
734
|
success: "Rebalance proposal created",
|
|
713
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
735
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.rebalances })
|
|
714
736
|
})
|
|
715
737
|
});
|
|
716
|
-
},
|
|
738
|
+
}, Ae = () => {
|
|
717
739
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
718
740
|
return i({
|
|
719
|
-
mutationFn: async (e) => (await
|
|
720
|
-
braTransitionRebalanceProposal(id: $id, status: $status) { ${
|
|
741
|
+
mutationFn: async (e) => (await u(`mutation BraTransitionRebalanceProposal($id: ID!, $status: BraRebalanceStatus!) {
|
|
742
|
+
braTransitionRebalanceProposal(id: $id, status: $status) { ${w} }
|
|
721
743
|
}`, e, t)).braTransitionRebalanceProposal,
|
|
722
|
-
...
|
|
744
|
+
...d({
|
|
723
745
|
success: (e) => `Rebalance ${e.status.toLowerCase()}`,
|
|
724
|
-
onSuccess: () => n.invalidateQueries({ queryKey:
|
|
746
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.rebalances })
|
|
725
747
|
})
|
|
726
748
|
});
|
|
727
749
|
};
|
|
728
|
-
function
|
|
729
|
-
let { apiGatewayUrl: n } = e(), i = t.pageSize ??
|
|
750
|
+
function G(t) {
|
|
751
|
+
let { apiGatewayUrl: n } = e(), i = t.pageSize ?? p.limit ?? 100, a = r({
|
|
730
752
|
queryKey: t.queryKey,
|
|
731
753
|
enabled: t.enabled ?? !0,
|
|
732
754
|
initialPageParam: null,
|
|
@@ -734,7 +756,7 @@ function X(t) {
|
|
|
734
756
|
let r = e ? {
|
|
735
757
|
limit: i,
|
|
736
758
|
cursor: e
|
|
737
|
-
} : { limit: i }, a = await
|
|
759
|
+
} : { limit: i }, a = await l(t.query, t.buildVariables(r), n);
|
|
738
760
|
return t.select(a);
|
|
739
761
|
},
|
|
740
762
|
getNextPageParam: (e) => e.pageInfo.hasMore && e.pageInfo.cursor ? e.pageInfo.cursor : void 0
|
|
@@ -753,15 +775,15 @@ function X(t) {
|
|
|
753
775
|
}
|
|
754
776
|
};
|
|
755
777
|
}
|
|
756
|
-
var
|
|
778
|
+
var je = (e = {}) => G({
|
|
757
779
|
queryKey: [
|
|
758
|
-
...
|
|
780
|
+
...f.accounts,
|
|
759
781
|
"paged",
|
|
760
782
|
e
|
|
761
783
|
],
|
|
762
784
|
query: `query BraListAccounts($householdId: ID, $status: BraAccountStatus, $pagination: PaginationInput) {
|
|
763
785
|
braListAccounts(householdId: $householdId, status: $status, pagination: $pagination) {
|
|
764
|
-
items { ${
|
|
786
|
+
items { ${g} }
|
|
765
787
|
pageInfo { cursor hasMore }
|
|
766
788
|
}
|
|
767
789
|
}`,
|
|
@@ -771,15 +793,15 @@ var Ee = (e = {}) => X({
|
|
|
771
793
|
pagination: t
|
|
772
794
|
}),
|
|
773
795
|
select: (e) => e.braListAccounts
|
|
774
|
-
}),
|
|
796
|
+
}), Me = (e = {}) => G({
|
|
775
797
|
queryKey: [
|
|
776
|
-
...
|
|
798
|
+
...f.portfolios,
|
|
777
799
|
"paged",
|
|
778
800
|
e
|
|
779
801
|
],
|
|
780
802
|
query: `query BraListPortfolios($householdId: ID, $status: BraPortfolioStatus, $pagination: PaginationInput) {
|
|
781
803
|
braListPortfolios(householdId: $householdId, status: $status, pagination: $pagination) {
|
|
782
|
-
items { ${
|
|
804
|
+
items { ${_} }
|
|
783
805
|
pageInfo { cursor hasMore }
|
|
784
806
|
}
|
|
785
807
|
}`,
|
|
@@ -789,15 +811,15 @@ var Ee = (e = {}) => X({
|
|
|
789
811
|
pagination: t
|
|
790
812
|
}),
|
|
791
813
|
select: (e) => e.braListPortfolios
|
|
792
|
-
}),
|
|
814
|
+
}), Ne = (e = {}) => G({
|
|
793
815
|
queryKey: [
|
|
794
|
-
...
|
|
816
|
+
...f.goals,
|
|
795
817
|
"paged",
|
|
796
818
|
e
|
|
797
819
|
],
|
|
798
820
|
query: `query BraListGoals($householdId: ID, $status: BraGoalStatus, $pagination: PaginationInput) {
|
|
799
821
|
braListGoals(householdId: $householdId, status: $status, pagination: $pagination) {
|
|
800
|
-
items { ${
|
|
822
|
+
items { ${x} }
|
|
801
823
|
pageInfo { cursor hasMore }
|
|
802
824
|
}
|
|
803
825
|
}`,
|
|
@@ -807,15 +829,15 @@ var Ee = (e = {}) => X({
|
|
|
807
829
|
pagination: t
|
|
808
830
|
}),
|
|
809
831
|
select: (e) => e.braListGoals
|
|
810
|
-
}),
|
|
832
|
+
}), Pe = (e = {}) => G({
|
|
811
833
|
queryKey: [
|
|
812
|
-
...
|
|
834
|
+
...f.households,
|
|
813
835
|
"paged",
|
|
814
836
|
e
|
|
815
837
|
],
|
|
816
838
|
query: `query BraListHouseholds($status: BraHouseholdStatus, $pagination: PaginationInput) {
|
|
817
839
|
braListHouseholds(status: $status, pagination: $pagination) {
|
|
818
|
-
items { ${
|
|
840
|
+
items { ${S} }
|
|
819
841
|
pageInfo { cursor hasMore }
|
|
820
842
|
}
|
|
821
843
|
}`,
|
|
@@ -824,15 +846,15 @@ var Ee = (e = {}) => X({
|
|
|
824
846
|
pagination: t
|
|
825
847
|
}),
|
|
826
848
|
select: (e) => e.braListHouseholds
|
|
827
|
-
}),
|
|
849
|
+
}), Fe = (e = {}) => G({
|
|
828
850
|
queryKey: [
|
|
829
|
-
...
|
|
851
|
+
...f.insights,
|
|
830
852
|
"paged",
|
|
831
853
|
e
|
|
832
854
|
],
|
|
833
855
|
query: `query BraListInsights($severity: BraInsightSeverity, $status: BraInsightStatus, $subjectId: ID, $subjectType: String, $pagination: PaginationInput) {
|
|
834
856
|
braListInsights(severity: $severity, status: $status, subjectId: $subjectId, subjectType: $subjectType, pagination: $pagination) {
|
|
835
|
-
items { ${
|
|
857
|
+
items { ${C} }
|
|
836
858
|
pageInfo { cursor hasMore }
|
|
837
859
|
}
|
|
838
860
|
}`,
|
|
@@ -844,15 +866,15 @@ var Ee = (e = {}) => X({
|
|
|
844
866
|
pagination: t
|
|
845
867
|
}),
|
|
846
868
|
select: (e) => e.braListInsights
|
|
847
|
-
}),
|
|
869
|
+
}), Ie = (e = {}) => G({
|
|
848
870
|
queryKey: [
|
|
849
|
-
...
|
|
871
|
+
...f.transactions,
|
|
850
872
|
"paged",
|
|
851
873
|
e
|
|
852
874
|
],
|
|
853
875
|
query: `query BraListTransactions($accountId: ID, $type: BraTransactionType, $pagination: PaginationInput) {
|
|
854
876
|
braListTransactions(accountId: $accountId, type: $type, pagination: $pagination) {
|
|
855
|
-
items { ${
|
|
877
|
+
items { ${h} }
|
|
856
878
|
pageInfo { cursor hasMore }
|
|
857
879
|
}
|
|
858
880
|
}`,
|
|
@@ -863,7 +885,7 @@ var Ee = (e = {}) => X({
|
|
|
863
885
|
}),
|
|
864
886
|
select: (e) => e.braListTransactions
|
|
865
887
|
});
|
|
866
|
-
async function
|
|
888
|
+
async function K(e, t = 200, n = 500) {
|
|
867
889
|
let r = [], i;
|
|
868
890
|
for (let a = 0; a < n; a++) {
|
|
869
891
|
let n = await e(i ? {
|
|
@@ -875,10 +897,10 @@ async function Q(e, t = 200, n = 500) {
|
|
|
875
897
|
}
|
|
876
898
|
return r;
|
|
877
899
|
}
|
|
878
|
-
async function
|
|
879
|
-
return
|
|
900
|
+
async function Le(e, t = {}, n = 200) {
|
|
901
|
+
return K(async (n) => (await l(`query BraListTransactions($accountId: ID, $type: BraTransactionType, $pagination: PaginationInput) {
|
|
880
902
|
braListTransactions(accountId: $accountId, type: $type, pagination: $pagination) {
|
|
881
|
-
items { ${
|
|
903
|
+
items { ${h} }
|
|
882
904
|
pageInfo { cursor hasMore }
|
|
883
905
|
}
|
|
884
906
|
}`, {
|
|
@@ -887,10 +909,10 @@ async function je(e, t = {}, n = 200) {
|
|
|
887
909
|
pagination: n
|
|
888
910
|
}, e)).braListTransactions, n);
|
|
889
911
|
}
|
|
890
|
-
async function
|
|
891
|
-
return
|
|
912
|
+
async function Re(e, t = {}, n = 200) {
|
|
913
|
+
return K(async (n) => (await l(`query BraListHoldings($accountId: ID, $portfolioId: ID, $pagination: PaginationInput) {
|
|
892
914
|
braListHoldings(accountId: $accountId, portfolioId: $portfolioId, pagination: $pagination) {
|
|
893
|
-
items { ${
|
|
915
|
+
items { ${m} }
|
|
894
916
|
pageInfo { cursor hasMore }
|
|
895
917
|
}
|
|
896
918
|
}`, {
|
|
@@ -899,24 +921,24 @@ async function Me(e, t = {}, n = 200) {
|
|
|
899
921
|
pagination: n
|
|
900
922
|
}, e)).braListHoldings, n);
|
|
901
923
|
}
|
|
902
|
-
var
|
|
924
|
+
var ze = (t = {}) => {
|
|
903
925
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
904
926
|
queryKey: [
|
|
905
|
-
...
|
|
927
|
+
...f.transactions,
|
|
906
928
|
"all",
|
|
907
929
|
t
|
|
908
930
|
],
|
|
909
|
-
queryFn: () =>
|
|
931
|
+
queryFn: () => Le(n, t)
|
|
910
932
|
});
|
|
911
933
|
return {
|
|
912
934
|
...r,
|
|
913
935
|
data: r.data ?? []
|
|
914
936
|
};
|
|
915
937
|
};
|
|
916
|
-
async function
|
|
917
|
-
return
|
|
938
|
+
async function q(e, t = {}, n = 200) {
|
|
939
|
+
return K(async (n) => (await l(`query BraListAccounts($householdId: ID, $status: BraAccountStatus, $pagination: PaginationInput) {
|
|
918
940
|
braListAccounts(householdId: $householdId, status: $status, pagination: $pagination) {
|
|
919
|
-
items { ${
|
|
941
|
+
items { ${g} }
|
|
920
942
|
pageInfo { cursor hasMore }
|
|
921
943
|
}
|
|
922
944
|
}`, {
|
|
@@ -925,21 +947,206 @@ async function $(e, t = {}, n = 200) {
|
|
|
925
947
|
pagination: n
|
|
926
948
|
}, e)).braListAccounts, n);
|
|
927
949
|
}
|
|
928
|
-
var
|
|
950
|
+
var Be = (t = {}) => {
|
|
929
951
|
let { apiGatewayUrl: n } = e(), r = a({
|
|
930
952
|
queryKey: [
|
|
931
|
-
...
|
|
953
|
+
...f.accounts,
|
|
932
954
|
"all",
|
|
933
955
|
t
|
|
934
956
|
],
|
|
935
|
-
queryFn: () =>
|
|
957
|
+
queryFn: () => q(n, t)
|
|
936
958
|
});
|
|
937
959
|
return {
|
|
938
960
|
...r,
|
|
939
961
|
data: r.data ?? []
|
|
940
962
|
};
|
|
963
|
+
}, J = "\n id workspaceId userId role status displayName email invitedById createdAt updatedAt\n", Ve = () => {
|
|
964
|
+
let { apiGatewayUrl: t } = e();
|
|
965
|
+
return a({
|
|
966
|
+
queryKey: f.myAdvisorProfile,
|
|
967
|
+
queryFn: async () => (await l(`query BraMyAdvisorProfile { braMyAdvisorProfile { ${J} } }`, {}, t)).braMyAdvisorProfile
|
|
968
|
+
});
|
|
969
|
+
}, He = () => {
|
|
970
|
+
let { apiGatewayUrl: t } = e(), n = o();
|
|
971
|
+
return i({
|
|
972
|
+
mutationFn: async (e) => (await u(`mutation BraEnsureAdvisorProfile($input: BraEnsureAdvisorInput!) {
|
|
973
|
+
braEnsureAdvisorProfile(input: $input) { ${J} }
|
|
974
|
+
}`, { input: e }, t)).braEnsureAdvisorProfile,
|
|
975
|
+
...d({
|
|
976
|
+
success: (e) => `${e.displayName ?? e.userId} is on the firm roster as ${e.role}`,
|
|
977
|
+
onSuccess: () => {
|
|
978
|
+
n.invalidateQueries({ queryKey: f.myAdvisorProfile }), n.invalidateQueries({ queryKey: f.advisors });
|
|
979
|
+
}
|
|
980
|
+
})
|
|
981
|
+
});
|
|
982
|
+
}, Ue = () => {
|
|
983
|
+
let { apiGatewayUrl: t } = e(), n = a({
|
|
984
|
+
queryKey: f.advisors,
|
|
985
|
+
queryFn: async () => (await l(`query BraListAdvisors { braListAdvisors { ${J} } }`, {}, t)).braListAdvisors
|
|
986
|
+
});
|
|
987
|
+
return {
|
|
988
|
+
...n,
|
|
989
|
+
data: n.data ?? []
|
|
990
|
+
};
|
|
991
|
+
}, We = () => {
|
|
992
|
+
let { apiGatewayUrl: t } = e(), n = o();
|
|
993
|
+
return i({
|
|
994
|
+
mutationFn: async ({ userId: e, role: n }) => (await u(`mutation BraSetAdvisorRole($userId: ID!, $role: BraAdvisorRole!) {
|
|
995
|
+
braSetAdvisorRole(userId: $userId, role: $role) { ${J} }
|
|
996
|
+
}`, {
|
|
997
|
+
userId: e,
|
|
998
|
+
role: n
|
|
999
|
+
}, t)).braSetAdvisorRole,
|
|
1000
|
+
...d({
|
|
1001
|
+
success: (e) => `Role updated to ${e.role}`,
|
|
1002
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.advisors })
|
|
1003
|
+
})
|
|
1004
|
+
});
|
|
1005
|
+
}, Ge = () => {
|
|
1006
|
+
let { apiGatewayUrl: t } = e();
|
|
1007
|
+
return a({
|
|
1008
|
+
queryKey: f.firmReport,
|
|
1009
|
+
queryFn: async () => (await l("query BraFirmReport {\n braFirmReport {\n workspaceId asOf totalAdvisors totalHouseholds totalAum currency\n byAdvisor { advisorId displayName email role householdCount aum }\n }\n }", {}, t)).braFirmReport,
|
|
1010
|
+
retry: !1
|
|
1011
|
+
});
|
|
1012
|
+
}, Y = "\n id workspaceId advisorId firmName logoFileId primaryColor secondaryColor\n contactEmail disclaimer createdAt updatedAt\n", Ke = () => {
|
|
1013
|
+
let { apiGatewayUrl: t } = e();
|
|
1014
|
+
return a({
|
|
1015
|
+
queryKey: f.myAdvisorBranding,
|
|
1016
|
+
queryFn: async () => (await l(`query BraMyAdvisorBranding { braMyAdvisorBranding { ${Y} } }`, {}, t)).braMyAdvisorBranding
|
|
1017
|
+
});
|
|
1018
|
+
}, qe = () => {
|
|
1019
|
+
let { apiGatewayUrl: t } = e(), n = o();
|
|
1020
|
+
return i({
|
|
1021
|
+
mutationFn: async (e) => (await u(`mutation BraUpsertMyAdvisorBranding($input: BraUpsertAdvisorBrandingInput!) {
|
|
1022
|
+
braUpsertMyAdvisorBranding(input: $input) { ${Y} }
|
|
1023
|
+
}`, { input: e }, t)).braUpsertMyAdvisorBranding,
|
|
1024
|
+
...d({
|
|
1025
|
+
success: "Client-portal branding saved",
|
|
1026
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.myAdvisorBranding })
|
|
1027
|
+
})
|
|
1028
|
+
});
|
|
1029
|
+
}, X = "\n id workspaceId advisorId householdId name frequency status lastRunAt nextRunAt createdAt updatedAt\n", Z = "\n id workspaceId scheduledReportId advisorId householdId status periodStart periodEnd\n errorMessage generatedAt notifiedAt createdAt\n", Je = () => {
|
|
1030
|
+
let { apiGatewayUrl: t } = e(), n = a({
|
|
1031
|
+
queryKey: f.scheduledReports,
|
|
1032
|
+
queryFn: async () => (await l(`query BraListScheduledReports { braListScheduledReports { ${X} } }`, {}, t)).braListScheduledReports
|
|
1033
|
+
});
|
|
1034
|
+
return {
|
|
1035
|
+
...n,
|
|
1036
|
+
data: n.data ?? []
|
|
1037
|
+
};
|
|
1038
|
+
}, Ye = () => {
|
|
1039
|
+
let { apiGatewayUrl: t } = e(), n = o();
|
|
1040
|
+
return i({
|
|
1041
|
+
mutationFn: async (e) => (await u(`mutation BraCreateScheduledReport($input: BraCreateScheduledReportInput!) {
|
|
1042
|
+
braCreateScheduledReport(input: $input) { ${X} }
|
|
1043
|
+
}`, { input: e }, t)).braCreateScheduledReport,
|
|
1044
|
+
...d({
|
|
1045
|
+
success: (e) => `"${e.name}" scheduled (${e.frequency.toLowerCase()})`,
|
|
1046
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.scheduledReports })
|
|
1047
|
+
})
|
|
1048
|
+
});
|
|
1049
|
+
}, Xe = () => {
|
|
1050
|
+
let { apiGatewayUrl: t } = e(), n = o();
|
|
1051
|
+
return i({
|
|
1052
|
+
mutationFn: async ({ id: e, pause: n }) => {
|
|
1053
|
+
let r = n ? "BraPauseScheduledReport" : "BraResumeScheduledReport", i = n ? "braPauseScheduledReport" : "braResumeScheduledReport";
|
|
1054
|
+
return (await u(`mutation ${r}($id: ID!) { ${i}(id: $id) { ${X} } }`, { id: e }, t))[i];
|
|
1055
|
+
},
|
|
1056
|
+
...d({
|
|
1057
|
+
success: (e) => e.status === "PAUSED" ? "Schedule paused" : "Schedule resumed",
|
|
1058
|
+
onSuccess: () => n.invalidateQueries({ queryKey: f.scheduledReports })
|
|
1059
|
+
})
|
|
1060
|
+
});
|
|
1061
|
+
}, Ze = (t) => {
|
|
1062
|
+
let { apiGatewayUrl: n } = e(), r = a({
|
|
1063
|
+
queryKey: f.reportRuns(t),
|
|
1064
|
+
queryFn: async () => (await l(`query BraListReportRuns($scheduledReportId: ID) {
|
|
1065
|
+
braListReportRuns(scheduledReportId: $scheduledReportId) { ${Z} }
|
|
1066
|
+
}`, { scheduledReportId: t ?? null }, n)).braListReportRuns
|
|
1067
|
+
});
|
|
1068
|
+
return {
|
|
1069
|
+
...r,
|
|
1070
|
+
data: r.data ?? []
|
|
1071
|
+
};
|
|
1072
|
+
}, Qe = () => {
|
|
1073
|
+
let { apiGatewayUrl: t } = e(), n = o();
|
|
1074
|
+
return i({
|
|
1075
|
+
mutationFn: async (e) => (await u(`mutation BraGenerateReportNow($input: BraGenerateReportNowInput!) {
|
|
1076
|
+
braGenerateReportNow(input: $input) { ${Z} }
|
|
1077
|
+
}`, { input: e }, t)).braGenerateReportNow,
|
|
1078
|
+
...d({
|
|
1079
|
+
success: "Report is generating — a \"report ready\" notification will follow",
|
|
1080
|
+
onSuccess: (e) => {
|
|
1081
|
+
n.invalidateQueries({ queryKey: f.reportRuns(e.scheduledReportId ?? void 0) }), n.invalidateQueries({ queryKey: f.reportRuns(void 0) }), n.invalidateQueries({ queryKey: f.scheduledReports });
|
|
1082
|
+
}
|
|
1083
|
+
})
|
|
1084
|
+
});
|
|
1085
|
+
};
|
|
1086
|
+
async function Q(e, t, n) {
|
|
1087
|
+
let r = (await l("query BraReportRunPdf($id: ID!) { braReportRunPdf(id: $id) }", { id: t }, e)).braReportRunPdf, i = atob(r), a = new Uint8Array(i.length);
|
|
1088
|
+
for (let e = 0; e < i.length; e += 1) a[e] = i.charCodeAt(e);
|
|
1089
|
+
let o = new Blob([a], { type: "application/pdf" }), s = URL.createObjectURL(o), c = document.createElement("a");
|
|
1090
|
+
c.href = s, c.download = n, document.body.appendChild(c), c.click(), c.remove(), URL.revokeObjectURL(s);
|
|
1091
|
+
}
|
|
1092
|
+
var $e = () => {
|
|
1093
|
+
let { apiGatewayUrl: t } = e();
|
|
1094
|
+
return i({
|
|
1095
|
+
mutationFn: async (e) => Q(t, e.id, `brainyrich-report-${e.id}.pdf`),
|
|
1096
|
+
...d({ success: "PDF downloaded" })
|
|
1097
|
+
});
|
|
1098
|
+
}, et = (t) => {
|
|
1099
|
+
let { apiGatewayUrl: n } = e();
|
|
1100
|
+
return a({
|
|
1101
|
+
queryKey: f.marketQuote(t ?? ""),
|
|
1102
|
+
enabled: !1,
|
|
1103
|
+
queryFn: async () => (await l("query BraMarketQuote($symbol: String!) {\n braMarketQuote(symbol: $symbol) { symbol price currency asOf source }\n }", { symbol: t }, n)).braMarketQuote
|
|
1104
|
+
});
|
|
1105
|
+
}, $ = "\n id workspaceId portfolioId accountId symbol action quantity referencePrice priceSource\n priceAsOf status source rationale reviewedById reviewedAt createdAt updatedAt\n", tt = (t, n) => {
|
|
1106
|
+
let { apiGatewayUrl: r } = e(), i = a({
|
|
1107
|
+
queryKey: f.tradeInstructions(t, n),
|
|
1108
|
+
queryFn: async () => (await l(`query BraListTradeInstructions($portfolioId: ID, $status: BraTradeInstructionStatus) {
|
|
1109
|
+
braListTradeInstructions(portfolioId: $portfolioId, status: $status) { ${$} }
|
|
1110
|
+
}`, {
|
|
1111
|
+
portfolioId: t ?? null,
|
|
1112
|
+
status: n ?? null
|
|
1113
|
+
}, r)).braListTradeInstructions
|
|
1114
|
+
});
|
|
1115
|
+
return {
|
|
1116
|
+
...i,
|
|
1117
|
+
data: i.data ?? []
|
|
1118
|
+
};
|
|
1119
|
+
}, nt = () => {
|
|
1120
|
+
let { apiGatewayUrl: t } = e(), n = o();
|
|
1121
|
+
return i({
|
|
1122
|
+
mutationFn: async (e) => (await u(`mutation BraCreateTradeInstruction($input: BraCreateTradeInstructionInput!) {
|
|
1123
|
+
braCreateTradeInstruction(input: $input) { ${$} }
|
|
1124
|
+
}`, { input: e }, t)).braCreateTradeInstruction,
|
|
1125
|
+
...d({
|
|
1126
|
+
success: (e) => `${e.action} ${e.quantity} ${e.symbol} instruction created`,
|
|
1127
|
+
onSuccess: (e) => {
|
|
1128
|
+
n.invalidateQueries({ queryKey: f.tradeInstructions(e.portfolioId) }), n.invalidateQueries({ queryKey: f.tradeInstructions(void 0) });
|
|
1129
|
+
}
|
|
1130
|
+
})
|
|
1131
|
+
});
|
|
1132
|
+
}, rt = () => {
|
|
1133
|
+
let { apiGatewayUrl: t } = e(), n = o();
|
|
1134
|
+
return i({
|
|
1135
|
+
mutationFn: async ({ id: e, status: n }) => (await u(`mutation BraReviewTradeInstruction($id: ID!, $status: BraTradeInstructionStatus!) {
|
|
1136
|
+
braReviewTradeInstruction(id: $id, status: $status) { ${$} }
|
|
1137
|
+
}`, {
|
|
1138
|
+
id: e,
|
|
1139
|
+
status: n
|
|
1140
|
+
}, t)).braReviewTradeInstruction,
|
|
1141
|
+
...d({
|
|
1142
|
+
success: (e) => `Instruction marked ${e.status.toLowerCase()}`,
|
|
1143
|
+
onSuccess: (e) => {
|
|
1144
|
+
n.invalidateQueries({ queryKey: f.tradeInstructions(e.portfolioId) }), n.invalidateQueries({ queryKey: f.tradeInstructions(void 0) });
|
|
1145
|
+
}
|
|
1146
|
+
})
|
|
1147
|
+
});
|
|
941
1148
|
};
|
|
942
1149
|
//#endregion
|
|
943
|
-
export {
|
|
1150
|
+
export { q as fetchAllAccounts, Re as fetchAllHoldings, re as useAccount, ne as useAccounts, _e as useAcknowledgeInsight, Ue as useAdvisors, Be as useAllAccounts, ze as useAllTransactions, oe as useArchiveAccount, V as useArchiveGoal, me as useArchiveHousehold, E as useArchivePortfolio, ie as useCreateAccount, z as useCreateGoal, O as useCreateHolding, fe as useCreateHousehold, ge as useCreateInsight, F as useCreateModelPortfolio, le as useCreatePortfolio, ke as useCreateRebalanceProposal, Ye as useCreateScheduledReport, nt as useCreateTradeInstruction, A as useDeleteHolding, ve as useDismissInsight, $e as useDownloadReportRunPdf, He as useEnsureAdvisorProfile, Ge as useFirmReport, Qe as useGenerateReportNow, Se as useGenerateRiskInsights, L as useGoal, R as useGoalFundings, I as useGoals, Ee as useHarvestTaxLossInsights, D as useHoldings, de as useHousehold, ue as useHouseholds, he as useInsights, U as useLinkGoalFunding, et as useMarketQuote, P as useModelPortfolio, N as useModelPortfolios, Ke as useMyAdvisorBranding, Ve as useMyAdvisorProfile, te as useNetWorthSummary, je as usePagedAccounts, Ne as usePagedGoals, Pe as usePagedHouseholds, Fe as usePagedInsights, Me as usePagedPortfolios, Ie as usePagedTransactions, ce as usePortfolio, xe as usePortfolioRiskSignals, Ce as usePortfolioRiskSummary, se as usePortfolios, Oe as useRebalanceProposals, H as useRecalcGoalProjection, De as useRecordTransaction, Ze as useReportRuns, ye as useResolveInsight, rt as useReviewTradeInstruction, Je as useScheduledReports, We as useSetAdvisorRole, Xe as useSetScheduledReportStatus, Te as useTaxLossOpportunities, tt as useTradeInstructions, Ae as useTransitionRebalanceProposal, W as useUnlinkGoalFunding, ae as useUpdateAccount, B as useUpdateGoal, k as useUpdateHolding, pe as useUpdateHousehold, T as useUpdatePortfolio, qe as useUpsertMyAdvisorBranding };
|
|
944
1151
|
|
|
945
1152
|
//# sourceMappingURL=useBrainyRichApi.js.map
|