@burdenoff/cli-sdk 2026.627.4 → 2026.627.5

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.
@@ -0,0 +1,281 @@
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 Oe(){let o=I();if(!o.auth.isAuthenticated())throw new h(`Authentication required. Run \`${o.productName} auth login\`.`)}async function c(o,n){return Oe(),I().gql.workspace.request(o,n)}async function w(o,n){return I().gql.workspaceAuthOnly.request(o,n)}function a(o){let n=o instanceof Error?o.message:String(o);throw new p(n)}function s(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
+ query MybListPrograms(
3
+ $memberId: ID
4
+ $status: MybProgramStatus
5
+ $pagination: PaginationInput
6
+ ) {
7
+ mybListPrograms(memberId: $memberId, status: $status, pagination: $pagination) {
8
+ items {
9
+ id memberId coachId name description goalType level phase status
10
+ weeks daysPerWeek startDate endDate tags createdAt updatedAt workspaceId
11
+ }
12
+ pageInfo { cursor hasMore }
13
+ }
14
+ }
15
+ `,x=`
16
+ query MybProgram($id: ID!) {
17
+ mybProgram(id: $id) {
18
+ id memberId coachId name description goalType level phase status
19
+ weeks daysPerWeek startDate endDate tags createdAt updatedAt workspaceId
20
+ workouts {
21
+ id name type dayOfWeek weekNumber orderIndex durationMin
22
+ }
23
+ }
24
+ }
25
+ `,D=`
26
+ query MybProgramWorkouts($programId: ID!) {
27
+ mybProgramWorkouts(programId: $programId) {
28
+ id programId name description type dayOfWeek weekNumber durationMin
29
+ orderIndex createdAt updatedAt workspaceId
30
+ }
31
+ }
32
+ `,O=`
33
+ mutation MybCreateProgram($input: MybCreateProgramInput!) {
34
+ mybCreateProgram(input: $input) {
35
+ id memberId coachId name description goalType level phase status
36
+ weeks daysPerWeek startDate endDate tags createdAt
37
+ }
38
+ }
39
+ `,v=`
40
+ mutation MybUpdateProgram($id: ID!, $input: MybUpdateProgramInput!) {
41
+ mybUpdateProgram(id: $id, input: $input) {
42
+ id name description goalType level phase status weeks daysPerWeek
43
+ startDate endDate tags updatedAt
44
+ }
45
+ }
46
+ `,R=`
47
+ mutation MybTransitionProgram($id: ID!, $status: MybProgramStatus!) {
48
+ mybTransitionProgram(id: $id, status: $status) {
49
+ id name status phase updatedAt
50
+ }
51
+ }
52
+ `,M=`
53
+ mutation MybArchiveProgram($id: ID!) {
54
+ mybArchiveProgram(id: $id)
55
+ }
56
+ `,P=`
57
+ mutation MybAddWorkout($input: MybCreateWorkoutInput!) {
58
+ mybAddWorkout(input: $input) {
59
+ id programId name description type dayOfWeek weekNumber durationMin
60
+ orderIndex createdAt workspaceId
61
+ }
62
+ }
63
+ `,N=`
64
+ mutation MybAddExercise($input: MybCreateExerciseInput!) {
65
+ mybAddExercise(input: $input) {
66
+ id workoutId name muscleGroup sets reps restSeconds targetWeight
67
+ orderIndex instructions createdAt workspaceId
68
+ }
69
+ }
70
+ `,L=`
71
+ query MybListSessions(
72
+ $programId: ID
73
+ $status: MybSessionStatus
74
+ $pagination: PaginationInput
75
+ ) {
76
+ mybListSessions(programId: $programId, status: $status, pagination: $pagination) {
77
+ items {
78
+ id memberId programId workoutId status scheduledFor startedAt
79
+ completedAt caloriesBurned perceivedExertion notes createdAt workspaceId
80
+ }
81
+ pageInfo { cursor hasMore }
82
+ }
83
+ }
84
+ `,$=`
85
+ query MybSession($id: ID!) {
86
+ mybSession(id: $id) {
87
+ id memberId programId workoutId status scheduledFor startedAt
88
+ completedAt caloriesBurned perceivedExertion notes createdAt updatedAt
89
+ workspaceId
90
+ sets {
91
+ id exerciseName setNumber reps weight distanceM durationSec
92
+ isPersonalRecord
93
+ }
94
+ }
95
+ }
96
+ `,G=`
97
+ mutation MybStartSession($input: MybStartSessionInput!) {
98
+ mybStartSession(input: $input) {
99
+ id memberId programId workoutId status scheduledFor startedAt
100
+ notes createdAt
101
+ }
102
+ }
103
+ `,_=`
104
+ mutation MybLogSet($input: MybLogSetInput!) {
105
+ mybLogSet(input: $input) {
106
+ id sessionId exerciseName setNumber reps weight distanceM durationSec
107
+ isPersonalRecord createdAt
108
+ }
109
+ }
110
+ `,W=`
111
+ mutation MybCompleteSession($id: ID!, $input: MybCompleteSessionInput!) {
112
+ mybCompleteSession(id: $id, input: $input) {
113
+ id status completedAt caloriesBurned perceivedExertion notes updatedAt
114
+ }
115
+ }
116
+ `,U=`
117
+ query MybListGoals(
118
+ $memberId: ID
119
+ $status: MybGoalStatus
120
+ $pagination: PaginationInput
121
+ ) {
122
+ mybListGoals(memberId: $memberId, status: $status, pagination: $pagination) {
123
+ items {
124
+ id memberId type status title description targetValue currentValue
125
+ baselineValue unit targetDate achievedAt createdAt updatedAt workspaceId
126
+ }
127
+ pageInfo { cursor hasMore }
128
+ }
129
+ }
130
+ `,q=`
131
+ query MybGoal($id: ID!) {
132
+ mybGoal(id: $id) {
133
+ id memberId type status title description targetValue currentValue
134
+ baselineValue unit targetDate achievedAt createdAt updatedAt workspaceId
135
+ }
136
+ }
137
+ `,F=`
138
+ mutation MybCreateGoal($input: MybCreateGoalInput!) {
139
+ mybCreateGoal(input: $input) {
140
+ id memberId type status title description targetValue currentValue
141
+ baselineValue unit targetDate createdAt
142
+ }
143
+ }
144
+ `,V=`
145
+ mutation MybUpdateGoal($id: ID!, $input: MybUpdateGoalInput!) {
146
+ mybUpdateGoal(id: $id, input: $input) {
147
+ id type status title description targetValue currentValue baselineValue
148
+ unit targetDate updatedAt
149
+ }
150
+ }
151
+ `,H=`
152
+ mutation MybAchieveGoal($id: ID!) {
153
+ mybAchieveGoal(id: $id) {
154
+ id title status achievedAt updatedAt
155
+ }
156
+ }
157
+ `,B=`
158
+ query MybListBodyMetrics(
159
+ $memberId: ID
160
+ $type: MybBodyMetricType
161
+ $pagination: PaginationInput
162
+ ) {
163
+ mybListBodyMetrics(memberId: $memberId, type: $type, pagination: $pagination) {
164
+ items {
165
+ id memberId type value unit measuredAt notes createdAt updatedAt
166
+ workspaceId
167
+ }
168
+ pageInfo { cursor hasMore }
169
+ }
170
+ }
171
+ `,j=`
172
+ mutation MybRecordBodyMetric($input: MybRecordMetricInput!) {
173
+ mybRecordBodyMetric(input: $input) {
174
+ id memberId type value unit measuredAt notes createdAt workspaceId
175
+ }
176
+ }
177
+ `,Y=`
178
+ query MybNutritionPlan($id: ID!) {
179
+ mybNutritionPlan(id: $id) {
180
+ id memberId coachId name goalType calorieTarget proteinTarget carbsTarget
181
+ fatTarget isActive startDate endDate notes createdAt updatedAt workspaceId
182
+ meals { id name mealType calories proteinG carbsG fatG loggedAt }
183
+ }
184
+ }
185
+ `,z=`
186
+ query MybActiveNutritionPlan($memberId: ID) {
187
+ mybActiveNutritionPlan(memberId: $memberId) {
188
+ id memberId coachId name goalType calorieTarget proteinTarget carbsTarget
189
+ fatTarget isActive startDate endDate notes createdAt updatedAt workspaceId
190
+ }
191
+ }
192
+ `,K=`
193
+ query MybDailyMacros($date: DateTime, $memberId: ID) {
194
+ mybDailyMacros(date: $date, memberId: $memberId) {
195
+ date calories calorieTarget proteinG proteinTarget carbsG carbsTarget
196
+ fatG fatTarget
197
+ }
198
+ }
199
+ `,J=`
200
+ mutation MybCreateNutritionPlan($input: MybCreateNutritionPlanInput!) {
201
+ mybCreateNutritionPlan(input: $input) {
202
+ id memberId coachId name goalType calorieTarget proteinTarget carbsTarget
203
+ fatTarget isActive startDate endDate notes createdAt
204
+ }
205
+ }
206
+ `,Q=`
207
+ mutation MybUpdateNutritionPlan($id: ID!, $input: MybUpdateNutritionPlanInput!) {
208
+ mybUpdateNutritionPlan(id: $id, input: $input) {
209
+ id name goalType calorieTarget proteinTarget carbsTarget fatTarget
210
+ startDate endDate notes updatedAt
211
+ }
212
+ }
213
+ `,X=`
214
+ mutation MybActivateNutritionPlan($id: ID!) {
215
+ mybActivateNutritionPlan(id: $id) {
216
+ id name isActive updatedAt
217
+ }
218
+ }
219
+ `,Z=`
220
+ query MybListMeals(
221
+ $mealType: MybMealType
222
+ $planId: ID
223
+ $pagination: PaginationInput
224
+ ) {
225
+ mybListMeals(mealType: $mealType, planId: $planId, pagination: $pagination) {
226
+ items {
227
+ id memberId planId name mealType calories proteinG carbsG fatG servings
228
+ isFavorite loggedAt createdAt workspaceId
229
+ }
230
+ pageInfo { cursor hasMore }
231
+ }
232
+ }
233
+ `,ee=`
234
+ mutation MybLogMeal($input: MybLogMealInput!) {
235
+ mybLogMeal(input: $input) {
236
+ id memberId planId name mealType calories proteinG carbsG fatG servings
237
+ isFavorite loggedAt createdAt workspaceId
238
+ }
239
+ }
240
+ `,te=`
241
+ mutation MybDeleteMeal($id: ID!) {
242
+ mybDeleteMeal(id: $id)
243
+ }
244
+ `,re=`
245
+ query MybListRecoveryLogs($memberId: ID, $metric: MybRecoveryMetric) {
246
+ mybListRecoveryLogs(memberId: $memberId, metric: $metric) {
247
+ id memberId metric score sleepHours notes loggedAt createdAt updatedAt
248
+ workspaceId
249
+ }
250
+ }
251
+ `,ne=`
252
+ mutation MybLogRecovery($input: MybLogRecoveryInput!) {
253
+ mybLogRecovery(input: $input) {
254
+ id memberId metric score sleepHours notes loggedAt createdAt workspaceId
255
+ }
256
+ }
257
+ `,oe=`
258
+ query MybListCoaching($memberId: ID, $status: MybCoachingStatus) {
259
+ mybListCoaching(memberId: $memberId, status: $status) {
260
+ id coachId memberId status specialty shareWorkouts shareNutrition
261
+ shareMetrics notes startedAt endedAt createdAt updatedAt workspaceId
262
+ }
263
+ }
264
+ `,ie=`
265
+ mutation MybCreateCoaching($input: MybCreateCoachingInput!) {
266
+ mybCreateCoaching(input: $input) {
267
+ id coachId memberId status specialty shareWorkouts shareNutrition
268
+ shareMetrics notes createdAt workspaceId
269
+ }
270
+ }
271
+ `,ae=`
272
+ mutation MybTransitionCoaching($id: ID!, $status: MybCoachingStatus!) {
273
+ mybTransitionCoaching(id: $id, status: $status) {
274
+ id coachId memberId status startedAt endedAt updatedAt
275
+ }
276
+ }
277
+ `,se=`
278
+ query MybHealth {
279
+ mybHealth
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;
@@ -0,0 +1,7 @@
1
+ import { C as CliModule } from '../../module-DxCuik6L.cjs';
2
+ import 'commander';
3
+ import 'graphql-request';
4
+
5
+ declare const mybodyshieldModule: CliModule;
6
+
7
+ export { mybodyshieldModule as default };
@@ -0,0 +1,7 @@
1
+ import { C as CliModule } from '../../module-DxCuik6L.js';
2
+ import 'commander';
3
+ import 'graphql-request';
4
+
5
+ declare const mybodyshieldModule: CliModule;
6
+
7
+ export { mybodyshieldModule as default };