@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.
Files changed (242) hide show
  1. package/dist/chunk-BGNPGKJM.js +1 -0
  2. package/dist/{chunk-ASSY2L5R.js → chunk-E6F56R4K.js} +3 -3
  3. package/dist/chunk-N7EXKGE2.js +34 -0
  4. package/dist/core/index.cjs +9 -9
  5. package/dist/core/index.d.cts +2 -2
  6. package/dist/core/index.d.ts +2 -2
  7. package/dist/core/index.js +1 -1
  8. package/dist/index.cjs +9 -9
  9. package/dist/index.d.cts +1 -1
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/{module-BNVKV_pI.d.ts → module-DWSAfs3k.d.cts} +20 -19
  13. package/dist/{module-BNVKV_pI.d.cts → module-DWSAfs3k.d.ts} +20 -19
  14. package/dist/modules/adaptercloud/index.cjs +38 -38
  15. package/dist/modules/adaptercloud/index.d.cts +1 -1
  16. package/dist/modules/adaptercloud/index.d.ts +1 -1
  17. package/dist/modules/adaptercloud/index.js +2 -2
  18. package/dist/modules/artistrybase/index.cjs +50 -50
  19. package/dist/modules/artistrybase/index.d.cts +1 -1
  20. package/dist/modules/artistrybase/index.d.ts +1 -1
  21. package/dist/modules/artistrybase/index.js +2 -2
  22. package/dist/modules/assethandler/index.cjs +32 -32
  23. package/dist/modules/assethandler/index.d.cts +1 -1
  24. package/dist/modules/assethandler/index.d.ts +1 -1
  25. package/dist/modules/assethandler/index.js +2 -2
  26. package/dist/modules/atheletebridge/index.cjs +34 -34
  27. package/dist/modules/atheletebridge/index.d.cts +1 -1
  28. package/dist/modules/atheletebridge/index.d.ts +1 -1
  29. package/dist/modules/atheletebridge/index.js +2 -2
  30. package/dist/modules/auth/index.cjs +34 -34
  31. package/dist/modules/auth/index.d.cts +1 -1
  32. package/dist/modules/auth/index.d.ts +1 -1
  33. package/dist/modules/auth/index.js +4 -4
  34. package/dist/modules/billing/index.cjs +18 -18
  35. package/dist/modules/billing/index.d.cts +1 -1
  36. package/dist/modules/billing/index.d.ts +1 -1
  37. package/dist/modules/billing/index.js +2 -2
  38. package/dist/modules/brainyrich/index.cjs +45 -45
  39. package/dist/modules/brainyrich/index.d.cts +1 -1
  40. package/dist/modules/brainyrich/index.d.ts +1 -1
  41. package/dist/modules/brainyrich/index.js +2 -2
  42. package/dist/modules/buildmyiq/index.cjs +32 -32
  43. package/dist/modules/buildmyiq/index.d.cts +1 -1
  44. package/dist/modules/buildmyiq/index.d.ts +1 -1
  45. package/dist/modules/buildmyiq/index.js +2 -2
  46. package/dist/modules/channels/index.cjs +12 -12
  47. package/dist/modules/channels/index.d.cts +1 -1
  48. package/dist/modules/channels/index.d.ts +1 -1
  49. package/dist/modules/channels/index.js +2 -2
  50. package/dist/modules/collabkin/index.cjs +34 -34
  51. package/dist/modules/collabkin/index.d.cts +1 -1
  52. package/dist/modules/collabkin/index.d.ts +1 -1
  53. package/dist/modules/collabkin/index.js +2 -2
  54. package/dist/modules/comradecircle/index.cjs +41 -41
  55. package/dist/modules/comradecircle/index.d.cts +1 -1
  56. package/dist/modules/comradecircle/index.d.ts +1 -1
  57. package/dist/modules/comradecircle/index.js +2 -2
  58. package/dist/modules/conversations/index.cjs +32 -32
  59. package/dist/modules/conversations/index.d.cts +1 -1
  60. package/dist/modules/conversations/index.d.ts +1 -1
  61. package/dist/modules/conversations/index.js +2 -2
  62. package/dist/modules/coolandlovely/index.cjs +41 -41
  63. package/dist/modules/coolandlovely/index.d.cts +1 -1
  64. package/dist/modules/coolandlovely/index.d.ts +1 -1
  65. package/dist/modules/coolandlovely/index.js +2 -2
  66. package/dist/modules/cosmicintersection/index.cjs +43 -43
  67. package/dist/modules/cosmicintersection/index.d.cts +1 -1
  68. package/dist/modules/cosmicintersection/index.d.ts +1 -1
  69. package/dist/modules/cosmicintersection/index.js +2 -2
  70. package/dist/modules/crewfoundry/index.cjs +70 -70
  71. package/dist/modules/crewfoundry/index.d.cts +1 -1
  72. package/dist/modules/crewfoundry/index.d.ts +1 -1
  73. package/dist/modules/crewfoundry/index.js +2 -2
  74. package/dist/modules/devportal/index.cjs +23 -23
  75. package/dist/modules/devportal/index.d.cts +1 -1
  76. package/dist/modules/devportal/index.d.ts +1 -1
  77. package/dist/modules/devportal/index.js +2 -2
  78. package/dist/modules/ecoimpacthub/index.cjs +41 -41
  79. package/dist/modules/ecoimpacthub/index.d.cts +1 -1
  80. package/dist/modules/ecoimpacthub/index.d.ts +1 -1
  81. package/dist/modules/ecoimpacthub/index.js +2 -2
  82. package/dist/modules/eventfullymanaged/index.cjs +92 -92
  83. package/dist/modules/eventfullymanaged/index.d.cts +1 -1
  84. package/dist/modules/eventfullymanaged/index.d.ts +1 -1
  85. package/dist/modules/eventfullymanaged/index.js +2 -2
  86. package/dist/modules/export/index.cjs +14 -14
  87. package/dist/modules/export/index.d.cts +1 -1
  88. package/dist/modules/export/index.d.ts +1 -1
  89. package/dist/modules/export/index.js +2 -2
  90. package/dist/modules/files/index.cjs +11 -11
  91. package/dist/modules/files/index.d.cts +1 -1
  92. package/dist/modules/files/index.d.ts +1 -1
  93. package/dist/modules/files/index.js +2 -2
  94. package/dist/modules/fluidgrids/index.cjs +29 -29
  95. package/dist/modules/fluidgrids/index.d.cts +1 -1
  96. package/dist/modules/fluidgrids/index.d.ts +1 -1
  97. package/dist/modules/fluidgrids/index.js +3 -3
  98. package/dist/modules/ggnomad/index.cjs +21 -21
  99. package/dist/modules/ggnomad/index.d.cts +1 -1
  100. package/dist/modules/ggnomad/index.d.ts +1 -1
  101. package/dist/modules/ggnomad/index.js +2 -2
  102. package/dist/modules/govcitizenhub/index.cjs +35 -35
  103. package/dist/modules/govcitizenhub/index.d.cts +1 -1
  104. package/dist/modules/govcitizenhub/index.d.ts +1 -1
  105. package/dist/modules/govcitizenhub/index.js +2 -2
  106. package/dist/modules/groups/index.cjs +12 -12
  107. package/dist/modules/groups/index.d.cts +1 -1
  108. package/dist/modules/groups/index.d.ts +1 -1
  109. package/dist/modules/groups/index.js +2 -2
  110. package/dist/modules/headshotmarketing/index.cjs +165 -165
  111. package/dist/modules/headshotmarketing/index.d.cts +1 -1
  112. package/dist/modules/headshotmarketing/index.d.ts +1 -1
  113. package/dist/modules/headshotmarketing/index.js +2 -2
  114. package/dist/modules/health/index.d.cts +1 -1
  115. package/dist/modules/health/index.d.ts +1 -1
  116. package/dist/modules/hookmovies/index.cjs +43 -43
  117. package/dist/modules/hookmovies/index.d.cts +1 -1
  118. package/dist/modules/hookmovies/index.d.ts +1 -1
  119. package/dist/modules/hookmovies/index.js +2 -2
  120. package/dist/modules/housingvista/index.cjs +24 -24
  121. package/dist/modules/housingvista/index.d.cts +1 -1
  122. package/dist/modules/housingvista/index.d.ts +1 -1
  123. package/dist/modules/housingvista/index.js +2 -2
  124. package/dist/modules/integrations/index.cjs +27 -27
  125. package/dist/modules/integrations/index.d.cts +1 -1
  126. package/dist/modules/integrations/index.d.ts +1 -1
  127. package/dist/modules/integrations/index.js +2 -2
  128. package/dist/modules/intelwatchtower/index.cjs +37 -37
  129. package/dist/modules/intelwatchtower/index.d.cts +1 -1
  130. package/dist/modules/intelwatchtower/index.d.ts +1 -1
  131. package/dist/modules/intelwatchtower/index.js +2 -2
  132. package/dist/modules/kadaikodi/index.cjs +26 -26
  133. package/dist/modules/kadaikodi/index.d.cts +1 -1
  134. package/dist/modules/kadaikodi/index.d.ts +1 -1
  135. package/dist/modules/kadaikodi/index.js +2 -2
  136. package/dist/modules/labsofscience/index.cjs +44 -44
  137. package/dist/modules/labsofscience/index.d.cts +1 -1
  138. package/dist/modules/labsofscience/index.d.ts +1 -1
  139. package/dist/modules/labsofscience/index.js +2 -2
  140. package/dist/modules/manufacturedops/index.cjs +36 -36
  141. package/dist/modules/manufacturedops/index.d.cts +1 -1
  142. package/dist/modules/manufacturedops/index.d.ts +1 -1
  143. package/dist/modules/manufacturedops/index.js +2 -2
  144. package/dist/modules/movethewheels/index.cjs +78 -78
  145. package/dist/modules/movethewheels/index.d.cts +1 -1
  146. package/dist/modules/movethewheels/index.d.ts +1 -1
  147. package/dist/modules/movethewheels/index.js +2 -2
  148. package/dist/modules/mybodyshield/index.cjs +36 -36
  149. package/dist/modules/mybodyshield/index.d.cts +1 -1
  150. package/dist/modules/mybodyshield/index.d.ts +1 -1
  151. package/dist/modules/mybodyshield/index.js +2 -2
  152. package/dist/modules/notifications/index.cjs +5 -5
  153. package/dist/modules/notifications/index.d.cts +1 -1
  154. package/dist/modules/notifications/index.d.ts +1 -1
  155. package/dist/modules/notifications/index.js +1 -1
  156. package/dist/modules/organizations/index.cjs +5 -5
  157. package/dist/modules/organizations/index.d.cts +1 -1
  158. package/dist/modules/organizations/index.d.ts +1 -1
  159. package/dist/modules/organizations/index.js +1 -1
  160. package/dist/modules/planmagnet/index.cjs +272 -272
  161. package/dist/modules/planmagnet/index.d.cts +1 -1
  162. package/dist/modules/planmagnet/index.d.ts +1 -1
  163. package/dist/modules/planmagnet/index.js +2 -2
  164. package/dist/modules/products/index.cjs +19 -19
  165. package/dist/modules/products/index.d.cts +1 -1
  166. package/dist/modules/products/index.d.ts +1 -1
  167. package/dist/modules/products/index.js +2 -2
  168. package/dist/modules/proserviceworld/index.cjs +24 -24
  169. package/dist/modules/proserviceworld/index.d.cts +1 -1
  170. package/dist/modules/proserviceworld/index.d.ts +1 -1
  171. package/dist/modules/proserviceworld/index.js +2 -2
  172. package/dist/modules/rbac/index.cjs +8 -8
  173. package/dist/modules/rbac/index.d.cts +1 -1
  174. package/dist/modules/rbac/index.d.ts +1 -1
  175. package/dist/modules/rbac/index.js +2 -2
  176. package/dist/modules/sandbox/index.cjs +39 -39
  177. package/dist/modules/sandbox/index.d.cts +1 -1
  178. package/dist/modules/sandbox/index.d.ts +1 -1
  179. package/dist/modules/sandbox/index.js +1 -1
  180. package/dist/modules/scheduler/index.cjs +25 -25
  181. package/dist/modules/scheduler/index.d.cts +1 -1
  182. package/dist/modules/scheduler/index.d.ts +1 -1
  183. package/dist/modules/scheduler/index.js +2 -2
  184. package/dist/modules/security/index.cjs +14 -14
  185. package/dist/modules/security/index.d.cts +1 -1
  186. package/dist/modules/security/index.d.ts +1 -1
  187. package/dist/modules/security/index.js +2 -2
  188. package/dist/modules/semanticfed/index.cjs +44 -44
  189. package/dist/modules/semanticfed/index.d.cts +1 -1
  190. package/dist/modules/semanticfed/index.d.ts +1 -1
  191. package/dist/modules/semanticfed/index.js +1 -1
  192. package/dist/modules/semanticfed-sql/index.cjs +4 -4
  193. package/dist/modules/semanticfed-sql/index.d.cts +1 -1
  194. package/dist/modules/semanticfed-sql/index.d.ts +1 -1
  195. package/dist/modules/semanticfed-sql/index.js +1 -1
  196. package/dist/modules/store/index.cjs +21 -21
  197. package/dist/modules/store/index.d.cts +1 -1
  198. package/dist/modules/store/index.d.ts +1 -1
  199. package/dist/modules/store/index.js +2 -2
  200. package/dist/modules/subscriberbot/index.cjs +41 -41
  201. package/dist/modules/subscriberbot/index.d.cts +1 -1
  202. package/dist/modules/subscriberbot/index.d.ts +1 -1
  203. package/dist/modules/subscriberbot/index.js +2 -2
  204. package/dist/modules/support/index.cjs +8 -8
  205. package/dist/modules/support/index.d.cts +1 -1
  206. package/dist/modules/support/index.d.ts +1 -1
  207. package/dist/modules/support/index.js +2 -2
  208. package/dist/modules/tags/index.cjs +10 -10
  209. package/dist/modules/tags/index.d.cts +1 -1
  210. package/dist/modules/tags/index.d.ts +1 -1
  211. package/dist/modules/tags/index.js +2 -2
  212. package/dist/modules/technospam/index.cjs +44 -44
  213. package/dist/modules/technospam/index.d.cts +1 -1
  214. package/dist/modules/technospam/index.d.ts +1 -1
  215. package/dist/modules/technospam/index.js +2 -2
  216. package/dist/modules/theculturepost/index.cjs +32 -32
  217. package/dist/modules/theculturepost/index.d.cts +1 -1
  218. package/dist/modules/theculturepost/index.d.ts +1 -1
  219. package/dist/modules/theculturepost/index.js +2 -2
  220. package/dist/modules/theglobalfuel/index.cjs +30 -30
  221. package/dist/modules/theglobalfuel/index.d.cts +1 -1
  222. package/dist/modules/theglobalfuel/index.d.ts +1 -1
  223. package/dist/modules/theglobalfuel/index.js +2 -2
  224. package/dist/modules/timecampus/index.cjs +69 -69
  225. package/dist/modules/timecampus/index.d.cts +1 -1
  226. package/dist/modules/timecampus/index.d.ts +1 -1
  227. package/dist/modules/timecampus/index.js +4 -4
  228. package/dist/modules/tours/index.cjs +4 -4
  229. package/dist/modules/tours/index.d.cts +1 -1
  230. package/dist/modules/tours/index.d.ts +1 -1
  231. package/dist/modules/tours/index.js +2 -2
  232. package/dist/modules/vibecontrols/index.cjs +460 -460
  233. package/dist/modules/vibecontrols/index.d.cts +1 -1
  234. package/dist/modules/vibecontrols/index.d.ts +1 -1
  235. package/dist/modules/vibecontrols/index.js +5 -5
  236. package/dist/modules/workspaces/index.cjs +16 -16
  237. package/dist/modules/workspaces/index.d.cts +1 -1
  238. package/dist/modules/workspaces/index.d.ts +1 -1
  239. package/dist/modules/workspaces/index.js +2 -2
  240. package/package.json +6 -1
  241. package/dist/chunk-3ZVMC2AF.js +0 -1
  242. package/dist/chunk-ZT6KOG7N.js +0 -34
@@ -1,4 +1,4 @@
1
- import {q as q$1,r}from'../../chunk-ZT6KOG7N.js';import {readFileSync}from'fs';var M=`
1
+ import {j as j$1,k as k$1}from'../../chunk-N7EXKGE2.js';import {readFileSync}from'fs';var M=`
2
2
  query MybListPrograms(
3
3
  $memberId: ID
4
4
  $status: MybProgramStatus
@@ -302,4 +302,4 @@ import {q as q$1,r}from'../../chunk-ZT6KOG7N.js';import {readFileSync}from'fs';v
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 } }",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 } }",ye="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 } }",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 } }",Ce="query MybListDeviceConnections($memberId: ID) { mybListDeviceConnections(memberId: $memberId) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }",Ae="mutation MybConnectDevice($input: MybConnectDeviceInput!) { mybConnectDevice(input: $input) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }",Se="mutation MybDisconnectDevice($id: ID!) { mybDisconnectDevice(id: $id) }",he="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 } } }",De="mutation MybRecordLegalAcceptance($input: MybRecordLegalAcceptanceInput!) { mybRecordLegalAcceptance(input: $input) { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } }",we="query MybMyAiProcessingConsent { mybMyAiProcessingConsent { acceptedAt actorId createdAt enabled id updatedAt withdrawnAt workspaceId } }",Me="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 } }";function g(m){return {async execWorkspace(o,i){if(!m.auth.isAuthenticated())throw new r(`Authentication required. Run \`${m.productName} auth login\`.`);return m.gql.workspace.request(o,i)},async execWorkspaceAuthOnly(o,i){return m.gql.workspaceAuthOnly.request(o,i)},formatAndOutput(o,i,d){m.output.formatAndOutput(o,i,d),m.output.getFormat(o)==="table"&&Ve(i)&&i.pageInfo.hasMore&&m.output.printInfo(`More results are available; continue with --cursor ${i.pageInfo.cursor??"(unavailable)"}.`);},handleCommandError(o){throw o instanceof r?o:new q$1(o instanceof Error?o.message:String(o))},printSuccess(o){m.output.printSuccess(o);},truncate(o,i){return m.output.truncate(o,i)},formatDate(o){return m.output.formatDate(o)}}}function Ve(m){if(typeof m!="object"||m===null||!("pageInfo"in m))return false;let o=m.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 Re(m,o){try{return JSON.parse(o)}catch{throw new q$1(`--${m} must be valid JSON`)}}function s(m){let o=Number(m);if(!m.trim()||!Number.isSafeInteger(o))throw new q$1(`Expected an integer but got "${m}"`);return o}function y(m){let o=Number(m);if(!m.trim()||!Number.isFinite(o))throw new q$1(`Expected a number but got "${m}"`);return o}function D(m){return m.split(",").map(o=>o.trim()).filter(o=>o.length>0)}function ke(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p}=g(o),n=m.command("programs").description("Mybodyshield training programs");n.command("list").description("List training programs").option("--member <id>","Filter by member ID").option("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(M,{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(r=>[p(r.id,12),r.name,r.goalType,r.level,r.phase,r.status])});}catch(e){c(e);}}),n.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 r=await i(O,{id:t});if(!r.mybProgram)throw new q$1(`Program ${t} not found`);d(e,r.mybProgram);}catch(r){c(r);}}),n.command("workouts").description("List workouts for a program").argument("<programId>","Program ID").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(R,{programId:t,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,r.mybProgramWorkouts,{headers:["ID","Name","Type","Day","Week","Duration"],rows:r.mybProgramWorkouts.items.map(a=>[p(a.id,12),a.name,a.type,a.dayOfWeek!=null?String(a.dayOfWeek):"-",a.weekNumber!=null?String(a.weekNumber):"-",a.durationMin!=null?String(a.durationMin):"-"])});}catch(r){c(r);}}),n.command("create").description("Create a training program").requiredOption("--name <name>","Program name").option("--member <id>","Member ID").option("--coach <id>","Coach ID").option("--description <s>","Description").option("--goal-type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|ELITE").option("--phase <p>","BUILD|PEAK|DELOAD|MAINTENANCE").option("--weeks <n>","Number of weeks",s).option("--days-per-week <n>","Days per week",s).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=D(t.tags));let r=await i(k,{input:e});u(`Program created: ${r.mybCreateProgram.name}`),d(t,r.mybCreateProgram);}catch(e){c(e);}}),n.command("update").description("Update a training program").argument("<id>","Program ID").option("--name <name>","Program name").option("--description <s>","Description").option("--goal-type <t>","Goal type").option("--level <l>","Fitness level").option("--phase <p>","Program phase").option("--weeks <n>","Number of weeks",s).option("--days-per-week <n>","Days per week",s).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 r={};if(e.name&&(r.name=e.name),e.description!==void 0&&(r.description=e.description),e.goalType&&(r.goalType=e.goalType.toUpperCase()),e.level&&(r.level=e.level.toUpperCase()),e.phase&&(r.phase=e.phase.toUpperCase()),e.weeks!==void 0&&(r.weeks=e.weeks),e.daysPerWeek!==void 0&&(r.daysPerWeek=e.daysPerWeek),e.coach&&(r.coachId=e.coach),e.startDate&&(r.startDate=e.startDate),e.endDate&&(r.endDate=e.endDate),e.tags&&(r.tags=D(e.tags)),!Object.keys(r).length)throw new q$1("No updates specified");let a=await i(N,{id:t,input:r});u("Program updated"),d(e,a.mybUpdateProgram);}catch(r){c(r);}}),n.command("transition").description("Advance a program through its lifecycle").argument("<id>","Program ID").requiredOption("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(L,{id:t,status:e.status.toUpperCase()});u(`Program transitioned to ${r.mybTransitionProgram.status}`),d(e,r.mybTransitionProgram);}catch(r){c(r);}}),n.command("archive").description("Archive a training program").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(P,{id:t});u(r.mybArchiveProgram?"Program archived":"Program not archived"),d(e,{archived:r.mybArchiveProgram});}catch(r){c(r);}});}function Ne(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u}=g(o),p=m.command("workouts").description("Mybodyshield workouts & exercises");p.command("exercises").description("List exercises with continuation metadata").argument("<workoutId>","workoutId").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await i(de,{workoutId:n,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybWorkoutExercises);}catch(e){c(e);}}),p.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)",s).option("--week-number <n>","Week number",s).option("--duration-min <n>","Duration (minutes)",s).option("--order-index <n>","Order index",s).option("-f, --format <format>","Output format").action(async n=>{try{let t={programId:n.program,name:n.name};n.description&&(t.description=n.description),n.type&&(t.type=n.type.toUpperCase()),n.dayOfWeek!==void 0&&(t.dayOfWeek=n.dayOfWeek),n.weekNumber!==void 0&&(t.weekNumber=n.weekNumber),n.durationMin!==void 0&&(t.durationMin=n.durationMin),n.orderIndex!==void 0&&(t.orderIndex=n.orderIndex);let e=await i(v,{input:t});u(`Workout added: ${e.mybAddWorkout.name}`),d(n,e.mybAddWorkout);}catch(t){c(t);}}),p.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",s).option("--reps <n>","Reps",s).option("--rest-seconds <n>","Rest (seconds)",s).option("--target-weight <n>","Target weight",y).option("--order-index <n>","Order index",s).option("--instructions <s>","Instructions").option("--demo-file-id <id>","Demo file ID").option("-f, --format <format>","Output format").action(async n=>{try{let t={workoutId:n.workout,name:n.name};n.muscleGroup&&(t.muscleGroup=n.muscleGroup.toUpperCase()),n.sets!==void 0&&(t.sets=n.sets),n.reps!==void 0&&(t.reps=n.reps),n.restSeconds!==void 0&&(t.restSeconds=n.restSeconds),n.targetWeight!==void 0&&(t.targetWeight=n.targetWeight),n.orderIndex!==void 0&&(t.orderIndex=n.orderIndex),n.instructions&&(t.instructions=n.instructions),n.demoFileId&&(t.demoFileId=n.demoFileId);let e=await i($,{input:t});u(`Exercise added: ${e.mybAddExercise.name}`),d(n,e.mybAddExercise);}catch(t){c(t);}});}function Le(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p,formatDate:n}=g(o),t=m.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",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async(e,r)=>{try{let a=await i(ce,{sessionId:e,pagination:{cursor:r.cursor,limit:r.limit,offset:r.offset}});d(r,a.mybSessionSets);}catch(a){c(a);}}),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",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async e=>{try{let r=await i(G,{programId:e.program,status:e.status?e.status.toUpperCase():void 0,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,r.mybListSessions,{headers:["ID","Member","Status","Scheduled","Started"],rows:r.mybListSessions.items.map(a=>[p(a.id,12),p(a.memberId,12),a.status,n(a.scheduledFor),n(a.startedAt)])});}catch(r){c(r);}}),t.command("get").description("Get a workout session by id").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(e,r)=>{try{let a=await i(x,{id:e});if(!a.mybSession)throw new q$1(`Session ${e} not found`);d(r,a.mybSession);}catch(a){c(a);}}),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 r={};e.program&&(r.programId=e.program),e.workout&&(r.workoutId=e.workout),e.scheduledFor&&(r.scheduledFor=e.scheduledFor),e.notes&&(r.notes=e.notes);let a=await i(_,{input:r});u(`Session started: ${p(a.mybStartSession.id,12)}`),d(e,a.mybStartSession);}catch(r){c(r);}}),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",s).option("--reps <n>","Reps",s).option("--weight <n>","Weight",y).option("--distance-m <n>","Distance (meters)",y).option("--duration-sec <n>","Duration (seconds)",s).option("--personal-record","Mark as a personal record").option("-f, --format <format>","Output format").action(async e=>{try{let r={sessionId:e.session,exerciseName:e.exerciseName};e.setNumber!==void 0&&(r.setNumber=e.setNumber),e.reps!==void 0&&(r.reps=e.reps),e.weight!==void 0&&(r.weight=e.weight),e.distanceM!==void 0&&(r.distanceM=e.distanceM),e.durationSec!==void 0&&(r.durationSec=e.durationSec),e.personalRecord&&(r.isPersonalRecord=!0);let a=await i(U,{input:r});u(`Set logged for ${a.mybLogSet.exerciseName}`),d(e,a.mybLogSet);}catch(r){c(r);}}),t.command("complete").description("Complete a workout session").argument("<id>","Session ID").option("--calories-burned <n>","Calories burned",s).option("--perceived-exertion <n>","Perceived exertion (1-10)",s).option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async(e,r)=>{try{let a={};r.caloriesBurned!==void 0&&(a.caloriesBurned=r.caloriesBurned),r.perceivedExertion!==void 0&&(a.perceivedExertion=r.perceivedExertion),r.notes&&(a.notes=r.notes);let h=await i(W,{id:e,input:a});u("Session completed"),d(r,h.mybCompleteSession);}catch(a){c(a);}});}function Pe(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p}=g(o),n=m.command("goals").description("Mybodyshield fitness goals");n.command("list").description("List fitness goals").option("--member <id>","Filter by member ID").option("--status <s>","ACTIVE|ACHIEVED|PAUSED|ABANDONED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(V,{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(r=>[p(r.id,12),r.title,r.type,r.status,`${r.currentValue??0}${r.unit?` ${r.unit}`:""}`,`${r.targetValue??0}${r.unit?` ${r.unit}`:""}`])});}catch(e){c(e);}}),n.command("get").description("Get a goal by id").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(H,{id:t});if(!r.mybGoal)throw new q$1(`Goal ${t} not found`);d(e,r.mybGoal);}catch(r){c(r);}}),n.command("create").description("Create a fitness goal").requiredOption("--title <t>","Goal title").option("--member <id>","Member ID").option("--type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--description <s>","Description").option("--target-value <n>","Target value",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 r=await i(F,{input:e});u(`Goal created: ${r.mybCreateGoal.title}`),d(t,r.mybCreateGoal);}catch(e){c(e);}}),n.command("update").description("Update a fitness goal").argument("<id>","Goal ID").option("--title <t>","Goal title").option("--type <t>","Goal type").option("--description <s>","Description").option("--target-value <n>","Target value",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 r={};if(e.title&&(r.title=e.title),e.type&&(r.type=e.type.toUpperCase()),e.description!==void 0&&(r.description=e.description),e.targetValue!==void 0&&(r.targetValue=e.targetValue),e.currentValue!==void 0&&(r.currentValue=e.currentValue),e.baselineValue!==void 0&&(r.baselineValue=e.baselineValue),e.unit&&(r.unit=e.unit),e.targetDate&&(r.targetDate=e.targetDate),!Object.keys(r).length)throw new q$1("No updates specified");let a=await i(B,{id:t,input:r});u("Goal updated"),d(e,a.mybUpdateGoal);}catch(r){c(r);}}),n.command("achieve").description("Mark a goal as achieved").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(q,{id:t});u(`Goal achieved: ${r.mybAchieveGoal.title}`),d(e,r.mybAchieveGoal);}catch(r){c(r);}});}function ve(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p,formatDate:n}=g(o),t=m.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",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async e=>{try{let r=await i(Y,{memberId:e.member,type:e.type?e.type.toUpperCase():void 0,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,r.mybListBodyMetrics,{headers:["ID","Type","Value","Unit","Measured"],rows:r.mybListBodyMetrics.items.map(a=>[p(a.id,12),a.type,String(a.value),a.unit,n(a.measuredAt)])});}catch(r){c(r);}}),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 r={type:e.type.toUpperCase(),value:e.value};e.member&&(r.memberId=e.member),e.unit&&(r.unit=e.unit),e.measuredAt&&(r.measuredAt=e.measuredAt),e.notes&&(r.notes=e.notes),e.photoFileId&&(r.photoFileId=e.photoFileId);let a=await i(j,{input:r});u(`Metric recorded: ${a.mybRecordBodyMetric.type}`),d(e,a.mybRecordBodyMetric);}catch(r){c(r);}});}function $e(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u}=g(o),p=m.command("nutrition").description("Mybodyshield nutrition plans");p.command("get").description("Get a nutrition plan by id").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await i(K,{id:n});if(!e.mybNutritionPlan)throw new q$1(`Nutrition plan ${n} not found`);d(t,e.mybNutritionPlan);}catch(e){c(e);}}),p.command("active").description("Get a member's active nutrition plan").option("--member <id>","Member ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await i(z,{memberId:n.member});if(!t.mybActiveNutritionPlan)throw new q$1("No active nutrition plan found");d(n,t.mybActiveNutritionPlan);}catch(t){c(t);}}),p.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 n=>{try{let t=await i(X,{memberId:n.member,date:n.date});d(n,t.mybDailyMacros);}catch(t){c(t);}}),p.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",s).option("--protein-target <n>","Protein target (g)",s).option("--carbs-target <n>","Carbs target (g)",s).option("--fat-target <n>","Fat target (g)",s).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 n=>{try{let t={name:n.name};n.member&&(t.memberId=n.member),n.coach&&(t.coachId=n.coach),n.goalType&&(t.goalType=n.goalType.toUpperCase()),n.calorieTarget!==void 0&&(t.calorieTarget=n.calorieTarget),n.proteinTarget!==void 0&&(t.proteinTarget=n.proteinTarget),n.carbsTarget!==void 0&&(t.carbsTarget=n.carbsTarget),n.fatTarget!==void 0&&(t.fatTarget=n.fatTarget),n.startDate&&(t.startDate=n.startDate),n.endDate&&(t.endDate=n.endDate),n.notes&&(t.notes=n.notes);let e=await i(J,{input:t});u(`Nutrition plan created: ${e.mybCreateNutritionPlan.name}`),d(n,e.mybCreateNutritionPlan);}catch(t){c(t);}}),p.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",s).option("--protein-target <n>","Protein target (g)",s).option("--carbs-target <n>","Carbs target (g)",s).option("--fat-target <n>","Fat target (g)",s).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(n,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 q$1("No updates specified");let r=await i(Z,{id:n,input:e});u("Nutrition plan updated"),d(t,r.mybUpdateNutritionPlan);}catch(e){c(e);}}),p.command("activate").description("Activate a nutrition plan").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await i(Q,{id:n});u(`Nutrition plan activated: ${e.mybActivateNutritionPlan.name}`),d(t,e.mybActivateNutritionPlan);}catch(e){c(e);}});}function Ge(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p}=g(o),n=m.command("meals").description("Mybodyshield meal logs");n.command("list").description("List logged meals").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Filter by nutrition plan ID").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,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(r=>[p(r.id,12),r.name,r.mealType,String(r.calories??0),`${r.proteinG??0}g`])});}catch(e){c(e);}}),n.command("log").description("Log a meal").requiredOption("--name <name>","Meal name").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Nutrition plan ID").option("--calories <n>","Calories",s).option("--protein-g <n>","Protein (g)",s).option("--carbs-g <n>","Carbs (g)",s).option("--fat-g <n>","Fat (g)",s).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 r=await i(te,{input:e});u(`Meal logged: ${r.mybLogMeal.name}`),d(t,r.mybLogMeal);}catch(e){c(e);}}),n.command("delete").description("Delete a logged meal").argument("<id>","Meal log ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(re,{id:t});u(r.mybDeleteMeal?"Meal deleted":"Meal not deleted"),d(e,{deleted:r.mybDeleteMeal});}catch(r){c(r);}});}function xe(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p,formatDate:n}=g(o),t=m.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",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async e=>{try{let r=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,r.mybListRecoveryLogs,{headers:["ID","Metric","Score","Sleep (h)","Logged"],rows:r.mybListRecoveryLogs.items.map(a=>[p(a.id,12),a.metric,String(a.score),a.sleepHours!=null?String(a.sleepHours):"-",n(a.loggedAt)])});}catch(r){c(r);}}),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",s).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 r={};e.member&&(r.memberId=e.member),e.metric&&(r.metric=e.metric.toUpperCase()),e.score!==void 0&&(r.score=e.score),e.sleepHours!==void 0&&(r.sleepHours=e.sleepHours),e.notes&&(r.notes=e.notes),e.loggedAt&&(r.loggedAt=e.loggedAt);let a=await i(oe,{input:r});u(`Recovery logged: ${a.mybLogRecovery.metric}`),d(e,a.mybLogRecovery);}catch(r){c(r);}});}function _e(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p}=g(o),n=m.command("coaching").description("Mybodyshield coaching relationships");n.command("list").description("List coaching relationships").option("--member <id>","Filter by member ID").option("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,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(r=>[p(r.id,12),p(r.coachId,12),p(r.memberId,12),r.status,r.specialty??"-"])});}catch(e){c(e);}}),n.command("create").description("Create a coaching relationship").requiredOption("--coach <id>","Coach ID").requiredOption("--member <id>","Member ID").option("--specialty <s>","Specialty").option("--share-workouts","Share workouts with the coach").option("--share-nutrition","Share nutrition with the coach").option("--share-metrics","Share body metrics with the coach").option("-f, --format <format>","Output format").action(async 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 r=await i(ae,{input:e});u("Coaching relationship created"),d(t,r.mybCreateCoaching);}catch(e){c(e);}}),n.command("transition").description("Transition a coaching relationship status").argument("<id>","Coaching relationship ID").requiredOption("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(se,{id:t,status:e.status.toUpperCase()});u(`Coaching transitioned to ${r.mybTransitionCoaching.status}`),d(e,r.mybTransitionCoaching);}catch(r){c(r);}});}function Ue(m,o){let{execWorkspaceAuthOnly:i,formatAndOutput:d,handleCommandError:c,printSuccess:u}=g(o);m.command("health").description("Mybodyshield service health check (public)").option("-f, --format <format>","Output format").action(async p=>{try{let n=await i(me);u(n.mybHealth),d(p,{health:n.mybHealth});}catch(n){c(n);}});}var Fe=[{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: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:ye,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: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:Ce,field:"mybListDeviceConnections",variables:[{name:"memberId",type:"ID"}]},{group:"devices",command:"connect",document:Ae,field:"mybConnectDevice",variables:[{name:"input",type:"MybConnectDeviceInput!"}]},{group:"devices",command:"disconnect",document:Se,field:"mybDisconnectDevice",variables:[{name:"id",type:"ID!"}]},{group:"devices",command:"sync",document:he,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:De,field:"mybRecordLegalAcceptance",variables:[{name:"input",type:"MybRecordLegalAcceptanceInput!"}]},{group:"privacy",command:"consent",document:we,field:"mybMyAiProcessingConsent",variables:[]},{group:"privacy",command:"set-consent",document:Me,field:"mybSetAiProcessingConsent",variables:[{name:"enabled",type:"Boolean!"}]},{group:"privacy",command:"export",document:Oe,field:"mybExportData",variables:[{name:"input",type:"MybExportInput!"}]}],T=m=>m.replace(/[A-Z]/g,o=>"-"+o.toLowerCase());function We(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c}=g(o),u=new Map;for(let p of Fe){let n=u.get(p.group);n||(n=m.command(p.group).description("MyBodyShield "+p.group),u.set(p.group,n));let t=n.command(p.command).description("Call "+p.field+" through the workspace gateway");for(let e of p.variables){let r=T(e.name),h=e.type.replace(/[![\]]/g,"").endsWith("Input"),f="--"+r+(h?"-file":"")+" <value>",S=h?e.type+" JSON file; keep secret-bearing files private":e.type;e.type.endsWith("!")?t.requiredOption(f,S):t.option(f,S);}t.option("-f, --format <format>","Output format").action(async e=>{try{let r={};for(let f of p.variables){let S=f.type.replace(/[![\]]/g,""),w=S.endsWith("Input"),A=e[f.name+(w?"File":"")];if(A!==void 0){if(typeof A!="string")throw new q$1("Invalid option "+T(f.name));if(w)r[f.name]=Re(T(f.name),readFileSync(A,"utf8"));else if(S==="Int")r[f.name]=s(A);else if(S==="Float")r[f.name]=y(A);else if(S==="Boolean"){if(A!=="true"&&A!=="false")throw new q$1("--"+T(f.name)+" must be true or false");r[f.name]=A==="true";}else r[f.name]=A;}}let a=await i(p.document,r),h=typeof e.format=="string"?e.format:void 0;d({format:h},a[p.field]);}catch(r){c(r);}});}}var Be={id:"mybodyshield",version:"1.0.0",displayName:"Mybodyshield",dependsOn:["auth","workspaces"],register(m,o){let i=m.command("mybodyshield").description("Mybodyshield fitness coaching platform");ke(i,o),Ne(i,o),Le(i,o),Pe(i,o),ve(i,o),$e(i,o),Ge(i,o),xe(i,o),_e(i,o),Ue(i,o),We(i,o);}},Wt=Be;export{Wt as default};
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 } }",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 } }",ye="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 } }",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 } }",Ce="query MybListDeviceConnections($memberId: ID) { mybListDeviceConnections(memberId: $memberId) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }",Ae="mutation MybConnectDevice($input: MybConnectDeviceInput!) { mybConnectDevice(input: $input) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }",Se="mutation MybDisconnectDevice($id: ID!) { mybDisconnectDevice(id: $id) }",he="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 } } }",De="mutation MybRecordLegalAcceptance($input: MybRecordLegalAcceptanceInput!) { mybRecordLegalAcceptance(input: $input) { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } }",we="query MybMyAiProcessingConsent { mybMyAiProcessingConsent { acceptedAt actorId createdAt enabled id updatedAt withdrawnAt workspaceId } }",Me="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 } }";function g(m){return {async execWorkspace(o,i){if(!m.auth.isAuthenticated())throw new k$1(`Authentication required. Run \`${m.productName} auth login\`.`);return m.gql.workspace.request(o,i)},async execWorkspaceAuthOnly(o,i){return m.gql.workspaceAuthOnly.request(o,i)},formatAndOutput(o,i,d){m.output.formatAndOutput(o,i,d),m.output.getFormat(o)==="table"&&Ve(i)&&i.pageInfo.hasMore&&m.output.printInfo(`More results are available; continue with --cursor ${i.pageInfo.cursor??"(unavailable)"}.`);},handleCommandError(o){throw o instanceof k$1?o:new j$1(o instanceof Error?o.message:String(o))},printSuccess(o){m.output.printSuccess(o);},truncate(o,i){return m.output.truncate(o,i)},formatDate(o){return m.output.formatDate(o)}}}function Ve(m){if(typeof m!="object"||m===null||!("pageInfo"in m))return false;let o=m.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 Re(m,o){try{return JSON.parse(o)}catch{throw new j$1(`--${m} must be valid JSON`)}}function s(m){let o=Number(m);if(!m.trim()||!Number.isSafeInteger(o))throw new j$1(`Expected an integer but got "${m}"`);return o}function y(m){let o=Number(m);if(!m.trim()||!Number.isFinite(o))throw new j$1(`Expected a number but got "${m}"`);return o}function D(m){return m.split(",").map(o=>o.trim()).filter(o=>o.length>0)}function ke(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p}=g(o),n=m.command("programs").description("Mybodyshield training programs");n.command("list").description("List training programs").option("--member <id>","Filter by member ID").option("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(M,{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(r=>[p(r.id,12),r.name,r.goalType,r.level,r.phase,r.status])});}catch(e){c(e);}}),n.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 r=await i(O,{id:t});if(!r.mybProgram)throw new j$1(`Program ${t} not found`);d(e,r.mybProgram);}catch(r){c(r);}}),n.command("workouts").description("List workouts for a program").argument("<programId>","Program ID").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(R,{programId:t,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,r.mybProgramWorkouts,{headers:["ID","Name","Type","Day","Week","Duration"],rows:r.mybProgramWorkouts.items.map(a=>[p(a.id,12),a.name,a.type,a.dayOfWeek!=null?String(a.dayOfWeek):"-",a.weekNumber!=null?String(a.weekNumber):"-",a.durationMin!=null?String(a.durationMin):"-"])});}catch(r){c(r);}}),n.command("create").description("Create a training program").requiredOption("--name <name>","Program name").option("--member <id>","Member ID").option("--coach <id>","Coach ID").option("--description <s>","Description").option("--goal-type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|ELITE").option("--phase <p>","BUILD|PEAK|DELOAD|MAINTENANCE").option("--weeks <n>","Number of weeks",s).option("--days-per-week <n>","Days per week",s).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=D(t.tags));let r=await i(k,{input:e});u(`Program created: ${r.mybCreateProgram.name}`),d(t,r.mybCreateProgram);}catch(e){c(e);}}),n.command("update").description("Update a training program").argument("<id>","Program ID").option("--name <name>","Program name").option("--description <s>","Description").option("--goal-type <t>","Goal type").option("--level <l>","Fitness level").option("--phase <p>","Program phase").option("--weeks <n>","Number of weeks",s).option("--days-per-week <n>","Days per week",s).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 r={};if(e.name&&(r.name=e.name),e.description!==void 0&&(r.description=e.description),e.goalType&&(r.goalType=e.goalType.toUpperCase()),e.level&&(r.level=e.level.toUpperCase()),e.phase&&(r.phase=e.phase.toUpperCase()),e.weeks!==void 0&&(r.weeks=e.weeks),e.daysPerWeek!==void 0&&(r.daysPerWeek=e.daysPerWeek),e.coach&&(r.coachId=e.coach),e.startDate&&(r.startDate=e.startDate),e.endDate&&(r.endDate=e.endDate),e.tags&&(r.tags=D(e.tags)),!Object.keys(r).length)throw new j$1("No updates specified");let a=await i(N,{id:t,input:r});u("Program updated"),d(e,a.mybUpdateProgram);}catch(r){c(r);}}),n.command("transition").description("Advance a program through its lifecycle").argument("<id>","Program ID").requiredOption("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(L,{id:t,status:e.status.toUpperCase()});u(`Program transitioned to ${r.mybTransitionProgram.status}`),d(e,r.mybTransitionProgram);}catch(r){c(r);}}),n.command("archive").description("Archive a training program").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(P,{id:t});u(r.mybArchiveProgram?"Program archived":"Program not archived"),d(e,{archived:r.mybArchiveProgram});}catch(r){c(r);}});}function Ne(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u}=g(o),p=m.command("workouts").description("Mybodyshield workouts & exercises");p.command("exercises").description("List exercises with continuation metadata").argument("<workoutId>","workoutId").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await i(de,{workoutId:n,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybWorkoutExercises);}catch(e){c(e);}}),p.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)",s).option("--week-number <n>","Week number",s).option("--duration-min <n>","Duration (minutes)",s).option("--order-index <n>","Order index",s).option("-f, --format <format>","Output format").action(async n=>{try{let t={programId:n.program,name:n.name};n.description&&(t.description=n.description),n.type&&(t.type=n.type.toUpperCase()),n.dayOfWeek!==void 0&&(t.dayOfWeek=n.dayOfWeek),n.weekNumber!==void 0&&(t.weekNumber=n.weekNumber),n.durationMin!==void 0&&(t.durationMin=n.durationMin),n.orderIndex!==void 0&&(t.orderIndex=n.orderIndex);let e=await i(v,{input:t});u(`Workout added: ${e.mybAddWorkout.name}`),d(n,e.mybAddWorkout);}catch(t){c(t);}}),p.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",s).option("--reps <n>","Reps",s).option("--rest-seconds <n>","Rest (seconds)",s).option("--target-weight <n>","Target weight",y).option("--order-index <n>","Order index",s).option("--instructions <s>","Instructions").option("--demo-file-id <id>","Demo file ID").option("-f, --format <format>","Output format").action(async n=>{try{let t={workoutId:n.workout,name:n.name};n.muscleGroup&&(t.muscleGroup=n.muscleGroup.toUpperCase()),n.sets!==void 0&&(t.sets=n.sets),n.reps!==void 0&&(t.reps=n.reps),n.restSeconds!==void 0&&(t.restSeconds=n.restSeconds),n.targetWeight!==void 0&&(t.targetWeight=n.targetWeight),n.orderIndex!==void 0&&(t.orderIndex=n.orderIndex),n.instructions&&(t.instructions=n.instructions),n.demoFileId&&(t.demoFileId=n.demoFileId);let e=await i($,{input:t});u(`Exercise added: ${e.mybAddExercise.name}`),d(n,e.mybAddExercise);}catch(t){c(t);}});}function Le(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p,formatDate:n}=g(o),t=m.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",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async(e,r)=>{try{let a=await i(ce,{sessionId:e,pagination:{cursor:r.cursor,limit:r.limit,offset:r.offset}});d(r,a.mybSessionSets);}catch(a){c(a);}}),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",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async e=>{try{let r=await i(G,{programId:e.program,status:e.status?e.status.toUpperCase():void 0,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,r.mybListSessions,{headers:["ID","Member","Status","Scheduled","Started"],rows:r.mybListSessions.items.map(a=>[p(a.id,12),p(a.memberId,12),a.status,n(a.scheduledFor),n(a.startedAt)])});}catch(r){c(r);}}),t.command("get").description("Get a workout session by id").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(e,r)=>{try{let a=await i(x,{id:e});if(!a.mybSession)throw new j$1(`Session ${e} not found`);d(r,a.mybSession);}catch(a){c(a);}}),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 r={};e.program&&(r.programId=e.program),e.workout&&(r.workoutId=e.workout),e.scheduledFor&&(r.scheduledFor=e.scheduledFor),e.notes&&(r.notes=e.notes);let a=await i(_,{input:r});u(`Session started: ${p(a.mybStartSession.id,12)}`),d(e,a.mybStartSession);}catch(r){c(r);}}),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",s).option("--reps <n>","Reps",s).option("--weight <n>","Weight",y).option("--distance-m <n>","Distance (meters)",y).option("--duration-sec <n>","Duration (seconds)",s).option("--personal-record","Mark as a personal record").option("-f, --format <format>","Output format").action(async e=>{try{let r={sessionId:e.session,exerciseName:e.exerciseName};e.setNumber!==void 0&&(r.setNumber=e.setNumber),e.reps!==void 0&&(r.reps=e.reps),e.weight!==void 0&&(r.weight=e.weight),e.distanceM!==void 0&&(r.distanceM=e.distanceM),e.durationSec!==void 0&&(r.durationSec=e.durationSec),e.personalRecord&&(r.isPersonalRecord=!0);let a=await i(U,{input:r});u(`Set logged for ${a.mybLogSet.exerciseName}`),d(e,a.mybLogSet);}catch(r){c(r);}}),t.command("complete").description("Complete a workout session").argument("<id>","Session ID").option("--calories-burned <n>","Calories burned",s).option("--perceived-exertion <n>","Perceived exertion (1-10)",s).option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async(e,r)=>{try{let a={};r.caloriesBurned!==void 0&&(a.caloriesBurned=r.caloriesBurned),r.perceivedExertion!==void 0&&(a.perceivedExertion=r.perceivedExertion),r.notes&&(a.notes=r.notes);let h=await i(W,{id:e,input:a});u("Session completed"),d(r,h.mybCompleteSession);}catch(a){c(a);}});}function Pe(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p}=g(o),n=m.command("goals").description("Mybodyshield fitness goals");n.command("list").description("List fitness goals").option("--member <id>","Filter by member ID").option("--status <s>","ACTIVE|ACHIEVED|PAUSED|ABANDONED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(V,{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(r=>[p(r.id,12),r.title,r.type,r.status,`${r.currentValue??0}${r.unit?` ${r.unit}`:""}`,`${r.targetValue??0}${r.unit?` ${r.unit}`:""}`])});}catch(e){c(e);}}),n.command("get").description("Get a goal by id").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(H,{id:t});if(!r.mybGoal)throw new j$1(`Goal ${t} not found`);d(e,r.mybGoal);}catch(r){c(r);}}),n.command("create").description("Create a fitness goal").requiredOption("--title <t>","Goal title").option("--member <id>","Member ID").option("--type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--description <s>","Description").option("--target-value <n>","Target value",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 r=await i(F,{input:e});u(`Goal created: ${r.mybCreateGoal.title}`),d(t,r.mybCreateGoal);}catch(e){c(e);}}),n.command("update").description("Update a fitness goal").argument("<id>","Goal ID").option("--title <t>","Goal title").option("--type <t>","Goal type").option("--description <s>","Description").option("--target-value <n>","Target value",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 r={};if(e.title&&(r.title=e.title),e.type&&(r.type=e.type.toUpperCase()),e.description!==void 0&&(r.description=e.description),e.targetValue!==void 0&&(r.targetValue=e.targetValue),e.currentValue!==void 0&&(r.currentValue=e.currentValue),e.baselineValue!==void 0&&(r.baselineValue=e.baselineValue),e.unit&&(r.unit=e.unit),e.targetDate&&(r.targetDate=e.targetDate),!Object.keys(r).length)throw new j$1("No updates specified");let a=await i(B,{id:t,input:r});u("Goal updated"),d(e,a.mybUpdateGoal);}catch(r){c(r);}}),n.command("achieve").description("Mark a goal as achieved").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(q,{id:t});u(`Goal achieved: ${r.mybAchieveGoal.title}`),d(e,r.mybAchieveGoal);}catch(r){c(r);}});}function ve(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p,formatDate:n}=g(o),t=m.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",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async e=>{try{let r=await i(Y,{memberId:e.member,type:e.type?e.type.toUpperCase():void 0,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,r.mybListBodyMetrics,{headers:["ID","Type","Value","Unit","Measured"],rows:r.mybListBodyMetrics.items.map(a=>[p(a.id,12),a.type,String(a.value),a.unit,n(a.measuredAt)])});}catch(r){c(r);}}),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 r={type:e.type.toUpperCase(),value:e.value};e.member&&(r.memberId=e.member),e.unit&&(r.unit=e.unit),e.measuredAt&&(r.measuredAt=e.measuredAt),e.notes&&(r.notes=e.notes),e.photoFileId&&(r.photoFileId=e.photoFileId);let a=await i(j,{input:r});u(`Metric recorded: ${a.mybRecordBodyMetric.type}`),d(e,a.mybRecordBodyMetric);}catch(r){c(r);}});}function $e(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u}=g(o),p=m.command("nutrition").description("Mybodyshield nutrition plans");p.command("get").description("Get a nutrition plan by id").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await i(K,{id:n});if(!e.mybNutritionPlan)throw new j$1(`Nutrition plan ${n} not found`);d(t,e.mybNutritionPlan);}catch(e){c(e);}}),p.command("active").description("Get a member's active nutrition plan").option("--member <id>","Member ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await i(z,{memberId:n.member});if(!t.mybActiveNutritionPlan)throw new j$1("No active nutrition plan found");d(n,t.mybActiveNutritionPlan);}catch(t){c(t);}}),p.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 n=>{try{let t=await i(X,{memberId:n.member,date:n.date});d(n,t.mybDailyMacros);}catch(t){c(t);}}),p.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",s).option("--protein-target <n>","Protein target (g)",s).option("--carbs-target <n>","Carbs target (g)",s).option("--fat-target <n>","Fat target (g)",s).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 n=>{try{let t={name:n.name};n.member&&(t.memberId=n.member),n.coach&&(t.coachId=n.coach),n.goalType&&(t.goalType=n.goalType.toUpperCase()),n.calorieTarget!==void 0&&(t.calorieTarget=n.calorieTarget),n.proteinTarget!==void 0&&(t.proteinTarget=n.proteinTarget),n.carbsTarget!==void 0&&(t.carbsTarget=n.carbsTarget),n.fatTarget!==void 0&&(t.fatTarget=n.fatTarget),n.startDate&&(t.startDate=n.startDate),n.endDate&&(t.endDate=n.endDate),n.notes&&(t.notes=n.notes);let e=await i(J,{input:t});u(`Nutrition plan created: ${e.mybCreateNutritionPlan.name}`),d(n,e.mybCreateNutritionPlan);}catch(t){c(t);}}),p.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",s).option("--protein-target <n>","Protein target (g)",s).option("--carbs-target <n>","Carbs target (g)",s).option("--fat-target <n>","Fat target (g)",s).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(n,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 j$1("No updates specified");let r=await i(Z,{id:n,input:e});u("Nutrition plan updated"),d(t,r.mybUpdateNutritionPlan);}catch(e){c(e);}}),p.command("activate").description("Activate a nutrition plan").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await i(Q,{id:n});u(`Nutrition plan activated: ${e.mybActivateNutritionPlan.name}`),d(t,e.mybActivateNutritionPlan);}catch(e){c(e);}});}function Ge(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p}=g(o),n=m.command("meals").description("Mybodyshield meal logs");n.command("list").description("List logged meals").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Filter by nutrition plan ID").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,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(r=>[p(r.id,12),r.name,r.mealType,String(r.calories??0),`${r.proteinG??0}g`])});}catch(e){c(e);}}),n.command("log").description("Log a meal").requiredOption("--name <name>","Meal name").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Nutrition plan ID").option("--calories <n>","Calories",s).option("--protein-g <n>","Protein (g)",s).option("--carbs-g <n>","Carbs (g)",s).option("--fat-g <n>","Fat (g)",s).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 r=await i(te,{input:e});u(`Meal logged: ${r.mybLogMeal.name}`),d(t,r.mybLogMeal);}catch(e){c(e);}}),n.command("delete").description("Delete a logged meal").argument("<id>","Meal log ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(re,{id:t});u(r.mybDeleteMeal?"Meal deleted":"Meal not deleted"),d(e,{deleted:r.mybDeleteMeal});}catch(r){c(r);}});}function xe(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p,formatDate:n}=g(o),t=m.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",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async e=>{try{let r=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,r.mybListRecoveryLogs,{headers:["ID","Metric","Score","Sleep (h)","Logged"],rows:r.mybListRecoveryLogs.items.map(a=>[p(a.id,12),a.metric,String(a.score),a.sleepHours!=null?String(a.sleepHours):"-",n(a.loggedAt)])});}catch(r){c(r);}}),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",s).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 r={};e.member&&(r.memberId=e.member),e.metric&&(r.metric=e.metric.toUpperCase()),e.score!==void 0&&(r.score=e.score),e.sleepHours!==void 0&&(r.sleepHours=e.sleepHours),e.notes&&(r.notes=e.notes),e.loggedAt&&(r.loggedAt=e.loggedAt);let a=await i(oe,{input:r});u(`Recovery logged: ${a.mybLogRecovery.metric}`),d(e,a.mybLogRecovery);}catch(r){c(r);}});}function _e(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p}=g(o),n=m.command("coaching").description("Mybodyshield coaching relationships");n.command("list").description("List coaching relationships").option("--member <id>","Filter by member ID").option("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,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(r=>[p(r.id,12),p(r.coachId,12),p(r.memberId,12),r.status,r.specialty??"-"])});}catch(e){c(e);}}),n.command("create").description("Create a coaching relationship").requiredOption("--coach <id>","Coach ID").requiredOption("--member <id>","Member ID").option("--specialty <s>","Specialty").option("--share-workouts","Share workouts with the coach").option("--share-nutrition","Share nutrition with the coach").option("--share-metrics","Share body metrics with the coach").option("-f, --format <format>","Output format").action(async 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 r=await i(ae,{input:e});u("Coaching relationship created"),d(t,r.mybCreateCoaching);}catch(e){c(e);}}),n.command("transition").description("Transition a coaching relationship status").argument("<id>","Coaching relationship ID").requiredOption("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(se,{id:t,status:e.status.toUpperCase()});u(`Coaching transitioned to ${r.mybTransitionCoaching.status}`),d(e,r.mybTransitionCoaching);}catch(r){c(r);}});}function Ue(m,o){let{execWorkspaceAuthOnly:i,formatAndOutput:d,handleCommandError:c,printSuccess:u}=g(o);m.command("health").description("Mybodyshield service health check (public)").option("-f, --format <format>","Output format").action(async p=>{try{let n=await i(me);u(n.mybHealth),d(p,{health:n.mybHealth});}catch(n){c(n);}});}var Fe=[{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: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:ye,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: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:Ce,field:"mybListDeviceConnections",variables:[{name:"memberId",type:"ID"}]},{group:"devices",command:"connect",document:Ae,field:"mybConnectDevice",variables:[{name:"input",type:"MybConnectDeviceInput!"}]},{group:"devices",command:"disconnect",document:Se,field:"mybDisconnectDevice",variables:[{name:"id",type:"ID!"}]},{group:"devices",command:"sync",document:he,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:De,field:"mybRecordLegalAcceptance",variables:[{name:"input",type:"MybRecordLegalAcceptanceInput!"}]},{group:"privacy",command:"consent",document:we,field:"mybMyAiProcessingConsent",variables:[]},{group:"privacy",command:"set-consent",document:Me,field:"mybSetAiProcessingConsent",variables:[{name:"enabled",type:"Boolean!"}]},{group:"privacy",command:"export",document:Oe,field:"mybExportData",variables:[{name:"input",type:"MybExportInput!"}]}],T=m=>m.replace(/[A-Z]/g,o=>"-"+o.toLowerCase());function We(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c}=g(o),u=new Map;for(let p of Fe){let n=u.get(p.group);n||(n=m.command(p.group).description("MyBodyShield "+p.group),u.set(p.group,n));let t=n.command(p.command).description("Call "+p.field+" through the workspace gateway");for(let e of p.variables){let r=T(e.name),h=e.type.replace(/[![\]]/g,"").endsWith("Input"),f="--"+r+(h?"-file":"")+" <value>",S=h?e.type+" JSON file; keep secret-bearing files private":e.type;e.type.endsWith("!")?t.requiredOption(f,S):t.option(f,S);}t.option("-f, --format <format>","Output format").action(async e=>{try{let r={};for(let f of p.variables){let S=f.type.replace(/[![\]]/g,""),w=S.endsWith("Input"),A=e[f.name+(w?"File":"")];if(A!==void 0){if(typeof A!="string")throw new j$1("Invalid option "+T(f.name));if(w)r[f.name]=Re(T(f.name),readFileSync(A,"utf8"));else if(S==="Int")r[f.name]=s(A);else if(S==="Float")r[f.name]=y(A);else if(S==="Boolean"){if(A!=="true"&&A!=="false")throw new j$1("--"+T(f.name)+" must be true or false");r[f.name]=A==="true";}else r[f.name]=A;}}let a=await i(p.document,r),h=typeof e.format=="string"?e.format:void 0;d({format:h},a[p.field]);}catch(r){c(r);}});}}var Be={id:"mybodyshield",version:"1.0.0",displayName:"Mybodyshield",dependsOn:["auth","workspaces"],register(m,o){let i=m.command("mybodyshield").description("Mybodyshield fitness coaching platform");ke(i,o),Ne(i,o),Le(i,o),Pe(i,o),ve(i,o),$e(i,o),Ge(i,o),xe(i,o),_e(i,o),Ue(i,o),We(i,o);}},Wt=Be;export{Wt as default};
@@ -1,26 +1,26 @@
1
- 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var u=class extends Error{exitCode;hint;constructor(n,i){super(n),this.name="CliUserError",this.exitCode=i?.exitCode??1,this.hint=i?.hint;}};var a=class extends Error{cause;constructor(n,i){super(n),this.name="CliInternalError",this.cause=i;}};var m=null;function I(e){m=e;}function c(){if(!m)throw new a("vibecontrols module helpers used before setHelpersContext was called");return m}async function d(e,n){return c().gql.global.request(e,n)}function f(e){let n=e instanceof Error?e.message:String(e);throw new u(n)}function h(e,n,i){c().output.formatAndOutput(e,n,i);}function w(e){c().output.printSuccess(e);}function E(e){return c().output.formatStatus(e)}function T(e){return c().output.formatDate(e)}function g(e,n){return c().output.truncate(e,n)}function k(){return c()}var A=`
1
+ 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var c=class extends Error{exitCode;hint;constructor(n,o){super(n),this.name="CliUserError",this.exitCode=o?.exitCode??1,this.hint=o?.hint;}},p=class extends c{constructor(n,o){super(n,{exitCode:2,hint:o?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},u=class extends Error{cause;constructor(n,o){super(n),this.name="CliInternalError",this.cause=o;}};function k(e){if(e instanceof p||e instanceof c)return e;let n=h(e)&&h(e.response)?e.response:void 0,o=n?.errors,t=Array.isArray(o)?o[0]:void 0,a=(h(t)&&h(t.extensions)?t.extensions:void 0)?.code,i=n?.status;return a==="UNAUTHENTICATED"||i===401?new p("Authentication required."):a==="FORBIDDEN"||i===403?new c("Permission denied."):a==="BAD_USER_INPUT"||a==="GRAPHQL_VALIDATION_FAILED"||i===400?new c("Invalid request. Check the command arguments."):a==="NOT_FOUND"||i===404?new c("Requested resource was not found."):a==="RATE_LIMITED"||a==="TOO_MANY_REQUESTS"||i===429?new c("Request limit reached. Try again later."):new u("The request could not be completed. Try again later.")}var f=class extends Error{response;constructor(n,o){super(n),this.name="GqlRequestError",this.response=o;}};function h(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var C=null;function A(e){C=e;}function l(){if(!C)throw new u("vibecontrols module helpers used before setHelpersContext was called");return C}async function g(e,n){return l().gql.global.request(e,n)}function m(e){throw e instanceof p||e instanceof c||e instanceof u?e:e instanceof f||e!==null&&typeof e=="object"&&"response"in e?k(e):new u("The command could not be completed. Try again later.")}function x(e,n,o){l().output.formatAndOutput(e,n,o);}function y(e){l().output.printSuccess(e);}function v(e){return l().output.formatStatus(e)}function O(e){return l().output.formatDate(e)}function w(e,n){return l().output.truncate(e,n)}function b(){return l()}var R=`
2
2
  query ListNotifications($filter: NotificationFilterInput, $limit: Int, $offset: Int) {
3
3
  notifications(filter: $filter, limit: $limit, offset: $offset) {
4
4
  items { id title message channel status isRead createdAt }
5
5
  total
6
6
  }
7
7
  }
8
- `,v=`
8
+ `,S=`
9
9
  mutation MarkNotificationRead($id: ID!) {
10
10
  markNotificationAsRead(id: $id) {
11
11
  id isRead readAt
12
12
  }
13
13
  }
14
- `,O=`
14
+ `,q=`
15
15
  query NotificationPreferences($filter: NotificationPreferenceFilterInput, $limit: Int) {
16
16
  notificationPreferences(filter: $filter, limit: $limit) {
17
17
  items { id channel enabled frequency scope topicId userId }
18
18
  }
19
19
  }
20
- `,R=`
20
+ `,P=`
21
21
  mutation CreateNotificationPreference($input: CreateNotificationPreferenceInput!) {
22
22
  createNotificationPreference(input: $input) {
23
23
  id channel enabled frequency
24
24
  }
25
25
  }
26
- `;function S(e){let n=e.command("notifications").description("Notification inbox & preferences");n.command("list").description("List the current user's notifications").option("--unread","Only unread").option("--channel <c>","Filter by channel").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let r={};t.unread&&(r.isRead=!1),t.channel&&(r.channel=t.channel.toUpperCase());let p=await d(A,{filter:Object.keys(r).length?r:void 0,limit:t.limit,offset:0});h(t,p.notifications.items,{headers:["ID","Title","Channel","Status","Read","When"],rows:p.notifications.items.map(s=>[g(s.id,12),g(s.title??"-",40),s.channel??"-",E(s.status),String(!!s.isRead),T(s.createdAt)])});}catch(r){f(r);}}),n.command("read").description("Mark a notification as read").argument("<id>").action(async t=>{try{await d(v,{id:t}),w("Notification marked read");}catch(r){f(r);}});let i=n.command("preferences").description("Notification preferences");i.command("get").description("Show current user's notification preferences").option("--user <id>","Override user id").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let r=k().auth.read(),p=t.user??r?.workspaceId??"",s=p?{userId:p}:{},x=await d(O,{filter:Object.keys(s).length?s:void 0,limit:t.limit});h(t,x.notificationPreferences.items,{headers:["ID","Channel","Enabled","Frequency","Scope"],rows:x.notificationPreferences.items.map(l=>[g(l.id,12),l.channel,String(l.enabled),l.frequency??"-",l.scope??"-"])});}catch(r){f(r);}}),i.command("set").description("Set a notification preference").requiredOption("--channel <c>","EMAIL|SMS|IN_APP|PUSH|WEBHOOK").requiredOption("--enabled <bool>","true or false").option("--frequency <f>","IMMEDIATE|HOURLY|DAILY|WEEKLY","IMMEDIATE").option("--scope <s>","GLOBAL|WORKSPACE|VIBE","GLOBAL").option("--topic <id>").option("--user <id>").action(async t=>{try{let r={channel:t.channel.toUpperCase(),enabled:t.enabled==="true",frequency:(t.frequency??"IMMEDIATE").toUpperCase(),scope:(t.scope??"GLOBAL").toUpperCase(),topicId:t.topic,userId:t.user??k().auth.read()?.workspaceId};await d(R,{input:r}),w("Preference saved");}catch(r){f(r);}});}var U={id:"notifications",version:"1.0.0",displayName:"Notifications",dependsOn:["auth"],register(e,n){I(n),S(e);}},tt=U;module.exports=tt;
26
+ `;function N(e){let n=e.command("notifications").description("Notification inbox & preferences");n.command("list").description("List the current user's notifications").option("--unread","Only unread").option("--channel <c>","Filter by channel").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let r={};t.unread&&(r.isRead=!1),t.channel&&(r.channel=t.channel.toUpperCase());let a=await g(R,{filter:Object.keys(r).length?r:void 0,limit:t.limit,offset:0});x(t,a.notifications.items,{headers:["ID","Title","Channel","Status","Read","When"],rows:a.notifications.items.map(i=>[w(i.id,12),w(i.title??"-",40),i.channel??"-",v(i.status),String(!!i.isRead),O(i.createdAt)])});}catch(r){m(r);}}),n.command("read").description("Mark a notification as read").argument("<id>").action(async t=>{try{await g(S,{id:t}),y("Notification marked read");}catch(r){m(r);}});let o=n.command("preferences").description("Notification preferences");o.command("get").description("Show current user's notification preferences").option("--user <id>","Override user id").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let r=b().auth.read(),a=t.user??r?.workspaceId??"",i=a?{userId:a}:{},I=await g(q,{filter:Object.keys(i).length?i:void 0,limit:t.limit});x(t,I.notificationPreferences.items,{headers:["ID","Channel","Enabled","Frequency","Scope"],rows:I.notificationPreferences.items.map(d=>[w(d.id,12),d.channel,String(d.enabled),d.frequency??"-",d.scope??"-"])});}catch(r){m(r);}}),o.command("set").description("Set a notification preference").requiredOption("--channel <c>","EMAIL|SMS|IN_APP|PUSH|WEBHOOK").requiredOption("--enabled <bool>","true or false").option("--frequency <f>","IMMEDIATE|HOURLY|DAILY|WEEKLY","IMMEDIATE").option("--scope <s>","GLOBAL|WORKSPACE|VIBE","GLOBAL").option("--topic <id>").option("--user <id>").action(async t=>{try{let r={channel:t.channel.toUpperCase(),enabled:t.enabled==="true",frequency:(t.frequency??"IMMEDIATE").toUpperCase(),scope:(t.scope??"GLOBAL").toUpperCase(),topicId:t.topic,userId:t.user??b().auth.read()?.workspaceId};await g(P,{input:r}),y("Preference saved");}catch(r){m(r);}});}var H={id:"notifications",version:"1.0.0",displayName:"Notifications",dependsOn:["auth"],register(e,n){A(n),N(e);}},ot=H;module.exports=ot;
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-BNVKV_pI.cjs';
1
+ import { C as CliModule } from '../../module-DWSAfs3k.cjs';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-BNVKV_pI.js';
1
+ import { C as CliModule } from '../../module-DWSAfs3k.js';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import {a,c,i,r,p,q,h as h$1,k,u}from'../../chunk-3ZVMC2AF.js';import'../../chunk-ZT6KOG7N.js';var h=`
1
+ import {a,c,i,r,p,q,h as h$1,k,u}from'../../chunk-BGNPGKJM.js';import'../../chunk-N7EXKGE2.js';var h=`
2
2
  query ListNotifications($filter: NotificationFilterInput, $limit: Int, $offset: Int) {
3
3
  notifications(filter: $filter, limit: $limit, offset: $offset) {
4
4
  items { id title message channel status isRead createdAt }
@@ -1,4 +1,4 @@
1
- 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var u=class extends Error{exitCode;hint;constructor(t,s){super(t),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}};var a=class extends Error{cause;constructor(t,s){super(t),this.name="CliInternalError",this.cause=s;}};var g=null;function y(e){g=e;}function c(){if(!g)throw new a("vibecontrols module helpers used before setHelpersContext was called");return g}async function p(e,t){return c().gql.global.request(e,t)}function l(e){let t=e instanceof Error?e.message:String(e);throw new u(t)}function f(e,t,s){c().output.formatAndOutput(e,t,s);}function m(e){c().output.printSuccess(e);}function h(e){return c().output.formatStatus(e)}function w(e){return c().output.formatDate(e)}function d(e,t){return c().output.truncate(e,t)}var I=`
1
+ 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var a=class extends Error{exitCode;hint;constructor(t,o){super(t),this.name="CliUserError",this.exitCode=o?.exitCode??1,this.hint=o?.hint;}},c=class extends a{constructor(t,o){super(t,{exitCode:2,hint:o?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},u=class extends Error{cause;constructor(t,o){super(t),this.name="CliInternalError",this.cause=o;}};function h(e){if(e instanceof c||e instanceof a)return e;let t=w(e)&&w(e.response)?e.response:void 0,o=t?.errors,r=Array.isArray(o)?o[0]:void 0,n=(w(r)&&w(r.extensions)?r.extensions:void 0)?.code,l=t?.status;return n==="UNAUTHENTICATED"||l===401?new c("Authentication required."):n==="FORBIDDEN"||l===403?new a("Permission denied."):n==="BAD_USER_INPUT"||n==="GRAPHQL_VALIDATION_FAILED"||l===400?new a("Invalid request. Check the command arguments."):n==="NOT_FOUND"||l===404?new a("Requested resource was not found."):n==="RATE_LIMITED"||n==="TOO_MANY_REQUESTS"||l===429?new a("Request limit reached. Try again later."):new u("The request could not be completed. Try again later.")}var d=class extends Error{response;constructor(t,o){super(t),this.name="GqlRequestError",this.response=o;}};function w(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var x=null;function E(e){x=e;}function p(){if(!x)throw new u("vibecontrols module helpers used before setHelpersContext was called");return x}async function f(e,t){return p().gql.global.request(e,t)}function g(e){throw e instanceof c||e instanceof a||e instanceof u?e:e instanceof d||e!==null&&typeof e=="object"&&"response"in e?h(e):new u("The command could not be completed. Try again later.")}function k(e,t,o){p().output.formatAndOutput(e,t,o);}function C(e){p().output.printSuccess(e);}function y(e){return p().output.formatStatus(e)}function I(e){return p().output.formatDate(e)}function m(e,t){return p().output.truncate(e,t)}var v=`
2
2
  query MyOrganizations($limit: Int, $offset: Int) {
3
3
  myOrganizations(limit: $limit, offset: $offset) {
4
4
  items {
@@ -15,7 +15,7 @@
15
15
  hasMore
16
16
  }
17
17
  }
18
- `,b=`
18
+ `,A=`
19
19
  query MyOrganizationInvites($status: InviteStatus, $limit: Int, $offset: Int) {
20
20
  myOrganizationInvites(status: $status, limit: $limit, offset: $offset) {
21
21
  items {
@@ -32,7 +32,7 @@
32
32
  hasMore
33
33
  }
34
34
  }
35
- `,v=`
35
+ `,O=`
36
36
  mutation AcceptOrganizationInvite($inviteId: ID!) {
37
37
  acceptOrganizationInvite(inviteId: $inviteId) {
38
38
  id
@@ -42,7 +42,7 @@
42
42
  joinedAt
43
43
  }
44
44
  }
45
- `,T=`
45
+ `,R=`
46
46
  mutation RejectOrganizationInvite($inviteId: ID!) {
47
47
  rejectOrganizationInvite(inviteId: $inviteId) {
48
48
  id
@@ -50,4 +50,4 @@
50
50
  respondedAt
51
51
  }
52
52
  }
53
- `;function E(e){let t=e.command("organizations").description("Organization membership & invites");t.command("list").description("List organizations the current user is a member of").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let o=await p(I,{limit:n.limit,offset:0});f(n,o.myOrganizations.items,{headers:["ID","Name","Slug","TenantID","Status","Created"],rows:o.myOrganizations.items.map(i=>[d(i.id,12),i.name,i.slug,d(i.tenantId,12),h(i.status),w(i.createdAt)])});}catch(o){l(o);}});let s=t.command("invites").description("Manage org invites");s.command("list").description("List pending org invites for the current user").option("--status <s>","Filter by invite status","PENDING").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let o=await p(b,{status:n.status?.toUpperCase(),limit:n.limit,offset:0});f(n,o.myOrganizationInvites.items,{headers:["InviteID","OrgID","Email","Role","Status","Expires"],rows:o.myOrganizationInvites.items.map(i=>[d(i.id,12),d(i.organizationId,12),i.email,i.role,h(i.status),w(i.expiresAt)])});}catch(o){l(o);}}),s.command("accept").description("Accept an organization invite").argument("<inviteId>").action(async n=>{try{await p(v,{inviteId:n}),m("Invite accepted");}catch(o){l(o);}}),s.command("decline").description("Decline an organization invite").argument("<inviteId>").action(async n=>{try{await p(T,{inviteId:n}),m("Invite declined");}catch(o){l(o);}});}var W={id:"organizations",version:"1.0.0",displayName:"Organizations",dependsOn:["auth"],register(e,t){y(t),E(e);}},Qe=W;module.exports=Qe;
53
+ `;function S(e){let t=e.command("organizations").description("Organization membership & invites");t.command("list").description("List organizations the current user is a member of").option("--limit <n>","Page size",r=>parseInt(r,10),50).option("-f, --format <format>","Output format").action(async r=>{try{let i=await f(v,{limit:r.limit,offset:0});k(r,i.myOrganizations.items,{headers:["ID","Name","Slug","TenantID","Status","Created"],rows:i.myOrganizations.items.map(n=>[m(n.id,12),n.name,n.slug,m(n.tenantId,12),y(n.status),I(n.createdAt)])});}catch(i){g(i);}});let o=t.command("invites").description("Manage org invites");o.command("list").description("List pending org invites for the current user").option("--status <s>","Filter by invite status","PENDING").option("--limit <n>","Page size",r=>parseInt(r,10),50).option("-f, --format <format>","Output format").action(async r=>{try{let i=await f(A,{status:r.status?.toUpperCase(),limit:r.limit,offset:0});k(r,i.myOrganizationInvites.items,{headers:["InviteID","OrgID","Email","Role","Status","Expires"],rows:i.myOrganizationInvites.items.map(n=>[m(n.id,12),m(n.organizationId,12),n.email,n.role,y(n.status),I(n.expiresAt)])});}catch(i){g(i);}}),o.command("accept").description("Accept an organization invite").argument("<inviteId>").action(async r=>{try{await f(O,{inviteId:r}),C("Invite accepted");}catch(i){g(i);}}),o.command("decline").description("Decline an organization invite").argument("<inviteId>").action(async r=>{try{await f(R,{inviteId:r}),C("Invite declined");}catch(i){g(i);}});}var j={id:"organizations",version:"1.0.0",displayName:"Organizations",dependsOn:["auth"],register(e,t){E(t),S(e);}},tt=j;module.exports=tt;
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-BNVKV_pI.cjs';
1
+ import { C as CliModule } from '../../module-DWSAfs3k.cjs';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-BNVKV_pI.js';
1
+ import { C as CliModule } from '../../module-DWSAfs3k.js';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import {a,c,i,r,p,q,h,k}from'../../chunk-3ZVMC2AF.js';import'../../chunk-ZT6KOG7N.js';var f=`
1
+ import {a,c,i,r,p,q,h,k}from'../../chunk-BGNPGKJM.js';import'../../chunk-N7EXKGE2.js';var f=`
2
2
  query MyOrganizations($limit: Int, $offset: Int) {
3
3
  myOrganizations(limit: $limit, offset: $offset) {
4
4
  items {