@burdenoff/microfe-atheletebridge 2026.801.1 → 2026.801.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atheletebridge/AthleteBridgeRoot.d.ts.map +1 -1
- package/dist/atheletebridge/AthleteBridgeRoot.js +53 -45
- package/dist/atheletebridge/AthleteBridgeRoot.js.map +1 -1
- package/dist/atheletebridge/AthleteBridgeRoutes.d.ts.map +1 -1
- package/dist/atheletebridge/AthleteBridgeRoutes.js +15 -7
- package/dist/atheletebridge/AthleteBridgeRoutes.js.map +1 -1
- package/dist/atheletebridge/components/StatusBadge.d.ts.map +1 -1
- package/dist/atheletebridge/components/StatusBadge.js +3 -1
- package/dist/atheletebridge/components/StatusBadge.js.map +1 -1
- package/dist/atheletebridge/components/ai/AgentRunFeed.d.ts +19 -0
- package/dist/atheletebridge/components/ai/AgentRunFeed.d.ts.map +1 -0
- package/dist/atheletebridge/components/ai/AgentRunFeed.js +124 -0
- package/dist/atheletebridge/components/ai/AgentRunFeed.js.map +1 -0
- package/dist/atheletebridge/components/ai/AiErrorNotice.d.ts +21 -0
- package/dist/atheletebridge/components/ai/AiErrorNotice.d.ts.map +1 -0
- package/dist/atheletebridge/components/ai/AiErrorNotice.js +114 -0
- package/dist/atheletebridge/components/ai/AiErrorNotice.js.map +1 -0
- package/dist/atheletebridge/components/ai/AiModelPicker.d.ts +19 -0
- package/dist/atheletebridge/components/ai/AiModelPicker.d.ts.map +1 -0
- package/dist/atheletebridge/components/ai/AiModelPicker.js +203 -0
- package/dist/atheletebridge/components/ai/AiModelPicker.js.map +1 -0
- package/dist/atheletebridge/components/ai/DecisionCard.d.ts +11 -0
- package/dist/atheletebridge/components/ai/DecisionCard.d.ts.map +1 -0
- package/dist/atheletebridge/components/ai/DecisionCard.js +343 -0
- package/dist/atheletebridge/components/ai/DecisionCard.js.map +1 -0
- package/dist/atheletebridge/components/ai/RunDecisionPanel.d.ts +21 -0
- package/dist/atheletebridge/components/ai/RunDecisionPanel.d.ts.map +1 -0
- package/dist/atheletebridge/components/ai/RunDecisionPanel.js +371 -0
- package/dist/atheletebridge/components/ai/RunDecisionPanel.js.map +1 -0
- package/dist/atheletebridge/components/ai/assessment.d.ts +14 -0
- package/dist/atheletebridge/components/ai/assessment.d.ts.map +1 -0
- package/dist/atheletebridge/components/ai/assessment.js +30 -0
- package/dist/atheletebridge/components/ai/assessment.js.map +1 -0
- package/dist/atheletebridge/components/ai/index.d.ts +11 -0
- package/dist/atheletebridge/components/ai/index.d.ts.map +1 -0
- package/dist/atheletebridge/components/index.d.ts +1 -0
- package/dist/atheletebridge/components/index.d.ts.map +1 -1
- package/dist/atheletebridge/hooks/index.d.ts +2 -2
- package/dist/atheletebridge/hooks/index.d.ts.map +1 -1
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.d.ts +92 -1
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.d.ts.map +1 -1
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.js +274 -129
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.js.map +1 -1
- package/dist/atheletebridge/index.d.ts +1 -1
- package/dist/atheletebridge/index.d.ts.map +1 -1
- package/dist/atheletebridge/pages/ai/AiOperationsPage.d.ts +23 -0
- package/dist/atheletebridge/pages/ai/AiOperationsPage.d.ts.map +1 -0
- package/dist/atheletebridge/pages/ai/AiOperationsPage.js +117 -0
- package/dist/atheletebridge/pages/ai/AiOperationsPage.js.map +1 -0
- package/dist/atheletebridge/types/index.d.ts +124 -1
- package/dist/atheletebridge/types/index.d.ts.map +1 -1
- package/dist/atheletebridge/utils/aiDecision.d.ts +73 -0
- package/dist/atheletebridge/utils/aiDecision.d.ts.map +1 -0
- package/dist/atheletebridge/utils/aiDecision.js +187 -0
- package/dist/atheletebridge/utils/aiDecision.js.map +1 -0
- package/dist/atheletebridge/utils/index.d.ts +2 -0
- package/dist/atheletebridge/utils/index.d.ts.map +1 -1
- package/dist/atheletebridge/utils/pageContext.d.ts.map +1 -1
- package/dist/atheletebridge/utils/pageContext.js +5 -0
- package/dist/atheletebridge/utils/pageContext.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +68885 -33499
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,15 @@ import { useCallback as t, useMemo as n } from "react";
|
|
|
4
4
|
import { useMutation as r, useQuery as i, useQueryClient as a } from "@tanstack/react-query";
|
|
5
5
|
import { clearGraphqlFetchResponseCache as o, graphqlFetch as s } from "@burdenoff/fe-libs/shared/graphql";
|
|
6
6
|
//#region src/atheletebridge/hooks/useAthleteBridgeApi.ts
|
|
7
|
-
var c =
|
|
7
|
+
var c = "AI_PROVIDER_UNAVAILABLE", l = class extends Error {
|
|
8
|
+
code;
|
|
9
|
+
agentRunId;
|
|
10
|
+
constructor(e, t) {
|
|
11
|
+
super(e), this.name = "AthApiError";
|
|
12
|
+
let n = t?.code, r = t?.agentRunId;
|
|
13
|
+
this.code = typeof n == "string" && n ? n : null, this.agentRunId = typeof r == "string" && r ? r : null;
|
|
14
|
+
}
|
|
15
|
+
}, u = async (e, t, n) => {
|
|
8
16
|
let r = await s({
|
|
9
17
|
gateway: "workspace",
|
|
10
18
|
baseUrl: n,
|
|
@@ -12,20 +20,26 @@ var c = async (e, t, n) => {
|
|
|
12
20
|
variables: t,
|
|
13
21
|
workspaceToken: !0
|
|
14
22
|
});
|
|
15
|
-
if (r.errors?.length)
|
|
16
|
-
|
|
23
|
+
if (r.errors?.length) {
|
|
24
|
+
let e = r.errors[0];
|
|
25
|
+
throw new l(e?.message ?? "GraphQL request failed", e?.extensions);
|
|
26
|
+
}
|
|
27
|
+
if (!r.data) throw new l("GraphQL response did not include data");
|
|
17
28
|
return e.trimStart().startsWith("mutation") && o(), r.data;
|
|
18
|
-
},
|
|
29
|
+
}, d = async (e, t) => {
|
|
19
30
|
let n = await s({
|
|
20
31
|
gateway: "global",
|
|
21
32
|
query: e,
|
|
22
33
|
variables: t,
|
|
23
34
|
suppressGlobalErrorEvent: !0
|
|
24
35
|
});
|
|
25
|
-
if (n.errors?.length)
|
|
26
|
-
|
|
36
|
+
if (n.errors?.length) {
|
|
37
|
+
let e = n.errors[0];
|
|
38
|
+
throw new l(e?.message ?? "GraphQL request failed", e?.extensions);
|
|
39
|
+
}
|
|
40
|
+
if (!n.data) throw new l("GraphQL response did not include data");
|
|
27
41
|
return n.data;
|
|
28
|
-
},
|
|
42
|
+
}, f = "\n id workspaceId name sport status description ageGroup season homeVenue\n headCoachId tags createdAt updatedAt\n", p = "\n id workspaceId teamId userId displayName role status position jerseyNumber\n height weight dominantSide notes joinedAt createdAt updatedAt\n", m = "\n id workspaceId type status competition round venue homeTeamId awayTeamId\n homeScore awayScore scheduledAt kickoffAt notes createdAt updatedAt\n homeTeam { id name sport }\n awayTeam { id name sport }\n", h = "\n id workspaceId competition teamId played won drawn lost goalsFor goalsAgainst\n points rank createdAt updatedAt\n team { id name sport }\n", g = "\n id workspaceId programId name description weekNumber orderIndex sets reps\n durationSec restSec createdAt updatedAt\n video { id }\n", _ = "\n id workspaceId coachId name sport level status summary weeks isTemplate tags\n createdAt updatedAt\n", v = "\n id workspaceId coachId athleteId programId title type status location\n meetingUrl scheduledAt durationMin completedAt feedback rating\n createdAt updatedAt\n", y = "\n id workspaceId athleteId programId title status performedAt durationMin rpe\n totalLoad metrics notes createdAt updatedAt\n", b = "\n id workspaceId athleteId type label value unit source recordedAt\n createdAt updatedAt\n", x = (t = {}) => {
|
|
29
43
|
let { apiGatewayUrl: n } = e();
|
|
30
44
|
return i({
|
|
31
45
|
queryKey: [
|
|
@@ -33,9 +47,9 @@ var c = async (e, t, n) => {
|
|
|
33
47
|
"teams",
|
|
34
48
|
t
|
|
35
49
|
],
|
|
36
|
-
queryFn: async () => (await
|
|
50
|
+
queryFn: async () => (await u(`query AthListTeams($sport: AthSport, $status: AthTeamStatus, $pagination: PaginationInput) {
|
|
37
51
|
athListTeams(sport: $sport, status: $status, pagination: $pagination) {
|
|
38
|
-
items { ${
|
|
52
|
+
items { ${f} members { items { id } } }
|
|
39
53
|
pageInfo { cursor hasMore }
|
|
40
54
|
}
|
|
41
55
|
}`, {
|
|
@@ -44,7 +58,7 @@ var c = async (e, t, n) => {
|
|
|
44
58
|
pagination: t.pagination
|
|
45
59
|
}, n)).athListTeams
|
|
46
60
|
});
|
|
47
|
-
},
|
|
61
|
+
}, S = (t) => {
|
|
48
62
|
let { apiGatewayUrl: n } = e();
|
|
49
63
|
return i({
|
|
50
64
|
queryKey: [
|
|
@@ -52,16 +66,16 @@ var c = async (e, t, n) => {
|
|
|
52
66
|
"team",
|
|
53
67
|
t
|
|
54
68
|
],
|
|
55
|
-
queryFn: async () => (await
|
|
69
|
+
queryFn: async () => (await u(`query AthTeam($id: ID!) {
|
|
56
70
|
athTeam(id: $id) {
|
|
57
|
-
${
|
|
58
|
-
members { items { ${
|
|
59
|
-
fixtures { items { ${
|
|
71
|
+
${f}
|
|
72
|
+
members { items { ${p} } }
|
|
73
|
+
fixtures { items { ${m} } }
|
|
60
74
|
}
|
|
61
75
|
}`, { id: t }, n)).athTeam,
|
|
62
76
|
enabled: !!t
|
|
63
77
|
});
|
|
64
|
-
},
|
|
78
|
+
}, C = (t, n) => {
|
|
65
79
|
let { apiGatewayUrl: r } = e();
|
|
66
80
|
return i({
|
|
67
81
|
queryKey: [
|
|
@@ -70,29 +84,29 @@ var c = async (e, t, n) => {
|
|
|
70
84
|
t,
|
|
71
85
|
n
|
|
72
86
|
],
|
|
73
|
-
queryFn: async () => (await
|
|
74
|
-
athListMembers(teamId: $teamId, status: $status) { items { ${
|
|
87
|
+
queryFn: async () => (await u(`query AthListMembers($teamId: ID!, $status: AthMemberStatus) {
|
|
88
|
+
athListMembers(teamId: $teamId, status: $status) { items { ${p} } }
|
|
75
89
|
}`, {
|
|
76
90
|
teamId: t,
|
|
77
91
|
status: n
|
|
78
92
|
}, r)).athListMembers.items,
|
|
79
93
|
enabled: !!t
|
|
80
94
|
});
|
|
81
|
-
},
|
|
95
|
+
}, w = () => {
|
|
82
96
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
83
97
|
return r({
|
|
84
|
-
mutationFn: async (e) => (await
|
|
85
|
-
athCreateTeam(input: $input) { ${
|
|
98
|
+
mutationFn: async (e) => (await u(`mutation AthCreateTeam($input: AthCreateTeamInput!) {
|
|
99
|
+
athCreateTeam(input: $input) { ${f} }
|
|
86
100
|
}`, { input: e }, n)).athCreateTeam,
|
|
87
101
|
onSuccess: () => {
|
|
88
102
|
t.invalidateQueries({ queryKey: ["atheletebridge", "teams"] });
|
|
89
103
|
}
|
|
90
104
|
});
|
|
91
|
-
},
|
|
105
|
+
}, T = () => {
|
|
92
106
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
93
107
|
return r({
|
|
94
|
-
mutationFn: async ({ id: e, input: t }) => (await
|
|
95
|
-
athUpdateTeam(id: $id, input: $input) { ${
|
|
108
|
+
mutationFn: async ({ id: e, input: t }) => (await u(`mutation AthUpdateTeam($id: ID!, $input: AthUpdateTeamInput!) {
|
|
109
|
+
athUpdateTeam(id: $id, input: $input) { ${f} }
|
|
96
110
|
}`, {
|
|
97
111
|
id: e,
|
|
98
112
|
input: t
|
|
@@ -105,19 +119,19 @@ var c = async (e, t, n) => {
|
|
|
105
119
|
] });
|
|
106
120
|
}
|
|
107
121
|
});
|
|
108
|
-
},
|
|
122
|
+
}, E = () => {
|
|
109
123
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
110
124
|
return r({
|
|
111
|
-
mutationFn: async (e) => (await
|
|
125
|
+
mutationFn: async (e) => (await u("mutation AthArchiveTeam($id: ID!) { athArchiveTeam(id: $id) }", { id: e }, n)).athArchiveTeam,
|
|
112
126
|
onSuccess: () => {
|
|
113
127
|
t.invalidateQueries({ queryKey: ["atheletebridge", "teams"] });
|
|
114
128
|
}
|
|
115
129
|
});
|
|
116
|
-
},
|
|
130
|
+
}, D = () => {
|
|
117
131
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
118
132
|
return r({
|
|
119
|
-
mutationFn: async (e) => (await
|
|
120
|
-
athAddMember(input: $input) { ${
|
|
133
|
+
mutationFn: async (e) => (await u(`mutation AthAddMember($input: AthAddMemberInput!) {
|
|
134
|
+
athAddMember(input: $input) { ${p} }
|
|
121
135
|
}`, { input: e }, n)).athAddMember,
|
|
122
136
|
onSuccess: (e) => {
|
|
123
137
|
t.invalidateQueries({ queryKey: [
|
|
@@ -131,10 +145,10 @@ var c = async (e, t, n) => {
|
|
|
131
145
|
] });
|
|
132
146
|
}
|
|
133
147
|
});
|
|
134
|
-
},
|
|
148
|
+
}, O = (t) => {
|
|
135
149
|
let n = a(), { apiGatewayUrl: i } = e();
|
|
136
150
|
return r({
|
|
137
|
-
mutationFn: async (e) => (await
|
|
151
|
+
mutationFn: async (e) => (await u("mutation AthRemoveMember($id: ID!) { athRemoveMember(id: $id) }", { id: e }, i)).athRemoveMember,
|
|
138
152
|
onSuccess: () => {
|
|
139
153
|
n.invalidateQueries({ queryKey: [
|
|
140
154
|
"atheletebridge",
|
|
@@ -147,7 +161,7 @@ var c = async (e, t, n) => {
|
|
|
147
161
|
] });
|
|
148
162
|
}
|
|
149
163
|
});
|
|
150
|
-
},
|
|
164
|
+
}, k = (t = {}) => {
|
|
151
165
|
let { apiGatewayUrl: n } = e();
|
|
152
166
|
return i({
|
|
153
167
|
queryKey: [
|
|
@@ -155,9 +169,9 @@ var c = async (e, t, n) => {
|
|
|
155
169
|
"fixtures",
|
|
156
170
|
t
|
|
157
171
|
],
|
|
158
|
-
queryFn: async () => (await
|
|
172
|
+
queryFn: async () => (await u(`query AthListFixtures($status: AthFixtureStatus, $teamId: ID, $pagination: PaginationInput) {
|
|
159
173
|
athListFixtures(status: $status, teamId: $teamId, pagination: $pagination) {
|
|
160
|
-
items { ${
|
|
174
|
+
items { ${m} }
|
|
161
175
|
pageInfo { cursor hasMore }
|
|
162
176
|
}
|
|
163
177
|
}`, {
|
|
@@ -166,7 +180,7 @@ var c = async (e, t, n) => {
|
|
|
166
180
|
pagination: t.pagination
|
|
167
181
|
}, n)).athListFixtures
|
|
168
182
|
});
|
|
169
|
-
},
|
|
183
|
+
}, A = (t) => {
|
|
170
184
|
let { apiGatewayUrl: n } = e();
|
|
171
185
|
return i({
|
|
172
186
|
queryKey: [
|
|
@@ -174,12 +188,12 @@ var c = async (e, t, n) => {
|
|
|
174
188
|
"fixture",
|
|
175
189
|
t
|
|
176
190
|
],
|
|
177
|
-
queryFn: async () => (await
|
|
178
|
-
athFixture(id: $id) { ${
|
|
191
|
+
queryFn: async () => (await u(`query AthFixture($id: ID!) {
|
|
192
|
+
athFixture(id: $id) { ${m} }
|
|
179
193
|
}`, { id: t }, n)).athFixture,
|
|
180
194
|
enabled: !!t
|
|
181
195
|
});
|
|
182
|
-
},
|
|
196
|
+
}, j = (t) => {
|
|
183
197
|
let { apiGatewayUrl: n } = e();
|
|
184
198
|
return i({
|
|
185
199
|
queryKey: [
|
|
@@ -187,26 +201,26 @@ var c = async (e, t, n) => {
|
|
|
187
201
|
"standings",
|
|
188
202
|
t
|
|
189
203
|
],
|
|
190
|
-
queryFn: async () => (await
|
|
191
|
-
athStandings(competition: $competition) { items { ${
|
|
204
|
+
queryFn: async () => (await u(`query AthStandings($competition: String!) {
|
|
205
|
+
athStandings(competition: $competition) { items { ${h} } }
|
|
192
206
|
}`, { competition: t }, n)).athStandings.items,
|
|
193
207
|
enabled: !!t
|
|
194
208
|
});
|
|
195
|
-
},
|
|
209
|
+
}, M = () => {
|
|
196
210
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
197
211
|
return r({
|
|
198
|
-
mutationFn: async (e) => (await
|
|
199
|
-
athScheduleFixture(input: $input) { ${
|
|
212
|
+
mutationFn: async (e) => (await u(`mutation AthScheduleFixture($input: AthCreateFixtureInput!) {
|
|
213
|
+
athScheduleFixture(input: $input) { ${m} }
|
|
200
214
|
}`, { input: e }, n)).athScheduleFixture,
|
|
201
215
|
onSuccess: () => {
|
|
202
216
|
t.invalidateQueries({ queryKey: ["atheletebridge", "fixtures"] });
|
|
203
217
|
}
|
|
204
218
|
});
|
|
205
|
-
},
|
|
219
|
+
}, ee = () => {
|
|
206
220
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
207
221
|
return r({
|
|
208
|
-
mutationFn: async ({ id: e, input: t }) => (await
|
|
209
|
-
athRecordFixtureResult(id: $id, input: $input) { ${
|
|
222
|
+
mutationFn: async ({ id: e, input: t }) => (await u(`mutation AthRecordFixtureResult($id: ID!, $input: AthRecordResultInput!) {
|
|
223
|
+
athRecordFixtureResult(id: $id, input: $input) { ${m} }
|
|
210
224
|
}`, {
|
|
211
225
|
id: e,
|
|
212
226
|
input: t
|
|
@@ -219,7 +233,7 @@ var c = async (e, t, n) => {
|
|
|
219
233
|
] }), t.invalidateQueries({ queryKey: ["atheletebridge", "standings"] });
|
|
220
234
|
}
|
|
221
235
|
});
|
|
222
|
-
},
|
|
236
|
+
}, te = (t = {}) => {
|
|
223
237
|
let { apiGatewayUrl: n } = e();
|
|
224
238
|
return i({
|
|
225
239
|
queryKey: [
|
|
@@ -227,9 +241,9 @@ var c = async (e, t, n) => {
|
|
|
227
241
|
"programs",
|
|
228
242
|
t
|
|
229
243
|
],
|
|
230
|
-
queryFn: async () => (await
|
|
244
|
+
queryFn: async () => (await u(`query AthListPrograms($sport: AthSport, $level: AthProgramLevel, $status: AthProgramStatus, $pagination: PaginationInput) {
|
|
231
245
|
athListPrograms(sport: $sport, level: $level, status: $status, pagination: $pagination) {
|
|
232
|
-
items { ${
|
|
246
|
+
items { ${_} drills { items { id } } }
|
|
233
247
|
pageInfo { cursor hasMore }
|
|
234
248
|
}
|
|
235
249
|
}`, {
|
|
@@ -239,7 +253,7 @@ var c = async (e, t, n) => {
|
|
|
239
253
|
pagination: t.pagination
|
|
240
254
|
}, n)).athListPrograms
|
|
241
255
|
});
|
|
242
|
-
},
|
|
256
|
+
}, ne = (t) => {
|
|
243
257
|
let { apiGatewayUrl: n } = e();
|
|
244
258
|
return i({
|
|
245
259
|
queryKey: [
|
|
@@ -247,29 +261,29 @@ var c = async (e, t, n) => {
|
|
|
247
261
|
"program",
|
|
248
262
|
t
|
|
249
263
|
],
|
|
250
|
-
queryFn: async () => (await
|
|
264
|
+
queryFn: async () => (await u(`query AthProgram($id: ID!) {
|
|
251
265
|
athProgram(id: $id) {
|
|
252
|
-
${
|
|
253
|
-
drills { items { ${
|
|
266
|
+
${_}
|
|
267
|
+
drills { items { ${g} } }
|
|
254
268
|
}
|
|
255
269
|
}`, { id: t }, n)).athProgram,
|
|
256
270
|
enabled: !!t
|
|
257
271
|
});
|
|
258
|
-
},
|
|
272
|
+
}, re = () => {
|
|
259
273
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
260
274
|
return r({
|
|
261
|
-
mutationFn: async (e) => (await
|
|
262
|
-
athCreateProgram(input: $input) { ${
|
|
275
|
+
mutationFn: async (e) => (await u(`mutation AthCreateProgram($input: AthCreateProgramInput!) {
|
|
276
|
+
athCreateProgram(input: $input) { ${_} }
|
|
263
277
|
}`, { input: e }, n)).athCreateProgram,
|
|
264
278
|
onSuccess: () => {
|
|
265
279
|
t.invalidateQueries({ queryKey: ["atheletebridge", "programs"] });
|
|
266
280
|
}
|
|
267
281
|
});
|
|
268
|
-
},
|
|
282
|
+
}, ie = () => {
|
|
269
283
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
270
284
|
return r({
|
|
271
|
-
mutationFn: async ({ id: e, input: t }) => (await
|
|
272
|
-
athUpdateProgram(id: $id, input: $input) { ${
|
|
285
|
+
mutationFn: async ({ id: e, input: t }) => (await u(`mutation AthUpdateProgram($id: ID!, $input: AthUpdateProgramInput!) {
|
|
286
|
+
athUpdateProgram(id: $id, input: $input) { ${_} }
|
|
273
287
|
}`, {
|
|
274
288
|
id: e,
|
|
275
289
|
input: t
|
|
@@ -282,11 +296,11 @@ var c = async (e, t, n) => {
|
|
|
282
296
|
] });
|
|
283
297
|
}
|
|
284
298
|
});
|
|
285
|
-
},
|
|
299
|
+
}, ae = () => {
|
|
286
300
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
287
301
|
return r({
|
|
288
|
-
mutationFn: async ({ id: e, status: t }) => (await
|
|
289
|
-
athTransitionProgram(id: $id, status: $status) { ${
|
|
302
|
+
mutationFn: async ({ id: e, status: t }) => (await u(`mutation AthTransitionProgram($id: ID!, $status: AthProgramStatus!) {
|
|
303
|
+
athTransitionProgram(id: $id, status: $status) { ${_} }
|
|
290
304
|
}`, {
|
|
291
305
|
id: e,
|
|
292
306
|
status: t
|
|
@@ -299,19 +313,19 @@ var c = async (e, t, n) => {
|
|
|
299
313
|
] });
|
|
300
314
|
}
|
|
301
315
|
});
|
|
302
|
-
},
|
|
316
|
+
}, oe = () => {
|
|
303
317
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
304
318
|
return r({
|
|
305
|
-
mutationFn: async (e) => (await
|
|
319
|
+
mutationFn: async (e) => (await u("mutation AthArchiveProgram($id: ID!) { athArchiveProgram(id: $id) }", { id: e }, n)).athArchiveProgram,
|
|
306
320
|
onSuccess: () => {
|
|
307
321
|
t.invalidateQueries({ queryKey: ["atheletebridge", "programs"] });
|
|
308
322
|
}
|
|
309
323
|
});
|
|
310
|
-
},
|
|
324
|
+
}, N = () => {
|
|
311
325
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
312
326
|
return r({
|
|
313
|
-
mutationFn: async (e) => (await
|
|
314
|
-
athAddDrill(input: $input) { ${
|
|
327
|
+
mutationFn: async (e) => (await u(`mutation AthAddDrill($input: AthAddDrillInput!) {
|
|
328
|
+
athAddDrill(input: $input) { ${g} }
|
|
315
329
|
}`, { input: e }, n)).athAddDrill,
|
|
316
330
|
onSuccess: (e) => {
|
|
317
331
|
t.invalidateQueries({ queryKey: [
|
|
@@ -321,10 +335,10 @@ var c = async (e, t, n) => {
|
|
|
321
335
|
] });
|
|
322
336
|
}
|
|
323
337
|
});
|
|
324
|
-
},
|
|
338
|
+
}, P = (t) => {
|
|
325
339
|
let n = a(), { apiGatewayUrl: i } = e();
|
|
326
340
|
return r({
|
|
327
|
-
mutationFn: async (e) => (await
|
|
341
|
+
mutationFn: async (e) => (await u("mutation AthRemoveDrill($id: ID!) { athRemoveDrill(id: $id) }", { id: e }, i)).athRemoveDrill,
|
|
328
342
|
onSuccess: () => {
|
|
329
343
|
n.invalidateQueries({ queryKey: [
|
|
330
344
|
"atheletebridge",
|
|
@@ -333,7 +347,7 @@ var c = async (e, t, n) => {
|
|
|
333
347
|
] });
|
|
334
348
|
}
|
|
335
349
|
});
|
|
336
|
-
},
|
|
350
|
+
}, F = (t = {}) => {
|
|
337
351
|
let { apiGatewayUrl: n } = e();
|
|
338
352
|
return i({
|
|
339
353
|
queryKey: [
|
|
@@ -341,9 +355,9 @@ var c = async (e, t, n) => {
|
|
|
341
355
|
"sessions",
|
|
342
356
|
t
|
|
343
357
|
],
|
|
344
|
-
queryFn: async () => (await
|
|
358
|
+
queryFn: async () => (await u(`query AthListSessions($athleteId: ID, $coachId: ID, $status: AthSessionStatus, $pagination: PaginationInput) {
|
|
345
359
|
athListSessions(athleteId: $athleteId, coachId: $coachId, status: $status, pagination: $pagination) {
|
|
346
|
-
items { ${
|
|
360
|
+
items { ${v} }
|
|
347
361
|
pageInfo { cursor hasMore }
|
|
348
362
|
}
|
|
349
363
|
}`, {
|
|
@@ -353,7 +367,7 @@ var c = async (e, t, n) => {
|
|
|
353
367
|
pagination: t.pagination
|
|
354
368
|
}, n)).athListSessions
|
|
355
369
|
});
|
|
356
|
-
},
|
|
370
|
+
}, I = (t) => {
|
|
357
371
|
let { apiGatewayUrl: n } = e();
|
|
358
372
|
return i({
|
|
359
373
|
queryKey: [
|
|
@@ -361,26 +375,26 @@ var c = async (e, t, n) => {
|
|
|
361
375
|
"session",
|
|
362
376
|
t
|
|
363
377
|
],
|
|
364
|
-
queryFn: async () => (await
|
|
365
|
-
athSession(id: $id) { ${
|
|
378
|
+
queryFn: async () => (await u(`query AthSession($id: ID!) {
|
|
379
|
+
athSession(id: $id) { ${v} }
|
|
366
380
|
}`, { id: t }, n)).athSession,
|
|
367
381
|
enabled: !!t
|
|
368
382
|
});
|
|
369
|
-
},
|
|
383
|
+
}, L = () => {
|
|
370
384
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
371
385
|
return r({
|
|
372
|
-
mutationFn: async (e) => (await
|
|
373
|
-
athBookSession(input: $input) { ${
|
|
386
|
+
mutationFn: async (e) => (await u(`mutation AthBookSession($input: AthBookSessionInput!) {
|
|
387
|
+
athBookSession(input: $input) { ${v} }
|
|
374
388
|
}`, { input: e }, n)).athBookSession,
|
|
375
389
|
onSuccess: () => {
|
|
376
390
|
t.invalidateQueries({ queryKey: ["atheletebridge", "sessions"] });
|
|
377
391
|
}
|
|
378
392
|
});
|
|
379
|
-
},
|
|
393
|
+
}, R = () => {
|
|
380
394
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
381
395
|
return r({
|
|
382
|
-
mutationFn: async (e) => (await
|
|
383
|
-
athConfirmSession(id: $id) { ${
|
|
396
|
+
mutationFn: async (e) => (await u(`mutation AthConfirmSession($id: ID!) {
|
|
397
|
+
athConfirmSession(id: $id) { ${v} }
|
|
384
398
|
}`, { id: e }, n)).athConfirmSession,
|
|
385
399
|
onSuccess: (e) => {
|
|
386
400
|
t.invalidateQueries({ queryKey: ["atheletebridge", "sessions"] }), t.invalidateQueries({ queryKey: [
|
|
@@ -390,11 +404,11 @@ var c = async (e, t, n) => {
|
|
|
390
404
|
] });
|
|
391
405
|
}
|
|
392
406
|
});
|
|
393
|
-
},
|
|
407
|
+
}, z = () => {
|
|
394
408
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
395
409
|
return r({
|
|
396
|
-
mutationFn: async ({ id: e, input: t }) => (await
|
|
397
|
-
athCompleteSession(id: $id, input: $input) { ${
|
|
410
|
+
mutationFn: async ({ id: e, input: t }) => (await u(`mutation AthCompleteSession($id: ID!, $input: AthCompleteSessionInput) {
|
|
411
|
+
athCompleteSession(id: $id, input: $input) { ${v} }
|
|
398
412
|
}`, {
|
|
399
413
|
id: e,
|
|
400
414
|
input: t
|
|
@@ -407,11 +421,11 @@ var c = async (e, t, n) => {
|
|
|
407
421
|
] });
|
|
408
422
|
}
|
|
409
423
|
});
|
|
410
|
-
},
|
|
424
|
+
}, B = () => {
|
|
411
425
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
412
426
|
return r({
|
|
413
|
-
mutationFn: async (e) => (await
|
|
414
|
-
athCancelSession(id: $id) { ${
|
|
427
|
+
mutationFn: async (e) => (await u(`mutation AthCancelSession($id: ID!) {
|
|
428
|
+
athCancelSession(id: $id) { ${v} }
|
|
415
429
|
}`, { id: e }, n)).athCancelSession,
|
|
416
430
|
onSuccess: (e) => {
|
|
417
431
|
t.invalidateQueries({ queryKey: ["atheletebridge", "sessions"] }), t.invalidateQueries({ queryKey: [
|
|
@@ -421,7 +435,7 @@ var c = async (e, t, n) => {
|
|
|
421
435
|
] });
|
|
422
436
|
}
|
|
423
437
|
});
|
|
424
|
-
},
|
|
438
|
+
}, V = (t = {}) => {
|
|
425
439
|
let { apiGatewayUrl: n } = e();
|
|
426
440
|
return i({
|
|
427
441
|
queryKey: [
|
|
@@ -429,9 +443,9 @@ var c = async (e, t, n) => {
|
|
|
429
443
|
"workout-logs",
|
|
430
444
|
t
|
|
431
445
|
],
|
|
432
|
-
queryFn: async () => (await
|
|
446
|
+
queryFn: async () => (await u(`query AthListWorkoutLogs($athleteId: ID, $programId: ID, $pagination: PaginationInput) {
|
|
433
447
|
athListWorkoutLogs(athleteId: $athleteId, programId: $programId, pagination: $pagination) {
|
|
434
|
-
items { ${
|
|
448
|
+
items { ${y} }
|
|
435
449
|
pageInfo { cursor hasMore }
|
|
436
450
|
}
|
|
437
451
|
}`, {
|
|
@@ -440,7 +454,7 @@ var c = async (e, t, n) => {
|
|
|
440
454
|
pagination: t.pagination
|
|
441
455
|
}, n)).athListWorkoutLogs
|
|
442
456
|
});
|
|
443
|
-
},
|
|
457
|
+
}, H = (t) => {
|
|
444
458
|
let { apiGatewayUrl: n } = e();
|
|
445
459
|
return i({
|
|
446
460
|
queryKey: [
|
|
@@ -448,32 +462,32 @@ var c = async (e, t, n) => {
|
|
|
448
462
|
"metrics",
|
|
449
463
|
t
|
|
450
464
|
],
|
|
451
|
-
queryFn: async () => (await
|
|
452
|
-
athPerformanceMetrics(athleteId: $athleteId) { items { ${
|
|
465
|
+
queryFn: async () => (await u(`query AthPerformanceMetrics($athleteId: ID!) {
|
|
466
|
+
athPerformanceMetrics(athleteId: $athleteId) { items { ${b} } }
|
|
453
467
|
}`, { athleteId: t }, n)).athPerformanceMetrics.items,
|
|
454
468
|
enabled: !!t
|
|
455
469
|
});
|
|
456
|
-
},
|
|
470
|
+
}, U = () => {
|
|
457
471
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
458
472
|
return r({
|
|
459
|
-
mutationFn: async (e) => (await
|
|
460
|
-
athLogWorkout(input: $input) { ${
|
|
473
|
+
mutationFn: async (e) => (await u(`mutation AthLogWorkout($input: AthLogWorkoutInput!) {
|
|
474
|
+
athLogWorkout(input: $input) { ${y} }
|
|
461
475
|
}`, { input: e }, n)).athLogWorkout,
|
|
462
476
|
onSuccess: () => {
|
|
463
477
|
t.invalidateQueries({ queryKey: ["atheletebridge", "workout-logs"] });
|
|
464
478
|
}
|
|
465
479
|
});
|
|
466
|
-
},
|
|
480
|
+
}, W = () => {
|
|
467
481
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
468
482
|
return r({
|
|
469
|
-
mutationFn: async (e) => (await
|
|
470
|
-
athRecordMetric(input: $input) { ${
|
|
483
|
+
mutationFn: async (e) => (await u(`mutation AthRecordMetric($input: AthRecordMetricInput!) {
|
|
484
|
+
athRecordMetric(input: $input) { ${b} }
|
|
471
485
|
}`, { input: e }, n)).athRecordMetric,
|
|
472
486
|
onSuccess: () => {
|
|
473
487
|
t.invalidateQueries({ queryKey: ["atheletebridge", "metrics"] });
|
|
474
488
|
}
|
|
475
489
|
});
|
|
476
|
-
},
|
|
490
|
+
}, G = "\n id workspaceId memberId fixtureId sessionId response respondedAt note\n createdAt updatedAt\n member { id displayName role }\n", K = (t) => {
|
|
477
491
|
let { apiGatewayUrl: n } = e(), { fixtureId: r, sessionId: a } = t;
|
|
478
492
|
return i({
|
|
479
493
|
queryKey: [
|
|
@@ -482,9 +496,9 @@ var c = async (e, t, n) => {
|
|
|
482
496
|
r ?? null,
|
|
483
497
|
a ?? null
|
|
484
498
|
],
|
|
485
|
-
queryFn: async () => (await
|
|
499
|
+
queryFn: async () => (await u(`query AthListAvailability($fixtureId: ID, $sessionId: ID) {
|
|
486
500
|
athListAvailability(fixtureId: $fixtureId, sessionId: $sessionId) {
|
|
487
|
-
items { ${
|
|
501
|
+
items { ${G} }
|
|
488
502
|
pageInfo { cursor hasMore }
|
|
489
503
|
}
|
|
490
504
|
}`, {
|
|
@@ -493,11 +507,11 @@ var c = async (e, t, n) => {
|
|
|
493
507
|
}, n)).athListAvailability.items,
|
|
494
508
|
enabled: !!(r || a)
|
|
495
509
|
});
|
|
496
|
-
},
|
|
510
|
+
}, q = () => {
|
|
497
511
|
let t = a(), { apiGatewayUrl: n } = e();
|
|
498
512
|
return r({
|
|
499
|
-
mutationFn: async (e) => (await
|
|
500
|
-
athSetAvailability(input: $input) { ${
|
|
513
|
+
mutationFn: async (e) => (await u(`mutation AthSetAvailability($input: AthSetAvailabilityInput!) {
|
|
514
|
+
athSetAvailability(input: $input) { ${G} }
|
|
501
515
|
}`, { input: e }, n)).athSetAvailability,
|
|
502
516
|
onSuccess: (e) => {
|
|
503
517
|
t.invalidateQueries({ queryKey: [
|
|
@@ -508,18 +522,18 @@ var c = async (e, t, n) => {
|
|
|
508
522
|
] });
|
|
509
523
|
}
|
|
510
524
|
});
|
|
511
|
-
},
|
|
525
|
+
}, se = () => {
|
|
512
526
|
let { apiGatewayUrl: t } = e();
|
|
513
|
-
return r({ mutationFn: async (e) => (await
|
|
514
|
-
},
|
|
527
|
+
return r({ mutationFn: async (e) => (await u("mutation AthRemindAvailability($fixtureId: ID, $sessionId: ID) {\n athRemindAvailability(fixtureId: $fixtureId, sessionId: $sessionId)\n }", e, t)).athRemindAvailability });
|
|
528
|
+
}, ce = (e) => {
|
|
515
529
|
let t = e.lastIndexOf(".");
|
|
516
530
|
return t >= 0 ? e.slice(t + 1).toLowerCase() : "bin";
|
|
517
|
-
},
|
|
531
|
+
}, le = () => {
|
|
518
532
|
let { apiGatewayUrl: n } = e();
|
|
519
533
|
return t(async (e) => {
|
|
520
|
-
let t = await
|
|
534
|
+
let t = await u("mutation AthInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) { uploadUrl session { id } }\n }", { input: {
|
|
521
535
|
fileName: e.name,
|
|
522
|
-
extension:
|
|
536
|
+
extension: ce(e.name),
|
|
523
537
|
fileSize: e.size,
|
|
524
538
|
mimeType: e.type || "application/octet-stream",
|
|
525
539
|
visibility: "WORKSPACE"
|
|
@@ -531,9 +545,9 @@ var c = async (e, t, n) => {
|
|
|
531
545
|
headers: { "Content-Type": e.type || "application/octet-stream" }
|
|
532
546
|
});
|
|
533
547
|
if (!a.ok) throw Error(`Storage rejected the upload (HTTP ${a.status}).`);
|
|
534
|
-
return (await
|
|
548
|
+
return (await u("mutation AthCompleteUpload($input: CompleteUploadInput!) {\n completeUpload(input: $input) { fileId }\n }", { input: { sessionId: i } }, n)).completeUpload.fileId;
|
|
535
549
|
}, [n]);
|
|
536
|
-
},
|
|
550
|
+
}, ue = (t) => {
|
|
537
551
|
let { apiGatewayUrl: n } = e();
|
|
538
552
|
return i({
|
|
539
553
|
queryKey: [
|
|
@@ -541,11 +555,11 @@ var c = async (e, t, n) => {
|
|
|
541
555
|
"file",
|
|
542
556
|
t
|
|
543
557
|
],
|
|
544
|
-
queryFn: async () => (await
|
|
558
|
+
queryFn: async () => (await u("query AthGetFile($id: ID!) {\n getFile(id: $id) { id name downloadUrl }\n }", { id: t }, n)).getFile,
|
|
545
559
|
enabled: !!t,
|
|
546
560
|
staleTime: 6e4
|
|
547
561
|
});
|
|
548
|
-
},
|
|
562
|
+
}, J = (e) => e.name?.trim() ? e.name.trim() : [e.firstName, e.lastName].filter(Boolean).join(" ").trim() || (e.username?.trim() ? e.username.trim() : e.email), de = (e) => {
|
|
549
563
|
let t = e.trim();
|
|
550
564
|
return i({
|
|
551
565
|
queryKey: [
|
|
@@ -553,7 +567,7 @@ var c = async (e, t, n) => {
|
|
|
553
567
|
"user-search",
|
|
554
568
|
t
|
|
555
569
|
],
|
|
556
|
-
queryFn: async () => (await
|
|
570
|
+
queryFn: async () => (await d("query AthUserSearch($filter: UserFilterInput, $pagination: PaginationInput) {\n users(filter: $filter, pagination: $pagination) {\n users { id name firstName lastName email username }\n hasMore\n }\n }", {
|
|
557
571
|
filter: { search: t },
|
|
558
572
|
pagination: {
|
|
559
573
|
limit: 8,
|
|
@@ -564,7 +578,7 @@ var c = async (e, t, n) => {
|
|
|
564
578
|
staleTime: 3e4,
|
|
565
579
|
retry: !1
|
|
566
580
|
});
|
|
567
|
-
},
|
|
581
|
+
}, Y = (e) => {
|
|
568
582
|
let t = n(() => Array.from(new Set(e.filter((e) => !!(e && e.trim())))).sort(), [e]);
|
|
569
583
|
return i({
|
|
570
584
|
queryKey: [
|
|
@@ -586,7 +600,7 @@ var c = async (e, t, n) => {
|
|
|
586
600
|
})).data ?? {}, a = {};
|
|
587
601
|
for (let e of Object.values(i)) e && e.id && (a[e.id] = {
|
|
588
602
|
id: e.id,
|
|
589
|
-
name:
|
|
603
|
+
name: J(e),
|
|
590
604
|
email: e.email ?? null
|
|
591
605
|
});
|
|
592
606
|
return a;
|
|
@@ -595,8 +609,8 @@ var c = async (e, t, n) => {
|
|
|
595
609
|
staleTime: 5 * 6e4,
|
|
596
610
|
retry: !1
|
|
597
611
|
});
|
|
598
|
-
},
|
|
599
|
-
let t =
|
|
612
|
+
}, fe = (e) => {
|
|
613
|
+
let t = Y(e), n = t.data ?? {};
|
|
600
614
|
return {
|
|
601
615
|
byId: n,
|
|
602
616
|
isLoading: t.isLoading,
|
|
@@ -604,7 +618,7 @@ var c = async (e, t, n) => {
|
|
|
604
618
|
nameOf: (e) => e ? n[e]?.name : void 0,
|
|
605
619
|
emailOf: (e) => e ? n[e]?.email : void 0
|
|
606
620
|
};
|
|
607
|
-
},
|
|
621
|
+
}, pe = ({ teams: e = [], fixtures: t = [], sessions: r = [], programs: i = [], limit: a = 8 }) => n(() => {
|
|
608
622
|
let n = [];
|
|
609
623
|
for (let t of e) {
|
|
610
624
|
n.push({
|
|
@@ -660,11 +674,11 @@ var c = async (e, t, n) => {
|
|
|
660
674
|
r,
|
|
661
675
|
i,
|
|
662
676
|
a
|
|
663
|
-
]),
|
|
664
|
-
let r =
|
|
677
|
+
]), me = (e, t) => {
|
|
678
|
+
let r = C(e), i = n(() => (r.data ?? []).find((e) => e.id === t) ?? null, [r.data, t]), a = i?.userId, o = H(a), s = V({
|
|
665
679
|
athleteId: a,
|
|
666
680
|
pagination: { limit: 100 }
|
|
667
|
-
}), c =
|
|
681
|
+
}), c = F({
|
|
668
682
|
athleteId: a,
|
|
669
683
|
pagination: { limit: 100 }
|
|
670
684
|
});
|
|
@@ -678,7 +692,7 @@ var c = async (e, t, n) => {
|
|
|
678
692
|
isError: r.isError || o.isError || s.isError || c.isError
|
|
679
693
|
};
|
|
680
694
|
};
|
|
681
|
-
function
|
|
695
|
+
function X(e, t, n, r = 8) {
|
|
682
696
|
let i = Date.now(), a = Array.from({ length: r }, () => 0);
|
|
683
697
|
for (let o of e) {
|
|
684
698
|
let e = new Date(t(o)).getTime();
|
|
@@ -696,15 +710,15 @@ function $(e, t, n, r = 8) {
|
|
|
696
710
|
};
|
|
697
711
|
});
|
|
698
712
|
}
|
|
699
|
-
var
|
|
700
|
-
let { competition: t, sampleLimit: r = 200 } = e, i =
|
|
713
|
+
var he = (e = {}) => {
|
|
714
|
+
let { competition: t, sampleLimit: r = 200 } = e, i = F({ pagination: { limit: r } }), a = V({ pagination: { limit: r } }), o = k({ pagination: { limit: r } }), s = n(() => i.data?.items ?? [], [i.data]), c = n(() => a.data?.items ?? [], [a.data]), l = n(() => o.data?.items ?? [], [o.data]), u = n(() => {
|
|
701
715
|
if (t) return t;
|
|
702
716
|
let e = /* @__PURE__ */ new Map();
|
|
703
717
|
for (let t of l) t.competition && e.set(t.competition, (e.get(t.competition) ?? 0) + 1);
|
|
704
718
|
let n = null, r = 0;
|
|
705
719
|
for (let [t, i] of e) i > r && (r = i, n = t);
|
|
706
720
|
return n;
|
|
707
|
-
}, [t, l]), d =
|
|
721
|
+
}, [t, l]), d = j(u ?? void 0);
|
|
708
722
|
return n(() => {
|
|
709
723
|
let e = s.length, t = s.filter((e) => e.rating !== null), n = t.length, r = n > 0 ? t.reduce((e, t) => e + (t.rating ?? 0), 0) / n : null, l = s.filter((e) => e.status === "COMPLETED").length, f = e > 0 ? l / e * 100 : 0, p = [
|
|
710
724
|
"REQUESTED",
|
|
@@ -734,7 +748,7 @@ var ue = (e = {}) => {
|
|
|
734
748
|
let t = e.totalLoad ?? 0, n = y - new Date(e.performedAt).getTime();
|
|
735
749
|
Number.isNaN(n) || (n <= 7 * b && (x += t), n <= 28 * b && (S += t));
|
|
736
750
|
}
|
|
737
|
-
let C = S / 4, w = C > 0 ? x / C : null, T =
|
|
751
|
+
let C = S / 4, w = C > 0 ? x / C : null, T = X(c, (e) => e.performedAt, (e) => e.totalLoad ?? 0), E = X(s, (e) => e.scheduledAt, () => 1);
|
|
738
752
|
return {
|
|
739
753
|
totalSessions: e,
|
|
740
754
|
ratedCount: n,
|
|
@@ -770,8 +784,139 @@ var ue = (e = {}) => {
|
|
|
770
784
|
o.isLoading,
|
|
771
785
|
o.isError
|
|
772
786
|
]);
|
|
787
|
+
}, Z = "\n id workspaceId actorId actorType provider model trigger status error\n promptSummary inputRefs decision tokensIn tokensOut latencyMs costUsd\n createdAt\n", Q = "\n workspaceId provider model autoPilotEnabled autoPilotLastRunAt updatedAt\n", ge = () => {
|
|
788
|
+
let { apiGatewayUrl: t } = e();
|
|
789
|
+
return i({
|
|
790
|
+
queryKey: ["atheletebridge", "ai-model-catalog"],
|
|
791
|
+
queryFn: async () => (await u("query AthAiModelCatalog {\n athAiModelCatalog { provider model label isDefault capabilities }\n }", {}, t)).athAiModelCatalog,
|
|
792
|
+
staleTime: 30 * 6e4
|
|
793
|
+
});
|
|
794
|
+
}, $ = () => {
|
|
795
|
+
let { apiGatewayUrl: t } = e();
|
|
796
|
+
return i({
|
|
797
|
+
queryKey: ["atheletebridge", "ai-config"],
|
|
798
|
+
queryFn: async () => (await u(`query AthWorkspaceAiConfig {
|
|
799
|
+
athWorkspaceAiConfig { ${Q} }
|
|
800
|
+
}`, {}, t)).athWorkspaceAiConfig
|
|
801
|
+
});
|
|
802
|
+
}, _e = () => {
|
|
803
|
+
let t = a(), { apiGatewayUrl: n } = e();
|
|
804
|
+
return r({
|
|
805
|
+
mutationFn: async ({ provider: e, model: t }) => (await u(`mutation AthSetWorkspaceAiModel($provider: String!, $model: String!) {
|
|
806
|
+
athSetWorkspaceAiModel(provider: $provider, model: $model) { ${Q} }
|
|
807
|
+
}`, {
|
|
808
|
+
provider: e,
|
|
809
|
+
model: t
|
|
810
|
+
}, n)).athSetWorkspaceAiModel,
|
|
811
|
+
onSuccess: (e) => {
|
|
812
|
+
t.setQueryData(["atheletebridge", "ai-config"], e);
|
|
813
|
+
}
|
|
814
|
+
});
|
|
815
|
+
}, ve = () => {
|
|
816
|
+
let t = a(), { apiGatewayUrl: n } = e();
|
|
817
|
+
return r({
|
|
818
|
+
mutationFn: async (e) => (await u(`mutation AthSetWorkspaceAutoPilot($enabled: Boolean!) {
|
|
819
|
+
athSetWorkspaceAutoPilot(enabled: $enabled) { ${Q} }
|
|
820
|
+
}`, { enabled: e }, n)).athSetWorkspaceAutoPilot,
|
|
821
|
+
onSuccess: (e) => {
|
|
822
|
+
t.setQueryData(["atheletebridge", "ai-config"], e);
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
}, ye = (t = {}) => {
|
|
826
|
+
let { apiGatewayUrl: n } = e(), { limit: r = 10, offset: a = 0 } = t;
|
|
827
|
+
return i({
|
|
828
|
+
queryKey: [
|
|
829
|
+
"atheletebridge",
|
|
830
|
+
"agent-runs",
|
|
831
|
+
r,
|
|
832
|
+
a
|
|
833
|
+
],
|
|
834
|
+
queryFn: async () => (await u(`query AthAgentRuns($pagination: PaginationInput) {
|
|
835
|
+
athAgentRuns(pagination: $pagination) {
|
|
836
|
+
items { ${Z} }
|
|
837
|
+
pageInfo { cursor hasMore }
|
|
838
|
+
}
|
|
839
|
+
}`, { pagination: {
|
|
840
|
+
limit: r,
|
|
841
|
+
offset: a
|
|
842
|
+
} }, n)).athAgentRuns
|
|
843
|
+
});
|
|
844
|
+
}, be = (t) => {
|
|
845
|
+
let { apiGatewayUrl: n } = e();
|
|
846
|
+
return i({
|
|
847
|
+
queryKey: [
|
|
848
|
+
"atheletebridge",
|
|
849
|
+
"agent-run",
|
|
850
|
+
t
|
|
851
|
+
],
|
|
852
|
+
queryFn: async () => (await u(`query AthAgentRun($id: ID!) {
|
|
853
|
+
athAgentRun(id: $id) { ${Z} }
|
|
854
|
+
}`, { id: t }, n)).athAgentRun,
|
|
855
|
+
enabled: !!t,
|
|
856
|
+
retry: !1
|
|
857
|
+
});
|
|
858
|
+
}, xe = (t) => {
|
|
859
|
+
let { apiGatewayUrl: n } = e();
|
|
860
|
+
return i({
|
|
861
|
+
queryKey: [
|
|
862
|
+
"atheletebridge",
|
|
863
|
+
"program-ai-state",
|
|
864
|
+
t
|
|
865
|
+
],
|
|
866
|
+
queryFn: async () => (await u("query AthProgramAiState($id: ID!) {\n athProgram(id: $id) { id name status context }\n }", { id: t }, n)).athProgram,
|
|
867
|
+
enabled: !!t,
|
|
868
|
+
retry: !1
|
|
869
|
+
});
|
|
870
|
+
}, Se = () => {
|
|
871
|
+
let t = a(), { apiGatewayUrl: n } = e();
|
|
872
|
+
return r({
|
|
873
|
+
mutationFn: async (e) => (await u(`mutation AthGenerateProgram($input: AthGenerateProgramInput!) {
|
|
874
|
+
athGenerateProgram(input: $input) {
|
|
875
|
+
agentRunId
|
|
876
|
+
drillCount
|
|
877
|
+
sessionCount
|
|
878
|
+
program { ${_} }
|
|
879
|
+
}
|
|
880
|
+
}`, { input: e }, n)).athGenerateProgram,
|
|
881
|
+
onSuccess: () => {
|
|
882
|
+
t.invalidateQueries({ queryKey: ["atheletebridge", "agent-runs"] }), t.invalidateQueries({ queryKey: ["atheletebridge", "programs"] }), t.invalidateQueries({ queryKey: ["atheletebridge", "sessions"] });
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
}, Ce = () => {
|
|
886
|
+
let t = a(), { apiGatewayUrl: n } = e();
|
|
887
|
+
return r({
|
|
888
|
+
mutationFn: async ({ athleteId: e, programId: t, requestedProvider: r }) => (await u("mutation AthAdjustPlanFromPerformance($athleteId: ID!, $programId: ID!, $requestedProvider: String) {\n athAdjustPlanFromPerformance(athleteId: $athleteId, programId: $programId, requestedProvider: $requestedProvider) {\n agentRunId athleteId programId assessment rationale confidence\n recommendedWeeklyLoadChangePct flags appliedToProgram createdAt\n }\n }", {
|
|
889
|
+
athleteId: e,
|
|
890
|
+
programId: t,
|
|
891
|
+
requestedProvider: r
|
|
892
|
+
}, n)).athAdjustPlanFromPerformance,
|
|
893
|
+
onSuccess: (e) => {
|
|
894
|
+
t.invalidateQueries({ queryKey: ["atheletebridge", "agent-runs"] }), t.invalidateQueries({ queryKey: [
|
|
895
|
+
"atheletebridge",
|
|
896
|
+
"program-ai-state",
|
|
897
|
+
e.programId
|
|
898
|
+
] });
|
|
899
|
+
}
|
|
900
|
+
});
|
|
901
|
+
}, we = () => {
|
|
902
|
+
let t = a(), { apiGatewayUrl: n } = e();
|
|
903
|
+
return r({
|
|
904
|
+
mutationFn: async ({ runId: e, programId: t, assessment: r, note: i }) => (await u("mutation AthOverrideAgentRun($runId: ID!, $programId: ID!, $assessment: AthAiAssessment!, $note: String!) {\n athOverrideAgentRun(runId: $runId, programId: $programId, assessment: $assessment, note: $note) {\n id workspaceId programId supersedesRunId assessment note\n appliedToProgram createdAt\n }\n }", {
|
|
905
|
+
runId: e,
|
|
906
|
+
programId: t,
|
|
907
|
+
assessment: r,
|
|
908
|
+
note: i
|
|
909
|
+
}, n)).athOverrideAgentRun,
|
|
910
|
+
onSuccess: (e) => {
|
|
911
|
+
t.invalidateQueries({ queryKey: ["atheletebridge", "agent-runs"] }), t.invalidateQueries({ queryKey: [
|
|
912
|
+
"atheletebridge",
|
|
913
|
+
"program-ai-state",
|
|
914
|
+
e.programId
|
|
915
|
+
] });
|
|
916
|
+
}
|
|
917
|
+
});
|
|
773
918
|
};
|
|
774
919
|
//#endregion
|
|
775
|
-
export {
|
|
920
|
+
export { c as AI_PROVIDER_UNAVAILABLE, l as AthApiError, J as directoryUserName, N as useAddDrill, D as useAddMember, Ce as useAdjustPlanFromPerformance, be as useAgentRun, ye as useAgentRuns, ge as useAiModelCatalog, oe as useArchiveProgram, E as useArchiveTeam, me as useAthleteProfile, K as useAvailability, L as useBookSession, B as useCancelSession, he as useCoachAnalytics, z as useCompleteSession, R as useConfirmSession, re as useCreateProgram, w as useCreateTeam, ue as useFile, A as useFixture, k as useFixtures, Se as useGenerateProgram, U as useLogWorkout, we as useOverrideAgentRun, H as usePerformanceMetrics, ne as useProgram, xe as useProgramAiState, te as usePrograms, pe as useRecentActivity, ee as useRecordFixtureResult, W as useRecordMetric, se as useRemindAvailability, P as useRemoveDrill, O as useRemoveMember, M as useScheduleFixture, I as useSession, F as useSessions, q as useSetAvailability, _e as useSetWorkspaceAiModel, ve as useSetWorkspaceAutoPilot, j as useStandings, S as useTeam, C as useTeamMembers, x as useTeams, ae as useTransitionProgram, ie as useUpdateProgram, T as useUpdateTeam, le as useUploadFile, fe as useUserDirectory, de as useUserSearch, Y as useUsersByIds, V as useWorkoutLogs, $ as useWorkspaceAiConfig };
|
|
776
921
|
|
|
777
922
|
//# sourceMappingURL=useAthleteBridgeApi.js.map
|