@burdenoff/cli-sdk 2026.627.5 → 2026.629.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.
@@ -0,0 +1,276 @@
1
+ import {a,b as b$1,h,p,g,i,d}from'../../chunk-WXDQ3S5J.js';import {o}from'../../chunk-TCBALVP4.js';var y=`
2
+ query AthListTeams(
3
+ $pagination: PaginationInput
4
+ $sport: AthSport
5
+ $status: AthTeamStatus
6
+ ) {
7
+ athListTeams(pagination: $pagination, sport: $sport, status: $status) {
8
+ items {
9
+ id name sport status season ageGroup homeVenue headCoachId
10
+ tags createdAt updatedAt workspaceId
11
+ }
12
+ pageInfo { cursor hasMore }
13
+ }
14
+ }
15
+ `,w=`
16
+ query AthTeam($id: ID!) {
17
+ athTeam(id: $id) {
18
+ id name description sport status season ageGroup homeVenue headCoachId
19
+ tags createdAt updatedAt workspaceId
20
+ members { id displayName role status jerseyNumber position userId }
21
+ fixtures { id homeTeamId awayTeamId scheduledAt status type competition }
22
+ }
23
+ }
24
+ `,b=`
25
+ mutation AthCreateTeam($input: AthCreateTeamInput!) {
26
+ athCreateTeam(input: $input) {
27
+ id name description sport status season ageGroup homeVenue headCoachId
28
+ tags createdAt workspaceId
29
+ }
30
+ }
31
+ `,R=`
32
+ mutation AthUpdateTeam($id: ID!, $input: AthUpdateTeamInput!) {
33
+ athUpdateTeam(id: $id, input: $input) {
34
+ id name description sport status season ageGroup homeVenue headCoachId
35
+ tags updatedAt
36
+ }
37
+ }
38
+ `,C=`
39
+ mutation AthArchiveTeam($id: ID!) {
40
+ athArchiveTeam(id: $id)
41
+ }
42
+ `,T=`
43
+ query AthListMembers($teamId: ID!, $status: AthMemberStatus) {
44
+ athListMembers(teamId: $teamId, status: $status) {
45
+ id teamId userId displayName role status jerseyNumber position
46
+ dominantSide height weight joinedAt notes createdAt updatedAt workspaceId
47
+ }
48
+ }
49
+ `,k=`
50
+ mutation AthAddMember($input: AthAddMemberInput!) {
51
+ athAddMember(input: $input) {
52
+ id teamId userId displayName role status jerseyNumber position
53
+ dominantSide height weight joinedAt notes createdAt workspaceId
54
+ }
55
+ }
56
+ `,O=`
57
+ mutation AthUpdateMember($id: ID!, $input: AthUpdateMemberInput!) {
58
+ athUpdateMember(id: $id, input: $input) {
59
+ id teamId userId displayName role status jerseyNumber position
60
+ dominantSide height weight notes updatedAt
61
+ }
62
+ }
63
+ `,E=`
64
+ mutation AthRemoveMember($id: ID!) {
65
+ athRemoveMember(id: $id)
66
+ }
67
+ `,M=`
68
+ query AthListPrograms(
69
+ $pagination: PaginationInput
70
+ $level: AthProgramLevel
71
+ $sport: AthSport
72
+ $status: AthProgramStatus
73
+ ) {
74
+ athListPrograms(
75
+ pagination: $pagination
76
+ level: $level
77
+ sport: $sport
78
+ status: $status
79
+ ) {
80
+ items {
81
+ id name summary sport level status weeks isTemplate coachId
82
+ tags createdAt updatedAt workspaceId
83
+ }
84
+ pageInfo { cursor hasMore }
85
+ }
86
+ }
87
+ `,$=`
88
+ query AthProgram($id: ID!) {
89
+ athProgram(id: $id) {
90
+ id name summary sport level status weeks isTemplate coachId
91
+ tags createdAt updatedAt workspaceId
92
+ drills {
93
+ id name description weekNumber orderIndex sets reps durationSec
94
+ restSec
95
+ }
96
+ }
97
+ }
98
+ `,D=`
99
+ mutation AthCreateProgram($input: AthCreateProgramInput!) {
100
+ athCreateProgram(input: $input) {
101
+ id name summary sport level status weeks isTemplate coachId
102
+ tags createdAt workspaceId
103
+ }
104
+ }
105
+ `,L=`
106
+ mutation AthUpdateProgram($id: ID!, $input: AthUpdateProgramInput!) {
107
+ athUpdateProgram(id: $id, input: $input) {
108
+ id name summary sport level status weeks isTemplate tags updatedAt
109
+ }
110
+ }
111
+ `,v=`
112
+ mutation AthTransitionProgram($id: ID!, $status: AthProgramStatus!) {
113
+ athTransitionProgram(id: $id, status: $status) {
114
+ id name status updatedAt
115
+ }
116
+ }
117
+ `,P=`
118
+ mutation AthArchiveProgram($id: ID!) {
119
+ athArchiveProgram(id: $id)
120
+ }
121
+ `,x=`
122
+ mutation AthAddDrill($input: AthAddDrillInput!) {
123
+ athAddDrill(input: $input) {
124
+ id programId name description weekNumber orderIndex sets reps
125
+ durationSec restSec createdAt workspaceId
126
+ }
127
+ }
128
+ `,N=`
129
+ mutation AthRemoveDrill($id: ID!) {
130
+ athRemoveDrill(id: $id)
131
+ }
132
+ `,U=`
133
+ query AthListSessions(
134
+ $pagination: PaginationInput
135
+ $athleteId: ID
136
+ $coachId: ID
137
+ $status: AthSessionStatus
138
+ ) {
139
+ athListSessions(
140
+ pagination: $pagination
141
+ athleteId: $athleteId
142
+ coachId: $coachId
143
+ status: $status
144
+ ) {
145
+ items {
146
+ id title type status athleteId coachId programId scheduledAt
147
+ durationMin location meetingUrl completedAt rating feedback
148
+ createdAt updatedAt workspaceId
149
+ }
150
+ pageInfo { cursor hasMore }
151
+ }
152
+ }
153
+ `,F=`
154
+ query AthSession($id: ID!) {
155
+ athSession(id: $id) {
156
+ id title type status athleteId coachId programId scheduledAt
157
+ durationMin location meetingUrl completedAt rating feedback
158
+ createdAt updatedAt workspaceId
159
+ }
160
+ }
161
+ `,_=`
162
+ mutation AthBookSession($input: AthBookSessionInput!) {
163
+ athBookSession(input: $input) {
164
+ id title type status athleteId coachId programId scheduledAt
165
+ durationMin location meetingUrl createdAt workspaceId
166
+ }
167
+ }
168
+ `,G=`
169
+ mutation AthConfirmSession($id: ID!) {
170
+ athConfirmSession(id: $id) {
171
+ id title status scheduledAt updatedAt
172
+ }
173
+ }
174
+ `,W=`
175
+ mutation AthCancelSession($id: ID!) {
176
+ athCancelSession(id: $id) {
177
+ id title status updatedAt
178
+ }
179
+ }
180
+ `,q=`
181
+ mutation AthCompleteSession($id: ID!, $input: AthCompleteSessionInput) {
182
+ athCompleteSession(id: $id, input: $input) {
183
+ id title status completedAt rating feedback updatedAt
184
+ }
185
+ }
186
+ `,B=`
187
+ query AthListWorkoutLogs(
188
+ $pagination: PaginationInput
189
+ $athleteId: ID
190
+ $programId: ID
191
+ ) {
192
+ athListWorkoutLogs(
193
+ pagination: $pagination
194
+ athleteId: $athleteId
195
+ programId: $programId
196
+ ) {
197
+ items {
198
+ id title status athleteId programId performedAt durationMin
199
+ totalLoad rpe notes metrics createdAt updatedAt workspaceId
200
+ }
201
+ pageInfo { cursor hasMore }
202
+ }
203
+ }
204
+ `,H=`
205
+ mutation AthLogWorkout($input: AthLogWorkoutInput!) {
206
+ athLogWorkout(input: $input) {
207
+ id title status athleteId programId performedAt durationMin
208
+ totalLoad rpe notes metrics createdAt workspaceId
209
+ }
210
+ }
211
+ `,j=`
212
+ query AthPerformanceMetrics($athleteId: ID!, $type: AthMetricType) {
213
+ athPerformanceMetrics(athleteId: $athleteId, type: $type) {
214
+ id athleteId label type value unit source recordedAt
215
+ createdAt updatedAt workspaceId
216
+ }
217
+ }
218
+ `,V=`
219
+ mutation AthRecordMetric($input: AthRecordMetricInput!) {
220
+ athRecordMetric(input: $input) {
221
+ id athleteId label type value unit source recordedAt
222
+ createdAt workspaceId
223
+ }
224
+ }
225
+ `,J=`
226
+ query AthListFixtures(
227
+ $pagination: PaginationInput
228
+ $status: AthFixtureStatus
229
+ $teamId: ID
230
+ ) {
231
+ athListFixtures(pagination: $pagination, status: $status, teamId: $teamId) {
232
+ items {
233
+ id type status competition round homeTeamId awayTeamId
234
+ homeScore awayScore scheduledAt kickoffAt venue notes
235
+ createdAt updatedAt workspaceId
236
+ }
237
+ pageInfo { cursor hasMore }
238
+ }
239
+ }
240
+ `,X=`
241
+ query AthFixture($id: ID!) {
242
+ athFixture(id: $id) {
243
+ id type status competition round homeTeamId awayTeamId
244
+ homeScore awayScore scheduledAt kickoffAt venue notes
245
+ createdAt updatedAt workspaceId
246
+ homeTeam { id name }
247
+ awayTeam { id name }
248
+ }
249
+ }
250
+ `,K=`
251
+ mutation AthScheduleFixture($input: AthCreateFixtureInput!) {
252
+ athScheduleFixture(input: $input) {
253
+ id type status competition round homeTeamId awayTeamId
254
+ scheduledAt kickoffAt venue notes createdAt workspaceId
255
+ }
256
+ }
257
+ `,z=`
258
+ mutation AthRecordFixtureResult($id: ID!, $input: AthRecordResultInput!) {
259
+ athRecordFixtureResult(id: $id, input: $input) {
260
+ id type status competition homeTeamId awayTeamId
261
+ homeScore awayScore updatedAt
262
+ }
263
+ }
264
+ `,Y=`
265
+ query AthStandings($competition: String!) {
266
+ athStandings(competition: $competition) {
267
+ id competition teamId rank played won drawn lost
268
+ goalsFor goalsAgainst points createdAt updatedAt workspaceId
269
+ team { id name }
270
+ }
271
+ }
272
+ `,Q=`
273
+ query AthHealth {
274
+ athHealth
275
+ }
276
+ `;function Z(d,r){try{return JSON.parse(r)}catch{throw new o(`--${d} must be valid JSON`)}}function m(d){let r=Number.parseInt(d,10);if(Number.isNaN(r))throw new o(`Expected an integer but got "${d}"`);return r}function l(d){let r=Number.parseFloat(d);if(Number.isNaN(r))throw new o(`Expected a number but got "${d}"`);return r}function I(d){return d.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function tt(d){let r=d.command("teams").description("AtheleteBridge teams");r.command("list").description("List teams").option("--sport <s>","Filter by sport").option("--status <s>","Filter by team status").option("--limit <n>","Page size",m,50).option("--offset <n>","Offset",m,0).option("-f, --format <format>","Output format").action(async o=>{try{let t=await b$1(y,{pagination:{limit:o.limit,offset:o.offset},sport:o.sport?o.sport.toUpperCase():void 0,status:o.status?o.status.toUpperCase():void 0});h(o,t.athListTeams.items,{headers:["ID","Name","Sport","Status","Season"],rows:t.athListTeams.items.map(e=>[p(e.id,12),e.name,e.sport,e.status,e.season??"-"])});}catch(t){g(t);}}),r.command("get").description("Get a team by id").argument("<id>","Team ID").option("-f, --format <format>","Output format").action(async(o$1,t)=>{try{let e=await b$1(w,{id:o$1});if(!e.athTeam)throw new o(`Team ${o$1} not found`);h(t,e.athTeam);}catch(e){g(e);}}),r.command("create").description("Create a team").requiredOption("--name <name>","Team name").option("--description <s>","Description").option("--sport <s>","Sport","OTHER").option("--status <s>","Team status","FORMING").option("--season <s>","Season").option("--age-group <s>","Age group").option("--home-venue <s>","Home venue").option("--head-coach-id <id>","Head coach user ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async o=>{try{let t={name:o.name,sport:(o.sport??"OTHER").toUpperCase(),status:(o.status??"FORMING").toUpperCase()};o.description&&(t.description=o.description),o.season&&(t.season=o.season),o.ageGroup&&(t.ageGroup=o.ageGroup),o.homeVenue&&(t.homeVenue=o.homeVenue),o.headCoachId&&(t.headCoachId=o.headCoachId),o.tags&&(t.tags=I(o.tags));let e=await b$1(b,{input:t});i(`Team created: ${e.athCreateTeam.name}`),h(o,e.athCreateTeam);}catch(t){g(t);}}),r.command("update").description("Update a team").argument("<id>","Team ID").option("--name <name>","Team name").option("--description <s>","Description").option("--sport <s>","Sport").option("--status <s>","Team status").option("--season <s>","Season").option("--age-group <s>","Age group").option("--home-venue <s>","Home venue").option("--head-coach-id <id>","Head coach user ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(o$1,t)=>{try{let e={};if(t.name&&(e.name=t.name),t.description!==void 0&&(e.description=t.description),t.sport&&(e.sport=t.sport.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.season&&(e.season=t.season),t.ageGroup&&(e.ageGroup=t.ageGroup),t.homeVenue&&(e.homeVenue=t.homeVenue),t.headCoachId&&(e.headCoachId=t.headCoachId),t.tags&&(e.tags=I(t.tags)),!Object.keys(e).length)throw new o("No updates specified");let i$1=await b$1(R,{id:o$1,input:e});i("Team updated"),h(t,i$1.athUpdateTeam);}catch(e){g(e);}}),r.command("archive").description("Archive a team").argument("<id>","Team ID").option("-f, --format <format>","Output format").action(async(o,t)=>{try{let e=await b$1(C,{id:o});i(e.athArchiveTeam?`Team ${o} archived`:`Team ${o} not archived`),h(t,{archived:e.athArchiveTeam});}catch(e){g(e);}});}function et(d){let r=d.command("members").description("AtheleteBridge team members");r.command("list").description("List members of a team").requiredOption("--team <id>","Team ID").option("--status <s>","Filter by member status").option("-f, --format <format>","Output format").action(async o=>{try{let t=await b$1(T,{teamId:o.team,status:o.status?o.status.toUpperCase():void 0});h(o,t.athListMembers,{headers:["ID","Name","Role","Status","Jersey","Position"],rows:t.athListMembers.map(e=>[p(e.id,12),e.displayName,e.role,e.status,e.jerseyNumber!==void 0&&e.jerseyNumber!==null?String(e.jerseyNumber):"-",e.position??"-"])});}catch(t){g(t);}}),r.command("add").description("Add a member to a team").requiredOption("--team <id>","Team ID").requiredOption("--user <id>","User ID").requiredOption("--display-name <name>","Display name").option("--role <r>","Member role","PLAYER").option("--status <s>","Member status","ACTIVE").option("--jersey-number <n>","Jersey number",m).option("--position <s>","Position").option("--dominant-side <s>","Dominant side").option("--height <n>","Height",l).option("--weight <n>","Weight",l).option("--joined-at <iso>","Joined at (ISO timestamp)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async o=>{try{let t={teamId:o.team,userId:o.user,displayName:o.displayName,role:(o.role??"PLAYER").toUpperCase(),status:(o.status??"ACTIVE").toUpperCase()};o.jerseyNumber!==void 0&&(t.jerseyNumber=o.jerseyNumber),o.position&&(t.position=o.position),o.dominantSide&&(t.dominantSide=o.dominantSide),o.height!==void 0&&(t.height=o.height),o.weight!==void 0&&(t.weight=o.weight),o.joinedAt&&(t.joinedAt=o.joinedAt),o.notes&&(t.notes=o.notes);let e=await b$1(k,{input:t});i(`Member added: ${e.athAddMember.displayName}`),h(o,e.athAddMember);}catch(t){g(t);}}),r.command("update").description("Update a team member").argument("<id>","Member ID").option("--display-name <name>","Display name").option("--role <r>","Member role").option("--status <s>","Member status").option("--jersey-number <n>","Jersey number",m).option("--position <s>","Position").option("--dominant-side <s>","Dominant side").option("--height <n>","Height",l).option("--weight <n>","Weight",l).option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async(o$1,t)=>{try{let e={};if(t.displayName&&(e.displayName=t.displayName),t.role&&(e.role=t.role.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.jerseyNumber!==void 0&&(e.jerseyNumber=t.jerseyNumber),t.position&&(e.position=t.position),t.dominantSide&&(e.dominantSide=t.dominantSide),t.height!==void 0&&(e.height=t.height),t.weight!==void 0&&(e.weight=t.weight),t.notes!==void 0&&(e.notes=t.notes),!Object.keys(e).length)throw new o("No updates specified");let i$1=await b$1(O,{id:o$1,input:e});i("Member updated"),h(t,i$1.athUpdateMember);}catch(e){g(e);}}),r.command("remove").description("Remove a team member").argument("<id>","Member ID").option("-f, --format <format>","Output format").action(async(o,t)=>{try{let e=await b$1(E,{id:o});i(e.athRemoveMember?`Member ${o} removed`:`Member ${o} not removed`),h(t,{removed:e.athRemoveMember});}catch(e){g(e);}});}function ot(d){let r=d.command("programs").description("AtheleteBridge training programs");r.command("list").description("List training programs").option("--level <l>","Filter by program level").option("--sport <s>","Filter by sport").option("--status <s>","Filter by program status").option("--limit <n>","Page size",m,50).option("--offset <n>","Offset",m,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(M,{pagination:{limit:t.limit,offset:t.offset},level:t.level?t.level.toUpperCase():void 0,sport:t.sport?t.sport.toUpperCase():void 0,status:t.status?t.status.toUpperCase():void 0});h(t,e.athListPrograms.items,{headers:["ID","Name","Sport","Level","Status","Weeks"],rows:e.athListPrograms.items.map(i=>[p(i.id,12),i.name,i.sport,i.level,i.status,i.weeks!==void 0&&i.weeks!==null?String(i.weeks):"-"])});}catch(e){g(e);}}),r.command("get").description("Get a training program by id").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i=await b$1($,{id:t});if(!i.athProgram)throw new o(`Program ${t} not found`);h(e,i.athProgram);}catch(i){g(i);}}),r.command("create").description("Create a training program").requiredOption("--name <name>","Program name").option("--summary <s>","Summary").option("--sport <s>","Sport","OTHER").option("--level <l>","Level","BEGINNER").option("--weeks <n>","Number of weeks",m).option("--template","Mark as a template").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,sport:(t.sport??"OTHER").toUpperCase(),level:(t.level??"BEGINNER").toUpperCase(),isTemplate:!!t.template};t.summary&&(e.summary=t.summary),t.weeks!==void 0&&(e.weeks=t.weeks),t.tags&&(e.tags=I(t.tags));let i$1=await b$1(D,{input:e});i(`Program created: ${i$1.athCreateProgram.name}`),h(t,i$1.athCreateProgram);}catch(e){g(e);}}),r.command("update").description("Update a training program").argument("<id>","Program ID").option("--name <name>","Program name").option("--summary <s>","Summary").option("--sport <s>","Sport").option("--level <l>","Level").option("--weeks <n>","Number of weeks",m).option("--template <bool>","Template flag (true|false)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1={};if(e.name&&(i$1.name=e.name),e.summary!==void 0&&(i$1.summary=e.summary),e.sport&&(i$1.sport=e.sport.toUpperCase()),e.level&&(i$1.level=e.level.toUpperCase()),e.weeks!==void 0&&(i$1.weeks=e.weeks),e.template!==void 0&&(i$1.isTemplate=e.template==="true"),e.tags&&(i$1.tags=I(e.tags)),!Object.keys(i$1).length)throw new o("No updates specified");let dt=await b$1(L,{id:t,input:i$1});i("Program updated"),h(e,dt.athUpdateProgram);}catch(i){g(i);}}),r.command("transition").description("Advance a program through its publish lifecycle (DRAFT -> PUBLISHED -> ARCHIVED)").argument("<id>","Program ID").requiredOption("--status <s>","Target status: DRAFT|PUBLISHED|ARCHIVED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(v,{id:t,status:e.status.toUpperCase()});i(`Program transitioned to ${i$1.athTransitionProgram.status}`),h(e,i$1.athTransitionProgram);}catch(i){g(i);}}),r.command("archive").description("Archive a training program").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(P,{id:t});i(i$1.athArchiveProgram?`Program ${t} archived`:`Program ${t} not archived`),h(e,{archived:i$1.athArchiveProgram});}catch(i){g(i);}});let o$1=r.command("drills").description("AtheleteBridge program drills");o$1.command("add").description("Add a drill to a program").requiredOption("--program <id>","Program ID").requiredOption("--name <name>","Drill name").option("--description <s>","Description").option("--week-number <n>","Week number",m,1).option("--order-index <n>","Order index",m,0).option("--sets <n>","Sets",m).option("--reps <n>","Reps",m).option("--duration-sec <n>","Duration (seconds)",m).option("--rest-sec <n>","Rest (seconds)",m).option("--video-file-id <id>","Video file ID (wspace-files-svc)").option("-f, --format <format>","Output format").action(async t=>{try{let e={programId:t.program,name:t.name,weekNumber:t.weekNumber??1,orderIndex:t.orderIndex??0};t.description&&(e.description=t.description),t.sets!==void 0&&(e.sets=t.sets),t.reps!==void 0&&(e.reps=t.reps),t.durationSec!==void 0&&(e.durationSec=t.durationSec),t.restSec!==void 0&&(e.restSec=t.restSec),t.videoFileId&&(e.videoFileId=t.videoFileId);let i$1=await b$1(x,{input:e});i(`Drill added: ${i$1.athAddDrill.name}`),h(t,i$1.athAddDrill);}catch(e){g(e);}}),o$1.command("remove").description("Remove a drill").argument("<id>","Drill ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let i$1=await b$1(N,{id:t});i(i$1.athRemoveDrill?`Drill ${t} removed`:`Drill ${t} not removed`),h(e,{removed:i$1.athRemoveDrill});}catch(i){g(i);}});}function rt(d){let r=d.command("sessions").description("AtheleteBridge coaching sessions");r.command("list").description("List sessions").option("--athlete <id>","Filter by athlete ID").option("--coach <id>","Filter by coach ID").option("--status <s>","Filter by session status").option("--limit <n>","Page size",m,50).option("--offset <n>","Offset",m,0).option("-f, --format <format>","Output format").action(async o=>{try{let t=await b$1(U,{pagination:{limit:o.limit,offset:o.offset},athleteId:o.athlete,coachId:o.coach,status:o.status?o.status.toUpperCase():void 0});h(o,t.athListSessions.items,{headers:["ID","Title","Type","Status","Scheduled"],rows:t.athListSessions.items.map(e=>[p(e.id,12),e.title,e.type,e.status,e.scheduledAt])});}catch(t){g(t);}}),r.command("get").description("Get a session by id").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(o$1,t)=>{try{let e=await b$1(F,{id:o$1});if(!e.athSession)throw new o(`Session ${o$1} not found`);h(t,e.athSession);}catch(e){g(e);}}),r.command("book").description("Book a coaching session").requiredOption("--athlete <id>","Athlete ID").requiredOption("--coach <id>","Coach ID").requiredOption("--title <s>","Session title").requiredOption("--scheduled-at <iso>","Scheduled at (ISO timestamp)").option("--type <t>","Session type","IN_PERSON").option("--duration-min <n>","Duration (minutes)",m).option("--location <s>","Location").option("--meeting-url <url>","Meeting URL").option("--program <id>","Program ID").option("-f, --format <format>","Output format").action(async o=>{try{let t={athleteId:o.athlete,coachId:o.coach,title:o.title,scheduledAt:o.scheduledAt,type:(o.type??"IN_PERSON").toUpperCase()};o.durationMin!==void 0&&(t.durationMin=o.durationMin),o.location&&(t.location=o.location),o.meetingUrl&&(t.meetingUrl=o.meetingUrl),o.program&&(t.programId=o.program);let e=await b$1(_,{input:t});i(`Session booked: ${e.athBookSession.title}`),h(o,e.athBookSession);}catch(t){g(t);}}),r.command("confirm").description("Confirm a requested session").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(o,t)=>{try{let e=await b$1(G,{id:o});i(`Session confirmed: ${e.athConfirmSession.status}`),h(t,e.athConfirmSession);}catch(e){g(e);}}),r.command("cancel").description("Cancel a session").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(o,t)=>{try{let e=await b$1(W,{id:o});i(`Session cancelled: ${e.athCancelSession.status}`),h(t,e.athCancelSession);}catch(e){g(e);}}),r.command("complete").description("Complete a session (optionally with rating and feedback)").argument("<id>","Session ID").option("--rating <n>","Rating",m).option("--feedback <s>","Feedback").option("-f, --format <format>","Output format").action(async(o,t)=>{try{let e={};t.rating!==void 0&&(e.rating=t.rating),t.feedback&&(e.feedback=t.feedback);let i$1=await b$1(q,{id:o,input:Object.keys(e).length?e:void 0});i(`Session completed: ${i$1.athCompleteSession.status}`),h(t,i$1.athCompleteSession);}catch(e){g(e);}});}function it(d){let r=d.command("workouts").description("AtheleteBridge workout logs");r.command("list").description("List workout logs").option("--athlete <id>","Filter by athlete ID").option("--program <id>","Filter by program ID").option("--limit <n>","Page size",m,50).option("--offset <n>","Offset",m,0).option("-f, --format <format>","Output format").action(async o=>{try{let t=await b$1(B,{pagination:{limit:o.limit,offset:o.offset},athleteId:o.athlete,programId:o.program});h(o,t.athListWorkoutLogs.items,{headers:["ID","Title","Status","Performed","Load","RPE"],rows:t.athListWorkoutLogs.items.map(e=>[p(e.id,12),e.title,e.status,e.performedAt,e.totalLoad!==void 0&&e.totalLoad!==null?String(e.totalLoad):"-",e.rpe!==void 0&&e.rpe!==null?String(e.rpe):"-"])});}catch(t){g(t);}}),r.command("log").description("Log a workout").requiredOption("--title <s>","Workout title").requiredOption("--performed-at <iso>","Performed at (ISO timestamp)").option("--athlete <id>","Athlete ID").option("--program <id>","Program ID").option("--status <s>","Workout status","COMPLETED").option("--duration-min <n>","Duration (minutes)",m).option("--total-load <n>","Total load",l).option("--rpe <n>","Rate of perceived exertion",m).option("--notes <s>","Notes").option("--metrics <json>","Metrics JSON object").option("-f, --format <format>","Output format").action(async o=>{try{let t={title:o.title,performedAt:o.performedAt,status:(o.status??"COMPLETED").toUpperCase()};o.athlete&&(t.athleteId=o.athlete),o.program&&(t.programId=o.program),o.durationMin!==void 0&&(t.durationMin=o.durationMin),o.totalLoad!==void 0&&(t.totalLoad=o.totalLoad),o.rpe!==void 0&&(t.rpe=o.rpe),o.notes&&(t.notes=o.notes),o.metrics&&(t.metrics=Z("metrics",o.metrics));let e=await b$1(H,{input:t});i(`Workout logged: ${e.athLogWorkout.title}`),h(o,e.athLogWorkout);}catch(t){g(t);}});}function at(d){let r=d.command("metrics").description("AtheleteBridge performance metrics");r.command("list").description("List performance metrics for an athlete").requiredOption("--athlete <id>","Athlete ID").option("--type <t>","Filter by metric type").option("-f, --format <format>","Output format").action(async o=>{try{let t=await b$1(j,{athleteId:o.athlete,type:o.type?o.type.toUpperCase():void 0});h(o,t.athPerformanceMetrics,{headers:["ID","Label","Type","Value","Unit","Recorded"],rows:t.athPerformanceMetrics.map(e=>[p(e.id,12),e.label,e.type,String(e.value),e.unit??"-",e.recordedAt])});}catch(t){g(t);}}),r.command("record").description("Record a performance metric").requiredOption("--label <s>","Metric label").requiredOption("--value <n>","Metric value",l).requiredOption("--recorded-at <iso>","Recorded at (ISO timestamp)").option("--athlete <id>","Athlete ID").option("--type <t>","Metric type","CUSTOM").option("--unit <s>","Unit").option("--source <s>","Source").option("-f, --format <format>","Output format").action(async o=>{try{let t={label:o.label,value:o.value,recordedAt:o.recordedAt,type:(o.type??"CUSTOM").toUpperCase()};o.athlete&&(t.athleteId=o.athlete),o.unit&&(t.unit=o.unit),o.source&&(t.source=o.source);let e=await b$1(V,{input:t});i(`Metric recorded: ${e.athRecordMetric.label}`),h(o,e.athRecordMetric);}catch(t){g(t);}});}function nt(d){let r=d.command("fixtures").description("AtheleteBridge fixtures");r.command("list").description("List fixtures").option("--team <id>","Filter by team ID").option("--status <s>","Filter by fixture status").option("--limit <n>","Page size",m,50).option("--offset <n>","Offset",m,0).option("-f, --format <format>","Output format").action(async o=>{try{let t=await b$1(J,{pagination:{limit:o.limit,offset:o.offset},status:o.status?o.status.toUpperCase():void 0,teamId:o.team});h(o,t.athListFixtures.items,{headers:["ID","Type","Status","Competition","Scheduled","Score"],rows:t.athListFixtures.items.map(e=>[p(e.id,12),e.type,e.status,e.competition??"-",e.scheduledAt,e.homeScore!==void 0&&e.homeScore!==null&&e.awayScore!==void 0&&e.awayScore!==null?`${e.homeScore}-${e.awayScore}`:"-"])});}catch(t){g(t);}}),r.command("get").description("Get a fixture by id").argument("<id>","Fixture ID").option("-f, --format <format>","Output format").action(async(o$1,t)=>{try{let e=await b$1(X,{id:o$1});if(!e.athFixture)throw new o(`Fixture ${o$1} not found`);h(t,e.athFixture);}catch(e){g(e);}}),r.command("schedule").description("Schedule a fixture").requiredOption("--home-team <id>","Home team ID").requiredOption("--scheduled-at <iso>","Scheduled at (ISO timestamp)").option("--away-team <id>","Away team ID").option("--type <t>","Fixture type","FRIENDLY").option("--competition <s>","Competition").option("--round <s>","Round").option("--kickoff-at <iso>","Kickoff at (ISO timestamp)").option("--venue <s>","Venue").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async o=>{try{let t={homeTeamId:o.homeTeam,scheduledAt:o.scheduledAt,type:(o.type??"FRIENDLY").toUpperCase()};o.awayTeam&&(t.awayTeamId=o.awayTeam),o.competition&&(t.competition=o.competition),o.round&&(t.round=o.round),o.kickoffAt&&(t.kickoffAt=o.kickoffAt),o.venue&&(t.venue=o.venue),o.notes&&(t.notes=o.notes);let e=await b$1(K,{input:t});i(`Fixture scheduled: ${e.athScheduleFixture.id}`),h(o,e.athScheduleFixture);}catch(t){g(t);}}),r.command("record-result").description("Record a final result for a fixture and recompute standings").argument("<id>","Fixture ID").requiredOption("--home-score <n>","Home score",m).requiredOption("--away-score <n>","Away score",m).option("-f, --format <format>","Output format").action(async(o,t)=>{try{let e=await b$1(z,{id:o,input:{homeScore:t.homeScore,awayScore:t.awayScore}});i(`Result recorded: ${e.athRecordFixtureResult.homeScore??0}-${e.athRecordFixtureResult.awayScore??0}`),h(t,e.athRecordFixtureResult);}catch(e){g(e);}});}function st(d){d.command("standings").description("AtheleteBridge standings").command("list").description("List standings for a competition").requiredOption("--competition <s>","Competition name").option("-f, --format <format>","Output format").action(async o=>{try{let t=await b$1(Y,{competition:o.competition});h(o,t.athStandings,{headers:["Rank","Team","P","W","D","L","Pts"],rows:t.athStandings.map(e=>[e.rank!==void 0&&e.rank!==null?String(e.rank):"-",p(e.teamId,12),String(e.played),String(e.won),String(e.drawn),String(e.lost),String(e.points)])});}catch(t){g(t);}});}function mt(d$1){d$1.command("health").description("AtheleteBridge service health check (public)").option("-f, --format <format>","Output format").action(async r=>{try{let o=await d(Q);i(o.athHealth),h(r,{health:o.athHealth});}catch(o){g(o);}});}var pt={id:"atheletebridge",version:"1.0.0",displayName:"AtheleteBridge",dependsOn:["auth","workspaces"],register(d,r){a(r);let o=d.command("atheletebridge").description("AtheleteBridge sports team & athlete management");tt(o),et(o),ot(o),rt(o),it(o),at(o),nt(o),st(o),mt(o);}},Vt=pt;export{Vt as default};