@burdenoff/cli-sdk 2026.1124.1 → 2026.1202.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/chunk-BGNPGKJM.js +1 -0
- package/dist/{chunk-ASSY2L5R.js → chunk-E6F56R4K.js} +3 -3
- package/dist/chunk-N7EXKGE2.js +34 -0
- package/dist/core/index.cjs +9 -9
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{module-BNVKV_pI.d.ts → module-DWSAfs3k.d.cts} +20 -19
- package/dist/{module-BNVKV_pI.d.cts → module-DWSAfs3k.d.ts} +20 -19
- package/dist/modules/adaptercloud/index.cjs +38 -38
- package/dist/modules/adaptercloud/index.d.cts +1 -1
- package/dist/modules/adaptercloud/index.d.ts +1 -1
- package/dist/modules/adaptercloud/index.js +2 -2
- package/dist/modules/artistrybase/index.cjs +50 -50
- package/dist/modules/artistrybase/index.d.cts +1 -1
- package/dist/modules/artistrybase/index.d.ts +1 -1
- package/dist/modules/artistrybase/index.js +2 -2
- package/dist/modules/assethandler/index.cjs +32 -32
- package/dist/modules/assethandler/index.d.cts +1 -1
- package/dist/modules/assethandler/index.d.ts +1 -1
- package/dist/modules/assethandler/index.js +2 -2
- package/dist/modules/atheletebridge/index.cjs +34 -34
- package/dist/modules/atheletebridge/index.d.cts +1 -1
- package/dist/modules/atheletebridge/index.d.ts +1 -1
- package/dist/modules/atheletebridge/index.js +2 -2
- package/dist/modules/auth/index.cjs +34 -34
- package/dist/modules/auth/index.d.cts +1 -1
- package/dist/modules/auth/index.d.ts +1 -1
- package/dist/modules/auth/index.js +4 -4
- package/dist/modules/billing/index.cjs +18 -18
- package/dist/modules/billing/index.d.cts +1 -1
- package/dist/modules/billing/index.d.ts +1 -1
- package/dist/modules/billing/index.js +2 -2
- package/dist/modules/brainyrich/index.cjs +45 -45
- package/dist/modules/brainyrich/index.d.cts +1 -1
- package/dist/modules/brainyrich/index.d.ts +1 -1
- package/dist/modules/brainyrich/index.js +2 -2
- package/dist/modules/buildmyiq/index.cjs +32 -32
- package/dist/modules/buildmyiq/index.d.cts +1 -1
- package/dist/modules/buildmyiq/index.d.ts +1 -1
- package/dist/modules/buildmyiq/index.js +2 -2
- package/dist/modules/channels/index.cjs +12 -12
- package/dist/modules/channels/index.d.cts +1 -1
- package/dist/modules/channels/index.d.ts +1 -1
- package/dist/modules/channels/index.js +2 -2
- package/dist/modules/collabkin/index.cjs +34 -34
- package/dist/modules/collabkin/index.d.cts +1 -1
- package/dist/modules/collabkin/index.d.ts +1 -1
- package/dist/modules/collabkin/index.js +2 -2
- package/dist/modules/comradecircle/index.cjs +41 -41
- package/dist/modules/comradecircle/index.d.cts +1 -1
- package/dist/modules/comradecircle/index.d.ts +1 -1
- package/dist/modules/comradecircle/index.js +2 -2
- package/dist/modules/conversations/index.cjs +32 -32
- package/dist/modules/conversations/index.d.cts +1 -1
- package/dist/modules/conversations/index.d.ts +1 -1
- package/dist/modules/conversations/index.js +2 -2
- package/dist/modules/coolandlovely/index.cjs +41 -41
- package/dist/modules/coolandlovely/index.d.cts +1 -1
- package/dist/modules/coolandlovely/index.d.ts +1 -1
- package/dist/modules/coolandlovely/index.js +2 -2
- package/dist/modules/cosmicintersection/index.cjs +43 -43
- package/dist/modules/cosmicintersection/index.d.cts +1 -1
- package/dist/modules/cosmicintersection/index.d.ts +1 -1
- package/dist/modules/cosmicintersection/index.js +2 -2
- package/dist/modules/crewfoundry/index.cjs +70 -70
- package/dist/modules/crewfoundry/index.d.cts +1 -1
- package/dist/modules/crewfoundry/index.d.ts +1 -1
- package/dist/modules/crewfoundry/index.js +2 -2
- package/dist/modules/devportal/index.cjs +23 -23
- package/dist/modules/devportal/index.d.cts +1 -1
- package/dist/modules/devportal/index.d.ts +1 -1
- package/dist/modules/devportal/index.js +2 -2
- package/dist/modules/ecoimpacthub/index.cjs +41 -41
- package/dist/modules/ecoimpacthub/index.d.cts +1 -1
- package/dist/modules/ecoimpacthub/index.d.ts +1 -1
- package/dist/modules/ecoimpacthub/index.js +2 -2
- package/dist/modules/eventfullymanaged/index.cjs +92 -92
- package/dist/modules/eventfullymanaged/index.d.cts +1 -1
- package/dist/modules/eventfullymanaged/index.d.ts +1 -1
- package/dist/modules/eventfullymanaged/index.js +2 -2
- package/dist/modules/export/index.cjs +14 -14
- package/dist/modules/export/index.d.cts +1 -1
- package/dist/modules/export/index.d.ts +1 -1
- package/dist/modules/export/index.js +2 -2
- package/dist/modules/files/index.cjs +11 -11
- package/dist/modules/files/index.d.cts +1 -1
- package/dist/modules/files/index.d.ts +1 -1
- package/dist/modules/files/index.js +2 -2
- package/dist/modules/fluidgrids/index.cjs +29 -29
- package/dist/modules/fluidgrids/index.d.cts +1 -1
- package/dist/modules/fluidgrids/index.d.ts +1 -1
- package/dist/modules/fluidgrids/index.js +3 -3
- package/dist/modules/ggnomad/index.cjs +21 -21
- package/dist/modules/ggnomad/index.d.cts +1 -1
- package/dist/modules/ggnomad/index.d.ts +1 -1
- package/dist/modules/ggnomad/index.js +2 -2
- package/dist/modules/govcitizenhub/index.cjs +35 -35
- package/dist/modules/govcitizenhub/index.d.cts +1 -1
- package/dist/modules/govcitizenhub/index.d.ts +1 -1
- package/dist/modules/govcitizenhub/index.js +2 -2
- package/dist/modules/groups/index.cjs +12 -12
- package/dist/modules/groups/index.d.cts +1 -1
- package/dist/modules/groups/index.d.ts +1 -1
- package/dist/modules/groups/index.js +2 -2
- package/dist/modules/headshotmarketing/index.cjs +165 -165
- package/dist/modules/headshotmarketing/index.d.cts +1 -1
- package/dist/modules/headshotmarketing/index.d.ts +1 -1
- package/dist/modules/headshotmarketing/index.js +2 -2
- package/dist/modules/health/index.d.cts +1 -1
- package/dist/modules/health/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.cjs +43 -43
- package/dist/modules/hookmovies/index.d.cts +1 -1
- package/dist/modules/hookmovies/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.js +2 -2
- package/dist/modules/housingvista/index.cjs +24 -24
- package/dist/modules/housingvista/index.d.cts +1 -1
- package/dist/modules/housingvista/index.d.ts +1 -1
- package/dist/modules/housingvista/index.js +2 -2
- package/dist/modules/integrations/index.cjs +27 -27
- package/dist/modules/integrations/index.d.cts +1 -1
- package/dist/modules/integrations/index.d.ts +1 -1
- package/dist/modules/integrations/index.js +2 -2
- package/dist/modules/intelwatchtower/index.cjs +37 -37
- package/dist/modules/intelwatchtower/index.d.cts +1 -1
- package/dist/modules/intelwatchtower/index.d.ts +1 -1
- package/dist/modules/intelwatchtower/index.js +2 -2
- package/dist/modules/kadaikodi/index.cjs +26 -26
- package/dist/modules/kadaikodi/index.d.cts +1 -1
- package/dist/modules/kadaikodi/index.d.ts +1 -1
- package/dist/modules/kadaikodi/index.js +2 -2
- package/dist/modules/labsofscience/index.cjs +44 -44
- package/dist/modules/labsofscience/index.d.cts +1 -1
- package/dist/modules/labsofscience/index.d.ts +1 -1
- package/dist/modules/labsofscience/index.js +2 -2
- package/dist/modules/manufacturedops/index.cjs +36 -36
- package/dist/modules/manufacturedops/index.d.cts +1 -1
- package/dist/modules/manufacturedops/index.d.ts +1 -1
- package/dist/modules/manufacturedops/index.js +2 -2
- package/dist/modules/movethewheels/index.cjs +78 -78
- package/dist/modules/movethewheels/index.d.cts +1 -1
- package/dist/modules/movethewheels/index.d.ts +1 -1
- package/dist/modules/movethewheels/index.js +2 -2
- package/dist/modules/mybodyshield/index.cjs +36 -36
- package/dist/modules/mybodyshield/index.d.cts +1 -1
- package/dist/modules/mybodyshield/index.d.ts +1 -1
- package/dist/modules/mybodyshield/index.js +2 -2
- package/dist/modules/notifications/index.cjs +5 -5
- package/dist/modules/notifications/index.d.cts +1 -1
- package/dist/modules/notifications/index.d.ts +1 -1
- package/dist/modules/notifications/index.js +1 -1
- package/dist/modules/organizations/index.cjs +5 -5
- package/dist/modules/organizations/index.d.cts +1 -1
- package/dist/modules/organizations/index.d.ts +1 -1
- package/dist/modules/organizations/index.js +1 -1
- package/dist/modules/planmagnet/index.cjs +272 -272
- package/dist/modules/planmagnet/index.d.cts +1 -1
- package/dist/modules/planmagnet/index.d.ts +1 -1
- package/dist/modules/planmagnet/index.js +2 -2
- package/dist/modules/products/index.cjs +19 -19
- package/dist/modules/products/index.d.cts +1 -1
- package/dist/modules/products/index.d.ts +1 -1
- package/dist/modules/products/index.js +2 -2
- package/dist/modules/proserviceworld/index.cjs +24 -24
- package/dist/modules/proserviceworld/index.d.cts +1 -1
- package/dist/modules/proserviceworld/index.d.ts +1 -1
- package/dist/modules/proserviceworld/index.js +2 -2
- package/dist/modules/rbac/index.cjs +8 -8
- package/dist/modules/rbac/index.d.cts +1 -1
- package/dist/modules/rbac/index.d.ts +1 -1
- package/dist/modules/rbac/index.js +2 -2
- package/dist/modules/sandbox/index.cjs +39 -39
- package/dist/modules/sandbox/index.d.cts +1 -1
- package/dist/modules/sandbox/index.d.ts +1 -1
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/scheduler/index.cjs +25 -25
- package/dist/modules/scheduler/index.d.cts +1 -1
- package/dist/modules/scheduler/index.d.ts +1 -1
- package/dist/modules/scheduler/index.js +2 -2
- package/dist/modules/security/index.cjs +14 -14
- package/dist/modules/security/index.d.cts +1 -1
- package/dist/modules/security/index.d.ts +1 -1
- package/dist/modules/security/index.js +2 -2
- package/dist/modules/semanticfed/index.cjs +44 -44
- package/dist/modules/semanticfed/index.d.cts +1 -1
- package/dist/modules/semanticfed/index.d.ts +1 -1
- package/dist/modules/semanticfed/index.js +1 -1
- package/dist/modules/semanticfed-sql/index.cjs +4 -4
- package/dist/modules/semanticfed-sql/index.d.cts +1 -1
- package/dist/modules/semanticfed-sql/index.d.ts +1 -1
- package/dist/modules/semanticfed-sql/index.js +1 -1
- package/dist/modules/store/index.cjs +21 -21
- package/dist/modules/store/index.d.cts +1 -1
- package/dist/modules/store/index.d.ts +1 -1
- package/dist/modules/store/index.js +2 -2
- package/dist/modules/subscriberbot/index.cjs +41 -41
- package/dist/modules/subscriberbot/index.d.cts +1 -1
- package/dist/modules/subscriberbot/index.d.ts +1 -1
- package/dist/modules/subscriberbot/index.js +2 -2
- package/dist/modules/support/index.cjs +8 -8
- package/dist/modules/support/index.d.cts +1 -1
- package/dist/modules/support/index.d.ts +1 -1
- package/dist/modules/support/index.js +2 -2
- package/dist/modules/tags/index.cjs +10 -10
- package/dist/modules/tags/index.d.cts +1 -1
- package/dist/modules/tags/index.d.ts +1 -1
- package/dist/modules/tags/index.js +2 -2
- package/dist/modules/technospam/index.cjs +44 -44
- package/dist/modules/technospam/index.d.cts +1 -1
- package/dist/modules/technospam/index.d.ts +1 -1
- package/dist/modules/technospam/index.js +2 -2
- package/dist/modules/theculturepost/index.cjs +32 -32
- package/dist/modules/theculturepost/index.d.cts +1 -1
- package/dist/modules/theculturepost/index.d.ts +1 -1
- package/dist/modules/theculturepost/index.js +2 -2
- package/dist/modules/theglobalfuel/index.cjs +30 -30
- package/dist/modules/theglobalfuel/index.d.cts +1 -1
- package/dist/modules/theglobalfuel/index.d.ts +1 -1
- package/dist/modules/theglobalfuel/index.js +2 -2
- package/dist/modules/timecampus/index.cjs +69 -69
- package/dist/modules/timecampus/index.d.cts +1 -1
- package/dist/modules/timecampus/index.d.ts +1 -1
- package/dist/modules/timecampus/index.js +4 -4
- package/dist/modules/tours/index.cjs +4 -4
- package/dist/modules/tours/index.d.cts +1 -1
- package/dist/modules/tours/index.d.ts +1 -1
- package/dist/modules/tours/index.js +2 -2
- package/dist/modules/vibecontrols/index.cjs +460 -460
- package/dist/modules/vibecontrols/index.d.cts +1 -1
- package/dist/modules/vibecontrols/index.d.ts +1 -1
- package/dist/modules/vibecontrols/index.js +5 -5
- package/dist/modules/workspaces/index.cjs +16 -16
- package/dist/modules/workspaces/index.d.cts +1 -1
- package/dist/modules/workspaces/index.d.ts +1 -1
- package/dist/modules/workspaces/index.js +2 -2
- package/package.json +6 -1
- package/dist/chunk-3ZVMC2AF.js +0 -1
- package/dist/chunk-ZT6KOG7N.js +0 -34
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var u=class extends Error{exitCode;hint;constructor(
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var u=class extends Error{exitCode;hint;constructor(o,t){super(o),this.name="CliUserError",this.exitCode=t?.exitCode??1,this.hint=t?.hint;}},h=class extends u{constructor(o,t){super(o,{exitCode:2,hint:t?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},g=class extends Error{cause;constructor(o,t){super(o),this.name="CliInternalError",this.cause=t;}};function T(r){if(r instanceof h||r instanceof u)return r;let o=E(r)&&E(r.response)?r.response:void 0,t=o?.errors,e=Array.isArray(t)?t[0]:void 0,m=(E(e)&&E(e.extensions)?e.extensions:void 0)?.code,A=o?.status;return m==="UNAUTHENTICATED"||A===401?new h("Authentication required."):m==="FORBIDDEN"||A===403?new u("Permission denied."):m==="BAD_USER_INPUT"||m==="GRAPHQL_VALIDATION_FAILED"||A===400?new u("Invalid request. Check the command arguments."):m==="NOT_FOUND"||A===404?new u("Requested resource was not found."):m==="RATE_LIMITED"||m==="TOO_MANY_REQUESTS"||A===429?new u("Request limit reached. Try again later."):new g("The request could not be completed. Try again later.")}var w=class extends Error{response;constructor(o,t){super(o),this.name="GqlRequestError",this.response=t;}};function E(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}var O=null;function P(r){O=r;}function b(){if(!O)throw new g("vibecontrols module helpers used before setHelpersContext was called");return O}function Bt(){let r=b();if(!r.auth.isAuthenticated())throw new h("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}async function a(r,o){return Bt(),b().gql.workspace.request(r,o)}async function k(r,o){return b().gql.workspaceAuthOnly.request(r,o)}function i(r){throw r instanceof h||r instanceof u||r instanceof g?r:r instanceof w||r!==null&&typeof r=="object"&&"response"in r?T(r):new g("The command could not be completed. Try again later.")}function s(r,o,t){b().output.formatAndOutput(r,o,t);}function c(r){b().output.printSuccess(r);}function l(r,o){return b().output.truncate(r,o)}var x=`
|
|
2
2
|
query BrainyrichGetHousehold($id: ID!) {
|
|
3
3
|
braHousehold(id: $id) {
|
|
4
4
|
id name advisorId aum currency riskProfile status notes
|
|
5
5
|
primaryContactName primaryContactEmail tags createdAt updatedAt workspaceId
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,S=`
|
|
9
9
|
query BrainyrichListHouseholds($status: BraHouseholdStatus, $pagination: PaginationInput) {
|
|
10
10
|
braListHouseholds(status: $status, pagination: $pagination) {
|
|
11
11
|
items {
|
|
@@ -15,25 +15,25 @@
|
|
|
15
15
|
pageInfo { cursor hasMore }
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
`,
|
|
18
|
+
`,L=`
|
|
19
19
|
mutation BrainyrichCreateHousehold($input: BraCreateHouseholdInput!) {
|
|
20
20
|
braCreateHousehold(input: $input) {
|
|
21
21
|
id name advisorId aum currency riskProfile status notes
|
|
22
22
|
primaryContactName primaryContactEmail tags createdAt
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`,v=`
|
|
26
26
|
mutation BrainyrichUpdateHousehold($id: ID!, $input: BraUpdateHouseholdInput!) {
|
|
27
27
|
braUpdateHousehold(id: $id, input: $input) {
|
|
28
28
|
id name aum currency riskProfile status notes
|
|
29
29
|
primaryContactName primaryContactEmail tags updatedAt
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`,N=`
|
|
33
33
|
mutation BrainyrichArchiveHousehold($id: ID!) {
|
|
34
34
|
braArchiveHousehold(id: $id)
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
`,$=`
|
|
37
37
|
query BrainyrichGetAccount($id: ID!) {
|
|
38
38
|
braAccount(id: $id) {
|
|
39
39
|
id ownerId householdId name type status currency cashBalance institution accountMask
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
`,
|
|
51
|
+
`,G=`
|
|
52
52
|
query BrainyrichListAccounts(
|
|
53
53
|
$householdId: ID
|
|
54
54
|
$status: BraAccountStatus
|
|
@@ -62,25 +62,25 @@
|
|
|
62
62
|
pageInfo { cursor hasMore }
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
`,
|
|
65
|
+
`,H=`
|
|
66
66
|
mutation BrainyrichCreateAccount($input: BraCreateAccountInput!) {
|
|
67
67
|
braCreateAccount(input: $input) {
|
|
68
68
|
id ownerId householdId name type status currency cashBalance
|
|
69
69
|
institution accountMask isManual createdAt
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
`,_=`
|
|
73
73
|
mutation BrainyrichUpdateAccount($id: ID!, $input: BraUpdateAccountInput!) {
|
|
74
74
|
braUpdateAccount(id: $id, input: $input) {
|
|
75
75
|
id name type status currency cashBalance institution
|
|
76
76
|
accountMask householdId updatedAt
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
`,
|
|
79
|
+
`,q=`
|
|
80
80
|
mutation BrainyrichArchiveAccount($id: ID!) {
|
|
81
81
|
braArchiveAccount(id: $id)
|
|
82
82
|
}
|
|
83
|
-
`,
|
|
83
|
+
`,U=`
|
|
84
84
|
query BrainyrichListHoldings($accountId: ID, $portfolioId: ID) {
|
|
85
85
|
braListHoldings(accountId: $accountId, portfolioId: $portfolioId) {
|
|
86
86
|
items {
|
|
@@ -90,25 +90,25 @@
|
|
|
90
90
|
pageInfo { cursor hasMore }
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
`,
|
|
93
|
+
`,B=`
|
|
94
94
|
mutation BrainyrichCreateHolding($input: BraCreateHoldingInput!) {
|
|
95
95
|
braCreateHolding(input: $input) {
|
|
96
96
|
id accountId portfolioId symbol name assetClass quantity costBasis
|
|
97
97
|
lastPrice marketValue currency asOf createdAt
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
`,
|
|
100
|
+
`,M=`
|
|
101
101
|
mutation BrainyrichUpdateHolding($id: ID!, $input: BraUpdateHoldingInput!) {
|
|
102
102
|
braUpdateHolding(id: $id, input: $input) {
|
|
103
103
|
id accountId portfolioId symbol name assetClass quantity costBasis
|
|
104
104
|
lastPrice marketValue currency asOf updatedAt
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
`,
|
|
107
|
+
`,F=`
|
|
108
108
|
mutation BrainyrichDeleteHolding($id: ID!) {
|
|
109
109
|
braDeleteHolding(id: $id)
|
|
110
110
|
}
|
|
111
|
-
`,
|
|
111
|
+
`,j=`
|
|
112
112
|
query BrainyrichGetPortfolio($id: ID!) {
|
|
113
113
|
braPortfolio(id: $id) {
|
|
114
114
|
id ownerId householdId name description status baseCurrency driftThresholdPct
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
`,
|
|
122
|
+
`,W=`
|
|
123
123
|
query BrainyrichListPortfolios(
|
|
124
124
|
$householdId: ID
|
|
125
125
|
$status: BraPortfolioStatus
|
|
@@ -133,32 +133,32 @@
|
|
|
133
133
|
pageInfo { cursor hasMore }
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
`,
|
|
136
|
+
`,V=`
|
|
137
137
|
mutation BrainyrichCreatePortfolio($input: BraCreatePortfolioInput!) {
|
|
138
138
|
braCreatePortfolio(input: $input) {
|
|
139
139
|
id ownerId householdId name description status baseCurrency
|
|
140
140
|
driftThresholdPct modelPortfolioId targetAllocation tags createdAt
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
`,
|
|
143
|
+
`,J=`
|
|
144
144
|
mutation BrainyrichUpdatePortfolio($id: ID!, $input: BraUpdatePortfolioInput!) {
|
|
145
145
|
braUpdatePortfolio(id: $id, input: $input) {
|
|
146
146
|
id name description status baseCurrency driftThresholdPct
|
|
147
147
|
modelPortfolioId targetAllocation tags updatedAt
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
`,
|
|
150
|
+
`,Y=`
|
|
151
151
|
mutation BrainyrichArchivePortfolio($id: ID!) {
|
|
152
152
|
braArchivePortfolio(id: $id)
|
|
153
153
|
}
|
|
154
|
-
`,
|
|
154
|
+
`,K=`
|
|
155
155
|
query BrainyrichGetModelPortfolio($id: ID!) {
|
|
156
156
|
braModelPortfolio(id: $id) {
|
|
157
157
|
id name description baseCurrency riskProfile isActive createdAt updatedAt workspaceId
|
|
158
158
|
allocations { items { id assetClass targetPct } pageInfo { cursor hasMore } }
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
`,
|
|
161
|
+
`,z=`
|
|
162
162
|
query BrainyrichListModelPortfolios {
|
|
163
163
|
braListModelPortfolios {
|
|
164
164
|
items {
|
|
@@ -168,14 +168,14 @@
|
|
|
168
168
|
pageInfo { cursor hasMore }
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
`,
|
|
171
|
+
`,Q=`
|
|
172
172
|
mutation BrainyrichCreateModelPortfolio($input: BraCreateModelPortfolioInput!) {
|
|
173
173
|
braCreateModelPortfolio(input: $input) {
|
|
174
174
|
id name description baseCurrency riskProfile isActive createdAt
|
|
175
175
|
allocations { items { id assetClass targetPct } pageInfo { cursor hasMore } }
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
`,
|
|
178
|
+
`,X=`
|
|
179
179
|
query BrainyrichGetGoal($id: ID!) {
|
|
180
180
|
braGoal(id: $id) {
|
|
181
181
|
id ownerId householdId name type status currency targetAmount targetDate
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
`,
|
|
189
|
+
`,Z=`
|
|
190
190
|
query BrainyrichListGoals(
|
|
191
191
|
$householdId: ID
|
|
192
192
|
$status: BraGoalStatus
|
|
@@ -200,48 +200,48 @@
|
|
|
200
200
|
pageInfo { cursor hasMore }
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
`,
|
|
203
|
+
`,tt=`
|
|
204
204
|
query BrainyrichListGoalFundings($goalId: ID!) {
|
|
205
205
|
braListGoalFundings(goalId: $goalId) {
|
|
206
206
|
items { id goalId accountId allocationPct fixedAmount createdAt updatedAt workspaceId }
|
|
207
207
|
pageInfo { cursor hasMore }
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
`,
|
|
210
|
+
`,et=`
|
|
211
211
|
mutation BrainyrichCreateGoal($input: BraCreateGoalInput!) {
|
|
212
212
|
braCreateGoal(input: $input) {
|
|
213
213
|
id ownerId householdId name type status currency targetAmount targetDate
|
|
214
214
|
monthlyContribution priority projection notes tags createdAt
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
`,
|
|
217
|
+
`,nt=`
|
|
218
218
|
mutation BrainyrichUpdateGoal($id: ID!, $input: BraUpdateGoalInput!) {
|
|
219
219
|
braUpdateGoal(id: $id, input: $input) {
|
|
220
220
|
id name type status currency targetAmount targetDate
|
|
221
221
|
monthlyContribution priority notes tags updatedAt
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
`,
|
|
224
|
+
`,ot=`
|
|
225
225
|
mutation BrainyrichArchiveGoal($id: ID!) {
|
|
226
226
|
braArchiveGoal(id: $id)
|
|
227
227
|
}
|
|
228
|
-
`,
|
|
228
|
+
`,rt=`
|
|
229
229
|
mutation BrainyrichRecalcGoalProjection($id: ID!, $fundedAmount: Float!) {
|
|
230
230
|
braRecalcGoalProjection(id: $id, fundedAmount: $fundedAmount) {
|
|
231
231
|
id name status projection targetAmount targetDate updatedAt
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
`,
|
|
234
|
+
`,it=`
|
|
235
235
|
mutation BrainyrichLinkGoalFunding($input: BraLinkGoalFundingInput!) {
|
|
236
236
|
braLinkGoalFunding(input: $input) {
|
|
237
237
|
id goalId accountId allocationPct fixedAmount createdAt
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
`,
|
|
240
|
+
`,st=`
|
|
241
241
|
mutation BrainyrichUnlinkGoalFunding($id: ID!) {
|
|
242
242
|
braUnlinkGoalFunding(id: $id)
|
|
243
243
|
}
|
|
244
|
-
`,
|
|
244
|
+
`,at=`
|
|
245
245
|
query BrainyrichListTransactions(
|
|
246
246
|
$accountId: ID
|
|
247
247
|
$type: BraTransactionType
|
|
@@ -255,21 +255,21 @@
|
|
|
255
255
|
pageInfo { cursor hasMore }
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
`,
|
|
258
|
+
`,ct=`
|
|
259
259
|
mutation BrainyrichRecordTransaction($input: BraCreateTransactionInput!) {
|
|
260
260
|
braRecordTransaction(input: $input) {
|
|
261
261
|
id accountId holdingId type symbol quantity price amount fee
|
|
262
262
|
currency tradeDate settleDate notes createdAt
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
`,
|
|
265
|
+
`,ut=`
|
|
266
266
|
query BrainyrichGetInsight($id: ID!) {
|
|
267
267
|
braInsight(id: $id) {
|
|
268
268
|
id ownerId type severity status title detail subjectId subjectType
|
|
269
269
|
metrics acknowledgedById resolvedAt createdAt updatedAt workspaceId
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
-
`,
|
|
272
|
+
`,dt=`
|
|
273
273
|
query BrainyrichListInsights(
|
|
274
274
|
$status: BraInsightStatus
|
|
275
275
|
$severity: BraInsightSeverity
|
|
@@ -290,32 +290,32 @@
|
|
|
290
290
|
pageInfo { cursor hasMore }
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
`,
|
|
293
|
+
`,pt=`
|
|
294
294
|
mutation BrainyrichCreateInsight($input: BraCreateInsightInput!) {
|
|
295
295
|
braCreateInsight(input: $input) {
|
|
296
296
|
id ownerId type severity status title detail subjectId subjectType
|
|
297
297
|
metrics createdAt
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
`,
|
|
300
|
+
`,lt=`
|
|
301
301
|
mutation BrainyrichAcknowledgeInsight($id: ID!) {
|
|
302
302
|
braAcknowledgeInsight(id: $id) {
|
|
303
303
|
id type severity status title acknowledgedById updatedAt
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
`,
|
|
306
|
+
`,mt=`
|
|
307
307
|
mutation BrainyrichDismissInsight($id: ID!) {
|
|
308
308
|
braDismissInsight(id: $id) {
|
|
309
309
|
id type severity status title updatedAt
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
`,
|
|
312
|
+
`,ft=`
|
|
313
313
|
mutation BrainyrichResolveInsight($id: ID!) {
|
|
314
314
|
braResolveInsight(id: $id) {
|
|
315
315
|
id type severity status title resolvedAt updatedAt
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
`,
|
|
318
|
+
`,gt=`
|
|
319
319
|
query BrainyrichListRebalanceProposals(
|
|
320
320
|
$portfolioId: ID
|
|
321
321
|
$householdId: ID
|
|
@@ -329,19 +329,19 @@
|
|
|
329
329
|
pageInfo { cursor hasMore }
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
`,
|
|
332
|
+
`,ht=`
|
|
333
333
|
mutation BrainyrichCreateRebalanceProposal($input: BraCreateRebalanceProposalInput!) {
|
|
334
334
|
braCreateRebalanceProposal(input: $input) {
|
|
335
335
|
id portfolioId householdId status driftPct rationale trades createdAt
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
`,
|
|
338
|
+
`,yt=`
|
|
339
339
|
mutation BrainyrichTransitionRebalanceProposal($id: ID!, $status: BraRebalanceStatus!) {
|
|
340
340
|
braTransitionRebalanceProposal(id: $id, status: $status) {
|
|
341
341
|
id portfolioId status driftPct approvedById executedAt updatedAt
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
`,
|
|
344
|
+
`,It=`
|
|
345
345
|
query BrainyrichNetWorthSummary($ownerId: ID) {
|
|
346
346
|
braNetWorthSummary(ownerId: $ownerId) {
|
|
347
347
|
ownerId currency totalNetWorth totalMarketValue totalCash accountCount
|
|
@@ -349,8 +349,8 @@
|
|
|
349
349
|
workspaceId
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
`,
|
|
352
|
+
`,Ct=`
|
|
353
353
|
query BrainyrichHealth {
|
|
354
354
|
braHealth
|
|
355
355
|
}
|
|
356
|
-
`;function h(s,n){try{return JSON.parse(n)}catch{throw new u(`--${s} must be valid JSON`)}}function m(s){let n=Number.parseInt(s,10);if(Number.isNaN(n))throw new u(`Expected an integer but got "${s}"`);return n}function d(s){let n=Number.parseFloat(s);if(Number.isNaN(n))throw new u(`Expected a number but got "${s}"`);return n}function y(s){return s.split(",").map(n=>n.trim()).filter(n=>n.length>0)}function ht(s){let n=s.command("households").description("Brainyrich advisory households");n.command("list").description("List households").option("--status <s>","PROSPECT|ONBOARDING|ACTIVE|INACTIVE").option("--limit <n>","Page size",m,50).option("--offset <n>","Offset",m,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(R,{status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});i(t,e.braListHouseholds.items,{headers:["ID","Name","Status","Risk","AUM","Currency"],rows:e.braListHouseholds.items.map(o=>[l(o.id,12),o.name,o.status??"-",o.riskProfile??"-",o.aum!=null?String(o.aum):"-",o.currency??"-"])});}catch(e){r(e);}}),n.command("get").description("Get a household by id").argument("<id>","Household ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(k,{id:t});if(!o.braHousehold)throw new u(`Household ${t} not found`);i(e,o.braHousehold);}catch(o){r(o);}}),n.command("create").description("Create a household").requiredOption("--name <name>","Household name").option("--advisor <id>","Advisor user ID").option("--currency <c>","Currency code").option("--risk-profile <r>","CONSERVATIVE|MODERATE|BALANCED|GROWTH|AGGRESSIVE").option("--status <s>","PROSPECT|ONBOARDING|ACTIVE|INACTIVE").option("--primary-contact-name <s>","Primary contact name").option("--primary-contact-email <s>","Primary contact email").option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.advisor&&(e.advisorId=t.advisor),t.currency&&(e.currency=t.currency),t.riskProfile&&(e.riskProfile=t.riskProfile.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.primaryContactName&&(e.primaryContactName=t.primaryContactName),t.primaryContactEmail&&(e.primaryContactEmail=t.primaryContactEmail),t.notes&&(e.notes=t.notes),t.tags&&(e.tags=y(t.tags));let o=await a(P,{input:e});c(`Household created: ${o.braCreateHousehold.name}`),i(t,o.braCreateHousehold);}catch(e){r(e);}}),n.command("update").description("Update a household").argument("<id>","Household ID").option("--name <name>","Household name").option("--aum <n>","Assets under management",d).option("--currency <c>","Currency code").option("--risk-profile <r>","CONSERVATIVE|MODERATE|BALANCED|GROWTH|AGGRESSIVE").option("--status <s>","PROSPECT|ONBOARDING|ACTIVE|INACTIVE").option("--primary-contact-name <s>","Primary contact name").option("--primary-contact-email <s>","Primary contact email").option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.aum!==void 0&&(o.aum=e.aum),e.currency&&(o.currency=e.currency),e.riskProfile&&(o.riskProfile=e.riskProfile.toUpperCase()),e.status&&(o.status=e.status.toUpperCase()),e.primaryContactName!==void 0&&(o.primaryContactName=e.primaryContactName),e.primaryContactEmail!==void 0&&(o.primaryContactEmail=e.primaryContactEmail),e.notes!==void 0&&(o.notes=e.notes),e.tags&&(o.tags=y(e.tags)),!Object.keys(o).length)throw new u("No updates specified");let f=await a(D,{id:t,input:o});c("Household updated"),i(e,f.braUpdateHousehold);}catch(o){r(o);}}),n.command("archive").description("Archive a household").argument("<id>","Household ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(x,{id:t});c(`Household archived: ${o.braArchiveHousehold}`),i(e,{archived:o.braArchiveHousehold});}catch(o){r(o);}});}function yt(s){let n=s.command("accounts").description("Brainyrich financial accounts");n.command("list").description("List accounts").option("--household <id>","Filter by household ID").option("--status <s>","ACTIVE|ARCHIVED|CLOSED").option("--limit <n>","Page size",m,50).option("--offset <n>","Offset",m,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(L,{householdId:t.household,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});i(t,e.braListAccounts.items,{headers:["ID","Name","Type","Status","Cash","Currency"],rows:e.braListAccounts.items.map(o=>[l(o.id,12),o.name,o.type??"-",o.status??"-",o.cashBalance!=null?String(o.cashBalance):"-",o.currency??"-"])});}catch(e){r(e);}}),n.command("get").description("Get an account by id").argument("<id>","Account ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(S,{id:t});if(!o.braAccount)throw new u(`Account ${t} not found`);i(e,o.braAccount);}catch(o){r(o);}}),n.command("create").description("Create an account").requiredOption("--name <name>","Account name").option("--owner <id>","Owner user ID").option("--household <id>","Household ID").option("--type <t>","BANK|BROKERAGE|RETIREMENT|CRYPTO|REAL_ESTATE|LIABILITY|CASH|ALTERNATIVE").option("--status <s>","ACTIVE|ARCHIVED|CLOSED").option("--currency <c>","Currency code").option("--cash-balance <n>","Cash balance",d).option("--institution <s>","Institution name").option("--account-mask <s>","Account mask").option("--manual","Mark as manually-tracked").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.owner&&(e.ownerId=t.owner),t.household&&(e.householdId=t.household),t.type&&(e.type=t.type.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.currency&&(e.currency=t.currency),t.cashBalance!==void 0&&(e.cashBalance=t.cashBalance),t.institution&&(e.institution=t.institution),t.accountMask&&(e.accountMask=t.accountMask),t.manual&&(e.isManual=!0);let o=await a(v,{input:e});c(`Account created: ${o.braCreateAccount.name}`),i(t,o.braCreateAccount);}catch(e){r(e);}}),n.command("update").description("Update an account").argument("<id>","Account ID").option("--name <name>","Account name").option("--household <id>","Household ID").option("--type <t>","BANK|BROKERAGE|RETIREMENT|CRYPTO|REAL_ESTATE|LIABILITY|CASH|ALTERNATIVE").option("--status <s>","ACTIVE|ARCHIVED|CLOSED").option("--currency <c>","Currency code").option("--cash-balance <n>","Cash balance",d).option("--institution <s>","Institution name").option("--account-mask <s>","Account mask").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.household&&(o.householdId=e.household),e.type&&(o.type=e.type.toUpperCase()),e.status&&(o.status=e.status.toUpperCase()),e.currency&&(o.currency=e.currency),e.cashBalance!==void 0&&(o.cashBalance=e.cashBalance),e.institution!==void 0&&(o.institution=e.institution),e.accountMask!==void 0&&(o.accountMask=e.accountMask),!Object.keys(o).length)throw new u("No updates specified");let f=await a($,{id:t,input:o});c("Account updated"),i(e,f.braUpdateAccount);}catch(o){r(o);}}),n.command("archive").description("Archive an account").argument("<id>","Account ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(N,{id:t});c(`Account archived: ${o.braArchiveAccount}`),i(e,{archived:o.braArchiveAccount});}catch(o){r(o);}});}function It(s){let n=s.command("holdings").description("Brainyrich account holdings");n.command("list").description("List holdings for an account or portfolio").option("--account <id>","Filter by account ID").option("--portfolio <id>","Filter by portfolio ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(G,{accountId:t.account,portfolioId:t.portfolio});i(t,e.braListHoldings.items,{headers:["ID","Symbol","Class","Qty","Last","Market Value"],rows:e.braListHoldings.items.map(o=>[l(o.id,12),o.symbol,o.assetClass??"-",o.quantity!=null?String(o.quantity):"-",o.lastPrice!=null?String(o.lastPrice):"-",o.marketValue!=null?String(o.marketValue):"-"])});}catch(e){r(e);}}),n.command("create").description("Create a holding").requiredOption("--account <id>","Account ID").requiredOption("--symbol <s>","Ticker symbol").option("--portfolio <id>","Portfolio ID").option("--name <s>","Display name").option("--asset-class <c>","EQUITY|FIXED_INCOME|CASH|REAL_ESTATE|COMMODITY|CRYPTO|ALTERNATIVE").option("--quantity <n>","Quantity",d).option("--cost-basis <n>","Cost basis",d).option("--last-price <n>","Last price",d).option("--currency <c>","Currency code").option("--as-of <iso>","As-of date (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e={accountId:t.account,symbol:t.symbol};t.portfolio&&(e.portfolioId=t.portfolio),t.name&&(e.name=t.name),t.assetClass&&(e.assetClass=t.assetClass.toUpperCase()),t.quantity!==void 0&&(e.quantity=t.quantity),t.costBasis!==void 0&&(e.costBasis=t.costBasis),t.lastPrice!==void 0&&(e.lastPrice=t.lastPrice),t.currency&&(e.currency=t.currency),t.asOf&&(e.asOf=t.asOf);let o=await a(H,{input:e});c(`Holding created: ${o.braCreateHolding.symbol}`),i(t,o.braCreateHolding);}catch(e){r(e);}}),n.command("update").description("Update a holding").argument("<id>","Holding ID").option("--name <s>","Display name").option("--asset-class <c>","EQUITY|FIXED_INCOME|CASH|REAL_ESTATE|COMMODITY|CRYPTO|ALTERNATIVE").option("--quantity <n>","Quantity",d).option("--cost-basis <n>","Cost basis",d).option("--last-price <n>","Last price",d).option("--portfolio <id>","Portfolio ID").option("--as-of <iso>","As-of date (ISO)").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name!==void 0&&(o.name=e.name),e.assetClass&&(o.assetClass=e.assetClass.toUpperCase()),e.quantity!==void 0&&(o.quantity=e.quantity),e.costBasis!==void 0&&(o.costBasis=e.costBasis),e.lastPrice!==void 0&&(o.lastPrice=e.lastPrice),e.portfolio&&(o.portfolioId=e.portfolio),e.asOf&&(o.asOf=e.asOf),!Object.keys(o).length)throw new u("No updates specified");let f=await a(_,{id:t,input:o});c("Holding updated"),i(e,f.braUpdateHolding);}catch(o){r(o);}}),n.command("delete").description("Delete a holding").argument("<id>","Holding ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(q,{id:t});c(`Holding deleted: ${o.braDeleteHolding}`),i(e,{deleted:o.braDeleteHolding});}catch(o){r(o);}});}function Ct(s){let n=s.command("portfolios").description("Brainyrich portfolios");n.command("list").description("List portfolios").option("--household <id>","Filter by household ID").option("--status <s>","DRAFT|ACTIVE|ARCHIVED").option("--limit <n>","Page size",m,50).option("--offset <n>","Offset",m,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(B,{householdId:t.household,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});i(t,e.braListPortfolios.items,{headers:["ID","Name","Status","Currency","Drift %"],rows:e.braListPortfolios.items.map(o=>[l(o.id,12),o.name,o.status??"-",o.baseCurrency??"-",o.driftThresholdPct!=null?String(o.driftThresholdPct):"-"])});}catch(e){r(e);}}),n.command("get").description("Get a portfolio by id").argument("<id>","Portfolio ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(U,{id:t});if(!o.braPortfolio)throw new u(`Portfolio ${t} not found`);i(e,o.braPortfolio);}catch(o){r(o);}}),n.command("create").description("Create a portfolio").requiredOption("--name <name>","Portfolio name").option("--owner <id>","Owner user ID").option("--household <id>","Household ID").option("--description <s>","Description").option("--base-currency <c>","Base currency code").option("--drift-threshold-pct <n>","Drift threshold %",d).option("--model-portfolio <id>","Model portfolio ID").option("--target-allocation <json>","Target allocation JSON").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.owner&&(e.ownerId=t.owner),t.household&&(e.householdId=t.household),t.description&&(e.description=t.description),t.baseCurrency&&(e.baseCurrency=t.baseCurrency),t.driftThresholdPct!==void 0&&(e.driftThresholdPct=t.driftThresholdPct),t.modelPortfolio&&(e.modelPortfolioId=t.modelPortfolio),t.targetAllocation&&(e.targetAllocation=h("target-allocation",t.targetAllocation)),t.tags&&(e.tags=y(t.tags));let o=await a(M,{input:e});c(`Portfolio created: ${o.braCreatePortfolio.name}`),i(t,o.braCreatePortfolio);}catch(e){r(e);}}),n.command("update").description("Update a portfolio").argument("<id>","Portfolio ID").option("--name <name>","Portfolio name").option("--description <s>","Description").option("--status <s>","DRAFT|ACTIVE|ARCHIVED").option("--base-currency <c>","Base currency code").option("--drift-threshold-pct <n>","Drift threshold %",d).option("--model-portfolio <id>","Model portfolio ID").option("--target-allocation <json>","Target allocation JSON").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.description!==void 0&&(o.description=e.description),e.status&&(o.status=e.status.toUpperCase()),e.baseCurrency&&(o.baseCurrency=e.baseCurrency),e.driftThresholdPct!==void 0&&(o.driftThresholdPct=e.driftThresholdPct),e.modelPortfolio&&(o.modelPortfolioId=e.modelPortfolio),e.targetAllocation&&(o.targetAllocation=h("target-allocation",e.targetAllocation)),e.tags&&(o.tags=y(e.tags)),!Object.keys(o).length)throw new u("No updates specified");let f=await a(F,{id:t,input:o});c("Portfolio updated"),i(e,f.braUpdatePortfolio);}catch(o){r(o);}}),n.command("archive").description("Archive a portfolio").argument("<id>","Portfolio ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(j,{id:t});c(`Portfolio archived: ${o.braArchivePortfolio}`),i(e,{archived:o.braArchivePortfolio});}catch(o){r(o);}});}function bt(s){let n=s.command("model-portfolios").description("Brainyrich model portfolios");n.command("list").description("List model portfolios").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(V);i(t,e.braListModelPortfolios.items,{headers:["ID","Name","Risk","Currency","Active"],rows:e.braListModelPortfolios.items.map(o=>[l(o.id,12),o.name,o.riskProfile??"-",o.baseCurrency??"-",o.isActive?"yes":"no"])});}catch(e){r(e);}}),n.command("get").description("Get a model portfolio by id").argument("<id>","Model portfolio ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(W,{id:t});if(!o.braModelPortfolio)throw new u(`Model portfolio ${t} not found`);i(e,o.braModelPortfolio);}catch(o){r(o);}}),n.command("create").description("Create a model portfolio").requiredOption("--name <name>","Model portfolio name").option("--description <s>","Description").option("--base-currency <c>","Base currency code").option("--risk-profile <r>","CONSERVATIVE|MODERATE|BALANCED|GROWTH|AGGRESSIVE").option("--allocations <json>","Allocations JSON array: [{ assetClass, targetPct }]").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};if(t.description&&(e.description=t.description),t.baseCurrency&&(e.baseCurrency=t.baseCurrency),t.riskProfile&&(e.riskProfile=t.riskProfile.toUpperCase()),t.allocations){let f=h("allocations",t.allocations);if(!Array.isArray(f))throw new u("--allocations must be a JSON array");e.allocations=f;}let o=await a(J,{input:e});c(`Model portfolio created: ${o.braCreateModelPortfolio.name}`),i(t,o.braCreateModelPortfolio);}catch(e){r(e);}});}function At(s){let n=s.command("goals").description("Brainyrich financial goals");n.command("list").description("List goals").option("--household <id>","Filter by household ID").option("--status <s>","ACTIVE|ON_HOLD|ACHIEVED|ABANDONED").option("--limit <n>","Page size",m,50).option("--offset <n>","Offset",m,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(K,{householdId:t.household,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});i(t,e.braListGoals.items,{headers:["ID","Name","Type","Status","Target","Projection"],rows:e.braListGoals.items.map(o=>[l(o.id,12),o.name,o.type??"-",o.status??"-",o.targetAmount!=null?String(o.targetAmount):"-",o.projection??"-"])});}catch(e){r(e);}}),n.command("get").description("Get a goal by id").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(Y,{id:t});if(!o.braGoal)throw new u(`Goal ${t} not found`);i(e,o.braGoal);}catch(o){r(o);}}),n.command("create").description("Create a goal").requiredOption("--name <name>","Goal name").requiredOption("--target-amount <n>","Target amount",d).requiredOption("--target-date <iso>","Target date (ISO)").option("--owner <id>","Owner user ID").option("--household <id>","Household ID").option("--type <t>","RETIREMENT|EDUCATION|HOME|EMERGENCY_FUND|MAJOR_PURCHASE|WEALTH_GROWTH|CUSTOM").option("--currency <c>","Currency code").option("--monthly-contribution <n>","Monthly contribution",d).option("--priority <n>","Priority",m).option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,targetAmount:t.targetAmount,targetDate:t.targetDate};t.owner&&(e.ownerId=t.owner),t.household&&(e.householdId=t.household),t.type&&(e.type=t.type.toUpperCase()),t.currency&&(e.currency=t.currency),t.monthlyContribution!==void 0&&(e.monthlyContribution=t.monthlyContribution),t.priority!==void 0&&(e.priority=t.priority),t.notes&&(e.notes=t.notes),t.tags&&(e.tags=y(t.tags));let o=await a(Q,{input:e});c(`Goal created: ${o.braCreateGoal.name}`),i(t,o.braCreateGoal);}catch(e){r(e);}}),n.command("update").description("Update a goal").argument("<id>","Goal ID").option("--name <name>","Goal name").option("--type <t>","RETIREMENT|EDUCATION|HOME|EMERGENCY_FUND|MAJOR_PURCHASE|WEALTH_GROWTH|CUSTOM").option("--status <s>","ACTIVE|ON_HOLD|ACHIEVED|ABANDONED").option("--currency <c>","Currency code").option("--target-amount <n>","Target amount",d).option("--target-date <iso>","Target date (ISO)").option("--monthly-contribution <n>","Monthly contribution",d).option("--priority <n>","Priority",m).option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.type&&(o.type=e.type.toUpperCase()),e.status&&(o.status=e.status.toUpperCase()),e.currency&&(o.currency=e.currency),e.targetAmount!==void 0&&(o.targetAmount=e.targetAmount),e.targetDate&&(o.targetDate=e.targetDate),e.monthlyContribution!==void 0&&(o.monthlyContribution=e.monthlyContribution),e.priority!==void 0&&(o.priority=e.priority),e.notes!==void 0&&(o.notes=e.notes),e.tags&&(o.tags=y(e.tags)),!Object.keys(o).length)throw new u("No updates specified");let f=await a(X,{id:t,input:o});c("Goal updated"),i(e,f.braUpdateGoal);}catch(o){r(o);}}),n.command("archive").description("Archive a goal").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(Z,{id:t});c(`Goal archived: ${o.braArchiveGoal}`),i(e,{archived:o.braArchiveGoal});}catch(o){r(o);}}),n.command("recalc-projection").description("Recompute a goal's projection from a funded amount").argument("<id>","Goal ID").requiredOption("--funded-amount <n>","Funded amount",d).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(tt,{id:t,fundedAmount:e.fundedAmount});c(`Projection: ${o.braRecalcGoalProjection.projection??"-"}`),i(e,o.braRecalcGoalProjection);}catch(o){r(o);}}),n.command("list-fundings").description("List fundings linked to a goal").requiredOption("--goal <id>","Goal ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(z,{goalId:t.goal});i(t,e.braListGoalFundings.items,{headers:["ID","Account","Allocation %","Fixed"],rows:e.braListGoalFundings.items.map(o=>[l(o.id,12),l(o.accountId,12),o.allocationPct!=null?String(o.allocationPct):"-",o.fixedAmount!=null?String(o.fixedAmount):"-"])});}catch(e){r(e);}}),n.command("link-funding").description("Link an account funding to a goal").requiredOption("--goal <id>","Goal ID").requiredOption("--account <id>","Account ID").option("--allocation-pct <n>","Allocation percentage",d).option("--fixed-amount <n>","Fixed amount",d).option("-f, --format <format>","Output format").action(async t=>{try{let e={goalId:t.goal,accountId:t.account};t.allocationPct!==void 0&&(e.allocationPct=t.allocationPct),t.fixedAmount!==void 0&&(e.fixedAmount=t.fixedAmount);let o=await a(et,{input:e});c("Funding linked"),i(t,o.braLinkGoalFunding);}catch(e){r(e);}}),n.command("unlink-funding").description("Unlink a funding from a goal").argument("<id>","Funding ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(ot,{id:t});c(`Funding unlinked: ${o.braUnlinkGoalFunding}`),i(e,{unlinked:o.braUnlinkGoalFunding});}catch(o){r(o);}});}function wt(s){let n=s.command("transactions").description("Brainyrich account transactions");n.command("list").description("List transactions").option("--account <id>","Filter by account ID").option("--type <t>","BUY|SELL|DIVIDEND|INTEREST|DEPOSIT|WITHDRAWAL|FEE|TRANSFER").option("--limit <n>","Page size",m,50).option("--offset <n>","Offset",m,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(nt,{accountId:t.account,type:t.type?t.type.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});i(t,e.braListTransactions.items,{headers:["ID","Type","Symbol","Qty","Amount","Trade Date"],rows:e.braListTransactions.items.map(o=>[l(o.id,12),o.type,o.symbol??"-",o.quantity!=null?String(o.quantity):"-",o.amount!=null?String(o.amount):"-",o.tradeDate??"-"])});}catch(e){r(e);}}),n.command("record").description("Record a transaction").requiredOption("--account <id>","Account ID").requiredOption("--type <t>","BUY|SELL|DIVIDEND|INTEREST|DEPOSIT|WITHDRAWAL|FEE|TRANSFER").requiredOption("--trade-date <iso>","Trade date (ISO)").option("--holding <id>","Holding ID").option("--symbol <s>","Ticker symbol").option("--quantity <n>","Quantity",d).option("--price <n>","Price",d).option("--amount <n>","Amount",d).option("--fee <n>","Fee",d).option("--currency <c>","Currency code").option("--settle-date <iso>","Settlement date (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async t=>{try{let e={accountId:t.account,type:t.type.toUpperCase(),tradeDate:t.tradeDate};t.holding&&(e.holdingId=t.holding),t.symbol&&(e.symbol=t.symbol),t.quantity!==void 0&&(e.quantity=t.quantity),t.price!==void 0&&(e.price=t.price),t.amount!==void 0&&(e.amount=t.amount),t.fee!==void 0&&(e.fee=t.fee),t.currency&&(e.currency=t.currency),t.settleDate&&(e.settleDate=t.settleDate),t.notes&&(e.notes=t.notes);let o=await a(rt,{input:e});c(`Transaction recorded: ${o.braRecordTransaction.type}`),i(t,o.braRecordTransaction);}catch(e){r(e);}});}function Et(s){let n=s.command("insights").description("Brainyrich advisory insights");n.command("list").description("List insights").option("--status <s>","OPEN|ACKNOWLEDGED|RESOLVED|DISMISSED").option("--severity <s>","INFO|LOW|MEDIUM|HIGH|CRITICAL").option("--subject-id <id>","Filter by subject ID").option("--subject-type <t>","Filter by subject type").option("--limit <n>","Page size",m,50).option("--offset <n>","Offset",m,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(st,{status:t.status?t.status.toUpperCase():void 0,severity:t.severity?t.severity.toUpperCase():void 0,subjectId:t.subjectId,subjectType:t.subjectType,pagination:{limit:t.limit,offset:t.offset}});i(t,e.braListInsights.items,{headers:["ID","Title","Type","Severity","Status"],rows:e.braListInsights.items.map(o=>[l(o.id,12),o.title,o.type,o.severity??"-",o.status??"-"])});}catch(e){r(e);}}),n.command("get").description("Get an insight by id").argument("<id>","Insight ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(it,{id:t});if(!o.braInsight)throw new u(`Insight ${t} not found`);i(e,o.braInsight);}catch(o){r(o);}}),n.command("create").description("Create an insight").requiredOption("--title <t>","Title").requiredOption("--type <t>","DRIFT|CASH_DRAG|CONCENTRATION_RISK|FEE_ANOMALY|TAX_OPPORTUNITY|GOAL_AT_RISK|REBALANCE_DUE").requiredOption("--subject-id <id>","Subject ID").requiredOption("--subject-type <t>","Subject type").option("--severity <s>","INFO|LOW|MEDIUM|HIGH|CRITICAL").option("--detail <s>","Detail").option("--owner <id>","Owner user ID").option("--metrics <json>","Metrics JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title,type:t.type.toUpperCase(),subjectId:t.subjectId,subjectType:t.subjectType};t.severity&&(e.severity=t.severity.toUpperCase()),t.detail&&(e.detail=t.detail),t.owner&&(e.ownerId=t.owner),t.metrics&&(e.metrics=h("metrics",t.metrics));let o=await a(at,{input:e});c(`Insight created: ${o.braCreateInsight.title}`),i(t,o.braCreateInsight);}catch(e){r(e);}}),n.command("acknowledge").description("Acknowledge an insight").argument("<id>","Insight ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(ct,{id:t});c(`Insight acknowledged: ${o.braAcknowledgeInsight.status??"-"}`),i(e,o.braAcknowledgeInsight);}catch(o){r(o);}}),n.command("dismiss").description("Dismiss an insight").argument("<id>","Insight ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(ut,{id:t});c(`Insight dismissed: ${o.braDismissInsight.status??"-"}`),i(e,o.braDismissInsight);}catch(o){r(o);}}),n.command("resolve").description("Resolve an insight").argument("<id>","Insight ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(dt,{id:t});c(`Insight resolved: ${o.braResolveInsight.status??"-"}`),i(e,o.braResolveInsight);}catch(o){r(o);}});}function Tt(s){let n=s.command("rebalances").description("Brainyrich rebalance proposals");n.command("list").description("List rebalance proposals").option("--portfolio <id>","Filter by portfolio ID").option("--household <id>","Filter by household ID").option("--status <s>","DRAFT|PROPOSED|APPROVED|REJECTED|EXECUTED|CANCELLED").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(pt,{portfolioId:t.portfolio,householdId:t.household,status:t.status?t.status.toUpperCase():void 0});i(t,e.braListRebalanceProposals.items,{headers:["ID","Portfolio","Status","Drift %","Rationale"],rows:e.braListRebalanceProposals.items.map(o=>[l(o.id,12),l(o.portfolioId,12),o.status,o.driftPct!=null?String(o.driftPct):"-",l(o.rationale??"-",30)])});}catch(e){r(e);}}),n.command("create").description("Create a rebalance proposal").requiredOption("--portfolio <id>","Portfolio ID").option("--household <id>","Household ID").option("--drift-pct <n>","Drift percentage",d).option("--rationale <s>","Rationale").option("--trades <json>","Trades JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={portfolioId:t.portfolio};t.household&&(e.householdId=t.household),t.driftPct!==void 0&&(e.driftPct=t.driftPct),t.rationale&&(e.rationale=t.rationale),t.trades&&(e.trades=h("trades",t.trades));let o=await a(lt,{input:e});c(`Rebalance proposal created: ${o.braCreateRebalanceProposal.id}`),i(t,o.braCreateRebalanceProposal);}catch(e){r(e);}}),n.command("transition").description("Advance a rebalance proposal through its review lifecycle").argument("<id>","Proposal ID").requiredOption("--status <s>","DRAFT|PROPOSED|APPROVED|REJECTED|EXECUTED|CANCELLED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(mt,{id:t,status:e.status.toUpperCase()});c(`Proposal status set to ${o.braTransitionRebalanceProposal.status}`),i(e,o.braTransitionRebalanceProposal);}catch(o){r(o);}});}function Ot(s){s.command("analytics").description("Brainyrich net-worth analytics & health").command("net-worth").description("Net-worth summary (totals + breakdown by asset class)").option("--owner <id>","Owner user ID (defaults to the calling actor)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(ft,{ownerId:t.owner});i(t,e.braNetWorthSummary);}catch(e){r(e);}}),s.command("health").description("Brainyrich service health check (public)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await w(gt);c(e.braHealth),i(t,{health:e.braHealth});}catch(e){r(e);}});}var _t={id:"brainyrich",version:"1.0.0",displayName:"Brainyrich",dependsOn:["auth","workspaces"],register(s,n){O(n);let t=s.command("brainyrich").description("Brainyrich wealth-management platform");ht(t),yt(t),It(t),Ct(t),bt(t),At(t),wt(t),Et(t),Tt(t),Ot(t);}},_o=_t;module.exports=_o;
|
|
356
|
+
`;function I(r,o){try{return JSON.parse(o)}catch{throw new u(`--${r} must be valid JSON`)}}function f(r){let o=Number.parseInt(r,10);if(Number.isNaN(o))throw new u(`Expected an integer but got "${r}"`);return o}function d(r){let o=Number.parseFloat(r);if(Number.isNaN(o))throw new u(`Expected a number but got "${r}"`);return o}function C(r){return r.split(",").map(o=>o.trim()).filter(o=>o.length>0)}function bt(r){let o=r.command("households").description("Brainyrich advisory households");o.command("list").description("List households").option("--status <s>","PROSPECT|ONBOARDING|ACTIVE|INACTIVE").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(S,{status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});s(t,e.braListHouseholds.items,{headers:["ID","Name","Status","Risk","AUM","Currency"],rows:e.braListHouseholds.items.map(n=>[l(n.id,12),n.name,n.status??"-",n.riskProfile??"-",n.aum!=null?String(n.aum):"-",n.currency??"-"])});}catch(e){i(e);}}),o.command("get").description("Get a household by id").argument("<id>","Household ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(x,{id:t});if(!n.braHousehold)throw new u(`Household ${t} not found`);s(e,n.braHousehold);}catch(n){i(n);}}),o.command("create").description("Create a household").requiredOption("--name <name>","Household name").option("--advisor <id>","Advisor user ID").option("--currency <c>","Currency code").option("--risk-profile <r>","CONSERVATIVE|MODERATE|BALANCED|GROWTH|AGGRESSIVE").option("--status <s>","PROSPECT|ONBOARDING|ACTIVE|INACTIVE").option("--primary-contact-name <s>","Primary contact name").option("--primary-contact-email <s>","Primary contact email").option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.advisor&&(e.advisorId=t.advisor),t.currency&&(e.currency=t.currency),t.riskProfile&&(e.riskProfile=t.riskProfile.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.primaryContactName&&(e.primaryContactName=t.primaryContactName),t.primaryContactEmail&&(e.primaryContactEmail=t.primaryContactEmail),t.notes&&(e.notes=t.notes),t.tags&&(e.tags=C(t.tags));let n=await a(L,{input:e});c(`Household created: ${n.braCreateHousehold.name}`),s(t,n.braCreateHousehold);}catch(e){i(e);}}),o.command("update").description("Update a household").argument("<id>","Household ID").option("--name <name>","Household name").option("--aum <n>","Assets under management",d).option("--currency <c>","Currency code").option("--risk-profile <r>","CONSERVATIVE|MODERATE|BALANCED|GROWTH|AGGRESSIVE").option("--status <s>","PROSPECT|ONBOARDING|ACTIVE|INACTIVE").option("--primary-contact-name <s>","Primary contact name").option("--primary-contact-email <s>","Primary contact email").option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.aum!==void 0&&(n.aum=e.aum),e.currency&&(n.currency=e.currency),e.riskProfile&&(n.riskProfile=e.riskProfile.toUpperCase()),e.status&&(n.status=e.status.toUpperCase()),e.primaryContactName!==void 0&&(n.primaryContactName=e.primaryContactName),e.primaryContactEmail!==void 0&&(n.primaryContactEmail=e.primaryContactEmail),e.notes!==void 0&&(n.notes=e.notes),e.tags&&(n.tags=C(e.tags)),!Object.keys(n).length)throw new u("No updates specified");let m=await a(v,{id:t,input:n});c("Household updated"),s(e,m.braUpdateHousehold);}catch(n){i(n);}}),o.command("archive").description("Archive a household").argument("<id>","Household ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(N,{id:t});c(`Household archived: ${n.braArchiveHousehold}`),s(e,{archived:n.braArchiveHousehold});}catch(n){i(n);}});}function At(r){let o=r.command("accounts").description("Brainyrich financial accounts");o.command("list").description("List accounts").option("--household <id>","Filter by household ID").option("--status <s>","ACTIVE|ARCHIVED|CLOSED").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(G,{householdId:t.household,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});s(t,e.braListAccounts.items,{headers:["ID","Name","Type","Status","Cash","Currency"],rows:e.braListAccounts.items.map(n=>[l(n.id,12),n.name,n.type??"-",n.status??"-",n.cashBalance!=null?String(n.cashBalance):"-",n.currency??"-"])});}catch(e){i(e);}}),o.command("get").description("Get an account by id").argument("<id>","Account ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a($,{id:t});if(!n.braAccount)throw new u(`Account ${t} not found`);s(e,n.braAccount);}catch(n){i(n);}}),o.command("create").description("Create an account").requiredOption("--name <name>","Account name").option("--owner <id>","Owner user ID").option("--household <id>","Household ID").option("--type <t>","BANK|BROKERAGE|RETIREMENT|CRYPTO|REAL_ESTATE|LIABILITY|CASH|ALTERNATIVE").option("--status <s>","ACTIVE|ARCHIVED|CLOSED").option("--currency <c>","Currency code").option("--cash-balance <n>","Cash balance",d).option("--institution <s>","Institution name").option("--account-mask <s>","Account mask").option("--manual","Mark as manually-tracked").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.owner&&(e.ownerId=t.owner),t.household&&(e.householdId=t.household),t.type&&(e.type=t.type.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.currency&&(e.currency=t.currency),t.cashBalance!==void 0&&(e.cashBalance=t.cashBalance),t.institution&&(e.institution=t.institution),t.accountMask&&(e.accountMask=t.accountMask),t.manual&&(e.isManual=!0);let n=await a(H,{input:e});c(`Account created: ${n.braCreateAccount.name}`),s(t,n.braCreateAccount);}catch(e){i(e);}}),o.command("update").description("Update an account").argument("<id>","Account ID").option("--name <name>","Account name").option("--household <id>","Household ID").option("--type <t>","BANK|BROKERAGE|RETIREMENT|CRYPTO|REAL_ESTATE|LIABILITY|CASH|ALTERNATIVE").option("--status <s>","ACTIVE|ARCHIVED|CLOSED").option("--currency <c>","Currency code").option("--cash-balance <n>","Cash balance",d).option("--institution <s>","Institution name").option("--account-mask <s>","Account mask").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.household&&(n.householdId=e.household),e.type&&(n.type=e.type.toUpperCase()),e.status&&(n.status=e.status.toUpperCase()),e.currency&&(n.currency=e.currency),e.cashBalance!==void 0&&(n.cashBalance=e.cashBalance),e.institution!==void 0&&(n.institution=e.institution),e.accountMask!==void 0&&(n.accountMask=e.accountMask),!Object.keys(n).length)throw new u("No updates specified");let m=await a(_,{id:t,input:n});c("Account updated"),s(e,m.braUpdateAccount);}catch(n){i(n);}}),o.command("archive").description("Archive an account").argument("<id>","Account ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(q,{id:t});c(`Account archived: ${n.braArchiveAccount}`),s(e,{archived:n.braArchiveAccount});}catch(n){i(n);}});}function wt(r){let o=r.command("holdings").description("Brainyrich account holdings");o.command("list").description("List holdings for an account or portfolio").option("--account <id>","Filter by account ID").option("--portfolio <id>","Filter by portfolio ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(U,{accountId:t.account,portfolioId:t.portfolio});s(t,e.braListHoldings.items,{headers:["ID","Symbol","Class","Qty","Last","Market Value"],rows:e.braListHoldings.items.map(n=>[l(n.id,12),n.symbol,n.assetClass??"-",n.quantity!=null?String(n.quantity):"-",n.lastPrice!=null?String(n.lastPrice):"-",n.marketValue!=null?String(n.marketValue):"-"])});}catch(e){i(e);}}),o.command("create").description("Create a holding").requiredOption("--account <id>","Account ID").requiredOption("--symbol <s>","Ticker symbol").option("--portfolio <id>","Portfolio ID").option("--name <s>","Display name").option("--asset-class <c>","EQUITY|FIXED_INCOME|CASH|REAL_ESTATE|COMMODITY|CRYPTO|ALTERNATIVE").option("--quantity <n>","Quantity",d).option("--cost-basis <n>","Cost basis",d).option("--last-price <n>","Last price",d).option("--currency <c>","Currency code").option("--as-of <iso>","As-of date (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e={accountId:t.account,symbol:t.symbol};t.portfolio&&(e.portfolioId=t.portfolio),t.name&&(e.name=t.name),t.assetClass&&(e.assetClass=t.assetClass.toUpperCase()),t.quantity!==void 0&&(e.quantity=t.quantity),t.costBasis!==void 0&&(e.costBasis=t.costBasis),t.lastPrice!==void 0&&(e.lastPrice=t.lastPrice),t.currency&&(e.currency=t.currency),t.asOf&&(e.asOf=t.asOf);let n=await a(B,{input:e});c(`Holding created: ${n.braCreateHolding.symbol}`),s(t,n.braCreateHolding);}catch(e){i(e);}}),o.command("update").description("Update a holding").argument("<id>","Holding ID").option("--name <s>","Display name").option("--asset-class <c>","EQUITY|FIXED_INCOME|CASH|REAL_ESTATE|COMMODITY|CRYPTO|ALTERNATIVE").option("--quantity <n>","Quantity",d).option("--cost-basis <n>","Cost basis",d).option("--last-price <n>","Last price",d).option("--portfolio <id>","Portfolio ID").option("--as-of <iso>","As-of date (ISO)").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name!==void 0&&(n.name=e.name),e.assetClass&&(n.assetClass=e.assetClass.toUpperCase()),e.quantity!==void 0&&(n.quantity=e.quantity),e.costBasis!==void 0&&(n.costBasis=e.costBasis),e.lastPrice!==void 0&&(n.lastPrice=e.lastPrice),e.portfolio&&(n.portfolioId=e.portfolio),e.asOf&&(n.asOf=e.asOf),!Object.keys(n).length)throw new u("No updates specified");let m=await a(M,{id:t,input:n});c("Holding updated"),s(e,m.braUpdateHolding);}catch(n){i(n);}}),o.command("delete").description("Delete a holding").argument("<id>","Holding ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(F,{id:t});c(`Holding deleted: ${n.braDeleteHolding}`),s(e,{deleted:n.braDeleteHolding});}catch(n){i(n);}});}function Et(r){let o=r.command("portfolios").description("Brainyrich portfolios");o.command("list").description("List portfolios").option("--household <id>","Filter by household ID").option("--status <s>","DRAFT|ACTIVE|ARCHIVED").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(W,{householdId:t.household,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});s(t,e.braListPortfolios.items,{headers:["ID","Name","Status","Currency","Drift %"],rows:e.braListPortfolios.items.map(n=>[l(n.id,12),n.name,n.status??"-",n.baseCurrency??"-",n.driftThresholdPct!=null?String(n.driftThresholdPct):"-"])});}catch(e){i(e);}}),o.command("get").description("Get a portfolio by id").argument("<id>","Portfolio ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(j,{id:t});if(!n.braPortfolio)throw new u(`Portfolio ${t} not found`);s(e,n.braPortfolio);}catch(n){i(n);}}),o.command("create").description("Create a portfolio").requiredOption("--name <name>","Portfolio name").option("--owner <id>","Owner user ID").option("--household <id>","Household ID").option("--description <s>","Description").option("--base-currency <c>","Base currency code").option("--drift-threshold-pct <n>","Drift threshold %",d).option("--model-portfolio <id>","Model portfolio ID").option("--target-allocation <json>","Target allocation JSON").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.owner&&(e.ownerId=t.owner),t.household&&(e.householdId=t.household),t.description&&(e.description=t.description),t.baseCurrency&&(e.baseCurrency=t.baseCurrency),t.driftThresholdPct!==void 0&&(e.driftThresholdPct=t.driftThresholdPct),t.modelPortfolio&&(e.modelPortfolioId=t.modelPortfolio),t.targetAllocation&&(e.targetAllocation=I("target-allocation",t.targetAllocation)),t.tags&&(e.tags=C(t.tags));let n=await a(V,{input:e});c(`Portfolio created: ${n.braCreatePortfolio.name}`),s(t,n.braCreatePortfolio);}catch(e){i(e);}}),o.command("update").description("Update a portfolio").argument("<id>","Portfolio ID").option("--name <name>","Portfolio name").option("--description <s>","Description").option("--status <s>","DRAFT|ACTIVE|ARCHIVED").option("--base-currency <c>","Base currency code").option("--drift-threshold-pct <n>","Drift threshold %",d).option("--model-portfolio <id>","Model portfolio ID").option("--target-allocation <json>","Target allocation JSON").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.description!==void 0&&(n.description=e.description),e.status&&(n.status=e.status.toUpperCase()),e.baseCurrency&&(n.baseCurrency=e.baseCurrency),e.driftThresholdPct!==void 0&&(n.driftThresholdPct=e.driftThresholdPct),e.modelPortfolio&&(n.modelPortfolioId=e.modelPortfolio),e.targetAllocation&&(n.targetAllocation=I("target-allocation",e.targetAllocation)),e.tags&&(n.tags=C(e.tags)),!Object.keys(n).length)throw new u("No updates specified");let m=await a(J,{id:t,input:n});c("Portfolio updated"),s(e,m.braUpdatePortfolio);}catch(n){i(n);}}),o.command("archive").description("Archive a portfolio").argument("<id>","Portfolio ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(Y,{id:t});c(`Portfolio archived: ${n.braArchivePortfolio}`),s(e,{archived:n.braArchivePortfolio});}catch(n){i(n);}});}function Tt(r){let o=r.command("model-portfolios").description("Brainyrich model portfolios");o.command("list").description("List model portfolios").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(z);s(t,e.braListModelPortfolios.items,{headers:["ID","Name","Risk","Currency","Active"],rows:e.braListModelPortfolios.items.map(n=>[l(n.id,12),n.name,n.riskProfile??"-",n.baseCurrency??"-",n.isActive?"yes":"no"])});}catch(e){i(e);}}),o.command("get").description("Get a model portfolio by id").argument("<id>","Model portfolio ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(K,{id:t});if(!n.braModelPortfolio)throw new u(`Model portfolio ${t} not found`);s(e,n.braModelPortfolio);}catch(n){i(n);}}),o.command("create").description("Create a model portfolio").requiredOption("--name <name>","Model portfolio name").option("--description <s>","Description").option("--base-currency <c>","Base currency code").option("--risk-profile <r>","CONSERVATIVE|MODERATE|BALANCED|GROWTH|AGGRESSIVE").option("--allocations <json>","Allocations JSON array: [{ assetClass, targetPct }]").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};if(t.description&&(e.description=t.description),t.baseCurrency&&(e.baseCurrency=t.baseCurrency),t.riskProfile&&(e.riskProfile=t.riskProfile.toUpperCase()),t.allocations){let m=I("allocations",t.allocations);if(!Array.isArray(m))throw new u("--allocations must be a JSON array");e.allocations=m;}let n=await a(Q,{input:e});c(`Model portfolio created: ${n.braCreateModelPortfolio.name}`),s(t,n.braCreateModelPortfolio);}catch(e){i(e);}});}function Ot(r){let o=r.command("goals").description("Brainyrich financial goals");o.command("list").description("List goals").option("--household <id>","Filter by household ID").option("--status <s>","ACTIVE|ON_HOLD|ACHIEVED|ABANDONED").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(Z,{householdId:t.household,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});s(t,e.braListGoals.items,{headers:["ID","Name","Type","Status","Target","Projection"],rows:e.braListGoals.items.map(n=>[l(n.id,12),n.name,n.type??"-",n.status??"-",n.targetAmount!=null?String(n.targetAmount):"-",n.projection??"-"])});}catch(e){i(e);}}),o.command("get").description("Get a goal by id").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(X,{id:t});if(!n.braGoal)throw new u(`Goal ${t} not found`);s(e,n.braGoal);}catch(n){i(n);}}),o.command("create").description("Create a goal").requiredOption("--name <name>","Goal name").requiredOption("--target-amount <n>","Target amount",d).requiredOption("--target-date <iso>","Target date (ISO)").option("--owner <id>","Owner user ID").option("--household <id>","Household ID").option("--type <t>","RETIREMENT|EDUCATION|HOME|EMERGENCY_FUND|MAJOR_PURCHASE|WEALTH_GROWTH|CUSTOM").option("--currency <c>","Currency code").option("--monthly-contribution <n>","Monthly contribution",d).option("--priority <n>","Priority",f).option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,targetAmount:t.targetAmount,targetDate:t.targetDate};t.owner&&(e.ownerId=t.owner),t.household&&(e.householdId=t.household),t.type&&(e.type=t.type.toUpperCase()),t.currency&&(e.currency=t.currency),t.monthlyContribution!==void 0&&(e.monthlyContribution=t.monthlyContribution),t.priority!==void 0&&(e.priority=t.priority),t.notes&&(e.notes=t.notes),t.tags&&(e.tags=C(t.tags));let n=await a(et,{input:e});c(`Goal created: ${n.braCreateGoal.name}`),s(t,n.braCreateGoal);}catch(e){i(e);}}),o.command("update").description("Update a goal").argument("<id>","Goal ID").option("--name <name>","Goal name").option("--type <t>","RETIREMENT|EDUCATION|HOME|EMERGENCY_FUND|MAJOR_PURCHASE|WEALTH_GROWTH|CUSTOM").option("--status <s>","ACTIVE|ON_HOLD|ACHIEVED|ABANDONED").option("--currency <c>","Currency code").option("--target-amount <n>","Target amount",d).option("--target-date <iso>","Target date (ISO)").option("--monthly-contribution <n>","Monthly contribution",d).option("--priority <n>","Priority",f).option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.type&&(n.type=e.type.toUpperCase()),e.status&&(n.status=e.status.toUpperCase()),e.currency&&(n.currency=e.currency),e.targetAmount!==void 0&&(n.targetAmount=e.targetAmount),e.targetDate&&(n.targetDate=e.targetDate),e.monthlyContribution!==void 0&&(n.monthlyContribution=e.monthlyContribution),e.priority!==void 0&&(n.priority=e.priority),e.notes!==void 0&&(n.notes=e.notes),e.tags&&(n.tags=C(e.tags)),!Object.keys(n).length)throw new u("No updates specified");let m=await a(nt,{id:t,input:n});c("Goal updated"),s(e,m.braUpdateGoal);}catch(n){i(n);}}),o.command("archive").description("Archive a goal").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(ot,{id:t});c(`Goal archived: ${n.braArchiveGoal}`),s(e,{archived:n.braArchiveGoal});}catch(n){i(n);}}),o.command("recalc-projection").description("Recompute a goal's projection from a funded amount").argument("<id>","Goal ID").requiredOption("--funded-amount <n>","Funded amount",d).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(rt,{id:t,fundedAmount:e.fundedAmount});c(`Projection: ${n.braRecalcGoalProjection.projection??"-"}`),s(e,n.braRecalcGoalProjection);}catch(n){i(n);}}),o.command("list-fundings").description("List fundings linked to a goal").requiredOption("--goal <id>","Goal ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(tt,{goalId:t.goal});s(t,e.braListGoalFundings.items,{headers:["ID","Account","Allocation %","Fixed"],rows:e.braListGoalFundings.items.map(n=>[l(n.id,12),l(n.accountId,12),n.allocationPct!=null?String(n.allocationPct):"-",n.fixedAmount!=null?String(n.fixedAmount):"-"])});}catch(e){i(e);}}),o.command("link-funding").description("Link an account funding to a goal").requiredOption("--goal <id>","Goal ID").requiredOption("--account <id>","Account ID").option("--allocation-pct <n>","Allocation percentage",d).option("--fixed-amount <n>","Fixed amount",d).option("-f, --format <format>","Output format").action(async t=>{try{let e={goalId:t.goal,accountId:t.account};t.allocationPct!==void 0&&(e.allocationPct=t.allocationPct),t.fixedAmount!==void 0&&(e.fixedAmount=t.fixedAmount);let n=await a(it,{input:e});c("Funding linked"),s(t,n.braLinkGoalFunding);}catch(e){i(e);}}),o.command("unlink-funding").description("Unlink a funding from a goal").argument("<id>","Funding ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(st,{id:t});c(`Funding unlinked: ${n.braUnlinkGoalFunding}`),s(e,{unlinked:n.braUnlinkGoalFunding});}catch(n){i(n);}});}function kt(r){let o=r.command("transactions").description("Brainyrich account transactions");o.command("list").description("List transactions").option("--account <id>","Filter by account ID").option("--type <t>","BUY|SELL|DIVIDEND|INTEREST|DEPOSIT|WITHDRAWAL|FEE|TRANSFER").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(at,{accountId:t.account,type:t.type?t.type.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});s(t,e.braListTransactions.items,{headers:["ID","Type","Symbol","Qty","Amount","Trade Date"],rows:e.braListTransactions.items.map(n=>[l(n.id,12),n.type,n.symbol??"-",n.quantity!=null?String(n.quantity):"-",n.amount!=null?String(n.amount):"-",n.tradeDate??"-"])});}catch(e){i(e);}}),o.command("record").description("Record a transaction").requiredOption("--account <id>","Account ID").requiredOption("--type <t>","BUY|SELL|DIVIDEND|INTEREST|DEPOSIT|WITHDRAWAL|FEE|TRANSFER").requiredOption("--trade-date <iso>","Trade date (ISO)").option("--holding <id>","Holding ID").option("--symbol <s>","Ticker symbol").option("--quantity <n>","Quantity",d).option("--price <n>","Price",d).option("--amount <n>","Amount",d).option("--fee <n>","Fee",d).option("--currency <c>","Currency code").option("--settle-date <iso>","Settlement date (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async t=>{try{let e={accountId:t.account,type:t.type.toUpperCase(),tradeDate:t.tradeDate};t.holding&&(e.holdingId=t.holding),t.symbol&&(e.symbol=t.symbol),t.quantity!==void 0&&(e.quantity=t.quantity),t.price!==void 0&&(e.price=t.price),t.amount!==void 0&&(e.amount=t.amount),t.fee!==void 0&&(e.fee=t.fee),t.currency&&(e.currency=t.currency),t.settleDate&&(e.settleDate=t.settleDate),t.notes&&(e.notes=t.notes);let n=await a(ct,{input:e});c(`Transaction recorded: ${n.braRecordTransaction.type}`),s(t,n.braRecordTransaction);}catch(e){i(e);}});}function Rt(r){let o=r.command("insights").description("Brainyrich advisory insights");o.command("list").description("List insights").option("--status <s>","OPEN|ACKNOWLEDGED|RESOLVED|DISMISSED").option("--severity <s>","INFO|LOW|MEDIUM|HIGH|CRITICAL").option("--subject-id <id>","Filter by subject ID").option("--subject-type <t>","Filter by subject type").option("--limit <n>","Page size",f,50).option("--offset <n>","Offset",f,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(dt,{status:t.status?t.status.toUpperCase():void 0,severity:t.severity?t.severity.toUpperCase():void 0,subjectId:t.subjectId,subjectType:t.subjectType,pagination:{limit:t.limit,offset:t.offset}});s(t,e.braListInsights.items,{headers:["ID","Title","Type","Severity","Status"],rows:e.braListInsights.items.map(n=>[l(n.id,12),n.title,n.type,n.severity??"-",n.status??"-"])});}catch(e){i(e);}}),o.command("get").description("Get an insight by id").argument("<id>","Insight ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(ut,{id:t});if(!n.braInsight)throw new u(`Insight ${t} not found`);s(e,n.braInsight);}catch(n){i(n);}}),o.command("create").description("Create an insight").requiredOption("--title <t>","Title").requiredOption("--type <t>","DRIFT|CASH_DRAG|CONCENTRATION_RISK|FEE_ANOMALY|TAX_OPPORTUNITY|GOAL_AT_RISK|REBALANCE_DUE").requiredOption("--subject-id <id>","Subject ID").requiredOption("--subject-type <t>","Subject type").option("--severity <s>","INFO|LOW|MEDIUM|HIGH|CRITICAL").option("--detail <s>","Detail").option("--owner <id>","Owner user ID").option("--metrics <json>","Metrics JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title,type:t.type.toUpperCase(),subjectId:t.subjectId,subjectType:t.subjectType};t.severity&&(e.severity=t.severity.toUpperCase()),t.detail&&(e.detail=t.detail),t.owner&&(e.ownerId=t.owner),t.metrics&&(e.metrics=I("metrics",t.metrics));let n=await a(pt,{input:e});c(`Insight created: ${n.braCreateInsight.title}`),s(t,n.braCreateInsight);}catch(e){i(e);}}),o.command("acknowledge").description("Acknowledge an insight").argument("<id>","Insight ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(lt,{id:t});c(`Insight acknowledged: ${n.braAcknowledgeInsight.status??"-"}`),s(e,n.braAcknowledgeInsight);}catch(n){i(n);}}),o.command("dismiss").description("Dismiss an insight").argument("<id>","Insight ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(mt,{id:t});c(`Insight dismissed: ${n.braDismissInsight.status??"-"}`),s(e,n.braDismissInsight);}catch(n){i(n);}}),o.command("resolve").description("Resolve an insight").argument("<id>","Insight ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(ft,{id:t});c(`Insight resolved: ${n.braResolveInsight.status??"-"}`),s(e,n.braResolveInsight);}catch(n){i(n);}});}function Dt(r){let o=r.command("rebalances").description("Brainyrich rebalance proposals");o.command("list").description("List rebalance proposals").option("--portfolio <id>","Filter by portfolio ID").option("--household <id>","Filter by household ID").option("--status <s>","DRAFT|PROPOSED|APPROVED|REJECTED|EXECUTED|CANCELLED").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(gt,{portfolioId:t.portfolio,householdId:t.household,status:t.status?t.status.toUpperCase():void 0});s(t,e.braListRebalanceProposals.items,{headers:["ID","Portfolio","Status","Drift %","Rationale"],rows:e.braListRebalanceProposals.items.map(n=>[l(n.id,12),l(n.portfolioId,12),n.status,n.driftPct!=null?String(n.driftPct):"-",l(n.rationale??"-",30)])});}catch(e){i(e);}}),o.command("create").description("Create a rebalance proposal").requiredOption("--portfolio <id>","Portfolio ID").option("--household <id>","Household ID").option("--drift-pct <n>","Drift percentage",d).option("--rationale <s>","Rationale").option("--trades <json>","Trades JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={portfolioId:t.portfolio};t.household&&(e.householdId=t.household),t.driftPct!==void 0&&(e.driftPct=t.driftPct),t.rationale&&(e.rationale=t.rationale),t.trades&&(e.trades=I("trades",t.trades));let n=await a(ht,{input:e});c(`Rebalance proposal created: ${n.braCreateRebalanceProposal.id}`),s(t,n.braCreateRebalanceProposal);}catch(e){i(e);}}),o.command("transition").description("Advance a rebalance proposal through its review lifecycle").argument("<id>","Proposal ID").requiredOption("--status <s>","DRAFT|PROPOSED|APPROVED|REJECTED|EXECUTED|CANCELLED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await a(yt,{id:t,status:e.status.toUpperCase()});c(`Proposal status set to ${n.braTransitionRebalanceProposal.status}`),s(e,n.braTransitionRebalanceProposal);}catch(n){i(n);}});}function Pt(r){r.command("analytics").description("Brainyrich net-worth analytics & health").command("net-worth").description("Net-worth summary (totals + breakdown by asset class)").option("--owner <id>","Owner user ID (defaults to the calling actor)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(It,{ownerId:t.owner});s(t,e.braNetWorthSummary);}catch(e){i(e);}}),r.command("health").description("Brainyrich service health check (public)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await k(Ct);c(e.braHealth),s(t,{health:e.braHealth});}catch(e){i(e);}});}var Mt={id:"brainyrich",version:"1.0.0",displayName:"Brainyrich",dependsOn:["auth","workspaces"],register(r,o){P(o);let t=r.command("brainyrich").description("Brainyrich wealth-management platform");bt(t),At(t),wt(t),Et(t),Tt(t),Ot(t),kt(t),Rt(t),Dt(t),Pt(t);}},Mn=Mt;module.exports=Mn;
|