@burdenoff/cli-sdk 2026.928.1 → 2026.1021.2
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-SQSFZFQZ.js +1 -0
- package/dist/chunk-UAFYTYK6.js +32 -0
- package/dist/core/index.cjs +7 -7
- 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 +7 -7
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{module-DxCuik6L.d.cts → module-DOIiVaXQ.d.cts} +4 -1
- package/dist/{module-DxCuik6L.d.ts → module-DOIiVaXQ.d.ts} +4 -1
- package/dist/modules/adaptercloud/index.cjs +2 -2
- package/dist/modules/adaptercloud/index.d.cts +1 -1
- package/dist/modules/adaptercloud/index.d.ts +1 -1
- package/dist/modules/adaptercloud/index.js +1 -1
- package/dist/modules/artistrybase/index.cjs +8 -8
- package/dist/modules/artistrybase/index.d.cts +1 -1
- package/dist/modules/artistrybase/index.d.ts +1 -1
- package/dist/modules/artistrybase/index.js +1 -1
- package/dist/modules/assethandler/index.cjs +1 -1
- package/dist/modules/assethandler/index.d.cts +1 -1
- package/dist/modules/assethandler/index.d.ts +1 -1
- package/dist/modules/assethandler/index.js +1 -1
- package/dist/modules/atheletebridge/index.cjs +8 -8
- package/dist/modules/atheletebridge/index.d.cts +1 -1
- package/dist/modules/atheletebridge/index.d.ts +1 -1
- package/dist/modules/atheletebridge/index.js +1 -1
- 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 +30 -30
- package/dist/modules/billing/index.cjs +3 -3
- package/dist/modules/billing/index.d.cts +1 -1
- package/dist/modules/billing/index.d.ts +1 -1
- package/dist/modules/billing/index.js +1 -1
- package/dist/modules/brainyrich/index.cjs +4 -4
- package/dist/modules/brainyrich/index.d.cts +1 -1
- package/dist/modules/brainyrich/index.d.ts +1 -1
- package/dist/modules/brainyrich/index.js +1 -1
- package/dist/modules/buildmyiq/index.cjs +3 -3
- package/dist/modules/buildmyiq/index.d.cts +1 -1
- package/dist/modules/buildmyiq/index.d.ts +1 -1
- package/dist/modules/buildmyiq/index.js +1 -1
- package/dist/modules/channels/index.cjs +5 -5
- package/dist/modules/channels/index.d.cts +1 -1
- package/dist/modules/channels/index.d.ts +1 -1
- package/dist/modules/channels/index.js +1 -1
- package/dist/modules/collabkin/index.cjs +11 -11
- package/dist/modules/collabkin/index.d.cts +1 -1
- package/dist/modules/collabkin/index.d.ts +1 -1
- package/dist/modules/collabkin/index.js +1 -1
- package/dist/modules/comradecircle/index.cjs +6 -6
- package/dist/modules/comradecircle/index.d.cts +1 -1
- package/dist/modules/comradecircle/index.d.ts +1 -1
- package/dist/modules/comradecircle/index.js +1 -1
- package/dist/modules/conversations/index.cjs +8 -8
- package/dist/modules/conversations/index.d.cts +1 -1
- package/dist/modules/conversations/index.d.ts +1 -1
- package/dist/modules/conversations/index.js +1 -1
- package/dist/modules/coolandlovely/index.cjs +4 -4
- package/dist/modules/coolandlovely/index.d.cts +1 -1
- package/dist/modules/coolandlovely/index.d.ts +1 -1
- package/dist/modules/coolandlovely/index.js +1 -1
- package/dist/modules/cosmicintersection/index.cjs +6 -6
- package/dist/modules/cosmicintersection/index.d.cts +1 -1
- package/dist/modules/cosmicintersection/index.d.ts +1 -1
- package/dist/modules/cosmicintersection/index.js +1 -1
- package/dist/modules/crewfoundry/index.cjs +1 -1
- package/dist/modules/crewfoundry/index.d.cts +1 -1
- package/dist/modules/crewfoundry/index.d.ts +1 -1
- package/dist/modules/crewfoundry/index.js +1 -1
- package/dist/modules/devportal/index.cjs +7 -7
- package/dist/modules/devportal/index.d.cts +1 -1
- package/dist/modules/devportal/index.d.ts +1 -1
- package/dist/modules/devportal/index.js +1 -1
- package/dist/modules/ecoimpacthub/index.cjs +2 -2
- package/dist/modules/ecoimpacthub/index.d.cts +1 -1
- package/dist/modules/ecoimpacthub/index.d.ts +1 -1
- package/dist/modules/ecoimpacthub/index.js +1 -1
- package/dist/modules/eventfullymanaged/index.cjs +21 -21
- package/dist/modules/eventfullymanaged/index.d.cts +1 -1
- package/dist/modules/eventfullymanaged/index.d.ts +1 -1
- package/dist/modules/eventfullymanaged/index.js +1 -1
- package/dist/modules/export/index.cjs +3 -3
- package/dist/modules/export/index.d.cts +1 -1
- package/dist/modules/export/index.d.ts +1 -1
- package/dist/modules/export/index.js +1 -1
- package/dist/modules/files/index.cjs +8 -8
- package/dist/modules/files/index.d.cts +1 -1
- package/dist/modules/files/index.d.ts +1 -1
- package/dist/modules/files/index.js +1 -1
- package/dist/modules/fluidgrids/index.cjs +401 -0
- package/dist/modules/fluidgrids/index.d.cts +7 -0
- package/dist/modules/fluidgrids/index.d.ts +7 -0
- package/dist/modules/fluidgrids/index.js +401 -0
- package/dist/modules/ggnomad/index.cjs +7 -7
- package/dist/modules/ggnomad/index.d.cts +1 -1
- package/dist/modules/ggnomad/index.d.ts +1 -1
- package/dist/modules/ggnomad/index.js +1 -1
- package/dist/modules/govcitizenhub/index.cjs +4 -4
- package/dist/modules/govcitizenhub/index.d.cts +1 -1
- package/dist/modules/govcitizenhub/index.d.ts +1 -1
- package/dist/modules/govcitizenhub/index.js +1 -1
- package/dist/modules/groups/index.cjs +4 -4
- package/dist/modules/groups/index.d.cts +1 -1
- package/dist/modules/groups/index.d.ts +1 -1
- package/dist/modules/groups/index.js +1 -1
- package/dist/modules/headshotmarketing/index.cjs +1 -1
- package/dist/modules/headshotmarketing/index.d.cts +1 -1
- package/dist/modules/headshotmarketing/index.d.ts +1 -1
- package/dist/modules/headshotmarketing/index.js +1 -1
- package/dist/modules/health/index.d.cts +1 -1
- package/dist/modules/health/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.cjs +7 -7
- package/dist/modules/hookmovies/index.d.cts +1 -1
- package/dist/modules/hookmovies/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.js +1 -1
- package/dist/modules/housingvista/index.cjs +8 -8
- package/dist/modules/housingvista/index.d.cts +1 -1
- package/dist/modules/housingvista/index.d.ts +1 -1
- package/dist/modules/housingvista/index.js +1 -1
- package/dist/modules/integrations/index.cjs +5 -5
- package/dist/modules/integrations/index.d.cts +1 -1
- package/dist/modules/integrations/index.d.ts +1 -1
- package/dist/modules/integrations/index.js +1 -1
- package/dist/modules/intelwatchtower/index.cjs +6 -6
- package/dist/modules/intelwatchtower/index.d.cts +1 -1
- package/dist/modules/intelwatchtower/index.d.ts +1 -1
- package/dist/modules/intelwatchtower/index.js +1 -1
- package/dist/modules/kadaikodi/index.cjs +2 -2
- package/dist/modules/kadaikodi/index.d.cts +1 -1
- package/dist/modules/kadaikodi/index.d.ts +1 -1
- package/dist/modules/kadaikodi/index.js +1 -1
- package/dist/modules/labsofscience/index.cjs +6 -6
- package/dist/modules/labsofscience/index.d.cts +1 -1
- package/dist/modules/labsofscience/index.d.ts +1 -1
- package/dist/modules/labsofscience/index.js +1 -1
- package/dist/modules/manufacturedops/index.cjs +6 -6
- package/dist/modules/manufacturedops/index.d.cts +1 -1
- package/dist/modules/manufacturedops/index.d.ts +1 -1
- package/dist/modules/manufacturedops/index.js +1 -1
- package/dist/modules/movethewheels/index.cjs +1 -1
- package/dist/modules/movethewheels/index.d.cts +1 -1
- package/dist/modules/movethewheels/index.d.ts +1 -1
- package/dist/modules/movethewheels/index.js +1 -1
- package/dist/modules/mybodyshield/index.cjs +8 -8
- package/dist/modules/mybodyshield/index.d.cts +1 -1
- package/dist/modules/mybodyshield/index.d.ts +1 -1
- package/dist/modules/mybodyshield/index.js +1 -1
- 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.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 +23 -23
- package/dist/modules/planmagnet/index.d.cts +1 -1
- package/dist/modules/planmagnet/index.d.ts +1 -1
- package/dist/modules/planmagnet/index.js +1 -1
- package/dist/modules/products/index.cjs +6 -6
- package/dist/modules/products/index.d.cts +1 -1
- package/dist/modules/products/index.d.ts +1 -1
- package/dist/modules/products/index.js +1 -1
- package/dist/modules/proserviceworld/index.cjs +2 -2
- package/dist/modules/proserviceworld/index.d.cts +1 -1
- package/dist/modules/proserviceworld/index.d.ts +1 -1
- package/dist/modules/proserviceworld/index.js +1 -1
- package/dist/modules/rbac/index.cjs +2 -2
- package/dist/modules/rbac/index.d.cts +1 -1
- package/dist/modules/rbac/index.d.ts +1 -1
- package/dist/modules/rbac/index.js +1 -1
- package/dist/modules/sandbox/index.cjs +1 -1
- 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 +7 -7
- package/dist/modules/scheduler/index.d.cts +1 -1
- package/dist/modules/scheduler/index.d.ts +1 -1
- package/dist/modules/scheduler/index.js +1 -1
- package/dist/modules/security/index.cjs +7 -7
- package/dist/modules/security/index.d.cts +1 -1
- package/dist/modules/security/index.d.ts +1 -1
- package/dist/modules/security/index.js +1 -1
- package/dist/modules/semanticfed/index.cjs +7 -7
- 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/store/index.cjs +7 -7
- package/dist/modules/store/index.d.cts +1 -1
- package/dist/modules/store/index.d.ts +1 -1
- package/dist/modules/store/index.js +1 -1
- package/dist/modules/subscriberbot/index.cjs +2 -2
- package/dist/modules/subscriberbot/index.d.cts +1 -1
- package/dist/modules/subscriberbot/index.d.ts +1 -1
- package/dist/modules/subscriberbot/index.js +1 -1
- package/dist/modules/support/index.cjs +2 -2
- package/dist/modules/support/index.d.cts +1 -1
- package/dist/modules/support/index.d.ts +1 -1
- package/dist/modules/support/index.js +1 -1
- package/dist/modules/tags/index.cjs +1 -1
- package/dist/modules/tags/index.d.cts +1 -1
- package/dist/modules/tags/index.d.ts +1 -1
- package/dist/modules/tags/index.js +1 -1
- package/dist/modules/technospam/index.cjs +4 -4
- package/dist/modules/technospam/index.d.cts +1 -1
- package/dist/modules/technospam/index.d.ts +1 -1
- package/dist/modules/technospam/index.js +1 -1
- package/dist/modules/theculturepost/index.cjs +3 -3
- package/dist/modules/theculturepost/index.d.cts +1 -1
- package/dist/modules/theculturepost/index.d.ts +1 -1
- package/dist/modules/theculturepost/index.js +1 -1
- package/dist/modules/theglobalfuel/index.cjs +3 -3
- package/dist/modules/theglobalfuel/index.d.cts +1 -1
- package/dist/modules/theglobalfuel/index.d.ts +1 -1
- package/dist/modules/theglobalfuel/index.js +1 -1
- package/dist/modules/timecampus/index.cjs +7 -7
- package/dist/modules/timecampus/index.d.cts +1 -1
- package/dist/modules/timecampus/index.d.ts +1 -1
- package/dist/modules/timecampus/index.js +1 -1
- package/dist/modules/tours/index.cjs +2 -2
- package/dist/modules/tours/index.d.cts +1 -1
- package/dist/modules/tours/index.d.ts +1 -1
- package/dist/modules/tours/index.js +1 -1
- package/dist/modules/vibecontrols/index.cjs +1 -1
- package/dist/modules/vibecontrols/index.d.cts +1 -1
- package/dist/modules/vibecontrols/index.d.ts +1 -1
- package/dist/modules/vibecontrols/index.js +1 -1
- package/dist/modules/workspaces/index.cjs +14 -14
- package/dist/modules/workspaces/index.d.cts +1 -1
- package/dist/modules/workspaces/index.d.ts +1 -1
- package/dist/modules/workspaces/index.js +11 -11
- package/package.json +1 -1
- package/dist/chunk-TCBALVP4.js +0 -32
- package/dist/chunk-WXDQ3S5J.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b as b$1,h as h$1,p,g,i,d}from'../../chunk-
|
|
1
|
+
import {a,b as b$1,h as h$1,p,g,i,d}from'../../chunk-SQSFZFQZ.js';import {o}from'../../chunk-UAFYTYK6.js';var R=`
|
|
2
2
|
query ManGetWorkCenter($id: ID!) {
|
|
3
3
|
manWorkCenter(id: $id) {
|
|
4
4
|
id code name type description capacityHours idealRunRate isActive
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var m=class extends Error{exitCode;hint;constructor(r,n){super(r),this.name="CliUserError",this.exitCode=n?.exitCode??1,this.hint=n?.hint;}},E=class extends m{constructor(r,n){super(r,{exitCode:2,hint:n?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},w=class extends Error{cause;constructor(r,n){super(r),this.name="CliInternalError",this.cause=n;}};var b=null;function D(c){b=c;}function C(){if(!b)throw new w("vibecontrols module helpers used before setHelpersContext was called");return b}function At(){let c=C();if(!c.auth.isAuthenticated())throw new E(
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var m=class extends Error{exitCode;hint;constructor(r,n){super(r),this.name="CliUserError",this.exitCode=n?.exitCode??1,this.hint=n?.hint;}},E=class extends m{constructor(r,n){super(r,{exitCode:2,hint:n?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},w=class extends Error{cause;constructor(r,n){super(r),this.name="CliInternalError",this.cause=n;}};var b=null;function D(c){b=c;}function C(){if(!b)throw new w("vibecontrols module helpers used before setHelpersContext was called");return b}function At(){let c=C();if(!c.auth.isAuthenticated())throw new E("Authentication required.",{hint:`Run \`${c.productName} auth login\` to authenticate.`})}async function o(c,r){return At(),C().gql.workspace.request(c,r)}function a(c){let r=c instanceof Error?c.message:String(c);throw new m(r)}function s(c,r,n){C().output.formatAndOutput(c,r,n);}function p(c){C().output.printSuccess(c);}function g(c,r){return C().output.truncate(c,r)}var R=`
|
|
2
2
|
query MovethewheelsGetCustomer($id: ID!) {
|
|
3
3
|
customer(id: $id) {
|
|
4
4
|
id name email phone company type taxId businessLicense address rating
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b as b$1,h as h$1,p,g,i}from'../../chunk-
|
|
1
|
+
import {a,b as b$1,h as h$1,p,g,i}from'../../chunk-SQSFZFQZ.js';import {o}from'../../chunk-UAFYTYK6.js';var D=`
|
|
2
2
|
query MovethewheelsGetCustomer($id: ID!) {
|
|
3
3
|
customer(id: $id) {
|
|
4
4
|
id name email phone company type taxId businessLicense address rating
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var p=class extends Error{exitCode;hint;constructor(n,e){super(n),this.name="CliUserError",this.exitCode=e?.exitCode??1,this.hint=e?.hint;}},h=class extends p{constructor(n,e){super(n,{exitCode:2,hint:e?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},b=class extends Error{cause;constructor(n,e){super(n),this.name="CliInternalError",this.cause=e;}};var C=null;function E(o){C=o;}function I(){if(!C)throw new b("vibecontrols module helpers used before setHelpersContext was called");return C}function
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var p=class extends Error{exitCode;hint;constructor(n,e){super(n),this.name="CliUserError",this.exitCode=e?.exitCode??1,this.hint=e?.hint;}},h=class extends p{constructor(n,e){super(n,{exitCode:2,hint:e?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},b=class extends Error{cause;constructor(n,e){super(n),this.name="CliInternalError",this.cause=e;}};var C=null;function E(o){C=o;}function I(){if(!C)throw new b("vibecontrols module helpers used before setHelpersContext was called");return C}function De(){let o=I();if(!o.auth.isAuthenticated())throw new h("Authentication required.",{hint:`Run \`${o.productName} auth login\` to authenticate.`})}async function c(o,n){return De(),I().gql.workspace.request(o,n)}async function w(o,n){return I().gql.workspaceAuthOnly.request(o,n)}function s(o){let n=o instanceof Error?o.message:String(o);throw new p(n)}function a(o,n,e){I().output.formatAndOutput(o,n,e);}function d(o){I().output.printSuccess(o);}function y(o){return I().output.formatDate(o)}function m(o,n){return I().output.truncate(o,n)}var S=`
|
|
2
2
|
query MybListPrograms(
|
|
3
3
|
$memberId: ID
|
|
4
4
|
$status: MybProgramStatus
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`,O=`
|
|
26
26
|
query MybProgramWorkouts($programId: ID!) {
|
|
27
27
|
mybProgramWorkouts(programId: $programId) {
|
|
28
28
|
id programId name description type dayOfWeek weekNumber durationMin
|
|
29
29
|
orderIndex createdAt updatedAt workspaceId
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`,D=`
|
|
33
33
|
mutation MybCreateProgram($input: MybCreateProgramInput!) {
|
|
34
34
|
mybCreateProgram(input: $input) {
|
|
35
35
|
id memberId coachId name description goalType level phase status
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
id name status phase updatedAt
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
`,
|
|
52
|
+
`,P=`
|
|
53
53
|
mutation MybArchiveProgram($id: ID!) {
|
|
54
54
|
mybArchiveProgram(id: $id)
|
|
55
55
|
}
|
|
56
|
-
`,
|
|
56
|
+
`,M=`
|
|
57
57
|
mutation MybAddWorkout($input: MybCreateWorkoutInput!) {
|
|
58
58
|
mybAddWorkout(input: $input) {
|
|
59
59
|
id programId name description type dayOfWeek weekNumber durationMin
|
|
@@ -268,14 +268,14 @@
|
|
|
268
268
|
shareMetrics notes createdAt workspaceId
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
`,
|
|
271
|
+
`,se=`
|
|
272
272
|
mutation MybTransitionCoaching($id: ID!, $status: MybCoachingStatus!) {
|
|
273
273
|
mybTransitionCoaching(id: $id, status: $status) {
|
|
274
274
|
id coachId memberId status startedAt endedAt updatedAt
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
`,
|
|
277
|
+
`,ae=`
|
|
278
278
|
query MybHealth {
|
|
279
279
|
mybHealth
|
|
280
280
|
}
|
|
281
|
-
`;function i(o){let n=Number.parseInt(o,10);if(Number.isNaN(n))throw new p(`Expected an integer but got "${o}"`);return n}function g(o){let n=Number.parseFloat(o);if(Number.isNaN(n))throw new p(`Expected a number but got "${o}"`);return n}function k(o){return o.split(",").map(n=>n.trim()).filter(n=>n.length>0)}function ce(o){let n=o.command("programs").description("Mybodyshield training programs");n.command("list").description("List training programs").option("--member <id>","Filter by member ID").option("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(S,{memberId:e.member,status:e.status?e.status.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});s(e,t.mybListPrograms.items,{headers:["ID","Name","Goal","Level","Phase","Status"],rows:t.mybListPrograms.items.map(r=>[m(r.id,12),r.name,r.goalType,r.level,r.phase,r.status])});}catch(t){a(t);}}),n.command("get").description("Get a training program by id").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(x,{id:e});if(!r.mybProgram)throw new p(`Program ${e} not found`);s(t,r.mybProgram);}catch(r){a(r);}}),n.command("workouts").description("List workouts for a program").argument("<programId>","Program ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(D,{programId:e});s(t,r.mybProgramWorkouts,{headers:["ID","Name","Type","Day","Week","Duration"],rows:r.mybProgramWorkouts.map(l=>[m(l.id,12),l.name,l.type,l.dayOfWeek!=null?String(l.dayOfWeek):"-",l.weekNumber!=null?String(l.weekNumber):"-",l.durationMin!=null?String(l.durationMin):"-"])});}catch(r){a(r);}}),n.command("create").description("Create a training program").requiredOption("--name <name>","Program name").option("--member <id>","Member ID").option("--coach <id>","Coach ID").option("--description <s>","Description").option("--goal-type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|ELITE").option("--phase <p>","BUILD|PEAK|DELOAD|MAINTENANCE").option("--weeks <n>","Number of weeks",i).option("--days-per-week <n>","Days per week",i).option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name};e.member&&(t.memberId=e.member),e.coach&&(t.coachId=e.coach),e.description&&(t.description=e.description),e.goalType&&(t.goalType=e.goalType.toUpperCase()),e.level&&(t.level=e.level.toUpperCase()),e.phase&&(t.phase=e.phase.toUpperCase()),e.weeks!==void 0&&(t.weeks=e.weeks),e.daysPerWeek!==void 0&&(t.daysPerWeek=e.daysPerWeek),e.startDate&&(t.startDate=e.startDate),e.endDate&&(t.endDate=e.endDate),e.tags&&(t.tags=k(e.tags));let r=await c(O,{input:t});d(`Program created: ${r.mybCreateProgram.name}`),s(e,r.mybCreateProgram);}catch(t){a(t);}}),n.command("update").description("Update a training program").argument("<id>","Program ID").option("--name <name>","Program name").option("--description <s>","Description").option("--goal-type <t>","Goal type").option("--level <l>","Fitness level").option("--phase <p>","Program phase").option("--weeks <n>","Number of weeks",i).option("--days-per-week <n>","Days per week",i).option("--coach <id>","Coach ID").option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r={};if(t.name&&(r.name=t.name),t.description!==void 0&&(r.description=t.description),t.goalType&&(r.goalType=t.goalType.toUpperCase()),t.level&&(r.level=t.level.toUpperCase()),t.phase&&(r.phase=t.phase.toUpperCase()),t.weeks!==void 0&&(r.weeks=t.weeks),t.daysPerWeek!==void 0&&(r.daysPerWeek=t.daysPerWeek),t.coach&&(r.coachId=t.coach),t.startDate&&(r.startDate=t.startDate),t.endDate&&(r.endDate=t.endDate),t.tags&&(r.tags=k(t.tags)),!Object.keys(r).length)throw new p("No updates specified");let l=await c(v,{id:e,input:r});d("Program updated"),s(t,l.mybUpdateProgram);}catch(r){a(r);}}),n.command("transition").description("Advance a program through its lifecycle").argument("<id>","Program ID").requiredOption("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(R,{id:e,status:t.status.toUpperCase()});d(`Program transitioned to ${r.mybTransitionProgram.status}`),s(t,r.mybTransitionProgram);}catch(r){a(r);}}),n.command("archive").description("Archive a training program").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(M,{id:e});d(r.mybArchiveProgram?"Program archived":"Program not archived"),s(t,{archived:r.mybArchiveProgram});}catch(r){a(r);}});}function de(o){let n=o.command("workouts").description("Mybodyshield workouts & exercises");n.command("add").description("Add a workout to a program").requiredOption("--program <id>","Program ID").requiredOption("--name <name>","Workout name").option("--description <s>","Description").option("--type <t>","STRENGTH|CARDIO|HIIT|MOBILITY|RECOVERY|YOGA").option("--day-of-week <n>","Day of week (0-6)",i).option("--week-number <n>","Week number",i).option("--duration-min <n>","Duration (minutes)",i).option("--order-index <n>","Order index",i).option("-f, --format <format>","Output format").action(async e=>{try{let t={programId:e.program,name:e.name};e.description&&(t.description=e.description),e.type&&(t.type=e.type.toUpperCase()),e.dayOfWeek!==void 0&&(t.dayOfWeek=e.dayOfWeek),e.weekNumber!==void 0&&(t.weekNumber=e.weekNumber),e.durationMin!==void 0&&(t.durationMin=e.durationMin),e.orderIndex!==void 0&&(t.orderIndex=e.orderIndex);let r=await c(P,{input:t});d(`Workout added: ${r.mybAddWorkout.name}`),s(e,r.mybAddWorkout);}catch(t){a(t);}}),n.command("add-exercise").description("Add an exercise to a workout").requiredOption("--workout <id>","Workout ID").requiredOption("--name <name>","Exercise name").option("--muscle-group <g>","CHEST|BACK|LEGS|SHOULDERS|ARMS|CORE|FULL_BODY").option("--sets <n>","Sets",i).option("--reps <n>","Reps",i).option("--rest-seconds <n>","Rest (seconds)",i).option("--target-weight <n>","Target weight",g).option("--order-index <n>","Order index",i).option("--instructions <s>","Instructions").option("--demo-file-id <id>","Demo file ID").option("-f, --format <format>","Output format").action(async e=>{try{let t={workoutId:e.workout,name:e.name};e.muscleGroup&&(t.muscleGroup=e.muscleGroup.toUpperCase()),e.sets!==void 0&&(t.sets=e.sets),e.reps!==void 0&&(t.reps=e.reps),e.restSeconds!==void 0&&(t.restSeconds=e.restSeconds),e.targetWeight!==void 0&&(t.targetWeight=e.targetWeight),e.orderIndex!==void 0&&(t.orderIndex=e.orderIndex),e.instructions&&(t.instructions=e.instructions),e.demoFileId&&(t.demoFileId=e.demoFileId);let r=await c(N,{input:t});d(`Exercise added: ${r.mybAddExercise.name}`),s(e,r.mybAddExercise);}catch(t){a(t);}});}function ue(o){let n=o.command("sessions").description("Mybodyshield workout sessions");n.command("list").description("List workout sessions").option("--program <id>","Filter by program ID").option("--status <s>","SCHEDULED|IN_PROGRESS|COMPLETED|SKIPPED").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(L,{programId:e.program,status:e.status?e.status.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});s(e,t.mybListSessions.items,{headers:["ID","Member","Status","Scheduled","Started"],rows:t.mybListSessions.items.map(r=>[m(r.id,12),m(r.memberId,12),r.status,y(r.scheduledFor),y(r.startedAt)])});}catch(t){a(t);}}),n.command("get").description("Get a workout session by id").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c($,{id:e});if(!r.mybSession)throw new p(`Session ${e} not found`);s(t,r.mybSession);}catch(r){a(r);}}),n.command("start").description("Start a workout session").option("--program <id>","Program ID").option("--workout <id>","Workout ID").option("--scheduled-for <iso>","Scheduled time (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.program&&(t.programId=e.program),e.workout&&(t.workoutId=e.workout),e.scheduledFor&&(t.scheduledFor=e.scheduledFor),e.notes&&(t.notes=e.notes);let r=await c(G,{input:t});d(`Session started: ${m(r.mybStartSession.id,12)}`),s(e,r.mybStartSession);}catch(t){a(t);}}),n.command("log-set").description("Log a set within a session").requiredOption("--session <id>","Session ID").requiredOption("--exercise-name <name>","Exercise name").option("--set-number <n>","Set number",i).option("--reps <n>","Reps",i).option("--weight <n>","Weight",g).option("--distance-m <n>","Distance (meters)",g).option("--duration-sec <n>","Duration (seconds)",i).option("--personal-record","Mark as a personal record").option("-f, --format <format>","Output format").action(async e=>{try{let t={sessionId:e.session,exerciseName:e.exerciseName};e.setNumber!==void 0&&(t.setNumber=e.setNumber),e.reps!==void 0&&(t.reps=e.reps),e.weight!==void 0&&(t.weight=e.weight),e.distanceM!==void 0&&(t.distanceM=e.distanceM),e.durationSec!==void 0&&(t.durationSec=e.durationSec),e.personalRecord&&(t.isPersonalRecord=!0);let r=await c(_,{input:t});d(`Set logged for ${r.mybLogSet.exerciseName}`),s(e,r.mybLogSet);}catch(t){a(t);}}),n.command("complete").description("Complete a workout session").argument("<id>","Session ID").option("--calories-burned <n>","Calories burned",i).option("--perceived-exertion <n>","Perceived exertion (1-10)",i).option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r={};t.caloriesBurned!==void 0&&(r.caloriesBurned=t.caloriesBurned),t.perceivedExertion!==void 0&&(r.perceivedExertion=t.perceivedExertion),t.notes&&(r.notes=t.notes);let l=await c(W,{id:e,input:r});d("Session completed"),s(t,l.mybCompleteSession);}catch(r){a(r);}});}function pe(o){let n=o.command("goals").description("Mybodyshield fitness goals");n.command("list").description("List fitness goals").option("--member <id>","Filter by member ID").option("--status <s>","ACTIVE|ACHIEVED|PAUSED|ABANDONED").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(U,{memberId:e.member,status:e.status?e.status.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});s(e,t.mybListGoals.items,{headers:["ID","Title","Type","Status","Current","Target"],rows:t.mybListGoals.items.map(r=>[m(r.id,12),r.title,r.type,r.status,`${r.currentValue??0}${r.unit?` ${r.unit}`:""}`,`${r.targetValue??0}${r.unit?` ${r.unit}`:""}`])});}catch(t){a(t);}}),n.command("get").description("Get a goal by id").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(q,{id:e});if(!r.mybGoal)throw new p(`Goal ${e} not found`);s(t,r.mybGoal);}catch(r){a(r);}}),n.command("create").description("Create a fitness goal").requiredOption("--title <t>","Goal title").option("--member <id>","Member ID").option("--type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--description <s>","Description").option("--target-value <n>","Target value",g).option("--baseline-value <n>","Baseline value",g).option("--unit <u>","Unit").option("--target-date <iso>","Target date (ISO)").option("-f, --format <format>","Output format").action(async e=>{try{let t={title:e.title};e.member&&(t.memberId=e.member),e.type&&(t.type=e.type.toUpperCase()),e.description&&(t.description=e.description),e.targetValue!==void 0&&(t.targetValue=e.targetValue),e.baselineValue!==void 0&&(t.baselineValue=e.baselineValue),e.unit&&(t.unit=e.unit),e.targetDate&&(t.targetDate=e.targetDate);let r=await c(F,{input:t});d(`Goal created: ${r.mybCreateGoal.title}`),s(e,r.mybCreateGoal);}catch(t){a(t);}}),n.command("update").description("Update a fitness goal").argument("<id>","Goal ID").option("--title <t>","Goal title").option("--type <t>","Goal type").option("--description <s>","Description").option("--target-value <n>","Target value",g).option("--current-value <n>","Current value",g).option("--baseline-value <n>","Baseline value",g).option("--unit <u>","Unit").option("--target-date <iso>","Target date (ISO)").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r={};if(t.title&&(r.title=t.title),t.type&&(r.type=t.type.toUpperCase()),t.description!==void 0&&(r.description=t.description),t.targetValue!==void 0&&(r.targetValue=t.targetValue),t.currentValue!==void 0&&(r.currentValue=t.currentValue),t.baselineValue!==void 0&&(r.baselineValue=t.baselineValue),t.unit&&(r.unit=t.unit),t.targetDate&&(r.targetDate=t.targetDate),!Object.keys(r).length)throw new p("No updates specified");let l=await c(V,{id:e,input:r});d("Goal updated"),s(t,l.mybUpdateGoal);}catch(r){a(r);}}),n.command("achieve").description("Mark a goal as achieved").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(H,{id:e});d(`Goal achieved: ${r.mybAchieveGoal.title}`),s(t,r.mybAchieveGoal);}catch(r){a(r);}});}function me(o){let n=o.command("metrics").description("Mybodyshield body metrics");n.command("list").description("List body metrics").option("--member <id>","Filter by member ID").option("--type <t>","WEIGHT|BODY_FAT|CHEST|WAIST|HIPS|THIGH|ARM|RESTING_HEART_RATE").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(B,{memberId:e.member,type:e.type?e.type.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});s(e,t.mybListBodyMetrics.items,{headers:["ID","Type","Value","Unit","Measured"],rows:t.mybListBodyMetrics.items.map(r=>[m(r.id,12),r.type,String(r.value),r.unit,y(r.measuredAt)])});}catch(t){a(t);}}),n.command("record").description("Record a body metric").requiredOption("--type <t>","WEIGHT|BODY_FAT|CHEST|WAIST|HIPS|THIGH|ARM|RESTING_HEART_RATE").requiredOption("--value <n>","Measured value",g).option("--member <id>","Member ID").option("--unit <u>","Unit").option("--measured-at <iso>","Measured at (ISO)").option("--notes <s>","Notes").option("--photo-file-id <id>","Progress photo file ID").option("-f, --format <format>","Output format").action(async e=>{try{let t={type:e.type.toUpperCase(),value:e.value};e.member&&(t.memberId=e.member),e.unit&&(t.unit=e.unit),e.measuredAt&&(t.measuredAt=e.measuredAt),e.notes&&(t.notes=e.notes),e.photoFileId&&(t.photoFileId=e.photoFileId);let r=await c(j,{input:t});d(`Metric recorded: ${r.mybRecordBodyMetric.type}`),s(e,r.mybRecordBodyMetric);}catch(t){a(t);}});}function le(o){let n=o.command("nutrition").description("Mybodyshield nutrition plans");n.command("get").description("Get a nutrition plan by id").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(Y,{id:e});if(!r.mybNutritionPlan)throw new p(`Nutrition plan ${e} not found`);s(t,r.mybNutritionPlan);}catch(r){a(r);}}),n.command("active").description("Get a member's active nutrition plan").option("--member <id>","Member ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(z,{memberId:e.member});if(!t.mybActiveNutritionPlan)throw new p("No active nutrition plan found");s(e,t.mybActiveNutritionPlan);}catch(t){a(t);}}),n.command("macros").description("Roll up a member's logged meals for a day against the active plan").option("--member <id>","Member ID").option("--date <iso>","Date (ISO)").option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(K,{memberId:e.member,date:e.date});s(e,t.mybDailyMacros);}catch(t){a(t);}}),n.command("create").description("Create a nutrition plan").requiredOption("--name <name>","Plan name").option("--member <id>","Member ID").option("--coach <id>","Coach ID").option("--goal-type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--calorie-target <n>","Calorie target",i).option("--protein-target <n>","Protein target (g)",i).option("--carbs-target <n>","Carbs target (g)",i).option("--fat-target <n>","Fat target (g)",i).option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name};e.member&&(t.memberId=e.member),e.coach&&(t.coachId=e.coach),e.goalType&&(t.goalType=e.goalType.toUpperCase()),e.calorieTarget!==void 0&&(t.calorieTarget=e.calorieTarget),e.proteinTarget!==void 0&&(t.proteinTarget=e.proteinTarget),e.carbsTarget!==void 0&&(t.carbsTarget=e.carbsTarget),e.fatTarget!==void 0&&(t.fatTarget=e.fatTarget),e.startDate&&(t.startDate=e.startDate),e.endDate&&(t.endDate=e.endDate),e.notes&&(t.notes=e.notes);let r=await c(J,{input:t});d(`Nutrition plan created: ${r.mybCreateNutritionPlan.name}`),s(e,r.mybCreateNutritionPlan);}catch(t){a(t);}}),n.command("update").description("Update a nutrition plan").argument("<id>","Plan ID").option("--name <name>","Plan name").option("--goal-type <t>","Goal type").option("--calorie-target <n>","Calorie target",i).option("--protein-target <n>","Protein target (g)",i).option("--carbs-target <n>","Carbs target (g)",i).option("--fat-target <n>","Fat target (g)",i).option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r={};if(t.name&&(r.name=t.name),t.goalType&&(r.goalType=t.goalType.toUpperCase()),t.calorieTarget!==void 0&&(r.calorieTarget=t.calorieTarget),t.proteinTarget!==void 0&&(r.proteinTarget=t.proteinTarget),t.carbsTarget!==void 0&&(r.carbsTarget=t.carbsTarget),t.fatTarget!==void 0&&(r.fatTarget=t.fatTarget),t.startDate&&(r.startDate=t.startDate),t.endDate&&(r.endDate=t.endDate),t.notes!==void 0&&(r.notes=t.notes),!Object.keys(r).length)throw new p("No updates specified");let l=await c(Q,{id:e,input:r});d("Nutrition plan updated"),s(t,l.mybUpdateNutritionPlan);}catch(r){a(r);}}),n.command("activate").description("Activate a nutrition plan").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(X,{id:e});d(`Nutrition plan activated: ${r.mybActivateNutritionPlan.name}`),s(t,r.mybActivateNutritionPlan);}catch(r){a(r);}});}function ge(o){let n=o.command("meals").description("Mybodyshield meal logs");n.command("list").description("List logged meals").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Filter by nutrition plan ID").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(Z,{mealType:e.mealType?e.mealType.toUpperCase():void 0,planId:e.plan,pagination:{limit:e.limit,offset:e.offset}});s(e,t.mybListMeals.items,{headers:["ID","Name","Meal","Calories","Protein"],rows:t.mybListMeals.items.map(r=>[m(r.id,12),r.name,r.mealType,String(r.calories??0),`${r.proteinG??0}g`])});}catch(t){a(t);}}),n.command("log").description("Log a meal").requiredOption("--name <name>","Meal name").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Nutrition plan ID").option("--calories <n>","Calories",i).option("--protein-g <n>","Protein (g)",i).option("--carbs-g <n>","Carbs (g)",i).option("--fat-g <n>","Fat (g)",i).option("--servings <n>","Servings",g).option("--favorite","Mark as favorite").option("--logged-at <iso>","Logged at (ISO)").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name};e.mealType&&(t.mealType=e.mealType.toUpperCase()),e.plan&&(t.planId=e.plan),e.calories!==void 0&&(t.calories=e.calories),e.proteinG!==void 0&&(t.proteinG=e.proteinG),e.carbsG!==void 0&&(t.carbsG=e.carbsG),e.fatG!==void 0&&(t.fatG=e.fatG),e.servings!==void 0&&(t.servings=e.servings),e.favorite&&(t.isFavorite=!0),e.loggedAt&&(t.loggedAt=e.loggedAt);let r=await c(ee,{input:t});d(`Meal logged: ${r.mybLogMeal.name}`),s(e,r.mybLogMeal);}catch(t){a(t);}}),n.command("delete").description("Delete a logged meal").argument("<id>","Meal log ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(te,{id:e});d(r.mybDeleteMeal?"Meal deleted":"Meal not deleted"),s(t,{deleted:r.mybDeleteMeal});}catch(r){a(r);}});}function fe(o){let n=o.command("recovery").description("Mybodyshield recovery logs");n.command("list").description("List recovery logs").option("--member <id>","Filter by member ID").option("--metric <m>","READINESS|SLEEP|SORENESS|STRESS|MOOD").option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(re,{memberId:e.member,metric:e.metric?e.metric.toUpperCase():void 0});s(e,t.mybListRecoveryLogs,{headers:["ID","Metric","Score","Sleep (h)","Logged"],rows:t.mybListRecoveryLogs.map(r=>[m(r.id,12),r.metric,String(r.score),r.sleepHours!=null?String(r.sleepHours):"-",y(r.loggedAt)])});}catch(t){a(t);}}),n.command("log").description("Log a recovery metric").option("--member <id>","Member ID").option("--metric <m>","READINESS|SLEEP|SORENESS|STRESS|MOOD").option("--score <n>","Score",i).option("--sleep-hours <n>","Sleep hours",g).option("--notes <s>","Notes").option("--logged-at <iso>","Logged at (ISO)").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.member&&(t.memberId=e.member),e.metric&&(t.metric=e.metric.toUpperCase()),e.score!==void 0&&(t.score=e.score),e.sleepHours!==void 0&&(t.sleepHours=e.sleepHours),e.notes&&(t.notes=e.notes),e.loggedAt&&(t.loggedAt=e.loggedAt);let r=await c(ne,{input:t});d(`Recovery logged: ${r.mybLogRecovery.metric}`),s(e,r.mybLogRecovery);}catch(t){a(t);}});}function ye(o){let n=o.command("coaching").description("Mybodyshield coaching relationships");n.command("list").description("List coaching relationships").option("--member <id>","Filter by member ID").option("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(oe,{memberId:e.member,status:e.status?e.status.toUpperCase():void 0});s(e,t.mybListCoaching,{headers:["ID","Coach","Member","Status","Specialty"],rows:t.mybListCoaching.map(r=>[m(r.id,12),m(r.coachId,12),m(r.memberId,12),r.status,r.specialty??"-"])});}catch(t){a(t);}}),n.command("create").description("Create a coaching relationship").requiredOption("--coach <id>","Coach ID").requiredOption("--member <id>","Member ID").option("--specialty <s>","Specialty").option("--share-workouts","Share workouts with the coach").option("--share-nutrition","Share nutrition with the coach").option("--share-metrics","Share body metrics with the coach").option("-f, --format <format>","Output format").action(async e=>{try{let t={coachId:e.coach,memberId:e.member};e.specialty&&(t.specialty=e.specialty),e.shareWorkouts&&(t.shareWorkouts=!0),e.shareNutrition&&(t.shareNutrition=!0),e.shareMetrics&&(t.shareMetrics=!0);let r=await c(ie,{input:t});d("Coaching relationship created"),s(e,r.mybCreateCoaching);}catch(t){a(t);}}),n.command("transition").description("Transition a coaching relationship status").argument("<id>","Coaching relationship ID").requiredOption("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(ae,{id:e,status:t.status.toUpperCase()});d(`Coaching transitioned to ${r.mybTransitionCoaching.status}`),s(t,r.mybTransitionCoaching);}catch(r){a(r);}});}function be(o){o.command("health").description("Mybodyshield service health check (public)").option("-f, --format <format>","Output format").action(async n=>{try{let e=await w(se);d(e.mybHealth),s(n,{health:e.mybHealth});}catch(e){a(e);}});}var ve={id:"mybodyshield",version:"1.0.0",displayName:"Mybodyshield",dependsOn:["auth","workspaces"],register(o,n){E(n);let e=o.command("mybodyshield").description("Mybodyshield fitness coaching platform");ce(e),de(e),ue(e),pe(e),me(e),le(e),ge(e),fe(e),ye(e),be(e);}},Sr=ve;module.exports=Sr;
|
|
281
|
+
`;function i(o){let n=Number.parseInt(o,10);if(Number.isNaN(n))throw new p(`Expected an integer but got "${o}"`);return n}function l(o){let n=Number.parseFloat(o);if(Number.isNaN(n))throw new p(`Expected a number but got "${o}"`);return n}function k(o){return o.split(",").map(n=>n.trim()).filter(n=>n.length>0)}function ce(o){let n=o.command("programs").description("Mybodyshield training programs");n.command("list").description("List training programs").option("--member <id>","Filter by member ID").option("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(S,{memberId:e.member,status:e.status?e.status.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});a(e,t.mybListPrograms.items,{headers:["ID","Name","Goal","Level","Phase","Status"],rows:t.mybListPrograms.items.map(r=>[m(r.id,12),r.name,r.goalType,r.level,r.phase,r.status])});}catch(t){s(t);}}),n.command("get").description("Get a training program by id").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(x,{id:e});if(!r.mybProgram)throw new p(`Program ${e} not found`);a(t,r.mybProgram);}catch(r){s(r);}}),n.command("workouts").description("List workouts for a program").argument("<programId>","Program ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(O,{programId:e});a(t,r.mybProgramWorkouts,{headers:["ID","Name","Type","Day","Week","Duration"],rows:r.mybProgramWorkouts.map(g=>[m(g.id,12),g.name,g.type,g.dayOfWeek!=null?String(g.dayOfWeek):"-",g.weekNumber!=null?String(g.weekNumber):"-",g.durationMin!=null?String(g.durationMin):"-"])});}catch(r){s(r);}}),n.command("create").description("Create a training program").requiredOption("--name <name>","Program name").option("--member <id>","Member ID").option("--coach <id>","Coach ID").option("--description <s>","Description").option("--goal-type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|ELITE").option("--phase <p>","BUILD|PEAK|DELOAD|MAINTENANCE").option("--weeks <n>","Number of weeks",i).option("--days-per-week <n>","Days per week",i).option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name};e.member&&(t.memberId=e.member),e.coach&&(t.coachId=e.coach),e.description&&(t.description=e.description),e.goalType&&(t.goalType=e.goalType.toUpperCase()),e.level&&(t.level=e.level.toUpperCase()),e.phase&&(t.phase=e.phase.toUpperCase()),e.weeks!==void 0&&(t.weeks=e.weeks),e.daysPerWeek!==void 0&&(t.daysPerWeek=e.daysPerWeek),e.startDate&&(t.startDate=e.startDate),e.endDate&&(t.endDate=e.endDate),e.tags&&(t.tags=k(e.tags));let r=await c(D,{input:t});d(`Program created: ${r.mybCreateProgram.name}`),a(e,r.mybCreateProgram);}catch(t){s(t);}}),n.command("update").description("Update a training program").argument("<id>","Program ID").option("--name <name>","Program name").option("--description <s>","Description").option("--goal-type <t>","Goal type").option("--level <l>","Fitness level").option("--phase <p>","Program phase").option("--weeks <n>","Number of weeks",i).option("--days-per-week <n>","Days per week",i).option("--coach <id>","Coach ID").option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r={};if(t.name&&(r.name=t.name),t.description!==void 0&&(r.description=t.description),t.goalType&&(r.goalType=t.goalType.toUpperCase()),t.level&&(r.level=t.level.toUpperCase()),t.phase&&(r.phase=t.phase.toUpperCase()),t.weeks!==void 0&&(r.weeks=t.weeks),t.daysPerWeek!==void 0&&(r.daysPerWeek=t.daysPerWeek),t.coach&&(r.coachId=t.coach),t.startDate&&(r.startDate=t.startDate),t.endDate&&(r.endDate=t.endDate),t.tags&&(r.tags=k(t.tags)),!Object.keys(r).length)throw new p("No updates specified");let g=await c(v,{id:e,input:r});d("Program updated"),a(t,g.mybUpdateProgram);}catch(r){s(r);}}),n.command("transition").description("Advance a program through its lifecycle").argument("<id>","Program ID").requiredOption("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(R,{id:e,status:t.status.toUpperCase()});d(`Program transitioned to ${r.mybTransitionProgram.status}`),a(t,r.mybTransitionProgram);}catch(r){s(r);}}),n.command("archive").description("Archive a training program").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(P,{id:e});d(r.mybArchiveProgram?"Program archived":"Program not archived"),a(t,{archived:r.mybArchiveProgram});}catch(r){s(r);}});}function de(o){let n=o.command("workouts").description("Mybodyshield workouts & exercises");n.command("add").description("Add a workout to a program").requiredOption("--program <id>","Program ID").requiredOption("--name <name>","Workout name").option("--description <s>","Description").option("--type <t>","STRENGTH|CARDIO|HIIT|MOBILITY|RECOVERY|YOGA").option("--day-of-week <n>","Day of week (0-6)",i).option("--week-number <n>","Week number",i).option("--duration-min <n>","Duration (minutes)",i).option("--order-index <n>","Order index",i).option("-f, --format <format>","Output format").action(async e=>{try{let t={programId:e.program,name:e.name};e.description&&(t.description=e.description),e.type&&(t.type=e.type.toUpperCase()),e.dayOfWeek!==void 0&&(t.dayOfWeek=e.dayOfWeek),e.weekNumber!==void 0&&(t.weekNumber=e.weekNumber),e.durationMin!==void 0&&(t.durationMin=e.durationMin),e.orderIndex!==void 0&&(t.orderIndex=e.orderIndex);let r=await c(M,{input:t});d(`Workout added: ${r.mybAddWorkout.name}`),a(e,r.mybAddWorkout);}catch(t){s(t);}}),n.command("add-exercise").description("Add an exercise to a workout").requiredOption("--workout <id>","Workout ID").requiredOption("--name <name>","Exercise name").option("--muscle-group <g>","CHEST|BACK|LEGS|SHOULDERS|ARMS|CORE|FULL_BODY").option("--sets <n>","Sets",i).option("--reps <n>","Reps",i).option("--rest-seconds <n>","Rest (seconds)",i).option("--target-weight <n>","Target weight",l).option("--order-index <n>","Order index",i).option("--instructions <s>","Instructions").option("--demo-file-id <id>","Demo file ID").option("-f, --format <format>","Output format").action(async e=>{try{let t={workoutId:e.workout,name:e.name};e.muscleGroup&&(t.muscleGroup=e.muscleGroup.toUpperCase()),e.sets!==void 0&&(t.sets=e.sets),e.reps!==void 0&&(t.reps=e.reps),e.restSeconds!==void 0&&(t.restSeconds=e.restSeconds),e.targetWeight!==void 0&&(t.targetWeight=e.targetWeight),e.orderIndex!==void 0&&(t.orderIndex=e.orderIndex),e.instructions&&(t.instructions=e.instructions),e.demoFileId&&(t.demoFileId=e.demoFileId);let r=await c(N,{input:t});d(`Exercise added: ${r.mybAddExercise.name}`),a(e,r.mybAddExercise);}catch(t){s(t);}});}function ue(o){let n=o.command("sessions").description("Mybodyshield workout sessions");n.command("list").description("List workout sessions").option("--program <id>","Filter by program ID").option("--status <s>","SCHEDULED|IN_PROGRESS|COMPLETED|SKIPPED").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(L,{programId:e.program,status:e.status?e.status.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});a(e,t.mybListSessions.items,{headers:["ID","Member","Status","Scheduled","Started"],rows:t.mybListSessions.items.map(r=>[m(r.id,12),m(r.memberId,12),r.status,y(r.scheduledFor),y(r.startedAt)])});}catch(t){s(t);}}),n.command("get").description("Get a workout session by id").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c($,{id:e});if(!r.mybSession)throw new p(`Session ${e} not found`);a(t,r.mybSession);}catch(r){s(r);}}),n.command("start").description("Start a workout session").option("--program <id>","Program ID").option("--workout <id>","Workout ID").option("--scheduled-for <iso>","Scheduled time (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.program&&(t.programId=e.program),e.workout&&(t.workoutId=e.workout),e.scheduledFor&&(t.scheduledFor=e.scheduledFor),e.notes&&(t.notes=e.notes);let r=await c(G,{input:t});d(`Session started: ${m(r.mybStartSession.id,12)}`),a(e,r.mybStartSession);}catch(t){s(t);}}),n.command("log-set").description("Log a set within a session").requiredOption("--session <id>","Session ID").requiredOption("--exercise-name <name>","Exercise name").option("--set-number <n>","Set number",i).option("--reps <n>","Reps",i).option("--weight <n>","Weight",l).option("--distance-m <n>","Distance (meters)",l).option("--duration-sec <n>","Duration (seconds)",i).option("--personal-record","Mark as a personal record").option("-f, --format <format>","Output format").action(async e=>{try{let t={sessionId:e.session,exerciseName:e.exerciseName};e.setNumber!==void 0&&(t.setNumber=e.setNumber),e.reps!==void 0&&(t.reps=e.reps),e.weight!==void 0&&(t.weight=e.weight),e.distanceM!==void 0&&(t.distanceM=e.distanceM),e.durationSec!==void 0&&(t.durationSec=e.durationSec),e.personalRecord&&(t.isPersonalRecord=!0);let r=await c(_,{input:t});d(`Set logged for ${r.mybLogSet.exerciseName}`),a(e,r.mybLogSet);}catch(t){s(t);}}),n.command("complete").description("Complete a workout session").argument("<id>","Session ID").option("--calories-burned <n>","Calories burned",i).option("--perceived-exertion <n>","Perceived exertion (1-10)",i).option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r={};t.caloriesBurned!==void 0&&(r.caloriesBurned=t.caloriesBurned),t.perceivedExertion!==void 0&&(r.perceivedExertion=t.perceivedExertion),t.notes&&(r.notes=t.notes);let g=await c(W,{id:e,input:r});d("Session completed"),a(t,g.mybCompleteSession);}catch(r){s(r);}});}function pe(o){let n=o.command("goals").description("Mybodyshield fitness goals");n.command("list").description("List fitness goals").option("--member <id>","Filter by member ID").option("--status <s>","ACTIVE|ACHIEVED|PAUSED|ABANDONED").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(U,{memberId:e.member,status:e.status?e.status.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});a(e,t.mybListGoals.items,{headers:["ID","Title","Type","Status","Current","Target"],rows:t.mybListGoals.items.map(r=>[m(r.id,12),r.title,r.type,r.status,`${r.currentValue??0}${r.unit?` ${r.unit}`:""}`,`${r.targetValue??0}${r.unit?` ${r.unit}`:""}`])});}catch(t){s(t);}}),n.command("get").description("Get a goal by id").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(q,{id:e});if(!r.mybGoal)throw new p(`Goal ${e} not found`);a(t,r.mybGoal);}catch(r){s(r);}}),n.command("create").description("Create a fitness goal").requiredOption("--title <t>","Goal title").option("--member <id>","Member ID").option("--type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--description <s>","Description").option("--target-value <n>","Target value",l).option("--baseline-value <n>","Baseline value",l).option("--unit <u>","Unit").option("--target-date <iso>","Target date (ISO)").option("-f, --format <format>","Output format").action(async e=>{try{let t={title:e.title};e.member&&(t.memberId=e.member),e.type&&(t.type=e.type.toUpperCase()),e.description&&(t.description=e.description),e.targetValue!==void 0&&(t.targetValue=e.targetValue),e.baselineValue!==void 0&&(t.baselineValue=e.baselineValue),e.unit&&(t.unit=e.unit),e.targetDate&&(t.targetDate=e.targetDate);let r=await c(F,{input:t});d(`Goal created: ${r.mybCreateGoal.title}`),a(e,r.mybCreateGoal);}catch(t){s(t);}}),n.command("update").description("Update a fitness goal").argument("<id>","Goal ID").option("--title <t>","Goal title").option("--type <t>","Goal type").option("--description <s>","Description").option("--target-value <n>","Target value",l).option("--current-value <n>","Current value",l).option("--baseline-value <n>","Baseline value",l).option("--unit <u>","Unit").option("--target-date <iso>","Target date (ISO)").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r={};if(t.title&&(r.title=t.title),t.type&&(r.type=t.type.toUpperCase()),t.description!==void 0&&(r.description=t.description),t.targetValue!==void 0&&(r.targetValue=t.targetValue),t.currentValue!==void 0&&(r.currentValue=t.currentValue),t.baselineValue!==void 0&&(r.baselineValue=t.baselineValue),t.unit&&(r.unit=t.unit),t.targetDate&&(r.targetDate=t.targetDate),!Object.keys(r).length)throw new p("No updates specified");let g=await c(V,{id:e,input:r});d("Goal updated"),a(t,g.mybUpdateGoal);}catch(r){s(r);}}),n.command("achieve").description("Mark a goal as achieved").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(H,{id:e});d(`Goal achieved: ${r.mybAchieveGoal.title}`),a(t,r.mybAchieveGoal);}catch(r){s(r);}});}function me(o){let n=o.command("metrics").description("Mybodyshield body metrics");n.command("list").description("List body metrics").option("--member <id>","Filter by member ID").option("--type <t>","WEIGHT|BODY_FAT|CHEST|WAIST|HIPS|THIGH|ARM|RESTING_HEART_RATE").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(B,{memberId:e.member,type:e.type?e.type.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});a(e,t.mybListBodyMetrics.items,{headers:["ID","Type","Value","Unit","Measured"],rows:t.mybListBodyMetrics.items.map(r=>[m(r.id,12),r.type,String(r.value),r.unit,y(r.measuredAt)])});}catch(t){s(t);}}),n.command("record").description("Record a body metric").requiredOption("--type <t>","WEIGHT|BODY_FAT|CHEST|WAIST|HIPS|THIGH|ARM|RESTING_HEART_RATE").requiredOption("--value <n>","Measured value",l).option("--member <id>","Member ID").option("--unit <u>","Unit").option("--measured-at <iso>","Measured at (ISO)").option("--notes <s>","Notes").option("--photo-file-id <id>","Progress photo file ID").option("-f, --format <format>","Output format").action(async e=>{try{let t={type:e.type.toUpperCase(),value:e.value};e.member&&(t.memberId=e.member),e.unit&&(t.unit=e.unit),e.measuredAt&&(t.measuredAt=e.measuredAt),e.notes&&(t.notes=e.notes),e.photoFileId&&(t.photoFileId=e.photoFileId);let r=await c(j,{input:t});d(`Metric recorded: ${r.mybRecordBodyMetric.type}`),a(e,r.mybRecordBodyMetric);}catch(t){s(t);}});}function ge(o){let n=o.command("nutrition").description("Mybodyshield nutrition plans");n.command("get").description("Get a nutrition plan by id").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(Y,{id:e});if(!r.mybNutritionPlan)throw new p(`Nutrition plan ${e} not found`);a(t,r.mybNutritionPlan);}catch(r){s(r);}}),n.command("active").description("Get a member's active nutrition plan").option("--member <id>","Member ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(z,{memberId:e.member});if(!t.mybActiveNutritionPlan)throw new p("No active nutrition plan found");a(e,t.mybActiveNutritionPlan);}catch(t){s(t);}}),n.command("macros").description("Roll up a member's logged meals for a day against the active plan").option("--member <id>","Member ID").option("--date <iso>","Date (ISO)").option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(K,{memberId:e.member,date:e.date});a(e,t.mybDailyMacros);}catch(t){s(t);}}),n.command("create").description("Create a nutrition plan").requiredOption("--name <name>","Plan name").option("--member <id>","Member ID").option("--coach <id>","Coach ID").option("--goal-type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--calorie-target <n>","Calorie target",i).option("--protein-target <n>","Protein target (g)",i).option("--carbs-target <n>","Carbs target (g)",i).option("--fat-target <n>","Fat target (g)",i).option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name};e.member&&(t.memberId=e.member),e.coach&&(t.coachId=e.coach),e.goalType&&(t.goalType=e.goalType.toUpperCase()),e.calorieTarget!==void 0&&(t.calorieTarget=e.calorieTarget),e.proteinTarget!==void 0&&(t.proteinTarget=e.proteinTarget),e.carbsTarget!==void 0&&(t.carbsTarget=e.carbsTarget),e.fatTarget!==void 0&&(t.fatTarget=e.fatTarget),e.startDate&&(t.startDate=e.startDate),e.endDate&&(t.endDate=e.endDate),e.notes&&(t.notes=e.notes);let r=await c(J,{input:t});d(`Nutrition plan created: ${r.mybCreateNutritionPlan.name}`),a(e,r.mybCreateNutritionPlan);}catch(t){s(t);}}),n.command("update").description("Update a nutrition plan").argument("<id>","Plan ID").option("--name <name>","Plan name").option("--goal-type <t>","Goal type").option("--calorie-target <n>","Calorie target",i).option("--protein-target <n>","Protein target (g)",i).option("--carbs-target <n>","Carbs target (g)",i).option("--fat-target <n>","Fat target (g)",i).option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r={};if(t.name&&(r.name=t.name),t.goalType&&(r.goalType=t.goalType.toUpperCase()),t.calorieTarget!==void 0&&(r.calorieTarget=t.calorieTarget),t.proteinTarget!==void 0&&(r.proteinTarget=t.proteinTarget),t.carbsTarget!==void 0&&(r.carbsTarget=t.carbsTarget),t.fatTarget!==void 0&&(r.fatTarget=t.fatTarget),t.startDate&&(r.startDate=t.startDate),t.endDate&&(r.endDate=t.endDate),t.notes!==void 0&&(r.notes=t.notes),!Object.keys(r).length)throw new p("No updates specified");let g=await c(Q,{id:e,input:r});d("Nutrition plan updated"),a(t,g.mybUpdateNutritionPlan);}catch(r){s(r);}}),n.command("activate").description("Activate a nutrition plan").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(X,{id:e});d(`Nutrition plan activated: ${r.mybActivateNutritionPlan.name}`),a(t,r.mybActivateNutritionPlan);}catch(r){s(r);}});}function le(o){let n=o.command("meals").description("Mybodyshield meal logs");n.command("list").description("List logged meals").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Filter by nutrition plan ID").option("--limit <n>","Page size",i,50).option("--offset <n>","Offset",i,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(Z,{mealType:e.mealType?e.mealType.toUpperCase():void 0,planId:e.plan,pagination:{limit:e.limit,offset:e.offset}});a(e,t.mybListMeals.items,{headers:["ID","Name","Meal","Calories","Protein"],rows:t.mybListMeals.items.map(r=>[m(r.id,12),r.name,r.mealType,String(r.calories??0),`${r.proteinG??0}g`])});}catch(t){s(t);}}),n.command("log").description("Log a meal").requiredOption("--name <name>","Meal name").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Nutrition plan ID").option("--calories <n>","Calories",i).option("--protein-g <n>","Protein (g)",i).option("--carbs-g <n>","Carbs (g)",i).option("--fat-g <n>","Fat (g)",i).option("--servings <n>","Servings",l).option("--favorite","Mark as favorite").option("--logged-at <iso>","Logged at (ISO)").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name};e.mealType&&(t.mealType=e.mealType.toUpperCase()),e.plan&&(t.planId=e.plan),e.calories!==void 0&&(t.calories=e.calories),e.proteinG!==void 0&&(t.proteinG=e.proteinG),e.carbsG!==void 0&&(t.carbsG=e.carbsG),e.fatG!==void 0&&(t.fatG=e.fatG),e.servings!==void 0&&(t.servings=e.servings),e.favorite&&(t.isFavorite=!0),e.loggedAt&&(t.loggedAt=e.loggedAt);let r=await c(ee,{input:t});d(`Meal logged: ${r.mybLogMeal.name}`),a(e,r.mybLogMeal);}catch(t){s(t);}}),n.command("delete").description("Delete a logged meal").argument("<id>","Meal log ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(te,{id:e});d(r.mybDeleteMeal?"Meal deleted":"Meal not deleted"),a(t,{deleted:r.mybDeleteMeal});}catch(r){s(r);}});}function fe(o){let n=o.command("recovery").description("Mybodyshield recovery logs");n.command("list").description("List recovery logs").option("--member <id>","Filter by member ID").option("--metric <m>","READINESS|SLEEP|SORENESS|STRESS|MOOD").option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(re,{memberId:e.member,metric:e.metric?e.metric.toUpperCase():void 0});a(e,t.mybListRecoveryLogs,{headers:["ID","Metric","Score","Sleep (h)","Logged"],rows:t.mybListRecoveryLogs.map(r=>[m(r.id,12),r.metric,String(r.score),r.sleepHours!=null?String(r.sleepHours):"-",y(r.loggedAt)])});}catch(t){s(t);}}),n.command("log").description("Log a recovery metric").option("--member <id>","Member ID").option("--metric <m>","READINESS|SLEEP|SORENESS|STRESS|MOOD").option("--score <n>","Score",i).option("--sleep-hours <n>","Sleep hours",l).option("--notes <s>","Notes").option("--logged-at <iso>","Logged at (ISO)").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.member&&(t.memberId=e.member),e.metric&&(t.metric=e.metric.toUpperCase()),e.score!==void 0&&(t.score=e.score),e.sleepHours!==void 0&&(t.sleepHours=e.sleepHours),e.notes&&(t.notes=e.notes),e.loggedAt&&(t.loggedAt=e.loggedAt);let r=await c(ne,{input:t});d(`Recovery logged: ${r.mybLogRecovery.metric}`),a(e,r.mybLogRecovery);}catch(t){s(t);}});}function ye(o){let n=o.command("coaching").description("Mybodyshield coaching relationships");n.command("list").description("List coaching relationships").option("--member <id>","Filter by member ID").option("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("-f, --format <format>","Output format").action(async e=>{try{let t=await c(oe,{memberId:e.member,status:e.status?e.status.toUpperCase():void 0});a(e,t.mybListCoaching,{headers:["ID","Coach","Member","Status","Specialty"],rows:t.mybListCoaching.map(r=>[m(r.id,12),m(r.coachId,12),m(r.memberId,12),r.status,r.specialty??"-"])});}catch(t){s(t);}}),n.command("create").description("Create a coaching relationship").requiredOption("--coach <id>","Coach ID").requiredOption("--member <id>","Member ID").option("--specialty <s>","Specialty").option("--share-workouts","Share workouts with the coach").option("--share-nutrition","Share nutrition with the coach").option("--share-metrics","Share body metrics with the coach").option("-f, --format <format>","Output format").action(async e=>{try{let t={coachId:e.coach,memberId:e.member};e.specialty&&(t.specialty=e.specialty),e.shareWorkouts&&(t.shareWorkouts=!0),e.shareNutrition&&(t.shareNutrition=!0),e.shareMetrics&&(t.shareMetrics=!0);let r=await c(ie,{input:t});d("Coaching relationship created"),a(e,r.mybCreateCoaching);}catch(t){s(t);}}),n.command("transition").description("Transition a coaching relationship status").argument("<id>","Coaching relationship ID").requiredOption("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let r=await c(se,{id:e,status:t.status.toUpperCase()});d(`Coaching transitioned to ${r.mybTransitionCoaching.status}`),a(t,r.mybTransitionCoaching);}catch(r){s(r);}});}function be(o){o.command("health").description("Mybodyshield service health check (public)").option("-f, --format <format>","Output format").action(async n=>{try{let e=await w(ae);d(e.mybHealth),a(n,{health:e.mybHealth});}catch(e){s(e);}});}var ve={id:"mybodyshield",version:"1.0.0",displayName:"Mybodyshield",dependsOn:["auth","workspaces"],register(o,n){E(n);let e=o.command("mybodyshield").description("Mybodyshield fitness coaching platform");ce(e),de(e),ue(e),pe(e),me(e),ge(e),le(e),fe(e),ye(e),be(e);}},Sr=ve;module.exports=Sr;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b,h as h$1,p,g,i,o as o$2,d}from'../../chunk-
|
|
1
|
+
import {a,b,h as h$1,p,g,i,o as o$2,d}from'../../chunk-SQSFZFQZ.js';import {o as o$1}from'../../chunk-UAFYTYK6.js';var T=`
|
|
2
2
|
query MybListPrograms(
|
|
3
3
|
$memberId: ID
|
|
4
4
|
$status: MybProgramStatus
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var u=class extends Error{exitCode;hint;constructor(n,i){super(n),this.name="CliUserError",this.exitCode=i?.exitCode??1,this.hint=i?.hint;}};var a=class extends Error{cause;constructor(n,i){super(n),this.name="CliInternalError",this.cause=i;}};var m=null;function b(e){m=e;}function c(){if(!m)throw new a("vibecontrols module helpers used before setHelpersContext was called");return m}async function d(e,n){return c().gql.global.request(e,n)}function f(e){let n=e instanceof Error?e.message:String(e);throw new u(n)}function h(e,n,i){c().output.formatAndOutput(e,n,i);}function
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var u=class extends Error{exitCode;hint;constructor(n,i){super(n),this.name="CliUserError",this.exitCode=i?.exitCode??1,this.hint=i?.hint;}};var a=class extends Error{cause;constructor(n,i){super(n),this.name="CliInternalError",this.cause=i;}};var m=null;function b(e){m=e;}function c(){if(!m)throw new a("vibecontrols module helpers used before setHelpersContext was called");return m}async function d(e,n){return c().gql.global.request(e,n)}function f(e){let n=e instanceof Error?e.message:String(e);throw new u(n)}function h(e,n,i){c().output.formatAndOutput(e,n,i);}function w(e){c().output.printSuccess(e);}function T(e){return c().output.formatStatus(e)}function E(e){return c().output.formatDate(e)}function g(e,n){return c().output.truncate(e,n)}function C(){return c()}var v=`
|
|
2
2
|
query ListNotifications($filter: NotificationFilterInput, $limit: Int, $offset: Int) {
|
|
3
3
|
notifications(filter: $filter, limit: $limit, offset: $offset) {
|
|
4
4
|
items { id title message channel status isRead createdAt }
|
|
5
5
|
total
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,A=`
|
|
9
9
|
mutation MarkNotificationRead($id: ID!) {
|
|
10
10
|
markNotificationAsRead(id: $id) {
|
|
11
11
|
id isRead readAt
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
`,
|
|
14
|
+
`,O=`
|
|
15
15
|
query NotificationPreferences($filter: NotificationPreferenceFilterInput, $limit: Int) {
|
|
16
16
|
notificationPreferences(filter: $filter, limit: $limit) {
|
|
17
17
|
items { id channel enabled frequency scope topicId userId }
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
`,
|
|
20
|
+
`,S=`
|
|
21
21
|
mutation CreateNotificationPreference($input: CreateNotificationPreferenceInput!) {
|
|
22
22
|
createNotificationPreference(input: $input) {
|
|
23
23
|
id channel enabled frequency
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
`;function R(e){let n=e.command("notifications").description("Notification inbox & preferences");n.command("list").description("List the current user's notifications").option("--unread","Only unread").option("--channel <c>","Filter by channel").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let r={};t.unread&&(r.isRead=!1),t.channel&&(r.channel=t.channel.toUpperCase());let
|
|
26
|
+
`;function R(e){let n=e.command("notifications").description("Notification inbox & preferences");n.command("list").description("List the current user's notifications").option("--unread","Only unread").option("--channel <c>","Filter by channel").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let r={};t.unread&&(r.isRead=!1),t.channel&&(r.channel=t.channel.toUpperCase());let p=await d(v,{filter:Object.keys(r).length?r:void 0,limit:t.limit,offset:0});h(t,p.notifications.items,{headers:["ID","Title","Channel","Status","Read","When"],rows:p.notifications.items.map(s=>[g(s.id,12),g(s.title??"-",40),s.channel??"-",T(s.status),String(!!s.isRead),E(s.createdAt)])});}catch(r){f(r);}}),n.command("read").description("Mark a notification as read").argument("<id>").action(async t=>{try{await d(A,{id:t}),w("Notification marked read");}catch(r){f(r);}});let i=n.command("preferences").description("Notification preferences");i.command("get").description("Show current user's notification preferences").option("--user <id>","Override user id").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let r=C().auth.read(),p=t.user??r?.workspaceId??"",s=p?{userId:p}:{},k=await d(O,{filter:Object.keys(s).length?s:void 0,limit:t.limit});h(t,k.notificationPreferences.items,{headers:["ID","Channel","Enabled","Frequency","Scope"],rows:k.notificationPreferences.items.map(l=>[g(l.id,12),l.channel,String(l.enabled),l.frequency??"-",l.scope??"-"])});}catch(r){f(r);}}),i.command("set").description("Set a notification preference").requiredOption("--channel <c>","EMAIL|SMS|IN_APP|PUSH|WEBHOOK").requiredOption("--enabled <bool>","true or false").option("--frequency <f>","IMMEDIATE|HOURLY|DAILY|WEEKLY","IMMEDIATE").option("--scope <s>","GLOBAL|WORKSPACE|VIBE","GLOBAL").option("--topic <id>").option("--user <id>").action(async t=>{try{let r={channel:t.channel.toUpperCase(),enabled:t.enabled==="true",frequency:(t.frequency??"IMMEDIATE").toUpperCase(),scope:(t.scope??"GLOBAL").toUpperCase(),topicId:t.topic,userId:t.user??C().auth.read()?.workspaceId};await d(S,{input:r}),w("Preference saved");}catch(r){f(r);}});}var U={id:"notifications",version:"1.0.0",displayName:"Notifications",dependsOn:["auth"],register(e,n){b(n),R(e);}},Ze=U;module.exports=Ze;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,c,h as h$1,p,n,o,g,i,s}from'../../chunk-
|
|
1
|
+
import {a,c,h as h$1,p,n,o,g,i,s}from'../../chunk-SQSFZFQZ.js';import'../../chunk-UAFYTYK6.js';var h=`
|
|
2
2
|
query ListNotifications($filter: NotificationFilterInput, $limit: Int, $offset: Int) {
|
|
3
3
|
notifications(filter: $filter, limit: $limit, offset: $offset) {
|
|
4
4
|
items { id title message channel status isRead createdAt }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,c,h,p,n,o,g,i}from'../../chunk-
|
|
1
|
+
import {a,c,h,p,n,o,g,i}from'../../chunk-SQSFZFQZ.js';import'../../chunk-UAFYTYK6.js';var f=`
|
|
2
2
|
query MyOrganizations($limit: Int, $offset: Int) {
|
|
3
3
|
myOrganizations(limit: $limit, offset: $offset) {
|
|
4
4
|
items {
|