@burdenoff/cli-sdk 2026.1124.1 → 2026.1202.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-BGNPGKJM.js +1 -0
- package/dist/{chunk-ASSY2L5R.js → chunk-E6F56R4K.js} +3 -3
- package/dist/chunk-N7EXKGE2.js +34 -0
- package/dist/core/index.cjs +9 -9
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{module-BNVKV_pI.d.ts → module-DWSAfs3k.d.cts} +20 -19
- package/dist/{module-BNVKV_pI.d.cts → module-DWSAfs3k.d.ts} +20 -19
- package/dist/modules/adaptercloud/index.cjs +38 -38
- package/dist/modules/adaptercloud/index.d.cts +1 -1
- package/dist/modules/adaptercloud/index.d.ts +1 -1
- package/dist/modules/adaptercloud/index.js +2 -2
- package/dist/modules/artistrybase/index.cjs +50 -50
- package/dist/modules/artistrybase/index.d.cts +1 -1
- package/dist/modules/artistrybase/index.d.ts +1 -1
- package/dist/modules/artistrybase/index.js +2 -2
- package/dist/modules/assethandler/index.cjs +32 -32
- package/dist/modules/assethandler/index.d.cts +1 -1
- package/dist/modules/assethandler/index.d.ts +1 -1
- package/dist/modules/assethandler/index.js +2 -2
- package/dist/modules/atheletebridge/index.cjs +34 -34
- package/dist/modules/atheletebridge/index.d.cts +1 -1
- package/dist/modules/atheletebridge/index.d.ts +1 -1
- package/dist/modules/atheletebridge/index.js +2 -2
- package/dist/modules/auth/index.cjs +34 -34
- package/dist/modules/auth/index.d.cts +1 -1
- package/dist/modules/auth/index.d.ts +1 -1
- package/dist/modules/auth/index.js +4 -4
- package/dist/modules/billing/index.cjs +18 -18
- package/dist/modules/billing/index.d.cts +1 -1
- package/dist/modules/billing/index.d.ts +1 -1
- package/dist/modules/billing/index.js +2 -2
- package/dist/modules/brainyrich/index.cjs +45 -45
- package/dist/modules/brainyrich/index.d.cts +1 -1
- package/dist/modules/brainyrich/index.d.ts +1 -1
- package/dist/modules/brainyrich/index.js +2 -2
- package/dist/modules/buildmyiq/index.cjs +32 -32
- package/dist/modules/buildmyiq/index.d.cts +1 -1
- package/dist/modules/buildmyiq/index.d.ts +1 -1
- package/dist/modules/buildmyiq/index.js +2 -2
- package/dist/modules/channels/index.cjs +12 -12
- package/dist/modules/channels/index.d.cts +1 -1
- package/dist/modules/channels/index.d.ts +1 -1
- package/dist/modules/channels/index.js +2 -2
- package/dist/modules/collabkin/index.cjs +34 -34
- package/dist/modules/collabkin/index.d.cts +1 -1
- package/dist/modules/collabkin/index.d.ts +1 -1
- package/dist/modules/collabkin/index.js +2 -2
- package/dist/modules/comradecircle/index.cjs +41 -41
- package/dist/modules/comradecircle/index.d.cts +1 -1
- package/dist/modules/comradecircle/index.d.ts +1 -1
- package/dist/modules/comradecircle/index.js +2 -2
- package/dist/modules/conversations/index.cjs +32 -32
- package/dist/modules/conversations/index.d.cts +1 -1
- package/dist/modules/conversations/index.d.ts +1 -1
- package/dist/modules/conversations/index.js +2 -2
- package/dist/modules/coolandlovely/index.cjs +41 -41
- package/dist/modules/coolandlovely/index.d.cts +1 -1
- package/dist/modules/coolandlovely/index.d.ts +1 -1
- package/dist/modules/coolandlovely/index.js +2 -2
- package/dist/modules/cosmicintersection/index.cjs +43 -43
- package/dist/modules/cosmicintersection/index.d.cts +1 -1
- package/dist/modules/cosmicintersection/index.d.ts +1 -1
- package/dist/modules/cosmicintersection/index.js +2 -2
- package/dist/modules/crewfoundry/index.cjs +70 -70
- package/dist/modules/crewfoundry/index.d.cts +1 -1
- package/dist/modules/crewfoundry/index.d.ts +1 -1
- package/dist/modules/crewfoundry/index.js +2 -2
- package/dist/modules/devportal/index.cjs +23 -23
- package/dist/modules/devportal/index.d.cts +1 -1
- package/dist/modules/devportal/index.d.ts +1 -1
- package/dist/modules/devportal/index.js +2 -2
- package/dist/modules/ecoimpacthub/index.cjs +41 -41
- package/dist/modules/ecoimpacthub/index.d.cts +1 -1
- package/dist/modules/ecoimpacthub/index.d.ts +1 -1
- package/dist/modules/ecoimpacthub/index.js +2 -2
- package/dist/modules/eventfullymanaged/index.cjs +92 -92
- package/dist/modules/eventfullymanaged/index.d.cts +1 -1
- package/dist/modules/eventfullymanaged/index.d.ts +1 -1
- package/dist/modules/eventfullymanaged/index.js +2 -2
- package/dist/modules/export/index.cjs +14 -14
- package/dist/modules/export/index.d.cts +1 -1
- package/dist/modules/export/index.d.ts +1 -1
- package/dist/modules/export/index.js +2 -2
- package/dist/modules/files/index.cjs +11 -11
- package/dist/modules/files/index.d.cts +1 -1
- package/dist/modules/files/index.d.ts +1 -1
- package/dist/modules/files/index.js +2 -2
- package/dist/modules/fluidgrids/index.cjs +29 -29
- package/dist/modules/fluidgrids/index.d.cts +1 -1
- package/dist/modules/fluidgrids/index.d.ts +1 -1
- package/dist/modules/fluidgrids/index.js +3 -3
- package/dist/modules/ggnomad/index.cjs +21 -21
- package/dist/modules/ggnomad/index.d.cts +1 -1
- package/dist/modules/ggnomad/index.d.ts +1 -1
- package/dist/modules/ggnomad/index.js +2 -2
- package/dist/modules/govcitizenhub/index.cjs +35 -35
- package/dist/modules/govcitizenhub/index.d.cts +1 -1
- package/dist/modules/govcitizenhub/index.d.ts +1 -1
- package/dist/modules/govcitizenhub/index.js +2 -2
- package/dist/modules/groups/index.cjs +12 -12
- package/dist/modules/groups/index.d.cts +1 -1
- package/dist/modules/groups/index.d.ts +1 -1
- package/dist/modules/groups/index.js +2 -2
- package/dist/modules/headshotmarketing/index.cjs +165 -165
- package/dist/modules/headshotmarketing/index.d.cts +1 -1
- package/dist/modules/headshotmarketing/index.d.ts +1 -1
- package/dist/modules/headshotmarketing/index.js +2 -2
- package/dist/modules/health/index.d.cts +1 -1
- package/dist/modules/health/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.cjs +43 -43
- package/dist/modules/hookmovies/index.d.cts +1 -1
- package/dist/modules/hookmovies/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.js +2 -2
- package/dist/modules/housingvista/index.cjs +24 -24
- package/dist/modules/housingvista/index.d.cts +1 -1
- package/dist/modules/housingvista/index.d.ts +1 -1
- package/dist/modules/housingvista/index.js +2 -2
- package/dist/modules/integrations/index.cjs +27 -27
- package/dist/modules/integrations/index.d.cts +1 -1
- package/dist/modules/integrations/index.d.ts +1 -1
- package/dist/modules/integrations/index.js +2 -2
- package/dist/modules/intelwatchtower/index.cjs +37 -37
- package/dist/modules/intelwatchtower/index.d.cts +1 -1
- package/dist/modules/intelwatchtower/index.d.ts +1 -1
- package/dist/modules/intelwatchtower/index.js +2 -2
- package/dist/modules/kadaikodi/index.cjs +26 -26
- package/dist/modules/kadaikodi/index.d.cts +1 -1
- package/dist/modules/kadaikodi/index.d.ts +1 -1
- package/dist/modules/kadaikodi/index.js +2 -2
- package/dist/modules/labsofscience/index.cjs +44 -44
- package/dist/modules/labsofscience/index.d.cts +1 -1
- package/dist/modules/labsofscience/index.d.ts +1 -1
- package/dist/modules/labsofscience/index.js +2 -2
- package/dist/modules/manufacturedops/index.cjs +36 -36
- package/dist/modules/manufacturedops/index.d.cts +1 -1
- package/dist/modules/manufacturedops/index.d.ts +1 -1
- package/dist/modules/manufacturedops/index.js +2 -2
- package/dist/modules/movethewheels/index.cjs +78 -78
- package/dist/modules/movethewheels/index.d.cts +1 -1
- package/dist/modules/movethewheels/index.d.ts +1 -1
- package/dist/modules/movethewheels/index.js +2 -2
- package/dist/modules/mybodyshield/index.cjs +36 -36
- package/dist/modules/mybodyshield/index.d.cts +1 -1
- package/dist/modules/mybodyshield/index.d.ts +1 -1
- package/dist/modules/mybodyshield/index.js +2 -2
- package/dist/modules/notifications/index.cjs +5 -5
- package/dist/modules/notifications/index.d.cts +1 -1
- package/dist/modules/notifications/index.d.ts +1 -1
- package/dist/modules/notifications/index.js +1 -1
- package/dist/modules/organizations/index.cjs +5 -5
- package/dist/modules/organizations/index.d.cts +1 -1
- package/dist/modules/organizations/index.d.ts +1 -1
- package/dist/modules/organizations/index.js +1 -1
- package/dist/modules/planmagnet/index.cjs +272 -272
- package/dist/modules/planmagnet/index.d.cts +1 -1
- package/dist/modules/planmagnet/index.d.ts +1 -1
- package/dist/modules/planmagnet/index.js +2 -2
- package/dist/modules/products/index.cjs +19 -19
- package/dist/modules/products/index.d.cts +1 -1
- package/dist/modules/products/index.d.ts +1 -1
- package/dist/modules/products/index.js +2 -2
- package/dist/modules/proserviceworld/index.cjs +24 -24
- package/dist/modules/proserviceworld/index.d.cts +1 -1
- package/dist/modules/proserviceworld/index.d.ts +1 -1
- package/dist/modules/proserviceworld/index.js +2 -2
- package/dist/modules/rbac/index.cjs +8 -8
- package/dist/modules/rbac/index.d.cts +1 -1
- package/dist/modules/rbac/index.d.ts +1 -1
- package/dist/modules/rbac/index.js +2 -2
- package/dist/modules/sandbox/index.cjs +39 -39
- package/dist/modules/sandbox/index.d.cts +1 -1
- package/dist/modules/sandbox/index.d.ts +1 -1
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/scheduler/index.cjs +25 -25
- package/dist/modules/scheduler/index.d.cts +1 -1
- package/dist/modules/scheduler/index.d.ts +1 -1
- package/dist/modules/scheduler/index.js +2 -2
- package/dist/modules/security/index.cjs +14 -14
- package/dist/modules/security/index.d.cts +1 -1
- package/dist/modules/security/index.d.ts +1 -1
- package/dist/modules/security/index.js +2 -2
- package/dist/modules/semanticfed/index.cjs +44 -44
- package/dist/modules/semanticfed/index.d.cts +1 -1
- package/dist/modules/semanticfed/index.d.ts +1 -1
- package/dist/modules/semanticfed/index.js +1 -1
- package/dist/modules/semanticfed-sql/index.cjs +4 -4
- package/dist/modules/semanticfed-sql/index.d.cts +1 -1
- package/dist/modules/semanticfed-sql/index.d.ts +1 -1
- package/dist/modules/semanticfed-sql/index.js +1 -1
- package/dist/modules/store/index.cjs +21 -21
- package/dist/modules/store/index.d.cts +1 -1
- package/dist/modules/store/index.d.ts +1 -1
- package/dist/modules/store/index.js +2 -2
- package/dist/modules/subscriberbot/index.cjs +41 -41
- package/dist/modules/subscriberbot/index.d.cts +1 -1
- package/dist/modules/subscriberbot/index.d.ts +1 -1
- package/dist/modules/subscriberbot/index.js +2 -2
- package/dist/modules/support/index.cjs +8 -8
- package/dist/modules/support/index.d.cts +1 -1
- package/dist/modules/support/index.d.ts +1 -1
- package/dist/modules/support/index.js +2 -2
- package/dist/modules/tags/index.cjs +10 -10
- package/dist/modules/tags/index.d.cts +1 -1
- package/dist/modules/tags/index.d.ts +1 -1
- package/dist/modules/tags/index.js +2 -2
- package/dist/modules/technospam/index.cjs +44 -44
- package/dist/modules/technospam/index.d.cts +1 -1
- package/dist/modules/technospam/index.d.ts +1 -1
- package/dist/modules/technospam/index.js +2 -2
- package/dist/modules/theculturepost/index.cjs +32 -32
- package/dist/modules/theculturepost/index.d.cts +1 -1
- package/dist/modules/theculturepost/index.d.ts +1 -1
- package/dist/modules/theculturepost/index.js +2 -2
- package/dist/modules/theglobalfuel/index.cjs +30 -30
- package/dist/modules/theglobalfuel/index.d.cts +1 -1
- package/dist/modules/theglobalfuel/index.d.ts +1 -1
- package/dist/modules/theglobalfuel/index.js +2 -2
- package/dist/modules/timecampus/index.cjs +69 -69
- package/dist/modules/timecampus/index.d.cts +1 -1
- package/dist/modules/timecampus/index.d.ts +1 -1
- package/dist/modules/timecampus/index.js +4 -4
- package/dist/modules/tours/index.cjs +4 -4
- package/dist/modules/tours/index.d.cts +1 -1
- package/dist/modules/tours/index.d.ts +1 -1
- package/dist/modules/tours/index.js +2 -2
- package/dist/modules/vibecontrols/index.cjs +460 -460
- package/dist/modules/vibecontrols/index.d.cts +1 -1
- package/dist/modules/vibecontrols/index.d.ts +1 -1
- package/dist/modules/vibecontrols/index.js +5 -5
- package/dist/modules/workspaces/index.cjs +16 -16
- package/dist/modules/workspaces/index.d.cts +1 -1
- package/dist/modules/workspaces/index.d.ts +1 -1
- package/dist/modules/workspaces/index.js +2 -2
- package/package.json +6 -1
- package/dist/chunk-3ZVMC2AF.js +0 -1
- package/dist/chunk-ZT6KOG7N.js +0 -34
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var fs=require('fs');var
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var fs=require('fs');var O=`
|
|
2
2
|
query MybListPrograms(
|
|
3
3
|
$memberId: ID
|
|
4
4
|
$status: MybProgramStatus
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
pageInfo { cursor hasMore }
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
`,
|
|
15
|
+
`,D=`
|
|
16
16
|
query MybProgram($id: ID!) {
|
|
17
17
|
mybProgram(id: $id) {
|
|
18
18
|
id memberId coachId name description goalType level phase status
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
`,
|
|
26
|
+
`,x=`
|
|
27
27
|
query MybProgramWorkouts($programId: ID!, $pagination: PaginationInput) {
|
|
28
28
|
mybProgramWorkouts(programId: $programId, pagination: $pagination) {
|
|
29
29
|
items {
|
|
@@ -33,31 +33,31 @@
|
|
|
33
33
|
pageInfo { cursor hasMore }
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
`,
|
|
36
|
+
`,R=`
|
|
37
37
|
mutation MybCreateProgram($input: MybCreateProgramInput!) {
|
|
38
38
|
mybCreateProgram(input: $input) {
|
|
39
39
|
id memberId coachId name description goalType level phase status
|
|
40
40
|
weeks daysPerWeek startDate endDate tags createdAt
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
`,
|
|
43
|
+
`,v=`
|
|
44
44
|
mutation MybUpdateProgram($id: ID!, $input: MybUpdateProgramInput!) {
|
|
45
45
|
mybUpdateProgram(id: $id, input: $input) {
|
|
46
46
|
id name description goalType level phase status weeks daysPerWeek
|
|
47
47
|
startDate endDate tags updatedAt
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
`,
|
|
50
|
+
`,M=`
|
|
51
51
|
mutation MybTransitionProgram($id: ID!, $status: MybProgramStatus!) {
|
|
52
52
|
mybTransitionProgram(id: $id, status: $status) {
|
|
53
53
|
id name status phase updatedAt
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
`,
|
|
56
|
+
`,L=`
|
|
57
57
|
mutation MybArchiveProgram($id: ID!) {
|
|
58
58
|
mybArchiveProgram(id: $id)
|
|
59
59
|
}
|
|
60
|
-
`,
|
|
60
|
+
`,N=`
|
|
61
61
|
mutation MybAddWorkout($input: MybCreateWorkoutInput!) {
|
|
62
62
|
mybAddWorkout(input: $input) {
|
|
63
63
|
id programId name description type dayOfWeek weekNumber durationMin
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
orderIndex instructions createdAt workspaceId
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
`,$=`
|
|
75
75
|
query MybListSessions(
|
|
76
76
|
$programId: ID
|
|
77
77
|
$status: MybSessionStatus
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
pageInfo { cursor hasMore }
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
`,G=`
|
|
89
89
|
query MybSession($id: ID!) {
|
|
90
90
|
mybSession(id: $id) {
|
|
91
91
|
id memberId programId workoutId status scheduledFor startedAt
|
|
@@ -97,21 +97,21 @@
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
`,
|
|
100
|
+
`,_=`
|
|
101
101
|
mutation MybStartSession($input: MybStartSessionInput!) {
|
|
102
102
|
mybStartSession(input: $input) {
|
|
103
103
|
id memberId programId workoutId status scheduledFor startedAt
|
|
104
104
|
notes createdAt
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
`,
|
|
107
|
+
`,q=`
|
|
108
108
|
mutation MybLogSet($input: MybLogSetInput!) {
|
|
109
109
|
mybLogSet(input: $input) {
|
|
110
110
|
id sessionId exerciseName setNumber reps weight distanceM durationSec
|
|
111
111
|
isPersonalRecord createdAt
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
`,
|
|
114
|
+
`,U=`
|
|
115
115
|
mutation MybCompleteSession($id: ID!, $input: MybCompleteSessionInput!) {
|
|
116
116
|
mybCompleteSession(id: $id, input: $input) {
|
|
117
117
|
id status completedAt caloriesBurned perceivedExertion notes updatedAt
|
|
@@ -131,34 +131,34 @@
|
|
|
131
131
|
pageInfo { cursor hasMore }
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
`,
|
|
134
|
+
`,F=`
|
|
135
135
|
query MybGoal($id: ID!) {
|
|
136
136
|
mybGoal(id: $id) {
|
|
137
137
|
id memberId type status title description targetValue currentValue
|
|
138
138
|
baselineValue unit targetDate achievedAt createdAt updatedAt workspaceId
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
`,
|
|
141
|
+
`,V=`
|
|
142
142
|
mutation MybCreateGoal($input: MybCreateGoalInput!) {
|
|
143
143
|
mybCreateGoal(input: $input) {
|
|
144
144
|
id memberId type status title description targetValue currentValue
|
|
145
145
|
baselineValue unit targetDate createdAt
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
`,
|
|
148
|
+
`,H=`
|
|
149
149
|
mutation MybUpdateGoal($id: ID!, $input: MybUpdateGoalInput!) {
|
|
150
150
|
mybUpdateGoal(id: $id, input: $input) {
|
|
151
151
|
id type status title description targetValue currentValue baselineValue
|
|
152
152
|
unit targetDate updatedAt
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
`,
|
|
155
|
+
`,B=`
|
|
156
156
|
mutation MybAchieveGoal($id: ID!) {
|
|
157
157
|
mybAchieveGoal(id: $id) {
|
|
158
158
|
id title status achievedAt updatedAt
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
`,
|
|
161
|
+
`,j=`
|
|
162
162
|
query MybListBodyMetrics(
|
|
163
163
|
$memberId: ID
|
|
164
164
|
$type: MybBodyMetricType
|
|
@@ -172,13 +172,13 @@
|
|
|
172
172
|
pageInfo { cursor hasMore }
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
`,
|
|
175
|
+
`,Y=`
|
|
176
176
|
mutation MybRecordBodyMetric($input: MybRecordMetricInput!) {
|
|
177
177
|
mybRecordBodyMetric(input: $input) {
|
|
178
178
|
id memberId type value unit measuredAt notes createdAt workspaceId
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
`,
|
|
181
|
+
`,z=`
|
|
182
182
|
query MybNutritionPlan($id: ID!) {
|
|
183
183
|
mybNutritionPlan(id: $id) {
|
|
184
184
|
id memberId coachId name goalType calorieTarget proteinTarget carbsTarget
|
|
@@ -186,21 +186,21 @@
|
|
|
186
186
|
meals { items { id name mealType calories proteinG carbsG fatG loggedAt } pageInfo { cursor hasMore } }
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
`,
|
|
189
|
+
`,K=`
|
|
190
190
|
query MybActiveNutritionPlan($memberId: ID) {
|
|
191
191
|
mybActiveNutritionPlan(memberId: $memberId) {
|
|
192
192
|
id memberId coachId name goalType calorieTarget proteinTarget carbsTarget
|
|
193
193
|
fatTarget isActive startDate endDate notes createdAt updatedAt workspaceId
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
`,
|
|
196
|
+
`,J=`
|
|
197
197
|
query MybDailyMacros($date: DateTime, $memberId: ID) {
|
|
198
198
|
mybDailyMacros(date: $date, memberId: $memberId) {
|
|
199
199
|
date calories calorieTarget proteinG proteinTarget carbsG carbsTarget
|
|
200
200
|
fatG fatTarget
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
`,
|
|
203
|
+
`,Q=`
|
|
204
204
|
mutation MybCreateNutritionPlan($input: MybCreateNutritionPlanInput!) {
|
|
205
205
|
mybCreateNutritionPlan(input: $input) {
|
|
206
206
|
id memberId coachId name goalType calorieTarget proteinTarget carbsTarget
|
|
@@ -214,13 +214,13 @@
|
|
|
214
214
|
startDate endDate notes updatedAt
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
`,
|
|
217
|
+
`,Z=`
|
|
218
218
|
mutation MybActivateNutritionPlan($id: ID!) {
|
|
219
219
|
mybActivateNutritionPlan(id: $id) {
|
|
220
220
|
id name isActive updatedAt
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
`,
|
|
223
|
+
`,ee=`
|
|
224
224
|
query MybListMeals(
|
|
225
225
|
$mealType: MybMealType
|
|
226
226
|
$planId: ID
|
|
@@ -234,18 +234,18 @@
|
|
|
234
234
|
pageInfo { cursor hasMore }
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
-
`,
|
|
237
|
+
`,te=`
|
|
238
238
|
mutation MybLogMeal($input: MybLogMealInput!) {
|
|
239
239
|
mybLogMeal(input: $input) {
|
|
240
240
|
id memberId planId name mealType calories proteinG carbsG fatG servings
|
|
241
241
|
isFavorite loggedAt createdAt workspaceId
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
`,
|
|
244
|
+
`,ne=`
|
|
245
245
|
mutation MybDeleteMeal($id: ID!) {
|
|
246
246
|
mybDeleteMeal(id: $id)
|
|
247
247
|
}
|
|
248
|
-
`,
|
|
248
|
+
`,re=`
|
|
249
249
|
query MybListRecoveryLogs($memberId: ID, $metric: MybRecoveryMetric, $pagination: PaginationInput) {
|
|
250
250
|
mybListRecoveryLogs(memberId: $memberId, metric: $metric, pagination: $pagination) {
|
|
251
251
|
items {
|
|
@@ -255,13 +255,13 @@
|
|
|
255
255
|
pageInfo { cursor hasMore }
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
`,
|
|
258
|
+
`,oe=`
|
|
259
259
|
mutation MybLogRecovery($input: MybLogRecoveryInput!) {
|
|
260
260
|
mybLogRecovery(input: $input) {
|
|
261
261
|
id memberId metric score sleepHours notes loggedAt createdAt workspaceId
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
`,
|
|
264
|
+
`,ie=`
|
|
265
265
|
query MybListCoaching($memberId: ID, $status: MybCoachingStatus, $pagination: PaginationInput) {
|
|
266
266
|
mybListCoaching(memberId: $memberId, status: $status, pagination: $pagination) {
|
|
267
267
|
items {
|
|
@@ -271,35 +271,35 @@
|
|
|
271
271
|
pageInfo { cursor hasMore }
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
`,
|
|
274
|
+
`,se=`
|
|
275
275
|
mutation MybCreateCoaching($input: MybCreateCoachingInput!) {
|
|
276
276
|
mybCreateCoaching(input: $input) {
|
|
277
277
|
id coachId memberId status specialty shareWorkouts shareNutrition
|
|
278
278
|
shareMetrics notes createdAt workspaceId
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
`,
|
|
281
|
+
`,ae=`
|
|
282
282
|
mutation MybTransitionCoaching($id: ID!, $status: MybCoachingStatus!) {
|
|
283
283
|
mybTransitionCoaching(id: $id, status: $status) {
|
|
284
284
|
id coachId memberId status startedAt endedAt updatedAt
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
`,
|
|
287
|
+
`,ce=`
|
|
288
288
|
query MybHealth {
|
|
289
289
|
mybHealth
|
|
290
290
|
}
|
|
291
|
-
`,
|
|
291
|
+
`,de=`
|
|
292
292
|
query MybWorkoutExercises($workoutId: ID!, $pagination: PaginationInput) {
|
|
293
293
|
mybWorkoutExercises(workoutId: $workoutId, pagination: $pagination) {
|
|
294
294
|
items { id workoutId name muscleGroup sets reps restSeconds targetWeight orderIndex instructions createdAt updatedAt workspaceId }
|
|
295
295
|
pageInfo { cursor hasMore }
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
`,
|
|
298
|
+
`,pe=`
|
|
299
299
|
query MybSessionSets($sessionId: ID!, $pagination: PaginationInput) {
|
|
300
300
|
mybSessionSets(sessionId: $sessionId, pagination: $pagination) {
|
|
301
301
|
items { id sessionId exerciseName setNumber reps weight distanceM durationSec isPersonalRecord createdAt updatedAt workspaceId }
|
|
302
302
|
pageInfo { cursor hasMore }
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
-
`,pe="query MybAiSettings { mybAiSettings { allowanceResetAt createdAt dailyAllowance dailyAllowanceUsed hasProviderKey id memberId modelName provider updatedAt workspaceId } }",ue="mutation MybUpdateAiSettings($input: MybUpdateAiSettingsInput!) { mybUpdateAiSettings(input: $input) { allowanceResetAt createdAt dailyAllowance dailyAllowanceUsed hasProviderKey id memberId modelName provider updatedAt workspaceId } }",me="query MybListAiOperationLogs($pagination: PaginationInput) { mybListAiOperationLogs(pagination: $pagination) { items { createdAt errorMessage id inputTokens memberId modelName operationType outputTokens provider status workspaceId } pageInfo { cursor hasMore } } }",ge="query MybTodayGuidance($memberId: ID) { mybTodayGuidance(memberId: $memberId) { aiSummary cards { action reason signal } date memberId readinessScore } }",le="query MybInsights($dateRangeEnd: DateTime, $dateRangeStart: DateTime, $memberId: ID) { mybInsights(dateRangeEnd: $dateRangeEnd, dateRangeStart: $dateRangeStart, memberId: $memberId) { daily { calories carbsG date fatG proteinG readiness sessions sleepHours volumeKg weight } dateRangeEnd dateRangeStart goals { achievedAt baselineValue createdAt currentValue description id memberId status targetDate targetValue title type unit updatedAt workspaceId } summary { averageReadiness consistencyStreakDays macroAdherencePercent totalSessions totalVolumeKg } } }",fe="query MybExerciseBestSet($exerciseName: String!) { mybExerciseBestSet(exerciseName: $exerciseName) { createdAt distanceM durationSec exerciseName id isPersonalRecord reps sessionId setNumber updatedAt weight workspaceId } }",ye="query MybSearchFoods($limit: Int, $query: String!) { mybSearchFoods(limit: $limit, query: $query) { barcode brand calories carbsG fatG imageUrl name proteinG servingG } }",be="query MybFoodByBarcode($barcode: String!) { mybFoodByBarcode(barcode: $barcode) { barcode brand calories carbsG fatG imageUrl name proteinG servingG } }",Ie="query MybListDeviceConnections($memberId: ID) { mybListDeviceConnections(memberId: $memberId) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }",he="mutation MybConnectDevice($input: MybConnectDeviceInput!) { mybConnectDevice(input: $input) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }",Ce="mutation MybDisconnectDevice($id: ID!) { mybDisconnectDevice(id: $id) }",we="mutation MybSyncDeviceReadings($connectionId: ID!, $readings: [MybSyncReadingInput!]!) { mybSyncDeviceReadings(connectionId: $connectionId, readings: $readings) { connectionId createdAt id metricType normalizedBodyMetricId normalizedRecoveryLogId recordedAt unit value } }",Ae="query MybListLegalAcceptances($actorId: ID, $checkpointType: MybLegalCheckpointType, $pagination: PaginationInput) { mybListLegalAcceptances(actorId: $actorId, checkpointType: $checkpointType, pagination: $pagination) { items { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } pageInfo { cursor hasMore } } }",Te="query MybMyLegalAcceptances($checkpointType: MybLegalCheckpointType, $pagination: PaginationInput) { mybMyLegalAcceptances(checkpointType: $checkpointType, pagination: $pagination) { items { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } pageInfo { cursor hasMore } } }",ke="mutation MybRecordLegalAcceptance($input: MybRecordLegalAcceptanceInput!) { mybRecordLegalAcceptance(input: $input) { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } }",Ee="query MybMyAiProcessingConsent { mybMyAiProcessingConsent { acceptedAt actorId createdAt enabled id updatedAt withdrawnAt workspaceId } }",Se="mutation MybSetAiProcessingConsent($enabled: Boolean!) { mybSetAiProcessingConsent(enabled: $enabled) { acceptedAt actorId createdAt enabled id updatedAt withdrawnAt workspaceId } }",Oe="mutation MybExportData($input: MybExportInput!) { mybExportData(input: $input) { createdAt entityTypes format id status } }";var g=class extends Error{exitCode;hint;constructor(o,i){super(o),this.name="CliUserError",this.exitCode=i?.exitCode??1,this.hint=i?.hint;}},w=class extends g{constructor(o,i){super(o,{exitCode:2,hint:i?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}};function f(c){return {async execWorkspace(o,i){if(!c.auth.isAuthenticated())throw new w(`Authentication required. Run \`${c.productName} auth login\`.`);return c.gql.workspace.request(o,i)},async execWorkspaceAuthOnly(o,i){return c.gql.workspaceAuthOnly.request(o,i)},formatAndOutput(o,i,d){c.output.formatAndOutput(o,i,d),c.output.getFormat(o)==="table"&&Ke(i)&&i.pageInfo.hasMore&&c.output.printInfo(`More results are available; continue with --cursor ${i.pageInfo.cursor??"(unavailable)"}.`);},handleCommandError(o){throw o instanceof w?o:new g(o instanceof Error?o.message:String(o))},printSuccess(o){c.output.printSuccess(o);},truncate(o,i){return c.output.truncate(o,i)},formatDate(o){return c.output.formatDate(o)}}}function Ke(c){if(typeof c!="object"||c===null||!("pageInfo"in c))return false;let o=c.pageInfo;return typeof o=="object"&&o!==null&&"hasMore"in o&&typeof o.hasMore=="boolean"&&"cursor"in o&&(typeof o.cursor=="string"||o.cursor===null)}function xe(c,o){try{return JSON.parse(o)}catch{throw new g(`--${c} must be valid JSON`)}}function a(c){let o=Number(c);if(!c.trim()||!Number.isSafeInteger(o))throw new g(`Expected an integer but got "${c}"`);return o}function y(c){let o=Number(c);if(!c.trim()||!Number.isFinite(o))throw new g(`Expected a number but got "${c}"`);return o}function k(c){return c.split(",").map(o=>o.trim()).filter(o=>o.length>0)}function Re(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u}=f(o),r=c.command("programs").description("Mybodyshield training programs");r.command("list").description("List training programs").option("--member <id>","Filter by member ID").option("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(S,{memberId:t.member,status:t.status?t.status.toUpperCase():void 0,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybListPrograms,{headers:["ID","Name","Goal","Level","Phase","Status"],rows:e.mybListPrograms.items.map(n=>[u(n.id,12),n.name,n.goalType,n.level,n.phase,n.status])});}catch(e){p(e);}}),r.command("get").description("Get a training program by id").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await i(O,{id:t});if(!n.mybProgram)throw new g(`Program ${t} not found`);d(e,n.mybProgram);}catch(n){p(n);}}),r.command("workouts").description("List workouts for a program").argument("<programId>","Program ID").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await i(D,{programId:t,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,n.mybProgramWorkouts,{headers:["ID","Name","Type","Day","Week","Duration"],rows:n.mybProgramWorkouts.items.map(s=>[u(s.id,12),s.name,s.type,s.dayOfWeek!=null?String(s.dayOfWeek):"-",s.weekNumber!=null?String(s.weekNumber):"-",s.durationMin!=null?String(s.durationMin):"-"])});}catch(n){p(n);}}),r.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",a).option("--days-per-week <n>","Days per week",a).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 t=>{try{let e={name:t.name};t.member&&(e.memberId=t.member),t.coach&&(e.coachId=t.coach),t.description&&(e.description=t.description),t.goalType&&(e.goalType=t.goalType.toUpperCase()),t.level&&(e.level=t.level.toUpperCase()),t.phase&&(e.phase=t.phase.toUpperCase()),t.weeks!==void 0&&(e.weeks=t.weeks),t.daysPerWeek!==void 0&&(e.daysPerWeek=t.daysPerWeek),t.startDate&&(e.startDate=t.startDate),t.endDate&&(e.endDate=t.endDate),t.tags&&(e.tags=k(t.tags));let n=await i(x,{input:e});m(`Program created: ${n.mybCreateProgram.name}`),d(t,n.mybCreateProgram);}catch(e){p(e);}}),r.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",a).option("--days-per-week <n>","Days per week",a).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(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.description!==void 0&&(n.description=e.description),e.goalType&&(n.goalType=e.goalType.toUpperCase()),e.level&&(n.level=e.level.toUpperCase()),e.phase&&(n.phase=e.phase.toUpperCase()),e.weeks!==void 0&&(n.weeks=e.weeks),e.daysPerWeek!==void 0&&(n.daysPerWeek=e.daysPerWeek),e.coach&&(n.coachId=e.coach),e.startDate&&(n.startDate=e.startDate),e.endDate&&(n.endDate=e.endDate),e.tags&&(n.tags=k(e.tags)),!Object.keys(n).length)throw new g("No updates specified");let s=await i(R,{id:t,input:n});m("Program updated"),d(e,s.mybUpdateProgram);}catch(n){p(n);}}),r.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(t,e)=>{try{let n=await i(v,{id:t,status:e.status.toUpperCase()});m(`Program transitioned to ${n.mybTransitionProgram.status}`),d(e,n.mybTransitionProgram);}catch(n){p(n);}}),r.command("archive").description("Archive a training program").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await i(M,{id:t});m(n.mybArchiveProgram?"Program archived":"Program not archived"),d(e,{archived:n.mybArchiveProgram});}catch(n){p(n);}});}function ve(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m}=f(o),u=c.command("workouts").description("Mybodyshield workouts & exercises");u.command("exercises").description("List exercises with continuation metadata").argument("<workoutId>","workoutId").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async(r,t)=>{try{let e=await i(ce,{workoutId:r,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybWorkoutExercises);}catch(e){p(e);}}),u.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)",a).option("--week-number <n>","Week number",a).option("--duration-min <n>","Duration (minutes)",a).option("--order-index <n>","Order index",a).option("-f, --format <format>","Output format").action(async r=>{try{let t={programId:r.program,name:r.name};r.description&&(t.description=r.description),r.type&&(t.type=r.type.toUpperCase()),r.dayOfWeek!==void 0&&(t.dayOfWeek=r.dayOfWeek),r.weekNumber!==void 0&&(t.weekNumber=r.weekNumber),r.durationMin!==void 0&&(t.durationMin=r.durationMin),r.orderIndex!==void 0&&(t.orderIndex=r.orderIndex);let e=await i(L,{input:t});m(`Workout added: ${e.mybAddWorkout.name}`),d(r,e.mybAddWorkout);}catch(t){p(t);}}),u.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",a).option("--reps <n>","Reps",a).option("--rest-seconds <n>","Rest (seconds)",a).option("--target-weight <n>","Target weight",y).option("--order-index <n>","Order index",a).option("--instructions <s>","Instructions").option("--demo-file-id <id>","Demo file ID").option("-f, --format <format>","Output format").action(async r=>{try{let t={workoutId:r.workout,name:r.name};r.muscleGroup&&(t.muscleGroup=r.muscleGroup.toUpperCase()),r.sets!==void 0&&(t.sets=r.sets),r.reps!==void 0&&(t.reps=r.reps),r.restSeconds!==void 0&&(t.restSeconds=r.restSeconds),r.targetWeight!==void 0&&(t.targetWeight=r.targetWeight),r.orderIndex!==void 0&&(t.orderIndex=r.orderIndex),r.instructions&&(t.instructions=r.instructions),r.demoFileId&&(t.demoFileId=r.demoFileId);let e=await i(P,{input:t});m(`Exercise added: ${e.mybAddExercise.name}`),d(r,e.mybAddExercise);}catch(t){p(t);}});}function Me(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u,formatDate:r}=f(o),t=c.command("sessions").description("Mybodyshield workout sessions");t.command("sets").description("List sets with continuation metadata").argument("<sessionId>","sessionId").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async(e,n)=>{try{let s=await i(de,{sessionId:e,pagination:{cursor:n.cursor,limit:n.limit,offset:n.offset}});d(n,s.mybSessionSets);}catch(s){p(s);}}),t.command("list").description("List workout sessions").option("--program <id>","Filter by program ID").option("--status <s>","SCHEDULED|IN_PROGRESS|COMPLETED|SKIPPED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await i(N,{programId:e.program,status:e.status?e.status.toUpperCase():void 0,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,n.mybListSessions,{headers:["ID","Member","Status","Scheduled","Started"],rows:n.mybListSessions.items.map(s=>[u(s.id,12),u(s.memberId,12),s.status,r(s.scheduledFor),r(s.startedAt)])});}catch(n){p(n);}}),t.command("get").description("Get a workout session by id").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(e,n)=>{try{let s=await i($,{id:e});if(!s.mybSession)throw new g(`Session ${e} not found`);d(n,s.mybSession);}catch(s){p(s);}}),t.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 n={};e.program&&(n.programId=e.program),e.workout&&(n.workoutId=e.workout),e.scheduledFor&&(n.scheduledFor=e.scheduledFor),e.notes&&(n.notes=e.notes);let s=await i(G,{input:n});m(`Session started: ${u(s.mybStartSession.id,12)}`),d(e,s.mybStartSession);}catch(n){p(n);}}),t.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",a).option("--reps <n>","Reps",a).option("--weight <n>","Weight",y).option("--distance-m <n>","Distance (meters)",y).option("--duration-sec <n>","Duration (seconds)",a).option("--personal-record","Mark as a personal record").option("-f, --format <format>","Output format").action(async e=>{try{let n={sessionId:e.session,exerciseName:e.exerciseName};e.setNumber!==void 0&&(n.setNumber=e.setNumber),e.reps!==void 0&&(n.reps=e.reps),e.weight!==void 0&&(n.weight=e.weight),e.distanceM!==void 0&&(n.distanceM=e.distanceM),e.durationSec!==void 0&&(n.durationSec=e.durationSec),e.personalRecord&&(n.isPersonalRecord=!0);let s=await i(_,{input:n});m(`Set logged for ${s.mybLogSet.exerciseName}`),d(e,s.mybLogSet);}catch(n){p(n);}}),t.command("complete").description("Complete a workout session").argument("<id>","Session ID").option("--calories-burned <n>","Calories burned",a).option("--perceived-exertion <n>","Perceived exertion (1-10)",a).option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async(e,n)=>{try{let s={};n.caloriesBurned!==void 0&&(s.caloriesBurned=n.caloriesBurned),n.perceivedExertion!==void 0&&(s.perceivedExertion=n.perceivedExertion),n.notes&&(s.notes=n.notes);let A=await i(q,{id:e,input:s});m("Session completed"),d(n,A.mybCompleteSession);}catch(s){p(s);}});}function Le(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u}=f(o),r=c.command("goals").description("Mybodyshield fitness goals");r.command("list").description("List fitness goals").option("--member <id>","Filter by member ID").option("--status <s>","ACTIVE|ACHIEVED|PAUSED|ABANDONED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(W,{memberId:t.member,status:t.status?t.status.toUpperCase():void 0,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybListGoals,{headers:["ID","Title","Type","Status","Current","Target"],rows:e.mybListGoals.items.map(n=>[u(n.id,12),n.title,n.type,n.status,`${n.currentValue??0}${n.unit?` ${n.unit}`:""}`,`${n.targetValue??0}${n.unit?` ${n.unit}`:""}`])});}catch(e){p(e);}}),r.command("get").description("Get a goal by id").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await i(U,{id:t});if(!n.mybGoal)throw new g(`Goal ${t} not found`);d(e,n.mybGoal);}catch(n){p(n);}}),r.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",y).option("--baseline-value <n>","Baseline value",y).option("--unit <u>","Unit").option("--target-date <iso>","Target date (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title};t.member&&(e.memberId=t.member),t.type&&(e.type=t.type.toUpperCase()),t.description&&(e.description=t.description),t.targetValue!==void 0&&(e.targetValue=t.targetValue),t.baselineValue!==void 0&&(e.baselineValue=t.baselineValue),t.unit&&(e.unit=t.unit),t.targetDate&&(e.targetDate=t.targetDate);let n=await i(F,{input:e});m(`Goal created: ${n.mybCreateGoal.title}`),d(t,n.mybCreateGoal);}catch(e){p(e);}}),r.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",y).option("--current-value <n>","Current value",y).option("--baseline-value <n>","Baseline value",y).option("--unit <u>","Unit").option("--target-date <iso>","Target date (ISO)").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.type&&(n.type=e.type.toUpperCase()),e.description!==void 0&&(n.description=e.description),e.targetValue!==void 0&&(n.targetValue=e.targetValue),e.currentValue!==void 0&&(n.currentValue=e.currentValue),e.baselineValue!==void 0&&(n.baselineValue=e.baselineValue),e.unit&&(n.unit=e.unit),e.targetDate&&(n.targetDate=e.targetDate),!Object.keys(n).length)throw new g("No updates specified");let s=await i(V,{id:t,input:n});m("Goal updated"),d(e,s.mybUpdateGoal);}catch(n){p(n);}}),r.command("achieve").description("Mark a goal as achieved").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await i(H,{id:t});m(`Goal achieved: ${n.mybAchieveGoal.title}`),d(e,n.mybAchieveGoal);}catch(n){p(n);}});}function Pe(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u,formatDate:r}=f(o),t=c.command("metrics").description("Mybodyshield body metrics");t.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("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await i(B,{memberId:e.member,type:e.type?e.type.toUpperCase():void 0,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,n.mybListBodyMetrics,{headers:["ID","Type","Value","Unit","Measured"],rows:n.mybListBodyMetrics.items.map(s=>[u(s.id,12),s.type,String(s.value),s.unit,r(s.measuredAt)])});}catch(n){p(n);}}),t.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",y).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 n={type:e.type.toUpperCase(),value:e.value};e.member&&(n.memberId=e.member),e.unit&&(n.unit=e.unit),e.measuredAt&&(n.measuredAt=e.measuredAt),e.notes&&(n.notes=e.notes),e.photoFileId&&(n.photoFileId=e.photoFileId);let s=await i(j,{input:n});m(`Metric recorded: ${s.mybRecordBodyMetric.type}`),d(e,s.mybRecordBodyMetric);}catch(n){p(n);}});}function Ne(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m}=f(o),u=c.command("nutrition").description("Mybodyshield nutrition plans");u.command("get").description("Get a nutrition plan by id").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(r,t)=>{try{let e=await i(Y,{id:r});if(!e.mybNutritionPlan)throw new g(`Nutrition plan ${r} not found`);d(t,e.mybNutritionPlan);}catch(e){p(e);}}),u.command("active").description("Get a member's active nutrition plan").option("--member <id>","Member ID").option("-f, --format <format>","Output format").action(async r=>{try{let t=await i(z,{memberId:r.member});if(!t.mybActiveNutritionPlan)throw new g("No active nutrition plan found");d(r,t.mybActiveNutritionPlan);}catch(t){p(t);}}),u.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 r=>{try{let t=await i(K,{memberId:r.member,date:r.date});d(r,t.mybDailyMacros);}catch(t){p(t);}}),u.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",a).option("--protein-target <n>","Protein target (g)",a).option("--carbs-target <n>","Carbs target (g)",a).option("--fat-target <n>","Fat target (g)",a).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 r=>{try{let t={name:r.name};r.member&&(t.memberId=r.member),r.coach&&(t.coachId=r.coach),r.goalType&&(t.goalType=r.goalType.toUpperCase()),r.calorieTarget!==void 0&&(t.calorieTarget=r.calorieTarget),r.proteinTarget!==void 0&&(t.proteinTarget=r.proteinTarget),r.carbsTarget!==void 0&&(t.carbsTarget=r.carbsTarget),r.fatTarget!==void 0&&(t.fatTarget=r.fatTarget),r.startDate&&(t.startDate=r.startDate),r.endDate&&(t.endDate=r.endDate),r.notes&&(t.notes=r.notes);let e=await i(J,{input:t});m(`Nutrition plan created: ${e.mybCreateNutritionPlan.name}`),d(r,e.mybCreateNutritionPlan);}catch(t){p(t);}}),u.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",a).option("--protein-target <n>","Protein target (g)",a).option("--carbs-target <n>","Carbs target (g)",a).option("--fat-target <n>","Fat target (g)",a).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(r,t)=>{try{let e={};if(t.name&&(e.name=t.name),t.goalType&&(e.goalType=t.goalType.toUpperCase()),t.calorieTarget!==void 0&&(e.calorieTarget=t.calorieTarget),t.proteinTarget!==void 0&&(e.proteinTarget=t.proteinTarget),t.carbsTarget!==void 0&&(e.carbsTarget=t.carbsTarget),t.fatTarget!==void 0&&(e.fatTarget=t.fatTarget),t.startDate&&(e.startDate=t.startDate),t.endDate&&(e.endDate=t.endDate),t.notes!==void 0&&(e.notes=t.notes),!Object.keys(e).length)throw new g("No updates specified");let n=await i(X,{id:r,input:e});m("Nutrition plan updated"),d(t,n.mybUpdateNutritionPlan);}catch(e){p(e);}}),u.command("activate").description("Activate a nutrition plan").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(r,t)=>{try{let e=await i(Q,{id:r});m(`Nutrition plan activated: ${e.mybActivateNutritionPlan.name}`),d(t,e.mybActivateNutritionPlan);}catch(e){p(e);}});}function $e(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u}=f(o),r=c.command("meals").description("Mybodyshield meal logs");r.command("list").description("List logged meals").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Filter by nutrition plan ID").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(Z,{mealType:t.mealType?t.mealType.toUpperCase():void 0,planId:t.plan,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybListMeals,{headers:["ID","Name","Meal","Calories","Protein"],rows:e.mybListMeals.items.map(n=>[u(n.id,12),n.name,n.mealType,String(n.calories??0),`${n.proteinG??0}g`])});}catch(e){p(e);}}),r.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",a).option("--protein-g <n>","Protein (g)",a).option("--carbs-g <n>","Carbs (g)",a).option("--fat-g <n>","Fat (g)",a).option("--servings <n>","Servings",y).option("--favorite","Mark as favorite").option("--logged-at <iso>","Logged at (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.mealType&&(e.mealType=t.mealType.toUpperCase()),t.plan&&(e.planId=t.plan),t.calories!==void 0&&(e.calories=t.calories),t.proteinG!==void 0&&(e.proteinG=t.proteinG),t.carbsG!==void 0&&(e.carbsG=t.carbsG),t.fatG!==void 0&&(e.fatG=t.fatG),t.servings!==void 0&&(e.servings=t.servings),t.favorite&&(e.isFavorite=!0),t.loggedAt&&(e.loggedAt=t.loggedAt);let n=await i(ee,{input:e});m(`Meal logged: ${n.mybLogMeal.name}`),d(t,n.mybLogMeal);}catch(e){p(e);}}),r.command("delete").description("Delete a logged meal").argument("<id>","Meal log ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await i(te,{id:t});m(n.mybDeleteMeal?"Meal deleted":"Meal not deleted"),d(e,{deleted:n.mybDeleteMeal});}catch(n){p(n);}});}function Ge(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u,formatDate:r}=f(o),t=c.command("recovery").description("Mybodyshield recovery logs");t.command("list").description("List recovery logs").option("--member <id>","Filter by member ID").option("--metric <m>","READINESS|SLEEP|SORENESS|STRESS|MOOD").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await i(ne,{memberId:e.member,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset},metric:e.metric?e.metric.toUpperCase():void 0});d(e,n.mybListRecoveryLogs,{headers:["ID","Metric","Score","Sleep (h)","Logged"],rows:n.mybListRecoveryLogs.items.map(s=>[u(s.id,12),s.metric,String(s.score),s.sleepHours!=null?String(s.sleepHours):"-",r(s.loggedAt)])});}catch(n){p(n);}}),t.command("log").description("Log a recovery metric").option("--member <id>","Member ID").option("--metric <m>","READINESS|SLEEP|SORENESS|STRESS|MOOD").option("--score <n>","Score",a).option("--sleep-hours <n>","Sleep hours",y).option("--notes <s>","Notes").option("--logged-at <iso>","Logged at (ISO)").option("-f, --format <format>","Output format").action(async e=>{try{let n={};e.member&&(n.memberId=e.member),e.metric&&(n.metric=e.metric.toUpperCase()),e.score!==void 0&&(n.score=e.score),e.sleepHours!==void 0&&(n.sleepHours=e.sleepHours),e.notes&&(n.notes=e.notes),e.loggedAt&&(n.loggedAt=e.loggedAt);let s=await i(re,{input:n});m(`Recovery logged: ${s.mybLogRecovery.metric}`),d(e,s.mybLogRecovery);}catch(n){p(n);}});}function _e(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u}=f(o),r=c.command("coaching").description("Mybodyshield coaching relationships");r.command("list").description("List coaching relationships").option("--member <id>","Filter by member ID").option("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(oe,{memberId:t.member,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0});d(t,e.mybListCoaching,{headers:["ID","Coach","Member","Status","Specialty"],rows:e.mybListCoaching.items.map(n=>[u(n.id,12),u(n.coachId,12),u(n.memberId,12),n.status,n.specialty??"-"])});}catch(e){p(e);}}),r.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 t=>{try{let e={coachId:t.coach,memberId:t.member};t.specialty&&(e.specialty=t.specialty),t.shareWorkouts&&(e.shareWorkouts=!0),t.shareNutrition&&(e.shareNutrition=!0),t.shareMetrics&&(e.shareMetrics=!0);let n=await i(ie,{input:e});m("Coaching relationship created"),d(t,n.mybCreateCoaching);}catch(e){p(e);}}),r.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(t,e)=>{try{let n=await i(se,{id:t,status:e.status.toUpperCase()});m(`Coaching transitioned to ${n.mybTransitionCoaching.status}`),d(e,n.mybTransitionCoaching);}catch(n){p(n);}});}function qe(c,o){let{execWorkspaceAuthOnly:i,formatAndOutput:d,handleCommandError:p,printSuccess:m}=f(o);c.command("health").description("Mybodyshield service health check (public)").option("-f, --format <format>","Output format").action(async u=>{try{let r=await i(ae);m(r.mybHealth),d(u,{health:r.mybHealth});}catch(r){p(r);}});}var Xe=[{group:"ai",command:"settings",document:pe,field:"mybAiSettings",variables:[]},{group:"ai",command:"update-settings",document:ue,field:"mybUpdateAiSettings",variables:[{name:"input",type:"MybUpdateAiSettingsInput!"}]},{group:"ai",command:"operation-logs",document:me,field:"mybListAiOperationLogs",variables:[{name:"pagination",type:"PaginationInput"}]},{group:"wellbeing",command:"guidance",document:ge,field:"mybTodayGuidance",variables:[{name:"memberId",type:"ID"}]},{group:"wellbeing",command:"insights",document:le,field:"mybInsights",variables:[{name:"dateRangeEnd",type:"DateTime"},{name:"dateRangeStart",type:"DateTime"},{name:"memberId",type:"ID"}]},{group:"performance",command:"best-set",document:fe,field:"mybExerciseBestSet",variables:[{name:"exerciseName",type:"String!"}]},{group:"foods",command:"search",document:ye,field:"mybSearchFoods",variables:[{name:"limit",type:"Int"},{name:"query",type:"String!"}]},{group:"foods",command:"barcode",document:be,field:"mybFoodByBarcode",variables:[{name:"barcode",type:"String!"}]},{group:"devices",command:"list",document:Ie,field:"mybListDeviceConnections",variables:[{name:"memberId",type:"ID"}]},{group:"devices",command:"connect",document:he,field:"mybConnectDevice",variables:[{name:"input",type:"MybConnectDeviceInput!"}]},{group:"devices",command:"disconnect",document:Ce,field:"mybDisconnectDevice",variables:[{name:"id",type:"ID!"}]},{group:"devices",command:"sync",document:we,field:"mybSyncDeviceReadings",variables:[{name:"connectionId",type:"ID!"},{name:"readings",type:"[MybSyncReadingInput!]!"}]},{group:"legal",command:"list",document:Ae,field:"mybListLegalAcceptances",variables:[{name:"actorId",type:"ID"},{name:"checkpointType",type:"MybLegalCheckpointType"},{name:"pagination",type:"PaginationInput"}]},{group:"legal",command:"mine",document:Te,field:"mybMyLegalAcceptances",variables:[{name:"checkpointType",type:"MybLegalCheckpointType"},{name:"pagination",type:"PaginationInput"}]},{group:"legal",command:"record",document:ke,field:"mybRecordLegalAcceptance",variables:[{name:"input",type:"MybRecordLegalAcceptanceInput!"}]},{group:"privacy",command:"consent",document:Ee,field:"mybMyAiProcessingConsent",variables:[]},{group:"privacy",command:"set-consent",document:Se,field:"mybSetAiProcessingConsent",variables:[{name:"enabled",type:"Boolean!"}]},{group:"privacy",command:"export",document:Oe,field:"mybExportData",variables:[{name:"input",type:"MybExportInput!"}]}],T=c=>c.replace(/[A-Z]/g,o=>"-"+o.toLowerCase());function We(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p}=f(o),m=new Map;for(let u of Xe){let r=m.get(u.group);r||(r=c.command(u.group).description("MyBodyShield "+u.group),m.set(u.group,r));let t=r.command(u.command).description("Call "+u.field+" through the workspace gateway");for(let e of u.variables){let n=T(e.name),A=e.type.replace(/[![\]]/g,"").endsWith("Input"),b="--"+n+(A?"-file":"")+" <value>",C=A?e.type+" JSON file; keep secret-bearing files private":e.type;e.type.endsWith("!")?t.requiredOption(b,C):t.option(b,C);}t.option("-f, --format <format>","Output format").action(async e=>{try{let n={};for(let b of u.variables){let C=b.type.replace(/[![\]]/g,""),E=C.endsWith("Input"),h=e[b.name+(E?"File":"")];if(h!==void 0){if(typeof h!="string")throw new g("Invalid option "+T(b.name));if(E)n[b.name]=xe(T(b.name),fs.readFileSync(h,"utf8"));else if(C==="Int")n[b.name]=a(h);else if(C==="Float")n[b.name]=y(h);else if(C==="Boolean"){if(h!=="true"&&h!=="false")throw new g("--"+T(b.name)+" must be true or false");n[b.name]=h==="true";}else n[b.name]=h;}}let s=await i(u.document,n),A=typeof e.format=="string"?e.format:void 0;d({format:A},s[u.field]);}catch(n){p(n);}});}}var Qe={id:"mybodyshield",version:"1.0.0",displayName:"Mybodyshield",dependsOn:["auth","workspaces"],register(c,o){let i=c.command("mybodyshield").description("Mybodyshield fitness coaching platform");Re(i,o),ve(i,o),Me(i,o),Le(i,o),Pe(i,o),Ne(i,o),$e(i,o),Ge(i,o),_e(i,o),qe(i,o),We(i,o);}},tr=Qe;module.exports=tr;
|
|
305
|
+
`,ue="query MybAiSettings { mybAiSettings { allowanceResetAt createdAt dailyAllowance dailyAllowanceUsed hasProviderKey id memberId modelName provider updatedAt workspaceId } }",me="mutation MybUpdateAiSettings($input: MybUpdateAiSettingsInput!) { mybUpdateAiSettings(input: $input) { allowanceResetAt createdAt dailyAllowance dailyAllowanceUsed hasProviderKey id memberId modelName provider updatedAt workspaceId } }",ge="query MybListAiOperationLogs($pagination: PaginationInput) { mybListAiOperationLogs(pagination: $pagination) { items { createdAt errorMessage id inputTokens memberId modelName operationType outputTokens provider status workspaceId } pageInfo { cursor hasMore } } }",le="query MybTodayGuidance($memberId: ID) { mybTodayGuidance(memberId: $memberId) { aiSummary cards { action reason signal } date memberId readinessScore } }",fe="query MybInsights($dateRangeEnd: DateTime, $dateRangeStart: DateTime, $memberId: ID) { mybInsights(dateRangeEnd: $dateRangeEnd, dateRangeStart: $dateRangeStart, memberId: $memberId) { daily { calories carbsG date fatG proteinG readiness sessions sleepHours volumeKg weight } dateRangeEnd dateRangeStart goals { achievedAt baselineValue createdAt currentValue description id memberId status targetDate targetValue title type unit updatedAt workspaceId } summary { averageReadiness consistencyStreakDays macroAdherencePercent totalSessions totalVolumeKg } } }",ye="query MybExerciseBestSet($exerciseName: String!) { mybExerciseBestSet(exerciseName: $exerciseName) { createdAt distanceM durationSec exerciseName id isPersonalRecord reps sessionId setNumber updatedAt weight workspaceId } }",be="query MybSearchFoods($limit: Int, $query: String!) { mybSearchFoods(limit: $limit, query: $query) { barcode brand calories carbsG fatG imageUrl name proteinG servingG } }",Ie="query MybFoodByBarcode($barcode: String!) { mybFoodByBarcode(barcode: $barcode) { barcode brand calories carbsG fatG imageUrl name proteinG servingG } }",he="query MybListDeviceConnections($memberId: ID) { mybListDeviceConnections(memberId: $memberId) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }",Ce="mutation MybConnectDevice($input: MybConnectDeviceInput!) { mybConnectDevice(input: $input) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }",we="mutation MybDisconnectDevice($id: ID!) { mybDisconnectDevice(id: $id) }",Ae="mutation MybSyncDeviceReadings($connectionId: ID!, $readings: [MybSyncReadingInput!]!) { mybSyncDeviceReadings(connectionId: $connectionId, readings: $readings) { connectionId createdAt id metricType normalizedBodyMetricId normalizedRecoveryLogId recordedAt unit value } }",Te="query MybListLegalAcceptances($actorId: ID, $checkpointType: MybLegalCheckpointType, $pagination: PaginationInput) { mybListLegalAcceptances(actorId: $actorId, checkpointType: $checkpointType, pagination: $pagination) { items { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } pageInfo { cursor hasMore } } }",Ee="query MybMyLegalAcceptances($checkpointType: MybLegalCheckpointType, $pagination: PaginationInput) { mybMyLegalAcceptances(checkpointType: $checkpointType, pagination: $pagination) { items { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } pageInfo { cursor hasMore } } }",ke="mutation MybRecordLegalAcceptance($input: MybRecordLegalAcceptanceInput!) { mybRecordLegalAcceptance(input: $input) { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } }",Se="query MybMyAiProcessingConsent { mybMyAiProcessingConsent { acceptedAt actorId createdAt enabled id updatedAt withdrawnAt workspaceId } }",Oe="mutation MybSetAiProcessingConsent($enabled: Boolean!) { mybSetAiProcessingConsent(enabled: $enabled) { acceptedAt actorId createdAt enabled id updatedAt withdrawnAt workspaceId } }",De="mutation MybExportData($input: MybExportInput!) { mybExportData(input: $input) { createdAt entityTypes format id status } }";var g=class extends Error{exitCode;hint;constructor(o,i){super(o),this.name="CliUserError",this.exitCode=i?.exitCode??1,this.hint=i?.hint;}},C=class extends g{constructor(o,i){super(o,{exitCode:2,hint:i?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}};function f(c){return {async execWorkspace(o,i){if(!c.auth.isAuthenticated())throw new C(`Authentication required. Run \`${c.productName} auth login\`.`);return c.gql.workspace.request(o,i)},async execWorkspaceAuthOnly(o,i){return c.gql.workspaceAuthOnly.request(o,i)},formatAndOutput(o,i,d){c.output.formatAndOutput(o,i,d),c.output.getFormat(o)==="table"&&Ke(i)&&i.pageInfo.hasMore&&c.output.printInfo(`More results are available; continue with --cursor ${i.pageInfo.cursor??"(unavailable)"}.`);},handleCommandError(o){throw o instanceof C?o:new g(o instanceof Error?o.message:String(o))},printSuccess(o){c.output.printSuccess(o);},truncate(o,i){return c.output.truncate(o,i)},formatDate(o){return c.output.formatDate(o)}}}function Ke(c){if(typeof c!="object"||c===null||!("pageInfo"in c))return false;let o=c.pageInfo;return typeof o=="object"&&o!==null&&"hasMore"in o&&typeof o.hasMore=="boolean"&&"cursor"in o&&(typeof o.cursor=="string"||o.cursor===null)}function xe(c,o){try{return JSON.parse(o)}catch{throw new g(`--${c} must be valid JSON`)}}function a(c){let o=Number(c);if(!c.trim()||!Number.isSafeInteger(o))throw new g(`Expected an integer but got "${c}"`);return o}function y(c){let o=Number(c);if(!c.trim()||!Number.isFinite(o))throw new g(`Expected a number but got "${c}"`);return o}function k(c){return c.split(",").map(o=>o.trim()).filter(o=>o.length>0)}function Re(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u}=f(o),r=c.command("programs").description("Mybodyshield training programs");r.command("list").description("List training programs").option("--member <id>","Filter by member ID").option("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(O,{memberId:t.member,status:t.status?t.status.toUpperCase():void 0,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybListPrograms,{headers:["ID","Name","Goal","Level","Phase","Status"],rows:e.mybListPrograms.items.map(n=>[u(n.id,12),n.name,n.goalType,n.level,n.phase,n.status])});}catch(e){p(e);}}),r.command("get").description("Get a training program by id").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await i(D,{id:t});if(!n.mybProgram)throw new g(`Program ${t} not found`);d(e,n.mybProgram);}catch(n){p(n);}}),r.command("workouts").description("List workouts for a program").argument("<programId>","Program ID").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await i(x,{programId:t,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,n.mybProgramWorkouts,{headers:["ID","Name","Type","Day","Week","Duration"],rows:n.mybProgramWorkouts.items.map(s=>[u(s.id,12),s.name,s.type,s.dayOfWeek!=null?String(s.dayOfWeek):"-",s.weekNumber!=null?String(s.weekNumber):"-",s.durationMin!=null?String(s.durationMin):"-"])});}catch(n){p(n);}}),r.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",a).option("--days-per-week <n>","Days per week",a).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 t=>{try{let e={name:t.name};t.member&&(e.memberId=t.member),t.coach&&(e.coachId=t.coach),t.description&&(e.description=t.description),t.goalType&&(e.goalType=t.goalType.toUpperCase()),t.level&&(e.level=t.level.toUpperCase()),t.phase&&(e.phase=t.phase.toUpperCase()),t.weeks!==void 0&&(e.weeks=t.weeks),t.daysPerWeek!==void 0&&(e.daysPerWeek=t.daysPerWeek),t.startDate&&(e.startDate=t.startDate),t.endDate&&(e.endDate=t.endDate),t.tags&&(e.tags=k(t.tags));let n=await i(R,{input:e});m(`Program created: ${n.mybCreateProgram.name}`),d(t,n.mybCreateProgram);}catch(e){p(e);}}),r.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",a).option("--days-per-week <n>","Days per week",a).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(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.description!==void 0&&(n.description=e.description),e.goalType&&(n.goalType=e.goalType.toUpperCase()),e.level&&(n.level=e.level.toUpperCase()),e.phase&&(n.phase=e.phase.toUpperCase()),e.weeks!==void 0&&(n.weeks=e.weeks),e.daysPerWeek!==void 0&&(n.daysPerWeek=e.daysPerWeek),e.coach&&(n.coachId=e.coach),e.startDate&&(n.startDate=e.startDate),e.endDate&&(n.endDate=e.endDate),e.tags&&(n.tags=k(e.tags)),!Object.keys(n).length)throw new g("No updates specified");let s=await i(v,{id:t,input:n});m("Program updated"),d(e,s.mybUpdateProgram);}catch(n){p(n);}}),r.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(t,e)=>{try{let n=await i(M,{id:t,status:e.status.toUpperCase()});m(`Program transitioned to ${n.mybTransitionProgram.status}`),d(e,n.mybTransitionProgram);}catch(n){p(n);}}),r.command("archive").description("Archive a training program").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await i(L,{id:t});m(n.mybArchiveProgram?"Program archived":"Program not archived"),d(e,{archived:n.mybArchiveProgram});}catch(n){p(n);}});}function ve(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m}=f(o),u=c.command("workouts").description("Mybodyshield workouts & exercises");u.command("exercises").description("List exercises with continuation metadata").argument("<workoutId>","workoutId").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async(r,t)=>{try{let e=await i(de,{workoutId:r,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybWorkoutExercises);}catch(e){p(e);}}),u.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)",a).option("--week-number <n>","Week number",a).option("--duration-min <n>","Duration (minutes)",a).option("--order-index <n>","Order index",a).option("-f, --format <format>","Output format").action(async r=>{try{let t={programId:r.program,name:r.name};r.description&&(t.description=r.description),r.type&&(t.type=r.type.toUpperCase()),r.dayOfWeek!==void 0&&(t.dayOfWeek=r.dayOfWeek),r.weekNumber!==void 0&&(t.weekNumber=r.weekNumber),r.durationMin!==void 0&&(t.durationMin=r.durationMin),r.orderIndex!==void 0&&(t.orderIndex=r.orderIndex);let e=await i(N,{input:t});m(`Workout added: ${e.mybAddWorkout.name}`),d(r,e.mybAddWorkout);}catch(t){p(t);}}),u.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",a).option("--reps <n>","Reps",a).option("--rest-seconds <n>","Rest (seconds)",a).option("--target-weight <n>","Target weight",y).option("--order-index <n>","Order index",a).option("--instructions <s>","Instructions").option("--demo-file-id <id>","Demo file ID").option("-f, --format <format>","Output format").action(async r=>{try{let t={workoutId:r.workout,name:r.name};r.muscleGroup&&(t.muscleGroup=r.muscleGroup.toUpperCase()),r.sets!==void 0&&(t.sets=r.sets),r.reps!==void 0&&(t.reps=r.reps),r.restSeconds!==void 0&&(t.restSeconds=r.restSeconds),r.targetWeight!==void 0&&(t.targetWeight=r.targetWeight),r.orderIndex!==void 0&&(t.orderIndex=r.orderIndex),r.instructions&&(t.instructions=r.instructions),r.demoFileId&&(t.demoFileId=r.demoFileId);let e=await i(P,{input:t});m(`Exercise added: ${e.mybAddExercise.name}`),d(r,e.mybAddExercise);}catch(t){p(t);}});}function Me(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u,formatDate:r}=f(o),t=c.command("sessions").description("Mybodyshield workout sessions");t.command("sets").description("List sets with continuation metadata").argument("<sessionId>","sessionId").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async(e,n)=>{try{let s=await i(pe,{sessionId:e,pagination:{cursor:n.cursor,limit:n.limit,offset:n.offset}});d(n,s.mybSessionSets);}catch(s){p(s);}}),t.command("list").description("List workout sessions").option("--program <id>","Filter by program ID").option("--status <s>","SCHEDULED|IN_PROGRESS|COMPLETED|SKIPPED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await i($,{programId:e.program,status:e.status?e.status.toUpperCase():void 0,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,n.mybListSessions,{headers:["ID","Member","Status","Scheduled","Started"],rows:n.mybListSessions.items.map(s=>[u(s.id,12),u(s.memberId,12),s.status,r(s.scheduledFor),r(s.startedAt)])});}catch(n){p(n);}}),t.command("get").description("Get a workout session by id").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(e,n)=>{try{let s=await i(G,{id:e});if(!s.mybSession)throw new g(`Session ${e} not found`);d(n,s.mybSession);}catch(s){p(s);}}),t.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 n={};e.program&&(n.programId=e.program),e.workout&&(n.workoutId=e.workout),e.scheduledFor&&(n.scheduledFor=e.scheduledFor),e.notes&&(n.notes=e.notes);let s=await i(_,{input:n});m(`Session started: ${u(s.mybStartSession.id,12)}`),d(e,s.mybStartSession);}catch(n){p(n);}}),t.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",a).option("--reps <n>","Reps",a).option("--weight <n>","Weight",y).option("--distance-m <n>","Distance (meters)",y).option("--duration-sec <n>","Duration (seconds)",a).option("--personal-record","Mark as a personal record").option("-f, --format <format>","Output format").action(async e=>{try{let n={sessionId:e.session,exerciseName:e.exerciseName};e.setNumber!==void 0&&(n.setNumber=e.setNumber),e.reps!==void 0&&(n.reps=e.reps),e.weight!==void 0&&(n.weight=e.weight),e.distanceM!==void 0&&(n.distanceM=e.distanceM),e.durationSec!==void 0&&(n.durationSec=e.durationSec),e.personalRecord&&(n.isPersonalRecord=!0);let s=await i(q,{input:n});m(`Set logged for ${s.mybLogSet.exerciseName}`),d(e,s.mybLogSet);}catch(n){p(n);}}),t.command("complete").description("Complete a workout session").argument("<id>","Session ID").option("--calories-burned <n>","Calories burned",a).option("--perceived-exertion <n>","Perceived exertion (1-10)",a).option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async(e,n)=>{try{let s={};n.caloriesBurned!==void 0&&(s.caloriesBurned=n.caloriesBurned),n.perceivedExertion!==void 0&&(s.perceivedExertion=n.perceivedExertion),n.notes&&(s.notes=n.notes);let A=await i(U,{id:e,input:s});m("Session completed"),d(n,A.mybCompleteSession);}catch(s){p(s);}});}function Le(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u}=f(o),r=c.command("goals").description("Mybodyshield fitness goals");r.command("list").description("List fitness goals").option("--member <id>","Filter by member ID").option("--status <s>","ACTIVE|ACHIEVED|PAUSED|ABANDONED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(W,{memberId:t.member,status:t.status?t.status.toUpperCase():void 0,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybListGoals,{headers:["ID","Title","Type","Status","Current","Target"],rows:e.mybListGoals.items.map(n=>[u(n.id,12),n.title,n.type,n.status,`${n.currentValue??0}${n.unit?` ${n.unit}`:""}`,`${n.targetValue??0}${n.unit?` ${n.unit}`:""}`])});}catch(e){p(e);}}),r.command("get").description("Get a goal by id").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await i(F,{id:t});if(!n.mybGoal)throw new g(`Goal ${t} not found`);d(e,n.mybGoal);}catch(n){p(n);}}),r.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",y).option("--baseline-value <n>","Baseline value",y).option("--unit <u>","Unit").option("--target-date <iso>","Target date (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title};t.member&&(e.memberId=t.member),t.type&&(e.type=t.type.toUpperCase()),t.description&&(e.description=t.description),t.targetValue!==void 0&&(e.targetValue=t.targetValue),t.baselineValue!==void 0&&(e.baselineValue=t.baselineValue),t.unit&&(e.unit=t.unit),t.targetDate&&(e.targetDate=t.targetDate);let n=await i(V,{input:e});m(`Goal created: ${n.mybCreateGoal.title}`),d(t,n.mybCreateGoal);}catch(e){p(e);}}),r.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",y).option("--current-value <n>","Current value",y).option("--baseline-value <n>","Baseline value",y).option("--unit <u>","Unit").option("--target-date <iso>","Target date (ISO)").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.type&&(n.type=e.type.toUpperCase()),e.description!==void 0&&(n.description=e.description),e.targetValue!==void 0&&(n.targetValue=e.targetValue),e.currentValue!==void 0&&(n.currentValue=e.currentValue),e.baselineValue!==void 0&&(n.baselineValue=e.baselineValue),e.unit&&(n.unit=e.unit),e.targetDate&&(n.targetDate=e.targetDate),!Object.keys(n).length)throw new g("No updates specified");let s=await i(H,{id:t,input:n});m("Goal updated"),d(e,s.mybUpdateGoal);}catch(n){p(n);}}),r.command("achieve").description("Mark a goal as achieved").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await i(B,{id:t});m(`Goal achieved: ${n.mybAchieveGoal.title}`),d(e,n.mybAchieveGoal);}catch(n){p(n);}});}function Ne(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u,formatDate:r}=f(o),t=c.command("metrics").description("Mybodyshield body metrics");t.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("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await i(j,{memberId:e.member,type:e.type?e.type.toUpperCase():void 0,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,n.mybListBodyMetrics,{headers:["ID","Type","Value","Unit","Measured"],rows:n.mybListBodyMetrics.items.map(s=>[u(s.id,12),s.type,String(s.value),s.unit,r(s.measuredAt)])});}catch(n){p(n);}}),t.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",y).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 n={type:e.type.toUpperCase(),value:e.value};e.member&&(n.memberId=e.member),e.unit&&(n.unit=e.unit),e.measuredAt&&(n.measuredAt=e.measuredAt),e.notes&&(n.notes=e.notes),e.photoFileId&&(n.photoFileId=e.photoFileId);let s=await i(Y,{input:n});m(`Metric recorded: ${s.mybRecordBodyMetric.type}`),d(e,s.mybRecordBodyMetric);}catch(n){p(n);}});}function Pe(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m}=f(o),u=c.command("nutrition").description("Mybodyshield nutrition plans");u.command("get").description("Get a nutrition plan by id").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(r,t)=>{try{let e=await i(z,{id:r});if(!e.mybNutritionPlan)throw new g(`Nutrition plan ${r} not found`);d(t,e.mybNutritionPlan);}catch(e){p(e);}}),u.command("active").description("Get a member's active nutrition plan").option("--member <id>","Member ID").option("-f, --format <format>","Output format").action(async r=>{try{let t=await i(K,{memberId:r.member});if(!t.mybActiveNutritionPlan)throw new g("No active nutrition plan found");d(r,t.mybActiveNutritionPlan);}catch(t){p(t);}}),u.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 r=>{try{let t=await i(J,{memberId:r.member,date:r.date});d(r,t.mybDailyMacros);}catch(t){p(t);}}),u.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",a).option("--protein-target <n>","Protein target (g)",a).option("--carbs-target <n>","Carbs target (g)",a).option("--fat-target <n>","Fat target (g)",a).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 r=>{try{let t={name:r.name};r.member&&(t.memberId=r.member),r.coach&&(t.coachId=r.coach),r.goalType&&(t.goalType=r.goalType.toUpperCase()),r.calorieTarget!==void 0&&(t.calorieTarget=r.calorieTarget),r.proteinTarget!==void 0&&(t.proteinTarget=r.proteinTarget),r.carbsTarget!==void 0&&(t.carbsTarget=r.carbsTarget),r.fatTarget!==void 0&&(t.fatTarget=r.fatTarget),r.startDate&&(t.startDate=r.startDate),r.endDate&&(t.endDate=r.endDate),r.notes&&(t.notes=r.notes);let e=await i(Q,{input:t});m(`Nutrition plan created: ${e.mybCreateNutritionPlan.name}`),d(r,e.mybCreateNutritionPlan);}catch(t){p(t);}}),u.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",a).option("--protein-target <n>","Protein target (g)",a).option("--carbs-target <n>","Carbs target (g)",a).option("--fat-target <n>","Fat target (g)",a).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(r,t)=>{try{let e={};if(t.name&&(e.name=t.name),t.goalType&&(e.goalType=t.goalType.toUpperCase()),t.calorieTarget!==void 0&&(e.calorieTarget=t.calorieTarget),t.proteinTarget!==void 0&&(e.proteinTarget=t.proteinTarget),t.carbsTarget!==void 0&&(e.carbsTarget=t.carbsTarget),t.fatTarget!==void 0&&(e.fatTarget=t.fatTarget),t.startDate&&(e.startDate=t.startDate),t.endDate&&(e.endDate=t.endDate),t.notes!==void 0&&(e.notes=t.notes),!Object.keys(e).length)throw new g("No updates specified");let n=await i(X,{id:r,input:e});m("Nutrition plan updated"),d(t,n.mybUpdateNutritionPlan);}catch(e){p(e);}}),u.command("activate").description("Activate a nutrition plan").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(r,t)=>{try{let e=await i(Z,{id:r});m(`Nutrition plan activated: ${e.mybActivateNutritionPlan.name}`),d(t,e.mybActivateNutritionPlan);}catch(e){p(e);}});}function $e(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u}=f(o),r=c.command("meals").description("Mybodyshield meal logs");r.command("list").description("List logged meals").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Filter by nutrition plan ID").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(ee,{mealType:t.mealType?t.mealType.toUpperCase():void 0,planId:t.plan,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybListMeals,{headers:["ID","Name","Meal","Calories","Protein"],rows:e.mybListMeals.items.map(n=>[u(n.id,12),n.name,n.mealType,String(n.calories??0),`${n.proteinG??0}g`])});}catch(e){p(e);}}),r.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",a).option("--protein-g <n>","Protein (g)",a).option("--carbs-g <n>","Carbs (g)",a).option("--fat-g <n>","Fat (g)",a).option("--servings <n>","Servings",y).option("--favorite","Mark as favorite").option("--logged-at <iso>","Logged at (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.mealType&&(e.mealType=t.mealType.toUpperCase()),t.plan&&(e.planId=t.plan),t.calories!==void 0&&(e.calories=t.calories),t.proteinG!==void 0&&(e.proteinG=t.proteinG),t.carbsG!==void 0&&(e.carbsG=t.carbsG),t.fatG!==void 0&&(e.fatG=t.fatG),t.servings!==void 0&&(e.servings=t.servings),t.favorite&&(e.isFavorite=!0),t.loggedAt&&(e.loggedAt=t.loggedAt);let n=await i(te,{input:e});m(`Meal logged: ${n.mybLogMeal.name}`),d(t,n.mybLogMeal);}catch(e){p(e);}}),r.command("delete").description("Delete a logged meal").argument("<id>","Meal log ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await i(ne,{id:t});m(n.mybDeleteMeal?"Meal deleted":"Meal not deleted"),d(e,{deleted:n.mybDeleteMeal});}catch(n){p(n);}});}function Ge(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u,formatDate:r}=f(o),t=c.command("recovery").description("Mybodyshield recovery logs");t.command("list").description("List recovery logs").option("--member <id>","Filter by member ID").option("--metric <m>","READINESS|SLEEP|SORENESS|STRESS|MOOD").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=await i(re,{memberId:e.member,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset},metric:e.metric?e.metric.toUpperCase():void 0});d(e,n.mybListRecoveryLogs,{headers:["ID","Metric","Score","Sleep (h)","Logged"],rows:n.mybListRecoveryLogs.items.map(s=>[u(s.id,12),s.metric,String(s.score),s.sleepHours!=null?String(s.sleepHours):"-",r(s.loggedAt)])});}catch(n){p(n);}}),t.command("log").description("Log a recovery metric").option("--member <id>","Member ID").option("--metric <m>","READINESS|SLEEP|SORENESS|STRESS|MOOD").option("--score <n>","Score",a).option("--sleep-hours <n>","Sleep hours",y).option("--notes <s>","Notes").option("--logged-at <iso>","Logged at (ISO)").option("-f, --format <format>","Output format").action(async e=>{try{let n={};e.member&&(n.memberId=e.member),e.metric&&(n.metric=e.metric.toUpperCase()),e.score!==void 0&&(n.score=e.score),e.sleepHours!==void 0&&(n.sleepHours=e.sleepHours),e.notes&&(n.notes=e.notes),e.loggedAt&&(n.loggedAt=e.loggedAt);let s=await i(oe,{input:n});m(`Recovery logged: ${s.mybLogRecovery.metric}`),d(e,s.mybLogRecovery);}catch(n){p(n);}});}function _e(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p,printSuccess:m,truncate:u}=f(o),r=c.command("coaching").description("Mybodyshield coaching relationships");r.command("list").description("List coaching relationships").option("--member <id>","Filter by member ID").option("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",a,50).option("--offset <n>","Offset",a,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(ie,{memberId:t.member,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0});d(t,e.mybListCoaching,{headers:["ID","Coach","Member","Status","Specialty"],rows:e.mybListCoaching.items.map(n=>[u(n.id,12),u(n.coachId,12),u(n.memberId,12),n.status,n.specialty??"-"])});}catch(e){p(e);}}),r.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 t=>{try{let e={coachId:t.coach,memberId:t.member};t.specialty&&(e.specialty=t.specialty),t.shareWorkouts&&(e.shareWorkouts=!0),t.shareNutrition&&(e.shareNutrition=!0),t.shareMetrics&&(e.shareMetrics=!0);let n=await i(se,{input:e});m("Coaching relationship created"),d(t,n.mybCreateCoaching);}catch(e){p(e);}}),r.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(t,e)=>{try{let n=await i(ae,{id:t,status:e.status.toUpperCase()});m(`Coaching transitioned to ${n.mybTransitionCoaching.status}`),d(e,n.mybTransitionCoaching);}catch(n){p(n);}});}function qe(c,o){let{execWorkspaceAuthOnly:i,formatAndOutput:d,handleCommandError:p,printSuccess:m}=f(o);c.command("health").description("Mybodyshield service health check (public)").option("-f, --format <format>","Output format").action(async u=>{try{let r=await i(ce);m(r.mybHealth),d(u,{health:r.mybHealth});}catch(r){p(r);}});}var Qe=[{group:"ai",command:"settings",document:ue,field:"mybAiSettings",variables:[]},{group:"ai",command:"update-settings",document:me,field:"mybUpdateAiSettings",variables:[{name:"input",type:"MybUpdateAiSettingsInput!"}]},{group:"ai",command:"operation-logs",document:ge,field:"mybListAiOperationLogs",variables:[{name:"pagination",type:"PaginationInput"}]},{group:"wellbeing",command:"guidance",document:le,field:"mybTodayGuidance",variables:[{name:"memberId",type:"ID"}]},{group:"wellbeing",command:"insights",document:fe,field:"mybInsights",variables:[{name:"dateRangeEnd",type:"DateTime"},{name:"dateRangeStart",type:"DateTime"},{name:"memberId",type:"ID"}]},{group:"performance",command:"best-set",document:ye,field:"mybExerciseBestSet",variables:[{name:"exerciseName",type:"String!"}]},{group:"foods",command:"search",document:be,field:"mybSearchFoods",variables:[{name:"limit",type:"Int"},{name:"query",type:"String!"}]},{group:"foods",command:"barcode",document:Ie,field:"mybFoodByBarcode",variables:[{name:"barcode",type:"String!"}]},{group:"devices",command:"list",document:he,field:"mybListDeviceConnections",variables:[{name:"memberId",type:"ID"}]},{group:"devices",command:"connect",document:Ce,field:"mybConnectDevice",variables:[{name:"input",type:"MybConnectDeviceInput!"}]},{group:"devices",command:"disconnect",document:we,field:"mybDisconnectDevice",variables:[{name:"id",type:"ID!"}]},{group:"devices",command:"sync",document:Ae,field:"mybSyncDeviceReadings",variables:[{name:"connectionId",type:"ID!"},{name:"readings",type:"[MybSyncReadingInput!]!"}]},{group:"legal",command:"list",document:Te,field:"mybListLegalAcceptances",variables:[{name:"actorId",type:"ID"},{name:"checkpointType",type:"MybLegalCheckpointType"},{name:"pagination",type:"PaginationInput"}]},{group:"legal",command:"mine",document:Ee,field:"mybMyLegalAcceptances",variables:[{name:"checkpointType",type:"MybLegalCheckpointType"},{name:"pagination",type:"PaginationInput"}]},{group:"legal",command:"record",document:ke,field:"mybRecordLegalAcceptance",variables:[{name:"input",type:"MybRecordLegalAcceptanceInput!"}]},{group:"privacy",command:"consent",document:Se,field:"mybMyAiProcessingConsent",variables:[]},{group:"privacy",command:"set-consent",document:Oe,field:"mybSetAiProcessingConsent",variables:[{name:"enabled",type:"Boolean!"}]},{group:"privacy",command:"export",document:De,field:"mybExportData",variables:[{name:"input",type:"MybExportInput!"}]}],T=c=>c.replace(/[A-Z]/g,o=>"-"+o.toLowerCase());function Ue(c,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:p}=f(o),m=new Map;for(let u of Qe){let r=m.get(u.group);r||(r=c.command(u.group).description("MyBodyShield "+u.group),m.set(u.group,r));let t=r.command(u.command).description("Call "+u.field+" through the workspace gateway");for(let e of u.variables){let n=T(e.name),A=e.type.replace(/[![\]]/g,"").endsWith("Input"),b="--"+n+(A?"-file":"")+" <value>",w=A?e.type+" JSON file; keep secret-bearing files private":e.type;e.type.endsWith("!")?t.requiredOption(b,w):t.option(b,w);}t.option("-f, --format <format>","Output format").action(async e=>{try{let n={};for(let b of u.variables){let w=b.type.replace(/[![\]]/g,""),S=w.endsWith("Input"),h=e[b.name+(S?"File":"")];if(h!==void 0){if(typeof h!="string")throw new g("Invalid option "+T(b.name));if(S)n[b.name]=xe(T(b.name),fs.readFileSync(h,"utf8"));else if(w==="Int")n[b.name]=a(h);else if(w==="Float")n[b.name]=y(h);else if(w==="Boolean"){if(h!=="true"&&h!=="false")throw new g("--"+T(b.name)+" must be true or false");n[b.name]=h==="true";}else n[b.name]=h;}}let s=await i(u.document,n),A=typeof e.format=="string"?e.format:void 0;d({format:A},s[u.field]);}catch(n){p(n);}});}}var Xe={id:"mybodyshield",version:"1.0.0",displayName:"Mybodyshield",dependsOn:["auth","workspaces"],register(c,o){let i=c.command("mybodyshield").description("Mybodyshield fitness coaching platform");Re(i,o),ve(i,o),Me(i,o),Le(i,o),Ne(i,o),Pe(i,o),$e(i,o),Ge(i,o),_e(i,o),qe(i,o),Ue(i,o);}},rr=Xe;module.exports=rr;
|