@trainheroic-unofficial/dto 3.5.2 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +176 -166
- package/dist/index.mjs +30 -4
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/athlete.d.ts
|
|
3
3
|
/** `/user/simple` — the identity + tenant key (numeric `id`) for any logged-in account. */
|
|
4
|
-
declare const userSimpleSchema: z.ZodObject<{
|
|
4
|
+
export declare const userSimpleSchema: z.ZodObject<{
|
|
5
5
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
6
6
|
roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7
7
|
org_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
8
8
|
}, z.core.$loose>;
|
|
9
|
-
type UserSimple = z.infer<typeof userSimpleSchema>;
|
|
9
|
+
export type UserSimple = z.infer<typeof userSimpleSchema>;
|
|
10
10
|
/** `/v5/athleteProfile/summary` — lifetime training totals. Needs `use_metric` in the query. */
|
|
11
|
-
declare const athleteProfileSummarySchema: z.ZodObject<{
|
|
11
|
+
export declare const athleteProfileSummarySchema: z.ZodObject<{
|
|
12
12
|
reps_sum: z.ZodOptional<z.ZodNumber>;
|
|
13
13
|
volume_sum: z.ZodOptional<z.ZodNumber>;
|
|
14
14
|
sessions_count: z.ZodOptional<z.ZodNumber>;
|
|
@@ -16,9 +16,9 @@ declare const athleteProfileSummarySchema: z.ZodObject<{
|
|
|
16
16
|
last_logged_date: z.ZodOptional<z.ZodString>;
|
|
17
17
|
duration_hours: z.ZodOptional<z.ZodNumber>;
|
|
18
18
|
}, z.core.$loose>;
|
|
19
|
-
type AthleteProfileSummary = z.infer<typeof athleteProfileSummarySchema>;
|
|
19
|
+
export type AthleteProfileSummary = z.infer<typeof athleteProfileSummarySchema>;
|
|
20
20
|
/** `/v5/users/{id}` — the detailed athlete profile (only the fields we surface). */
|
|
21
|
-
declare const athleteUserSchema: z.ZodObject<{
|
|
21
|
+
export declare const athleteUserSchema: z.ZodObject<{
|
|
22
22
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
23
23
|
email: z.ZodOptional<z.ZodString>;
|
|
24
24
|
name_first: z.ZodOptional<z.ZodString>;
|
|
@@ -28,14 +28,14 @@ declare const athleteUserSchema: z.ZodObject<{
|
|
|
28
28
|
date_of_birth: z.ZodOptional<z.ZodString>;
|
|
29
29
|
use_metric: z.ZodOptional<z.ZodBoolean>;
|
|
30
30
|
}, z.core.$loose>;
|
|
31
|
-
type AthleteUser = z.infer<typeof athleteUserSchema>;
|
|
31
|
+
export type AthleteUser = z.infer<typeof athleteUserSchema>;
|
|
32
32
|
/** `/1.0/athlete/prefs` — notification + display preference flags. */
|
|
33
|
-
declare const athletePrefsSchema: z.ZodObject<{
|
|
33
|
+
export declare const athletePrefsSchema: z.ZodObject<{
|
|
34
34
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
35
35
|
}, z.core.$loose>;
|
|
36
|
-
type AthletePrefs = z.infer<typeof athletePrefsSchema>;
|
|
36
|
+
export type AthletePrefs = z.infer<typeof athletePrefsSchema>;
|
|
37
37
|
/** One item of `/2.0/athlete/workingMax` — the athlete's working max for an exercise. */
|
|
38
|
-
declare const athleteWorkingMaxSchema: z.ZodObject<{
|
|
38
|
+
export declare const athleteWorkingMaxSchema: z.ZodObject<{
|
|
39
39
|
exercise_id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
40
40
|
title: z.ZodOptional<z.ZodString>;
|
|
41
41
|
param_type: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
@@ -43,7 +43,7 @@ declare const athleteWorkingMaxSchema: z.ZodObject<{
|
|
|
43
43
|
type_suffix: z.ZodOptional<z.ZodString>;
|
|
44
44
|
working_max_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
45
45
|
}, z.core.$loose>;
|
|
46
|
-
declare const athleteWorkingMaxListSchema: z.ZodArray<z.ZodObject<{
|
|
46
|
+
export declare const athleteWorkingMaxListSchema: z.ZodArray<z.ZodObject<{
|
|
47
47
|
exercise_id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
48
48
|
title: z.ZodOptional<z.ZodString>;
|
|
49
49
|
param_type: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
@@ -51,9 +51,9 @@ declare const athleteWorkingMaxListSchema: z.ZodArray<z.ZodObject<{
|
|
|
51
51
|
type_suffix: z.ZodOptional<z.ZodString>;
|
|
52
52
|
working_max_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
53
53
|
}, z.core.$loose>>;
|
|
54
|
-
type AthleteWorkingMax = z.infer<typeof athleteWorkingMaxSchema>;
|
|
54
|
+
export type AthleteWorkingMax = z.infer<typeof athleteWorkingMaxSchema>;
|
|
55
55
|
/** One item of `/v5/users/exercises/history` — an exercise the athlete has logged. */
|
|
56
|
-
declare const exerciseHistoryListItemSchema: z.ZodObject<{
|
|
56
|
+
export declare const exerciseHistoryListItemSchema: z.ZodObject<{
|
|
57
57
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
58
58
|
title: z.ZodString;
|
|
59
59
|
isCircuit: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -61,7 +61,7 @@ declare const exerciseHistoryListItemSchema: z.ZodObject<{
|
|
|
61
61
|
param1Type: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
62
62
|
param2Type: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
63
63
|
}, z.core.$loose>;
|
|
64
|
-
declare const exerciseHistoryListSchema: z.ZodArray<z.ZodObject<{
|
|
64
|
+
export declare const exerciseHistoryListSchema: z.ZodArray<z.ZodObject<{
|
|
65
65
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
66
66
|
title: z.ZodString;
|
|
67
67
|
isCircuit: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -69,9 +69,9 @@ declare const exerciseHistoryListSchema: z.ZodArray<z.ZodObject<{
|
|
|
69
69
|
param1Type: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
70
70
|
param2Type: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
71
71
|
}, z.core.$loose>>;
|
|
72
|
-
type ExerciseHistoryListItem = z.infer<typeof exerciseHistoryListItemSchema>;
|
|
72
|
+
export type ExerciseHistoryListItem = z.infer<typeof exerciseHistoryListItemSchema>;
|
|
73
73
|
/** A single completed set inside a history entry (`/v5/exercises/{id}/history`). */
|
|
74
|
-
declare const historySetSchema: z.ZodObject<{
|
|
74
|
+
export declare const historySetSchema: z.ZodObject<{
|
|
75
75
|
setNumber: z.ZodNumber;
|
|
76
76
|
formattedValue: z.ZodOptional<z.ZodString>;
|
|
77
77
|
rawValue1: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
@@ -79,12 +79,12 @@ declare const historySetSchema: z.ZodObject<{
|
|
|
79
79
|
savedWorkoutSetExerciseId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
80
80
|
}, z.core.$loose>;
|
|
81
81
|
/** A best rep-max derived for a history entry. */
|
|
82
|
-
declare const repMaxSchema: z.ZodObject<{
|
|
82
|
+
export declare const repMaxSchema: z.ZodObject<{
|
|
83
83
|
reps: z.ZodNumber;
|
|
84
84
|
weight: z.ZodNumber;
|
|
85
85
|
}, z.core.$loose>;
|
|
86
86
|
/** One performed session of an exercise (`/v5/exercises/{id}/history` → `history[]`). */
|
|
87
|
-
declare const historyEntrySchema: z.ZodObject<{
|
|
87
|
+
export declare const historyEntrySchema: z.ZodObject<{
|
|
88
88
|
dateCompleted: z.ZodString;
|
|
89
89
|
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
90
|
isLift: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -108,7 +108,7 @@ declare const historyEntrySchema: z.ZodObject<{
|
|
|
108
108
|
}, z.core.$loose>>>;
|
|
109
109
|
}, z.core.$loose>;
|
|
110
110
|
/** A lifetime PR row from `/v5/exercises/{id}/history` → `liftPRs[]`. */
|
|
111
|
-
declare const liftPRSchema: z.ZodObject<{
|
|
111
|
+
export declare const liftPRSchema: z.ZodObject<{
|
|
112
112
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
113
113
|
savedWorkoutSetExerciseId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
114
114
|
setNumber: z.ZodOptional<z.ZodNumber>;
|
|
@@ -119,7 +119,7 @@ declare const liftPRSchema: z.ZodObject<{
|
|
|
119
119
|
description: z.ZodOptional<z.ZodString>;
|
|
120
120
|
}, z.core.$loose>;
|
|
121
121
|
/** `/v5/exercises/{id}/history` — the per-exercise PRs + session history. */
|
|
122
|
-
declare const exerciseHistoryDetailSchema: z.ZodObject<{
|
|
122
|
+
export declare const exerciseHistoryDetailSchema: z.ZodObject<{
|
|
123
123
|
liftPRs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
124
124
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
125
125
|
savedWorkoutSetExerciseId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
@@ -155,9 +155,9 @@ declare const exerciseHistoryDetailSchema: z.ZodObject<{
|
|
|
155
155
|
}, z.core.$loose>>>;
|
|
156
156
|
}, z.core.$loose>>>;
|
|
157
157
|
}, z.core.$loose>;
|
|
158
|
-
type ExerciseHistoryDetail = z.infer<typeof exerciseHistoryDetailSchema>;
|
|
158
|
+
export type ExerciseHistoryDetail = z.infer<typeof exerciseHistoryDetailSchema>;
|
|
159
159
|
/** One item of `/v5/exercises/{id}/personalRecords` — a standards-filtered PR. */
|
|
160
|
-
declare const personalRecordSchema: z.ZodObject<{
|
|
160
|
+
export declare const personalRecordSchema: z.ZodObject<{
|
|
161
161
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
162
162
|
savedWorkoutSetExerciseId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
163
163
|
setNumber: z.ZodOptional<z.ZodNumber>;
|
|
@@ -167,7 +167,7 @@ declare const personalRecordSchema: z.ZodObject<{
|
|
|
167
167
|
units: z.ZodOptional<z.ZodString>;
|
|
168
168
|
isMetric: z.ZodOptional<z.ZodBoolean>;
|
|
169
169
|
}, z.core.$loose>;
|
|
170
|
-
declare const personalRecordListSchema: z.ZodArray<z.ZodObject<{
|
|
170
|
+
export declare const personalRecordListSchema: z.ZodArray<z.ZodObject<{
|
|
171
171
|
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
172
172
|
savedWorkoutSetExerciseId: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
173
173
|
setNumber: z.ZodOptional<z.ZodNumber>;
|
|
@@ -177,20 +177,20 @@ declare const personalRecordListSchema: z.ZodArray<z.ZodObject<{
|
|
|
177
177
|
units: z.ZodOptional<z.ZodString>;
|
|
178
178
|
isMetric: z.ZodOptional<z.ZodBoolean>;
|
|
179
179
|
}, z.core.$loose>>;
|
|
180
|
-
type PersonalRecord = z.infer<typeof personalRecordSchema>;
|
|
180
|
+
export type PersonalRecord = z.infer<typeof personalRecordSchema>;
|
|
181
181
|
/** `/v5/exercises/{id}/stats` — last performance + PR for an exercise. Needs `date` in the query. */
|
|
182
|
-
declare const exerciseStatsSchema: z.ZodObject<{
|
|
182
|
+
export declare const exerciseStatsSchema: z.ZodObject<{
|
|
183
183
|
isLift: z.ZodOptional<z.ZodBoolean>;
|
|
184
184
|
lastPerformance: z.ZodOptional<z.ZodUnknown>;
|
|
185
185
|
personalRecord: z.ZodOptional<z.ZodUnknown>;
|
|
186
186
|
}, z.core.$loose>;
|
|
187
|
-
type ExerciseStats = z.infer<typeof exerciseStatsSchema>;
|
|
187
|
+
export type ExerciseStats = z.infer<typeof exerciseStatsSchema>;
|
|
188
188
|
/**
|
|
189
189
|
* One item of `/3.0/athlete/programworkout/range` — a scheduled/completed workout. The deep
|
|
190
190
|
* `summarizedSavedWorkout` tree is left loose: the presenter in `js` flattens it, so dto only
|
|
191
191
|
* pins the top-level fields the warehouse and presenter key off.
|
|
192
192
|
*/
|
|
193
|
-
declare const programWorkoutSchema: z.ZodObject<{
|
|
193
|
+
export declare const programWorkoutSchema: z.ZodObject<{
|
|
194
194
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
195
195
|
date: z.ZodOptional<z.ZodString>;
|
|
196
196
|
workout_title: z.ZodOptional<z.ZodString>;
|
|
@@ -200,7 +200,7 @@ declare const programWorkoutSchema: z.ZodObject<{
|
|
|
200
200
|
team_title: z.ZodOptional<z.ZodString>;
|
|
201
201
|
summarizedSavedWorkout: z.ZodOptional<z.ZodUnknown>;
|
|
202
202
|
}, z.core.$loose>;
|
|
203
|
-
declare const programWorkoutListSchema: z.ZodArray<z.ZodObject<{
|
|
203
|
+
export declare const programWorkoutListSchema: z.ZodArray<z.ZodObject<{
|
|
204
204
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
205
205
|
date: z.ZodOptional<z.ZodString>;
|
|
206
206
|
workout_title: z.ZodOptional<z.ZodString>;
|
|
@@ -210,20 +210,20 @@ declare const programWorkoutListSchema: z.ZodArray<z.ZodObject<{
|
|
|
210
210
|
team_title: z.ZodOptional<z.ZodString>;
|
|
211
211
|
summarizedSavedWorkout: z.ZodOptional<z.ZodUnknown>;
|
|
212
212
|
}, z.core.$loose>>;
|
|
213
|
-
type ProgramWorkout = z.infer<typeof programWorkoutSchema>;
|
|
213
|
+
export type ProgramWorkout = z.infer<typeof programWorkoutSchema>;
|
|
214
214
|
/** A `YYYY-MM-DD` date argument. The single definition reused across athlete tool inputs. */
|
|
215
|
-
declare const dateString: z.ZodString;
|
|
215
|
+
export declare const dateString: z.ZodString;
|
|
216
216
|
/** Args for the workout-range read: an inclusive `YYYY-MM-DD` window. */
|
|
217
|
-
declare const athleteWorkoutRangeArgsSchema: z.ZodObject<{
|
|
217
|
+
export declare const athleteWorkoutRangeArgsSchema: z.ZodObject<{
|
|
218
218
|
startDate: z.ZodString;
|
|
219
219
|
endDate: z.ZodString;
|
|
220
220
|
}, z.core.$strip>;
|
|
221
|
-
type AthleteWorkoutRangeArgs = z.infer<typeof athleteWorkoutRangeArgsSchema>;
|
|
221
|
+
export type AthleteWorkoutRangeArgs = z.infer<typeof athleteWorkoutRangeArgsSchema>;
|
|
222
222
|
/**
|
|
223
223
|
* One entered set: the value of each parameter slot (param 1 / param 2 — e.g. reps / weight).
|
|
224
224
|
* Shared by every logging write so the per-set shape is defined once.
|
|
225
225
|
*/
|
|
226
|
-
declare const loggedSetSchema: z.ZodObject<{
|
|
226
|
+
export declare const loggedSetSchema: z.ZodObject<{
|
|
227
227
|
param1: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
228
228
|
param2: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
229
229
|
}, z.core.$strip>;
|
|
@@ -236,7 +236,7 @@ declare const loggedSetSchema: z.ZodObject<{
|
|
|
236
236
|
* by-set logging write (not the by-exercise session log, where each exercise's sets are
|
|
237
237
|
* always sequential).
|
|
238
238
|
*/
|
|
239
|
-
declare const loggedSetWithSlotSchema: z.ZodObject<{
|
|
239
|
+
export declare const loggedSetWithSlotSchema: z.ZodObject<{
|
|
240
240
|
param1: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
241
241
|
param2: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
242
242
|
slot: z.ZodOptional<z.ZodNumber>;
|
|
@@ -249,7 +249,7 @@ declare const loggedSetWithSlotSchema: z.ZodObject<{
|
|
|
249
249
|
* log keeps positions already logged in an earlier call and leaves the positions it does not
|
|
250
250
|
* write empty.
|
|
251
251
|
*/
|
|
252
|
-
declare const logSetArgsSchema: z.ZodObject<{
|
|
252
|
+
export declare const logSetArgsSchema: z.ZodObject<{
|
|
253
253
|
date: z.ZodString;
|
|
254
254
|
savedWorkoutSetId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
255
255
|
results: z.ZodArray<z.ZodObject<{
|
|
@@ -261,12 +261,12 @@ declare const logSetArgsSchema: z.ZodObject<{
|
|
|
261
261
|
}, z.core.$strip>>;
|
|
262
262
|
}, z.core.$strip>>;
|
|
263
263
|
}, z.core.$strip>;
|
|
264
|
-
type LogSetArgs = z.infer<typeof logSetArgsSchema>;
|
|
264
|
+
export type LogSetArgs = z.infer<typeof logSetArgsSchema>;
|
|
265
265
|
/**
|
|
266
266
|
* Args for the coach "log for athlete" write — the same shape as logSetArgsSchema plus the
|
|
267
267
|
* roster `athleteId` whose set is being logged on their behalf.
|
|
268
268
|
*/
|
|
269
|
-
declare const coachLogSetArgsSchema: z.ZodObject<{
|
|
269
|
+
export declare const coachLogSetArgsSchema: z.ZodObject<{
|
|
270
270
|
date: z.ZodString;
|
|
271
271
|
savedWorkoutSetId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
272
272
|
results: z.ZodArray<z.ZodObject<{
|
|
@@ -279,14 +279,14 @@ declare const coachLogSetArgsSchema: z.ZodObject<{
|
|
|
279
279
|
}, z.core.$strip>>;
|
|
280
280
|
athleteId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
281
281
|
}, z.core.$strip>;
|
|
282
|
-
type CoachLogSetArgs = z.infer<typeof coachLogSetArgsSchema>;
|
|
282
|
+
export type CoachLogSetArgs = z.infer<typeof coachLogSetArgsSchema>;
|
|
283
283
|
/**
|
|
284
284
|
* Args for changing the logged-in athlete's prescribed targets without marking the set performed.
|
|
285
285
|
* The write replaces the exercise's whole prescription, so its sets are positional and sequential
|
|
286
286
|
* by definition: it deliberately omits the log path's `slot` field because a sparse prescription
|
|
287
287
|
* has no meaning here.
|
|
288
288
|
*/
|
|
289
|
-
declare const athletePrescribeSetArgsSchema: z.ZodObject<{
|
|
289
|
+
export declare const athletePrescribeSetArgsSchema: z.ZodObject<{
|
|
290
290
|
date: z.ZodString;
|
|
291
291
|
savedWorkoutSetId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
292
292
|
results: z.ZodArray<z.ZodObject<{
|
|
@@ -297,9 +297,9 @@ declare const athletePrescribeSetArgsSchema: z.ZodObject<{
|
|
|
297
297
|
}, z.core.$strip>>;
|
|
298
298
|
}, z.core.$strip>>;
|
|
299
299
|
}, z.core.$strip>;
|
|
300
|
-
type AthletePrescribeSetArgs = z.infer<typeof athletePrescribeSetArgsSchema>;
|
|
300
|
+
export type AthletePrescribeSetArgs = z.infer<typeof athletePrescribeSetArgsSchema>;
|
|
301
301
|
/** Coach variant of {@link athletePrescribeSetArgsSchema}, with the roster athlete to update. */
|
|
302
|
-
declare const coachPrescribeSetArgsSchema: z.ZodObject<{
|
|
302
|
+
export declare const coachPrescribeSetArgsSchema: z.ZodObject<{
|
|
303
303
|
date: z.ZodString;
|
|
304
304
|
savedWorkoutSetId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
305
305
|
results: z.ZodArray<z.ZodObject<{
|
|
@@ -311,7 +311,7 @@ declare const coachPrescribeSetArgsSchema: z.ZodObject<{
|
|
|
311
311
|
}, z.core.$strip>>;
|
|
312
312
|
athleteId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
313
313
|
}, z.core.$strip>;
|
|
314
|
-
type CoachPrescribeSetArgs = z.infer<typeof coachPrescribeSetArgsSchema>;
|
|
314
|
+
export type CoachPrescribeSetArgs = z.infer<typeof coachPrescribeSetArgsSchema>;
|
|
315
315
|
/**
|
|
316
316
|
* Args for the coach per-athlete exercise swap: replace the exercise prescribed in one of a
|
|
317
317
|
* roster athlete's saved-workout slots with a different exercise, the API equivalent of the
|
|
@@ -319,18 +319,18 @@ type CoachPrescribeSetArgs = z.infer<typeof coachPrescribeSetArgsSchema>;
|
|
|
319
319
|
* (the same id `coachLogSetArgsSchema` uses, read off athlete_saved_workouts raw);
|
|
320
320
|
* `exerciseId` is the replacement exercise. The team/program prescription is left untouched.
|
|
321
321
|
*/
|
|
322
|
-
declare const swapAthleteExerciseArgsSchema: z.ZodObject<{
|
|
322
|
+
export declare const swapAthleteExerciseArgsSchema: z.ZodObject<{
|
|
323
323
|
savedWorkoutSetExerciseId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
324
324
|
exerciseId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
325
325
|
}, z.core.$strip>;
|
|
326
|
-
type SwapAthleteExerciseArgs = z.infer<typeof swapAthleteExerciseArgsSchema>;
|
|
326
|
+
export type SwapAthleteExerciseArgs = z.infer<typeof swapAthleteExerciseArgsSchema>;
|
|
327
327
|
/**
|
|
328
328
|
* Args for logging a whole session by exercise (rather than by saved-workout-set id). Each
|
|
329
329
|
* exercise carries its entered sets and an optional 1-based `order`. The athlete path creates
|
|
330
330
|
* or reuses a personal session for the date and logs against it; the coach path resolves each
|
|
331
331
|
* exercise to a set already prescribed on that date and logs against that.
|
|
332
332
|
*/
|
|
333
|
-
declare const logSessionArgsSchema: z.ZodObject<{
|
|
333
|
+
export declare const logSessionArgsSchema: z.ZodObject<{
|
|
334
334
|
date: z.ZodString;
|
|
335
335
|
exercises: z.ZodArray<z.ZodObject<{
|
|
336
336
|
exerciseId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
@@ -341,12 +341,12 @@ declare const logSessionArgsSchema: z.ZodObject<{
|
|
|
341
341
|
}, z.core.$strip>>;
|
|
342
342
|
}, z.core.$strip>>;
|
|
343
343
|
}, z.core.$strip>;
|
|
344
|
-
type LogSessionArgs = z.infer<typeof logSessionArgsSchema>;
|
|
344
|
+
export type LogSessionArgs = z.infer<typeof logSessionArgsSchema>;
|
|
345
345
|
/**
|
|
346
346
|
* Args for the coach variant of {@link logSessionArgsSchema}: the same shape plus the roster
|
|
347
347
|
* `athleteId` whose session is being logged on their behalf.
|
|
348
348
|
*/
|
|
349
|
-
declare const coachLogSessionArgsSchema: z.ZodObject<{
|
|
349
|
+
export declare const coachLogSessionArgsSchema: z.ZodObject<{
|
|
350
350
|
date: z.ZodString;
|
|
351
351
|
exercises: z.ZodArray<z.ZodObject<{
|
|
352
352
|
exerciseId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
@@ -358,18 +358,18 @@ declare const coachLogSessionArgsSchema: z.ZodObject<{
|
|
|
358
358
|
}, z.core.$strip>>;
|
|
359
359
|
athleteId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
360
360
|
}, z.core.$strip>;
|
|
361
|
-
type CoachLogSessionArgs = z.infer<typeof coachLogSessionArgsSchema>;
|
|
361
|
+
export type CoachLogSessionArgs = z.infer<typeof coachLogSessionArgsSchema>;
|
|
362
362
|
/**
|
|
363
363
|
* Args for removing a personal (athlete-created) workout session. `programWorkoutId` is the
|
|
364
364
|
* range item's top-level `id`; `date` is that session's day, used to look the item back up so the
|
|
365
365
|
* write can confirm it is a personal session (`personal_cal === true`) before deleting. A
|
|
366
366
|
* coach-scheduled workout is never removed this way.
|
|
367
367
|
*/
|
|
368
|
-
declare const athleteSessionRemoveArgsSchema: z.ZodObject<{
|
|
368
|
+
export declare const athleteSessionRemoveArgsSchema: z.ZodObject<{
|
|
369
369
|
programWorkoutId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
370
370
|
date: z.ZodString;
|
|
371
371
|
}, z.core.$strip>;
|
|
372
|
-
type AthleteSessionRemoveArgs = z.infer<typeof athleteSessionRemoveArgsSchema>;
|
|
372
|
+
export type AthleteSessionRemoveArgs = z.infer<typeof athleteSessionRemoveArgsSchema>;
|
|
373
373
|
/**
|
|
374
374
|
* Args for the athlete session-note write. `programWorkoutId` is the range item's top-level `id`
|
|
375
375
|
* (athlete_workouts); `date` locates that day so the SDK can resolve the saved-workout id the PUT
|
|
@@ -377,31 +377,31 @@ type AthleteSessionRemoveArgs = z.infer<typeof athleteSessionRemoveArgsSchema>;
|
|
|
377
377
|
* the session RPE (1–10). At least one of `notes` / `rpe` is required — a notes-only PUT leaves
|
|
378
378
|
* rpe untouched and vice versa.
|
|
379
379
|
*/
|
|
380
|
-
declare const athleteWorkoutNoteObject: z.ZodObject<{
|
|
380
|
+
export declare const athleteWorkoutNoteObject: z.ZodObject<{
|
|
381
381
|
date: z.ZodString;
|
|
382
382
|
programWorkoutId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
383
383
|
notes: z.ZodOptional<z.ZodString>;
|
|
384
384
|
rpe: z.ZodOptional<z.ZodNumber>;
|
|
385
385
|
}, z.core.$strip>;
|
|
386
|
-
declare const athleteWorkoutNoteArgsSchema: z.ZodObject<{
|
|
386
|
+
export declare const athleteWorkoutNoteArgsSchema: z.ZodObject<{
|
|
387
387
|
date: z.ZodString;
|
|
388
388
|
programWorkoutId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
389
389
|
notes: z.ZodOptional<z.ZodString>;
|
|
390
390
|
rpe: z.ZodOptional<z.ZodNumber>;
|
|
391
391
|
}, z.core.$strip>;
|
|
392
|
-
type AthleteWorkoutNoteArgs = z.infer<typeof athleteWorkoutNoteArgsSchema>;
|
|
392
|
+
export type AthleteWorkoutNoteArgs = z.infer<typeof athleteWorkoutNoteArgsSchema>;
|
|
393
393
|
/**
|
|
394
394
|
* Args for the athlete per-exercise note write (the "Add exercise note" box on the exercise
|
|
395
395
|
* screen — band color, etc.). `savedWorkoutSetExerciseId` is the slot id from athlete_log_targets.
|
|
396
396
|
* Empty `notes` clears the note. Distinct from {@link athleteWorkoutNoteArgsSchema} (session note).
|
|
397
397
|
*/
|
|
398
|
-
declare const athleteExerciseNoteArgsSchema: z.ZodObject<{
|
|
398
|
+
export declare const athleteExerciseNoteArgsSchema: z.ZodObject<{
|
|
399
399
|
savedWorkoutSetExerciseId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
400
400
|
notes: z.ZodString;
|
|
401
401
|
}, z.core.$strip>;
|
|
402
|
-
type AthleteExerciseNoteArgs = z.infer<typeof athleteExerciseNoteArgsSchema>;
|
|
402
|
+
export type AthleteExerciseNoteArgs = z.infer<typeof athleteExerciseNoteArgsSchema>;
|
|
403
403
|
/** Flattened exercise within a presented workout: prescriptions, logged results, units. */
|
|
404
|
-
declare const athleteWorkoutExerciseSchema: z.ZodObject<{
|
|
404
|
+
export declare const athleteWorkoutExerciseSchema: z.ZodObject<{
|
|
405
405
|
exerciseId: z.ZodNullable<z.ZodNumber>;
|
|
406
406
|
title: z.ZodString;
|
|
407
407
|
instruction: z.ZodNullable<z.ZodString>;
|
|
@@ -410,8 +410,8 @@ declare const athleteWorkoutExerciseSchema: z.ZodObject<{
|
|
|
410
410
|
prescribed: z.ZodArray<z.ZodString>;
|
|
411
411
|
performed: z.ZodArray<z.ZodString>;
|
|
412
412
|
}, z.core.$strip>;
|
|
413
|
-
type AthleteWorkoutExercise = z.infer<typeof athleteWorkoutExerciseSchema>;
|
|
414
|
-
declare const athleteWorkoutBlockSchema: z.ZodObject<{
|
|
413
|
+
export type AthleteWorkoutExercise = z.infer<typeof athleteWorkoutExerciseSchema>;
|
|
414
|
+
export declare const athleteWorkoutBlockSchema: z.ZodObject<{
|
|
415
415
|
order: z.ZodNumber;
|
|
416
416
|
title: z.ZodNullable<z.ZodString>;
|
|
417
417
|
instruction: z.ZodNullable<z.ZodString>;
|
|
@@ -426,8 +426,8 @@ declare const athleteWorkoutBlockSchema: z.ZodObject<{
|
|
|
426
426
|
performed: z.ZodArray<z.ZodString>;
|
|
427
427
|
}, z.core.$strip>>;
|
|
428
428
|
}, z.core.$strip>;
|
|
429
|
-
type AthleteWorkoutBlock = z.infer<typeof athleteWorkoutBlockSchema>;
|
|
430
|
-
declare const athleteWorkoutViewSchema: z.ZodObject<{
|
|
429
|
+
export type AthleteWorkoutBlock = z.infer<typeof athleteWorkoutBlockSchema>;
|
|
430
|
+
export declare const athleteWorkoutViewSchema: z.ZodObject<{
|
|
431
431
|
id: z.ZodNullable<z.ZodNumber>;
|
|
432
432
|
date: z.ZodString;
|
|
433
433
|
title: z.ZodString;
|
|
@@ -454,8 +454,8 @@ declare const athleteWorkoutViewSchema: z.ZodObject<{
|
|
|
454
454
|
}, z.core.$strip>>;
|
|
455
455
|
}, z.core.$strip>>;
|
|
456
456
|
}, z.core.$strip>;
|
|
457
|
-
type AthleteWorkoutView = z.infer<typeof athleteWorkoutViewSchema>;
|
|
458
|
-
declare const athleteWorkoutSummarySchema: z.ZodObject<{
|
|
457
|
+
export type AthleteWorkoutView = z.infer<typeof athleteWorkoutViewSchema>;
|
|
458
|
+
export declare const athleteWorkoutSummarySchema: z.ZodObject<{
|
|
459
459
|
id: z.ZodNullable<z.ZodNumber>;
|
|
460
460
|
date: z.ZodString;
|
|
461
461
|
title: z.ZodString;
|
|
@@ -466,9 +466,9 @@ declare const athleteWorkoutSummarySchema: z.ZodObject<{
|
|
|
466
466
|
exerciseCount: z.ZodNumber;
|
|
467
467
|
performedCount: z.ZodNumber;
|
|
468
468
|
}, z.core.$strip>;
|
|
469
|
-
type AthleteWorkoutSummary = z.infer<typeof athleteWorkoutSummarySchema>;
|
|
469
|
+
export type AthleteWorkoutSummary = z.infer<typeof athleteWorkoutSummarySchema>;
|
|
470
470
|
/** Presented views first so a summary/detail row cannot be swallowed by the loose raw list. */
|
|
471
|
-
declare const athleteWorkoutsOutputSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
471
|
+
export declare const athleteWorkoutsOutputSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
472
472
|
id: z.ZodNullable<z.ZodNumber>;
|
|
473
473
|
date: z.ZodString;
|
|
474
474
|
title: z.ZodString;
|
|
@@ -514,7 +514,7 @@ declare const athleteWorkoutsOutputSchema: z.ZodUnion<readonly [z.ZodArray<z.Zod
|
|
|
514
514
|
team_title: z.ZodOptional<z.ZodString>;
|
|
515
515
|
summarizedSavedWorkout: z.ZodOptional<z.ZodUnknown>;
|
|
516
516
|
}, z.core.$loose>>]>;
|
|
517
|
-
declare const athleteProfileOutputSchema: z.ZodObject<{
|
|
517
|
+
export declare const athleteProfileOutputSchema: z.ZodObject<{
|
|
518
518
|
summary: z.ZodObject<{
|
|
519
519
|
reps_sum: z.ZodOptional<z.ZodNumber>;
|
|
520
520
|
volume_sum: z.ZodOptional<z.ZodNumber>;
|
|
@@ -534,20 +534,20 @@ declare const athleteProfileOutputSchema: z.ZodObject<{
|
|
|
534
534
|
use_metric: z.ZodOptional<z.ZodBoolean>;
|
|
535
535
|
}, z.core.$loose>;
|
|
536
536
|
}, z.core.$loose>;
|
|
537
|
-
declare const athleteExerciseCatalogOutputSchema: z.ZodArray<z.ZodObject<{
|
|
537
|
+
export declare const athleteExerciseCatalogOutputSchema: z.ZodArray<z.ZodObject<{
|
|
538
538
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
539
539
|
title: z.ZodString;
|
|
540
540
|
isCircuit: z.ZodBoolean;
|
|
541
541
|
units: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
542
542
|
}, z.core.$strip>>;
|
|
543
|
-
declare const coachAthleteExerciseSchema: z.ZodObject<{
|
|
543
|
+
export declare const coachAthleteExerciseSchema: z.ZodObject<{
|
|
544
544
|
exerciseId: z.ZodNullable<z.ZodNumber>;
|
|
545
545
|
title: z.ZodString;
|
|
546
546
|
summary: z.ZodNullable<z.ZodString>;
|
|
547
547
|
completed: z.ZodBoolean;
|
|
548
548
|
}, z.core.$strip>;
|
|
549
|
-
type CoachAthleteExercise = z.infer<typeof coachAthleteExerciseSchema>;
|
|
550
|
-
declare const coachAthleteSessionSchema: z.ZodObject<{
|
|
549
|
+
export type CoachAthleteExercise = z.infer<typeof coachAthleteExerciseSchema>;
|
|
550
|
+
export declare const coachAthleteSessionSchema: z.ZodObject<{
|
|
551
551
|
workoutId: z.ZodNullable<z.ZodNumber>;
|
|
552
552
|
savedWorkoutId: z.ZodNullable<z.ZodNumber>;
|
|
553
553
|
title: z.ZodString;
|
|
@@ -563,8 +563,8 @@ declare const coachAthleteSessionSchema: z.ZodObject<{
|
|
|
563
563
|
completed: z.ZodBoolean;
|
|
564
564
|
}, z.core.$strip>>;
|
|
565
565
|
}, z.core.$strip>;
|
|
566
|
-
type CoachAthleteSession = z.infer<typeof coachAthleteSessionSchema>;
|
|
567
|
-
declare const coachAthleteTrainingSchema: z.ZodObject<{
|
|
566
|
+
export type CoachAthleteSession = z.infer<typeof coachAthleteSessionSchema>;
|
|
567
|
+
export declare const coachAthleteTrainingSchema: z.ZodObject<{
|
|
568
568
|
athleteId: z.ZodNullable<z.ZodNumber>;
|
|
569
569
|
athleteName: z.ZodNullable<z.ZodString>;
|
|
570
570
|
year: z.ZodNumber;
|
|
@@ -586,8 +586,8 @@ declare const coachAthleteTrainingSchema: z.ZodObject<{
|
|
|
586
586
|
}, z.core.$strip>>;
|
|
587
587
|
}, z.core.$strip>>;
|
|
588
588
|
}, z.core.$strip>;
|
|
589
|
-
type CoachAthleteTraining = z.infer<typeof coachAthleteTrainingSchema>;
|
|
590
|
-
declare const coachAthleteTrainingOutputSchema: z.ZodObject<{
|
|
589
|
+
export type CoachAthleteTraining = z.infer<typeof coachAthleteTrainingSchema>;
|
|
590
|
+
export declare const coachAthleteTrainingOutputSchema: z.ZodObject<{
|
|
591
591
|
athleteId: z.ZodNullable<z.ZodNumber>;
|
|
592
592
|
athleteName: z.ZodNullable<z.ZodString>;
|
|
593
593
|
year: z.ZodNumber;
|
|
@@ -609,7 +609,7 @@ declare const coachAthleteTrainingOutputSchema: z.ZodObject<{
|
|
|
609
609
|
}, z.core.$strip>>;
|
|
610
610
|
}, z.core.$strip>>;
|
|
611
611
|
}, z.core.$strip>;
|
|
612
|
-
declare const rosterActivityRowSchema: z.ZodObject<{
|
|
612
|
+
export declare const rosterActivityRowSchema: z.ZodObject<{
|
|
613
613
|
athleteId: z.ZodNumber;
|
|
614
614
|
sessionsCount: z.ZodNullable<z.ZodNumber>;
|
|
615
615
|
firstLoggedDate: z.ZodNullable<z.ZodString>;
|
|
@@ -617,8 +617,8 @@ declare const rosterActivityRowSchema: z.ZodObject<{
|
|
|
617
617
|
totalReps: z.ZodNullable<z.ZodNumber>;
|
|
618
618
|
totalVolume: z.ZodNullable<z.ZodNumber>;
|
|
619
619
|
}, z.core.$strip>;
|
|
620
|
-
type RosterActivityRow = z.infer<typeof rosterActivityRowSchema>;
|
|
621
|
-
declare const teamVolumeAthleteSchema: z.ZodObject<{
|
|
620
|
+
export type RosterActivityRow = z.infer<typeof rosterActivityRowSchema>;
|
|
621
|
+
export declare const teamVolumeAthleteSchema: z.ZodObject<{
|
|
622
622
|
athleteId: z.ZodNumber;
|
|
623
623
|
name: z.ZodNullable<z.ZodString>;
|
|
624
624
|
sessions: z.ZodNumber;
|
|
@@ -627,8 +627,8 @@ declare const teamVolumeAthleteSchema: z.ZodObject<{
|
|
|
627
627
|
firstLoggedDate: z.ZodNullable<z.ZodString>;
|
|
628
628
|
lastLoggedDate: z.ZodNullable<z.ZodString>;
|
|
629
629
|
}, z.core.$strip>;
|
|
630
|
-
type TeamVolumeAthlete = z.infer<typeof teamVolumeAthleteSchema>;
|
|
631
|
-
declare const teamVolumeReportSchema: z.ZodObject<{
|
|
630
|
+
export type TeamVolumeAthlete = z.infer<typeof teamVolumeAthleteSchema>;
|
|
631
|
+
export declare const teamVolumeReportSchema: z.ZodObject<{
|
|
632
632
|
window: z.ZodObject<{
|
|
633
633
|
start: z.ZodString;
|
|
634
634
|
end: z.ZodString;
|
|
@@ -649,8 +649,8 @@ declare const teamVolumeReportSchema: z.ZodObject<{
|
|
|
649
649
|
volume: z.ZodNumber;
|
|
650
650
|
}, z.core.$strip>;
|
|
651
651
|
}, z.core.$strip>;
|
|
652
|
-
type TeamVolumeReport = z.infer<typeof teamVolumeReportSchema>;
|
|
653
|
-
declare const teamVolumeOutputSchema: z.ZodObject<{
|
|
652
|
+
export type TeamVolumeReport = z.infer<typeof teamVolumeReportSchema>;
|
|
653
|
+
export declare const teamVolumeOutputSchema: z.ZodObject<{
|
|
654
654
|
window: z.ZodObject<{
|
|
655
655
|
start: z.ZodString;
|
|
656
656
|
end: z.ZodString;
|
|
@@ -671,7 +671,7 @@ declare const teamVolumeOutputSchema: z.ZodObject<{
|
|
|
671
671
|
volume: z.ZodNumber;
|
|
672
672
|
}, z.core.$strip>;
|
|
673
673
|
}, z.core.$strip>;
|
|
674
|
-
declare const rosterActivityOutputSchema: z.ZodArray<z.ZodObject<{
|
|
674
|
+
export declare const rosterActivityOutputSchema: z.ZodArray<z.ZodObject<{
|
|
675
675
|
athleteId: z.ZodNumber;
|
|
676
676
|
sessionsCount: z.ZodNullable<z.ZodNumber>;
|
|
677
677
|
firstLoggedDate: z.ZodNullable<z.ZodString>;
|
|
@@ -679,7 +679,7 @@ declare const rosterActivityOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
679
679
|
totalReps: z.ZodNullable<z.ZodNumber>;
|
|
680
680
|
totalVolume: z.ZodNullable<z.ZodNumber>;
|
|
681
681
|
}, z.core.$strip>>;
|
|
682
|
-
declare const presentedExerciseSessionSchema: z.ZodObject<{
|
|
682
|
+
export declare const presentedExerciseSessionSchema: z.ZodObject<{
|
|
683
683
|
date: z.ZodString;
|
|
684
684
|
abr: z.ZodNullable<z.ZodString>;
|
|
685
685
|
notes: z.ZodNullable<z.ZodString>;
|
|
@@ -689,8 +689,8 @@ declare const presentedExerciseSessionSchema: z.ZodObject<{
|
|
|
689
689
|
value: z.ZodNullable<z.ZodString>;
|
|
690
690
|
}, z.core.$strip>>;
|
|
691
691
|
}, z.core.$strip>;
|
|
692
|
-
type PresentedExerciseSession = z.infer<typeof presentedExerciseSessionSchema>;
|
|
693
|
-
declare const presentedExerciseHistorySchema: z.ZodObject<{
|
|
692
|
+
export type PresentedExerciseSession = z.infer<typeof presentedExerciseSessionSchema>;
|
|
693
|
+
export declare const presentedExerciseHistorySchema: z.ZodObject<{
|
|
694
694
|
liftPRs: z.ZodArray<z.ZodObject<{
|
|
695
695
|
description: z.ZodNullable<z.ZodString>;
|
|
696
696
|
reps: z.ZodNullable<z.ZodNumber>;
|
|
@@ -709,9 +709,9 @@ declare const presentedExerciseHistorySchema: z.ZodObject<{
|
|
|
709
709
|
}, z.core.$strip>>;
|
|
710
710
|
}, z.core.$strip>>;
|
|
711
711
|
}, z.core.$strip>;
|
|
712
|
-
type PresentedExerciseHistory = z.infer<typeof presentedExerciseHistorySchema>;
|
|
712
|
+
export type PresentedExerciseHistory = z.infer<typeof presentedExerciseHistorySchema>;
|
|
713
713
|
/** Presented history first so the loose raw detail schema cannot swallow it. */
|
|
714
|
-
declare const exerciseHistoryOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
714
|
+
export declare const exerciseHistoryOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
715
715
|
liftPRs: z.ZodArray<z.ZodObject<{
|
|
716
716
|
description: z.ZodNullable<z.ZodString>;
|
|
717
717
|
reps: z.ZodNullable<z.ZodNumber>;
|
|
@@ -771,7 +771,7 @@ declare const exerciseHistoryOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
771
771
|
* (`reps`, `lb`, `sec`, `%max`, `RPE`, …). The value is kept raw: a number when the slot holds a
|
|
772
772
|
* number, or a string for a non-numeric prescription such as `AMRAP` or a rep range like `8-12`.
|
|
773
773
|
*/
|
|
774
|
-
type ExportSetParam = {
|
|
774
|
+
export type ExportSetParam = {
|
|
775
775
|
unit: string | null;
|
|
776
776
|
value: number | string | null;
|
|
777
777
|
};
|
|
@@ -781,7 +781,7 @@ type ExportSetParam = {
|
|
|
781
781
|
* time/distance/percentage exercise loses nothing. `display` is the readable `"5 @ 225"` form used
|
|
782
782
|
* by the text export.
|
|
783
783
|
*/
|
|
784
|
-
type ExportSetSide = {
|
|
784
|
+
export type ExportSetSide = {
|
|
785
785
|
reps: number | string | null;
|
|
786
786
|
weight: number | string | null;
|
|
787
787
|
weightUnit: string | null;
|
|
@@ -793,20 +793,20 @@ type ExportSetSide = {
|
|
|
793
793
|
* coach programmed and `performed` is what the athlete logged; either can be null (a skipped set
|
|
794
794
|
* has no `performed`; athlete-added work has no `prescribed`).
|
|
795
795
|
*/
|
|
796
|
-
type ExportSet = {
|
|
796
|
+
export type ExportSet = {
|
|
797
797
|
set: number;
|
|
798
798
|
prescribed: ExportSetSide | null;
|
|
799
799
|
performed: ExportSetSide | null;
|
|
800
800
|
};
|
|
801
801
|
/** An exercise within an exported workout: its unit labels and the per-set prescribed/performed. */
|
|
802
|
-
type ExportExercise = {
|
|
802
|
+
export type ExportExercise = {
|
|
803
803
|
exerciseId: number | null;
|
|
804
804
|
title: string;
|
|
805
805
|
units: Array<string | null>;
|
|
806
806
|
sets: ExportSet[];
|
|
807
807
|
};
|
|
808
808
|
/** A block (workout set / superset) within an exported workout. */
|
|
809
|
-
type ExportBlock = {
|
|
809
|
+
export type ExportBlock = {
|
|
810
810
|
order: number;
|
|
811
811
|
title: string | null;
|
|
812
812
|
isTest: boolean;
|
|
@@ -817,7 +817,7 @@ type ExportBlock = {
|
|
|
817
817
|
* produces, but with structured numeric sets (reps/weight broken out) instead of joined strings,
|
|
818
818
|
* so it serializes cleanly to CSV and JSON. Produced by `presentAthleteWorkoutsExport` in `js`.
|
|
819
819
|
*/
|
|
820
|
-
type WorkoutHistoryExport = {
|
|
820
|
+
export type WorkoutHistoryExport = {
|
|
821
821
|
id: number | null;
|
|
822
822
|
date: string;
|
|
823
823
|
title: string;
|
|
@@ -830,18 +830,18 @@ type WorkoutHistoryExport = {
|
|
|
830
830
|
//#endregion
|
|
831
831
|
//#region src/common.d.ts
|
|
832
832
|
/** An entity id as it arrives over the wire — a number or a numeric string. */
|
|
833
|
-
declare const idSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
834
|
-
type Id = z.infer<typeof idSchema>;
|
|
833
|
+
export declare const idSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
834
|
+
export type Id = z.infer<typeof idSchema>;
|
|
835
835
|
/**
|
|
836
836
|
* An id as a tool argument: a number, or a string of digits. Unlike idSchema (which
|
|
837
837
|
* tolerates whatever the API sends back), this rejects non-numeric strings up front so
|
|
838
838
|
* a bad argument fails validation instead of becoming NaN in a URL or a query.
|
|
839
839
|
*/
|
|
840
|
-
declare const idArgSchema: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
840
|
+
export declare const idArgSchema: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
841
841
|
//#endregion
|
|
842
842
|
//#region src/exercise.d.ts
|
|
843
843
|
/** A library exercise row as the index stores it. */
|
|
844
|
-
type ExerciseRow = {
|
|
844
|
+
export type ExerciseRow = {
|
|
845
845
|
id: number;
|
|
846
846
|
title: string;
|
|
847
847
|
param_1_type: number | null;
|
|
@@ -856,7 +856,7 @@ type ExerciseRow = {
|
|
|
856
856
|
* (param 1, then param 2). Positional, not semantic: param 2 is not always the load
|
|
857
857
|
* — some exercises reverse the slots — so the units are not labelled by role.
|
|
858
858
|
*/
|
|
859
|
-
declare const exerciseViewSchema: z.ZodObject<{
|
|
859
|
+
export declare const exerciseViewSchema: z.ZodObject<{
|
|
860
860
|
id: z.ZodNumber;
|
|
861
861
|
title: z.ZodString;
|
|
862
862
|
can_edit: z.ZodNumber;
|
|
@@ -864,20 +864,20 @@ declare const exerciseViewSchema: z.ZodObject<{
|
|
|
864
864
|
use_count: z.ZodNumber;
|
|
865
865
|
units: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
866
866
|
}, z.core.$strip>;
|
|
867
|
-
type ExerciseView = z.infer<typeof exerciseViewSchema>;
|
|
867
|
+
export type ExerciseView = z.infer<typeof exerciseViewSchema>;
|
|
868
868
|
/**
|
|
869
869
|
* Full library object from `exercise_get`: the stored row with param-type codes
|
|
870
870
|
* replaced by positional `units`. Extra API fields are preserved. Search/resolve
|
|
871
871
|
* use the strict `exerciseViewSchema` projection instead.
|
|
872
872
|
*/
|
|
873
|
-
declare const exerciseGetOutputSchema: z.ZodObject<{
|
|
873
|
+
export declare const exerciseGetOutputSchema: z.ZodObject<{
|
|
874
874
|
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
875
875
|
title: z.ZodString;
|
|
876
876
|
units: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
877
877
|
}, z.core.$loose>;
|
|
878
|
-
type ExerciseGetOutput = z.infer<typeof exerciseGetOutputSchema>;
|
|
878
|
+
export type ExerciseGetOutput = z.infer<typeof exerciseGetOutputSchema>;
|
|
879
879
|
/** The outcome of resolving a name: a single match (or null) plus ranked candidates. */
|
|
880
|
-
declare const exerciseResolveOutputSchema: z.ZodObject<{
|
|
880
|
+
export declare const exerciseResolveOutputSchema: z.ZodObject<{
|
|
881
881
|
match: z.ZodNullable<z.ZodObject<{
|
|
882
882
|
id: z.ZodNumber;
|
|
883
883
|
title: z.ZodString;
|
|
@@ -895,58 +895,69 @@ declare const exerciseResolveOutputSchema: z.ZodObject<{
|
|
|
895
895
|
units: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
896
896
|
}, z.core.$strip>>;
|
|
897
897
|
}, z.core.$strip>;
|
|
898
|
-
type ResolveResult = z.infer<typeof exerciseResolveOutputSchema>;
|
|
898
|
+
export type ResolveResult = z.infer<typeof exerciseResolveOutputSchema>;
|
|
899
|
+
/** TrainHeroic's documented exercise parameter-type codes. */
|
|
900
|
+
export declare const exerciseParamTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<18>]>;
|
|
899
901
|
/** Body for creating a custom exercise; extra fields the API accepts are preserved. */
|
|
900
|
-
declare const exerciseCreateSchema: z.ZodObject<{
|
|
902
|
+
export declare const exerciseCreateSchema: z.ZodObject<{
|
|
901
903
|
title: z.ZodString;
|
|
902
|
-
param_1_type: z.ZodOptional<z.
|
|
903
|
-
param_2_type: z.ZodOptional<z.
|
|
904
|
+
param_1_type: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<18>]>>;
|
|
905
|
+
param_2_type: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<18>]>>;
|
|
906
|
+
points_of_performance: z.ZodDefault<z.ZodString>;
|
|
904
907
|
}, z.core.$loose>;
|
|
905
|
-
type ExerciseCreate = z.
|
|
908
|
+
export type ExerciseCreate = z.input<typeof exerciseCreateSchema>;
|
|
909
|
+
/** Body for updating a custom exercise without clearing fields the caller omitted. */
|
|
910
|
+
export declare const exerciseUpdateSchema: z.ZodObject<{
|
|
911
|
+
title: z.ZodString;
|
|
912
|
+
param_1_type: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<18>]>>;
|
|
913
|
+
param_2_type: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>, z.ZodLiteral<10>, z.ZodLiteral<11>, z.ZodLiteral<12>, z.ZodLiteral<13>, z.ZodLiteral<14>, z.ZodLiteral<18>]>>;
|
|
914
|
+
points_of_performance: z.ZodOptional<z.ZodString>;
|
|
915
|
+
}, z.core.$loose>;
|
|
916
|
+
export type ExerciseUpdate = z.infer<typeof exerciseUpdateSchema>;
|
|
906
917
|
//#endregion
|
|
907
918
|
//#region src/messaging.d.ts
|
|
908
919
|
/** A chat comment to draft or send: target stream, body text, optional threaded reply. */
|
|
909
|
-
declare const commentDraftSchema: z.ZodObject<{
|
|
920
|
+
export declare const commentDraftSchema: z.ZodObject<{
|
|
910
921
|
streamId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
911
922
|
text: z.ZodString;
|
|
912
923
|
replyTo: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
913
924
|
}, z.core.$strip>;
|
|
914
|
-
type CommentDraft = z.infer<typeof commentDraftSchema>;
|
|
925
|
+
export type CommentDraft = z.infer<typeof commentDraftSchema>;
|
|
915
926
|
//#endregion
|
|
916
927
|
//#region src/responses.d.ts
|
|
917
928
|
/** An exercise as the library + create endpoints return it (only the fields we read). */
|
|
918
|
-
declare const exerciseResponseSchema: z.ZodObject<{
|
|
929
|
+
export declare const exerciseResponseSchema: z.ZodObject<{
|
|
919
930
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
920
931
|
title: z.ZodString;
|
|
921
932
|
param_1_type: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
922
933
|
param_2_type: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
923
934
|
}, z.core.$loose>;
|
|
924
935
|
/** The exercise library list (envelope already unwrapped). */
|
|
925
|
-
declare const exerciseLibraryResponseSchema: z.ZodArray<z.ZodObject<{
|
|
936
|
+
export declare const exerciseLibraryResponseSchema: z.ZodArray<z.ZodObject<{
|
|
926
937
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
927
938
|
title: z.ZodString;
|
|
928
939
|
param_1_type: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
929
940
|
param_2_type: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
930
941
|
}, z.core.$loose>>;
|
|
931
942
|
/** The create-session response (a programWorkout): we read workout_id + id. */
|
|
932
|
-
declare const sessionCreateResponseSchema: z.ZodObject<{
|
|
943
|
+
export declare const sessionCreateResponseSchema: z.ZodObject<{
|
|
933
944
|
workout_id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
934
945
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
935
946
|
}, z.core.$loose>;
|
|
936
947
|
/** A programWorkout from the calendar edit view (we match by id and walk sets). */
|
|
937
|
-
declare const programWorkoutResponseSchema: z.ZodObject<{
|
|
948
|
+
export declare const programWorkoutResponseSchema: z.ZodObject<{
|
|
938
949
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
939
950
|
sets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
940
951
|
}, z.core.$loose>;
|
|
941
952
|
/** The calendar edit-view response we read sessions back from. */
|
|
942
|
-
declare const programsEditResponseSchema: z.ZodObject<{
|
|
953
|
+
export declare const programsEditResponseSchema: z.ZodObject<{
|
|
943
954
|
programWorkouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
944
955
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
945
956
|
sets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
946
957
|
}, z.core.$loose>>>;
|
|
947
958
|
}, z.core.$loose>;
|
|
948
959
|
/** A standalone program create response (container id + usable calendar/program id). */
|
|
949
|
-
declare const programCreateResponseSchema: z.ZodObject<{
|
|
960
|
+
export declare const programCreateResponseSchema: z.ZodObject<{
|
|
950
961
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
951
962
|
title: z.ZodString;
|
|
952
963
|
programId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
@@ -960,22 +971,22 @@ declare const programCreateResponseSchema: z.ZodObject<{
|
|
|
960
971
|
//#endregion
|
|
961
972
|
//#region src/team.d.ts
|
|
962
973
|
/** Fields merged onto the program object for `POST /1.0/coach/team/updatePublishSettings`. */
|
|
963
|
-
declare const teamPublishPatchObject: z.ZodObject<{
|
|
974
|
+
export declare const teamPublishPatchObject: z.ZodObject<{
|
|
964
975
|
pub_enabled: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean]>>;
|
|
965
976
|
pub_days: z.ZodOptional<z.ZodUnknown>;
|
|
966
977
|
pub_time: z.ZodOptional<z.ZodUnknown>;
|
|
967
978
|
pub_timezone: z.ZodOptional<z.ZodString>;
|
|
968
979
|
}, z.core.$strip>;
|
|
969
|
-
declare const teamPublishPatchSchema: z.ZodObject<{
|
|
980
|
+
export declare const teamPublishPatchSchema: z.ZodObject<{
|
|
970
981
|
pub_enabled: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean]>>;
|
|
971
982
|
pub_days: z.ZodOptional<z.ZodUnknown>;
|
|
972
983
|
pub_time: z.ZodOptional<z.ZodUnknown>;
|
|
973
984
|
pub_timezone: z.ZodOptional<z.ZodString>;
|
|
974
985
|
}, z.core.$strip>;
|
|
975
|
-
type TeamPublishPatch = z.infer<typeof teamPublishPatchSchema>;
|
|
986
|
+
export type TeamPublishPatch = z.infer<typeof teamPublishPatchSchema>;
|
|
976
987
|
//#endregion
|
|
977
988
|
//#region src/tool-output.d.ts
|
|
978
|
-
declare const truncationMarkerSchema: z.ZodObject<{
|
|
989
|
+
export declare const truncationMarkerSchema: z.ZodObject<{
|
|
979
990
|
field: z.ZodOptional<z.ZodString>;
|
|
980
991
|
returned: z.ZodOptional<z.ZodNumber>;
|
|
981
992
|
total: z.ZodNumber;
|
|
@@ -983,7 +994,7 @@ declare const truncationMarkerSchema: z.ZodObject<{
|
|
|
983
994
|
hint: z.ZodString;
|
|
984
995
|
}, z.core.$loose>;
|
|
985
996
|
/** Dedicated budget-fallback envelope. Never the natural tool shape. */
|
|
986
|
-
declare const truncatedOutputSchema: z.ZodObject<{
|
|
997
|
+
export declare const truncatedOutputSchema: z.ZodObject<{
|
|
987
998
|
preview: z.ZodOptional<z.ZodString>;
|
|
988
999
|
items: z.ZodOptional<z.ZodArray<z.ZodJSONSchema>>;
|
|
989
1000
|
__truncated: z.ZodObject<{
|
|
@@ -999,7 +1010,7 @@ declare const truncatedOutputSchema: z.ZodObject<{
|
|
|
999
1010
|
* Truncation is a dedicated `{ items|preview, __truncated }` envelope, so it cannot
|
|
1000
1011
|
* validate as the natural object and drop the marker.
|
|
1001
1012
|
*/
|
|
1002
|
-
declare function toolOutputSchema<T extends z.ZodType>(schema: T): z.ZodUnion<readonly [z.ZodObject<{
|
|
1013
|
+
export declare function toolOutputSchema<T extends z.ZodType>(schema: T): z.ZodUnion<readonly [z.ZodObject<{
|
|
1003
1014
|
preview: z.ZodOptional<z.ZodString>;
|
|
1004
1015
|
items: z.ZodOptional<z.ZodArray<z.ZodJSONSchema>>;
|
|
1005
1016
|
__truncated: z.ZodObject<{
|
|
@@ -1010,9 +1021,9 @@ declare function toolOutputSchema<T extends z.ZodType>(schema: T): z.ZodUnion<re
|
|
|
1010
1021
|
hint: z.ZodString;
|
|
1011
1022
|
}, z.core.$loose>;
|
|
1012
1023
|
}, z.core.$loose>, T]>;
|
|
1013
|
-
declare const opaqueJsonOutputSchema: z.ZodJSONSchema;
|
|
1024
|
+
export declare const opaqueJsonOutputSchema: z.ZodJSONSchema;
|
|
1014
1025
|
/** Explicit passthrough for tools whose live API payload is not yet contracted. */
|
|
1015
|
-
declare const opaqueOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1026
|
+
export declare const opaqueOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1016
1027
|
preview: z.ZodOptional<z.ZodString>;
|
|
1017
1028
|
items: z.ZodOptional<z.ZodArray<z.ZodJSONSchema>>;
|
|
1018
1029
|
__truncated: z.ZodObject<{
|
|
@@ -1023,7 +1034,7 @@ declare const opaqueOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1023
1034
|
hint: z.ZodString;
|
|
1024
1035
|
}, z.core.$loose>;
|
|
1025
1036
|
}, z.core.$loose>, z.ZodJSONSchema]>;
|
|
1026
|
-
declare const logTargetsOutputSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
1037
|
+
export declare const logTargetsOutputSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
1027
1038
|
date: z.ZodString;
|
|
1028
1039
|
workoutTitle: z.ZodString;
|
|
1029
1040
|
program: z.ZodNullable<z.ZodString>;
|
|
@@ -1050,13 +1061,13 @@ declare const logTargetsOutputSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodObjec
|
|
|
1050
1061
|
team_title: z.ZodOptional<z.ZodString>;
|
|
1051
1062
|
summarizedSavedWorkout: z.ZodOptional<z.ZodUnknown>;
|
|
1052
1063
|
}, z.core.$loose>>]>;
|
|
1053
|
-
declare const messageDraftOutputSchema: z.ZodObject<{
|
|
1064
|
+
export declare const messageDraftOutputSchema: z.ZodObject<{
|
|
1054
1065
|
draft: z.ZodLiteral<true>;
|
|
1055
1066
|
note: z.ZodString;
|
|
1056
1067
|
would_POST: z.ZodString;
|
|
1057
1068
|
payload: z.ZodJSONSchema;
|
|
1058
1069
|
}, z.core.$strip>;
|
|
1059
|
-
declare const feedbackOutputSchema: z.ZodObject<{
|
|
1070
|
+
export declare const feedbackOutputSchema: z.ZodObject<{
|
|
1060
1071
|
status: z.ZodEnum<{
|
|
1061
1072
|
logged: "logged";
|
|
1062
1073
|
sent: "sent";
|
|
@@ -1064,36 +1075,36 @@ declare const feedbackOutputSchema: z.ZodObject<{
|
|
|
1064
1075
|
reference: z.ZodOptional<z.ZodString>;
|
|
1065
1076
|
note: z.ZodString;
|
|
1066
1077
|
}, z.core.$loose>;
|
|
1067
|
-
declare const removedSessionOutputSchema: z.ZodObject<{
|
|
1078
|
+
export declare const removedSessionOutputSchema: z.ZodObject<{
|
|
1068
1079
|
removed: z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber]>;
|
|
1069
1080
|
}, z.core.$loose>;
|
|
1070
|
-
declare const athleteSessionRemovedOutputSchema: z.ZodObject<{
|
|
1081
|
+
export declare const athleteSessionRemovedOutputSchema: z.ZodObject<{
|
|
1071
1082
|
removed: z.ZodLiteral<true>;
|
|
1072
1083
|
programWorkoutId: z.ZodNumber;
|
|
1073
1084
|
date: z.ZodString;
|
|
1074
1085
|
}, z.core.$strip>;
|
|
1075
|
-
declare const athleteInviteOutputSchema: z.ZodObject<{
|
|
1086
|
+
export declare const athleteInviteOutputSchema: z.ZodObject<{
|
|
1076
1087
|
invited: z.ZodLiteral<true>;
|
|
1077
1088
|
teamId: z.ZodNumber;
|
|
1078
1089
|
result: z.ZodOptional<z.ZodJSONSchema>;
|
|
1079
1090
|
}, z.core.$strip>;
|
|
1080
|
-
declare const setLogOutputSchema: z.ZodObject<{
|
|
1091
|
+
export declare const setLogOutputSchema: z.ZodObject<{
|
|
1081
1092
|
savedWorkoutSetId: z.ZodNumber;
|
|
1082
1093
|
exercisesLogged: z.ZodNumber;
|
|
1083
1094
|
setCompleted: z.ZodBoolean;
|
|
1084
1095
|
}, z.core.$strip>;
|
|
1085
|
-
declare const setPrescriptionOutputSchema: z.ZodObject<{
|
|
1096
|
+
export declare const setPrescriptionOutputSchema: z.ZodObject<{
|
|
1086
1097
|
savedWorkoutSetId: z.ZodNumber;
|
|
1087
1098
|
exercisesPrescribed: z.ZodNumber;
|
|
1088
1099
|
}, z.core.$strip>;
|
|
1089
|
-
declare const exerciseSwapOutputSchema: z.ZodObject<{
|
|
1100
|
+
export declare const exerciseSwapOutputSchema: z.ZodObject<{
|
|
1090
1101
|
savedWorkoutSetExerciseId: z.ZodNumber;
|
|
1091
1102
|
athleteId: z.ZodNullable<z.ZodNumber>;
|
|
1092
1103
|
newExerciseId: z.ZodNumber;
|
|
1093
1104
|
newExerciseTitle: z.ZodNullable<z.ZodString>;
|
|
1094
1105
|
originalTeamExerciseId: z.ZodNullable<z.ZodNumber>;
|
|
1095
1106
|
}, z.core.$strip>;
|
|
1096
|
-
declare const sessionLogOutputSchema: z.ZodObject<{
|
|
1107
|
+
export declare const sessionLogOutputSchema: z.ZodObject<{
|
|
1097
1108
|
date: z.ZodString;
|
|
1098
1109
|
created: z.ZodBoolean;
|
|
1099
1110
|
sets: z.ZodArray<z.ZodObject<{
|
|
@@ -1109,27 +1120,27 @@ declare const sessionLogOutputSchema: z.ZodObject<{
|
|
|
1109
1120
|
savedWorkoutSetExerciseId: z.ZodNumber;
|
|
1110
1121
|
}, z.core.$strip>>>;
|
|
1111
1122
|
}, z.core.$strip>;
|
|
1112
|
-
declare const personalWorkoutCreatedOutputSchema: z.ZodObject<{
|
|
1123
|
+
export declare const personalWorkoutCreatedOutputSchema: z.ZodObject<{
|
|
1113
1124
|
programWorkoutId: z.ZodNumber;
|
|
1114
1125
|
workoutId: z.ZodNumber;
|
|
1115
1126
|
savedWorkoutId: z.ZodNumber;
|
|
1116
1127
|
groupId: z.ZodNumber;
|
|
1117
1128
|
date: z.ZodString;
|
|
1118
1129
|
}, z.core.$strip>;
|
|
1119
|
-
declare const athleteWorkoutNoteOutputSchema: z.ZodObject<{
|
|
1130
|
+
export declare const athleteWorkoutNoteOutputSchema: z.ZodObject<{
|
|
1120
1131
|
programWorkoutId: z.ZodNumber;
|
|
1121
1132
|
savedWorkoutId: z.ZodNumber;
|
|
1122
1133
|
date: z.ZodString;
|
|
1123
1134
|
notes: z.ZodString;
|
|
1124
1135
|
rpe: z.ZodNullable<z.ZodNumber>;
|
|
1125
1136
|
}, z.core.$strip>;
|
|
1126
|
-
type AthleteWorkoutNoteOutput = z.infer<typeof athleteWorkoutNoteOutputSchema>;
|
|
1127
|
-
declare const athleteExerciseNoteOutputSchema: z.ZodObject<{
|
|
1137
|
+
export type AthleteWorkoutNoteOutput = z.infer<typeof athleteWorkoutNoteOutputSchema>;
|
|
1138
|
+
export declare const athleteExerciseNoteOutputSchema: z.ZodObject<{
|
|
1128
1139
|
savedWorkoutSetExerciseId: z.ZodNumber;
|
|
1129
1140
|
notes: z.ZodString;
|
|
1130
1141
|
}, z.core.$strip>;
|
|
1131
|
-
type AthleteExerciseNoteOutput = z.infer<typeof athleteExerciseNoteOutputSchema>;
|
|
1132
|
-
declare const workoutReadOutputSchema: z.ZodObject<{
|
|
1142
|
+
export type AthleteExerciseNoteOutput = z.infer<typeof athleteExerciseNoteOutputSchema>;
|
|
1143
|
+
export declare const workoutReadOutputSchema: z.ZodObject<{
|
|
1133
1144
|
pwId: z.ZodNumber;
|
|
1134
1145
|
date: z.ZodString;
|
|
1135
1146
|
published: z.ZodOptional<z.ZodJSONSchema>;
|
|
@@ -1150,7 +1161,7 @@ declare const workoutReadOutputSchema: z.ZodObject<{
|
|
|
1150
1161
|
}, z.core.$strip>>;
|
|
1151
1162
|
}, z.core.$strip>>;
|
|
1152
1163
|
}, z.core.$strip>;
|
|
1153
|
-
declare const workoutBuildOutputSchema: z.ZodObject<{
|
|
1164
|
+
export declare const workoutBuildOutputSchema: z.ZodObject<{
|
|
1154
1165
|
pwId: z.ZodNumber;
|
|
1155
1166
|
workoutId: z.ZodNumber;
|
|
1156
1167
|
programId: z.ZodNumber;
|
|
@@ -1182,7 +1193,7 @@ declare const workoutBuildOutputSchema: z.ZodObject<{
|
|
|
1182
1193
|
}, z.core.$strip>>;
|
|
1183
1194
|
note: z.ZodString;
|
|
1184
1195
|
}, z.core.$strip>;
|
|
1185
|
-
declare const workoutPublishOutputSchema: z.ZodObject<{
|
|
1196
|
+
export declare const workoutPublishOutputSchema: z.ZodObject<{
|
|
1186
1197
|
published: z.ZodNumber;
|
|
1187
1198
|
readback: z.ZodObject<{
|
|
1188
1199
|
pwId: z.ZodNumber;
|
|
@@ -1207,30 +1218,30 @@ declare const workoutPublishOutputSchema: z.ZodObject<{
|
|
|
1207
1218
|
}, z.core.$strip>;
|
|
1208
1219
|
note: z.ZodString;
|
|
1209
1220
|
}, z.core.$strip>;
|
|
1210
|
-
declare const messageSentOutputSchema: z.ZodObject<{
|
|
1221
|
+
export declare const messageSentOutputSchema: z.ZodObject<{
|
|
1211
1222
|
sent: z.ZodLiteral<true>;
|
|
1212
1223
|
comment: z.ZodJSONSchema;
|
|
1213
1224
|
}, z.core.$strip>;
|
|
1214
|
-
declare const messageDeletedOutputSchema: z.ZodObject<{
|
|
1225
|
+
export declare const messageDeletedOutputSchema: z.ZodObject<{
|
|
1215
1226
|
deleted: z.ZodLiteral<true>;
|
|
1216
1227
|
response: z.ZodOptional<z.ZodJSONSchema>;
|
|
1217
1228
|
}, z.core.$strip>;
|
|
1218
|
-
declare const exerciseDeletedOutputSchema: z.ZodObject<{
|
|
1229
|
+
export declare const exerciseDeletedOutputSchema: z.ZodObject<{
|
|
1219
1230
|
deleted: z.ZodNumber;
|
|
1220
1231
|
}, z.core.$strip>;
|
|
1221
|
-
declare const exerciseForgottenOutputSchema: z.ZodObject<{
|
|
1232
|
+
export declare const exerciseForgottenOutputSchema: z.ZodObject<{
|
|
1222
1233
|
forgotten: z.ZodNumber;
|
|
1223
1234
|
}, z.core.$strip>;
|
|
1224
|
-
declare const exerciseCreatedOutputSchema: z.ZodObject<{
|
|
1235
|
+
export declare const exerciseCreatedOutputSchema: z.ZodObject<{
|
|
1225
1236
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
1226
1237
|
title: z.ZodString;
|
|
1227
1238
|
param_1_type: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
1228
1239
|
param_2_type: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodNull]>>;
|
|
1229
1240
|
}, z.core.$loose>;
|
|
1230
|
-
declare const sessionTemplateCreatedOutputSchema: z.ZodObject<{
|
|
1241
|
+
export declare const sessionTemplateCreatedOutputSchema: z.ZodObject<{
|
|
1231
1242
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
1232
1243
|
}, z.core.$loose>;
|
|
1233
|
-
declare const athleteMainLiftPrsOutputSchema: z.ZodObject<{
|
|
1244
|
+
export declare const athleteMainLiftPrsOutputSchema: z.ZodObject<{
|
|
1234
1245
|
athleteId: z.ZodNumber;
|
|
1235
1246
|
athleteName: z.ZodNullable<z.ZodString>;
|
|
1236
1247
|
prs: z.ZodArray<z.ZodObject<{
|
|
@@ -1251,7 +1262,7 @@ declare const athleteMainLiftPrsOutputSchema: z.ZodObject<{
|
|
|
1251
1262
|
date: z.ZodNullable<z.ZodString>;
|
|
1252
1263
|
}, z.core.$strip>>;
|
|
1253
1264
|
}, z.core.$strip>;
|
|
1254
|
-
declare const programCreatedOutputSchema: z.ZodObject<{
|
|
1265
|
+
export declare const programCreatedOutputSchema: z.ZodObject<{
|
|
1255
1266
|
containerId: z.ZodNumber;
|
|
1256
1267
|
programId: z.ZodNumber;
|
|
1257
1268
|
title: z.ZodString;
|
|
@@ -1262,14 +1273,14 @@ declare const programCreatedOutputSchema: z.ZodObject<{
|
|
|
1262
1273
|
requestedName: z.ZodString;
|
|
1263
1274
|
nameApplied: z.ZodBoolean;
|
|
1264
1275
|
}, z.core.$strip>;
|
|
1265
|
-
declare const programDeletedOutputSchema: z.ZodObject<{
|
|
1276
|
+
export declare const programDeletedOutputSchema: z.ZodObject<{
|
|
1266
1277
|
programId: z.ZodNumber;
|
|
1267
1278
|
containerId: z.ZodNullable<z.ZodNumber>;
|
|
1268
1279
|
}, z.core.$strip>;
|
|
1269
1280
|
//#endregion
|
|
1270
1281
|
//#region src/workout.d.ts
|
|
1271
1282
|
/** A single exercise prescription inside a block. */
|
|
1272
|
-
declare const exerciseSpecSchema: z.ZodObject<{
|
|
1283
|
+
export declare const exerciseSpecSchema: z.ZodObject<{
|
|
1273
1284
|
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
1274
1285
|
title: z.ZodOptional<z.ZodString>;
|
|
1275
1286
|
reps: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>]>>;
|
|
@@ -1280,21 +1291,21 @@ declare const exerciseSpecSchema: z.ZodObject<{
|
|
|
1280
1291
|
param_1_type: z.ZodOptional<z.ZodNumber>;
|
|
1281
1292
|
param_2_type: z.ZodOptional<z.ZodNumber>;
|
|
1282
1293
|
}, z.core.$strip>;
|
|
1283
|
-
type ExerciseSpec = z.infer<typeof exerciseSpecSchema>;
|
|
1294
|
+
export type ExerciseSpec = z.infer<typeof exerciseSpecSchema>;
|
|
1284
1295
|
/** A block's Red-Zone leaderboard: a unit string/number, or an object with options. */
|
|
1285
|
-
declare const leaderboardSpecSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
1296
|
+
export declare const leaderboardSpecSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
1286
1297
|
unit: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1287
1298
|
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1288
1299
|
lowest_wins: z.ZodOptional<z.ZodBoolean>;
|
|
1289
1300
|
instruction: z.ZodOptional<z.ZodString>;
|
|
1290
1301
|
}, z.core.$strip>]>;
|
|
1291
|
-
type LeaderboardSpec = z.infer<typeof leaderboardSpecSchema>;
|
|
1302
|
+
export type LeaderboardSpec = z.infer<typeof leaderboardSpecSchema>;
|
|
1292
1303
|
/**
|
|
1293
1304
|
* A block (group of exercises); two exercises render as a superset.
|
|
1294
1305
|
* Empty `exercises` is allowed only with a non-empty `instruction` — that is TrainHeroic's
|
|
1295
1306
|
* free-text Circuit / Conditioning block (type 1): title + instruction blurb, no linked lifts.
|
|
1296
1307
|
*/
|
|
1297
|
-
declare const blockSpecSchema: z.ZodObject<{
|
|
1308
|
+
export declare const blockSpecSchema: z.ZodObject<{
|
|
1298
1309
|
title: z.ZodString;
|
|
1299
1310
|
type: z.ZodOptional<z.ZodNumber>;
|
|
1300
1311
|
instruction: z.ZodOptional<z.ZodString>;
|
|
@@ -1316,9 +1327,9 @@ declare const blockSpecSchema: z.ZodObject<{
|
|
|
1316
1327
|
param_2_type: z.ZodOptional<z.ZodNumber>;
|
|
1317
1328
|
}, z.core.$strip>>;
|
|
1318
1329
|
}, z.core.$strip>;
|
|
1319
|
-
type BlockSpec = z.infer<typeof blockSpecSchema>;
|
|
1330
|
+
export type BlockSpec = z.infer<typeof blockSpecSchema>;
|
|
1320
1331
|
/** A full session spec: the blocks plus an optional session note (Coach Instructions). */
|
|
1321
|
-
declare const workoutSpecSchema: z.ZodObject<{
|
|
1332
|
+
export declare const workoutSpecSchema: z.ZodObject<{
|
|
1322
1333
|
blocks: z.ZodArray<z.ZodObject<{
|
|
1323
1334
|
title: z.ZodString;
|
|
1324
1335
|
type: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1343,9 +1354,9 @@ declare const workoutSpecSchema: z.ZodObject<{
|
|
|
1343
1354
|
}, z.core.$strip>>;
|
|
1344
1355
|
instruction: z.ZodOptional<z.ZodString>;
|
|
1345
1356
|
}, z.core.$strip>;
|
|
1346
|
-
type WorkoutSpec = z.infer<typeof workoutSpecSchema>;
|
|
1357
|
+
export type WorkoutSpec = z.infer<typeof workoutSpecSchema>;
|
|
1347
1358
|
/** A calendar date as the workout API expects it: [year, month, day]. */
|
|
1348
|
-
type WorkoutDate = readonly [number, number, number];
|
|
1359
|
+
export type WorkoutDate = readonly [number, number, number];
|
|
1349
1360
|
/**
|
|
1350
1361
|
* Parse a `YYYY-M-D` string into the `WorkoutDate` tuple. The single home for this
|
|
1351
1362
|
* conversion, shared by the MCP tools and the CLI so they cannot drift on what counts
|
|
@@ -1353,14 +1364,14 @@ type WorkoutDate = readonly [number, number, number];
|
|
|
1353
1364
|
* the trailing one in "2026-9-" must be rejected explicitly), and month/day must be in range so
|
|
1354
1365
|
* a typo cannot land a session on a date the calendar does not have.
|
|
1355
1366
|
*/
|
|
1356
|
-
declare function parseWorkoutDate(s: string): WorkoutDate;
|
|
1367
|
+
export declare function parseWorkoutDate(s: string): WorkoutDate;
|
|
1357
1368
|
/** Unit advisories surfaced when building: informational notes and override warnings. */
|
|
1358
|
-
type Advisory = {
|
|
1369
|
+
export type Advisory = {
|
|
1359
1370
|
notes: string[];
|
|
1360
1371
|
warnings: string[];
|
|
1361
1372
|
};
|
|
1362
1373
|
/** A single exercise as read back from a built session. */
|
|
1363
|
-
type ReadExercise = {
|
|
1374
|
+
export type ReadExercise = {
|
|
1364
1375
|
order: number;
|
|
1365
1376
|
title: string;
|
|
1366
1377
|
reps: string[];
|
|
@@ -1370,7 +1381,7 @@ type ReadExercise = {
|
|
|
1370
1381
|
instruction: string;
|
|
1371
1382
|
};
|
|
1372
1383
|
/** A block as read back from a built session. */
|
|
1373
|
-
type ReadBlock = {
|
|
1384
|
+
export type ReadBlock = {
|
|
1374
1385
|
order: number;
|
|
1375
1386
|
title: string;
|
|
1376
1387
|
/** Block-level coach note (free-text Circuit / conditioning blurbs live here). */
|
|
@@ -1379,7 +1390,7 @@ type ReadBlock = {
|
|
|
1379
1390
|
exercises: ReadExercise[];
|
|
1380
1391
|
};
|
|
1381
1392
|
/** A whole session read back from the calendar. */
|
|
1382
|
-
type ReadResult = {
|
|
1393
|
+
export type ReadResult = {
|
|
1383
1394
|
pwId: number;
|
|
1384
1395
|
date: string;
|
|
1385
1396
|
published: unknown;
|
|
@@ -1387,10 +1398,9 @@ type ReadResult = {
|
|
|
1387
1398
|
blocks: ReadBlock[];
|
|
1388
1399
|
};
|
|
1389
1400
|
/** Body for `POST /v5/sessions/template` (library create, not save-from-session). */
|
|
1390
|
-
declare const sessionTemplateCreateSchema: z.ZodObject<{
|
|
1401
|
+
export declare const sessionTemplateCreateSchema: z.ZodObject<{
|
|
1391
1402
|
title: z.ZodString;
|
|
1392
1403
|
instruction: z.ZodOptional<z.ZodString>;
|
|
1393
1404
|
}, z.core.$strip>;
|
|
1394
|
-
type SessionTemplateCreate = z.infer<typeof sessionTemplateCreateSchema>;
|
|
1395
|
-
//#endregion
|
|
1396
|
-
export { Advisory, AthleteExerciseNoteArgs, AthleteExerciseNoteOutput, AthletePrefs, AthletePrescribeSetArgs, AthleteProfileSummary, AthleteSessionRemoveArgs, AthleteUser, AthleteWorkingMax, AthleteWorkoutBlock, AthleteWorkoutExercise, AthleteWorkoutNoteArgs, AthleteWorkoutNoteOutput, AthleteWorkoutRangeArgs, AthleteWorkoutSummary, AthleteWorkoutView, BlockSpec, CoachAthleteExercise, CoachAthleteSession, CoachAthleteTraining, CoachLogSessionArgs, CoachLogSetArgs, CoachPrescribeSetArgs, CommentDraft, ExerciseCreate, ExerciseGetOutput, ExerciseHistoryDetail, ExerciseHistoryListItem, ExerciseRow, ExerciseSpec, ExerciseStats, ExerciseView, ExportBlock, ExportExercise, ExportSet, ExportSetParam, ExportSetSide, Id, LeaderboardSpec, LogSessionArgs, LogSetArgs, PersonalRecord, PresentedExerciseHistory, PresentedExerciseSession, ProgramWorkout, ReadBlock, ReadExercise, ReadResult, ResolveResult, RosterActivityRow, SessionTemplateCreate, SwapAthleteExerciseArgs, TeamPublishPatch, TeamVolumeAthlete, TeamVolumeReport, UserSimple, WorkoutDate, WorkoutHistoryExport, WorkoutSpec, athleteExerciseCatalogOutputSchema, athleteExerciseNoteArgsSchema, athleteExerciseNoteOutputSchema, athleteInviteOutputSchema, athleteMainLiftPrsOutputSchema, athletePrefsSchema, athletePrescribeSetArgsSchema, athleteProfileOutputSchema, athleteProfileSummarySchema, athleteSessionRemoveArgsSchema, athleteSessionRemovedOutputSchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutBlockSchema, athleteWorkoutExerciseSchema, athleteWorkoutNoteArgsSchema, athleteWorkoutNoteObject, athleteWorkoutNoteOutputSchema, athleteWorkoutRangeArgsSchema, athleteWorkoutSummarySchema, athleteWorkoutViewSchema, athleteWorkoutsOutputSchema, blockSpecSchema, coachAthleteExerciseSchema, coachAthleteSessionSchema, coachAthleteTrainingOutputSchema, coachAthleteTrainingSchema, coachLogSessionArgsSchema, coachLogSetArgsSchema, coachPrescribeSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseCreatedOutputSchema, exerciseDeletedOutputSchema, exerciseForgottenOutputSchema, exerciseGetOutputSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseHistoryOutputSchema, exerciseLibraryResponseSchema, exerciseResolveOutputSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, exerciseSwapOutputSchema, exerciseViewSchema, feedbackOutputSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSessionArgsSchema, logSetArgsSchema, logTargetsOutputSchema, loggedSetSchema, loggedSetWithSlotSchema, messageDeletedOutputSchema, messageDraftOutputSchema, messageSentOutputSchema, opaqueJsonOutputSchema, opaqueOutputSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, personalWorkoutCreatedOutputSchema, presentedExerciseHistorySchema, presentedExerciseSessionSchema, programCreateResponseSchema, programCreatedOutputSchema, programDeletedOutputSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, removedSessionOutputSchema, repMaxSchema, rosterActivityOutputSchema, rosterActivityRowSchema, sessionCreateResponseSchema, sessionLogOutputSchema, sessionTemplateCreateSchema, sessionTemplateCreatedOutputSchema, setLogOutputSchema, setPrescriptionOutputSchema, swapAthleteExerciseArgsSchema, teamPublishPatchObject, teamPublishPatchSchema, teamVolumeAthleteSchema, teamVolumeOutputSchema, teamVolumeReportSchema, toolOutputSchema, truncatedOutputSchema, truncationMarkerSchema, userSimpleSchema, workoutBuildOutputSchema, workoutPublishOutputSchema, workoutReadOutputSchema, workoutSpecSchema };
|
|
1405
|
+
export type SessionTemplateCreate = z.infer<typeof sessionTemplateCreateSchema>;
|
|
1406
|
+
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -456,11 +456,37 @@ const exerciseResolveOutputSchema = z.object({
|
|
|
456
456
|
match: exerciseViewSchema.nullable(),
|
|
457
457
|
candidates: z.array(exerciseViewSchema)
|
|
458
458
|
});
|
|
459
|
+
/** TrainHeroic's documented exercise parameter-type codes. */
|
|
460
|
+
const exerciseParamTypeSchema = z.union([
|
|
461
|
+
z.literal(0),
|
|
462
|
+
z.literal(1),
|
|
463
|
+
z.literal(2),
|
|
464
|
+
z.literal(3),
|
|
465
|
+
z.literal(4),
|
|
466
|
+
z.literal(5),
|
|
467
|
+
z.literal(6),
|
|
468
|
+
z.literal(7),
|
|
469
|
+
z.literal(10),
|
|
470
|
+
z.literal(11),
|
|
471
|
+
z.literal(12),
|
|
472
|
+
z.literal(13),
|
|
473
|
+
z.literal(14),
|
|
474
|
+
z.literal(18)
|
|
475
|
+
]);
|
|
476
|
+
const exerciseWriteShape = {
|
|
477
|
+
title: z.string().trim().min(1),
|
|
478
|
+
param_1_type: exerciseParamTypeSchema.optional(),
|
|
479
|
+
param_2_type: exerciseParamTypeSchema.optional()
|
|
480
|
+
};
|
|
459
481
|
/** Body for creating a custom exercise; extra fields the API accepts are preserved. */
|
|
460
482
|
const exerciseCreateSchema = z.looseObject({
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
483
|
+
...exerciseWriteShape,
|
|
484
|
+
points_of_performance: z.string().default("")
|
|
485
|
+
});
|
|
486
|
+
/** Body for updating a custom exercise without clearing fields the caller omitted. */
|
|
487
|
+
const exerciseUpdateSchema = z.looseObject({
|
|
488
|
+
...exerciseWriteShape,
|
|
489
|
+
points_of_performance: z.string().optional()
|
|
464
490
|
});
|
|
465
491
|
//#endregion
|
|
466
492
|
//#region src/messaging.ts
|
|
@@ -810,4 +836,4 @@ const sessionTemplateCreateSchema = z.object({
|
|
|
810
836
|
instruction: z.string().optional()
|
|
811
837
|
});
|
|
812
838
|
//#endregion
|
|
813
|
-
export { athleteExerciseCatalogOutputSchema, athleteExerciseNoteArgsSchema, athleteExerciseNoteOutputSchema, athleteInviteOutputSchema, athleteMainLiftPrsOutputSchema, athletePrefsSchema, athletePrescribeSetArgsSchema, athleteProfileOutputSchema, athleteProfileSummarySchema, athleteSessionRemoveArgsSchema, athleteSessionRemovedOutputSchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutBlockSchema, athleteWorkoutExerciseSchema, athleteWorkoutNoteArgsSchema, athleteWorkoutNoteObject, athleteWorkoutNoteOutputSchema, athleteWorkoutRangeArgsSchema, athleteWorkoutSummarySchema, athleteWorkoutViewSchema, athleteWorkoutsOutputSchema, blockSpecSchema, coachAthleteExerciseSchema, coachAthleteSessionSchema, coachAthleteTrainingOutputSchema, coachAthleteTrainingSchema, coachLogSessionArgsSchema, coachLogSetArgsSchema, coachPrescribeSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseCreatedOutputSchema, exerciseDeletedOutputSchema, exerciseForgottenOutputSchema, exerciseGetOutputSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseHistoryOutputSchema, exerciseLibraryResponseSchema, exerciseResolveOutputSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, exerciseSwapOutputSchema, exerciseViewSchema, feedbackOutputSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSessionArgsSchema, logSetArgsSchema, logTargetsOutputSchema, loggedSetSchema, loggedSetWithSlotSchema, messageDeletedOutputSchema, messageDraftOutputSchema, messageSentOutputSchema, opaqueJsonOutputSchema, opaqueOutputSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, personalWorkoutCreatedOutputSchema, presentedExerciseHistorySchema, presentedExerciseSessionSchema, programCreateResponseSchema, programCreatedOutputSchema, programDeletedOutputSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, removedSessionOutputSchema, repMaxSchema, rosterActivityOutputSchema, rosterActivityRowSchema, sessionCreateResponseSchema, sessionLogOutputSchema, sessionTemplateCreateSchema, sessionTemplateCreatedOutputSchema, setLogOutputSchema, setPrescriptionOutputSchema, swapAthleteExerciseArgsSchema, teamPublishPatchObject, teamPublishPatchSchema, teamVolumeAthleteSchema, teamVolumeOutputSchema, teamVolumeReportSchema, toolOutputSchema, truncatedOutputSchema, truncationMarkerSchema, userSimpleSchema, workoutBuildOutputSchema, workoutPublishOutputSchema, workoutReadOutputSchema, workoutSpecSchema };
|
|
839
|
+
export { athleteExerciseCatalogOutputSchema, athleteExerciseNoteArgsSchema, athleteExerciseNoteOutputSchema, athleteInviteOutputSchema, athleteMainLiftPrsOutputSchema, athletePrefsSchema, athletePrescribeSetArgsSchema, athleteProfileOutputSchema, athleteProfileSummarySchema, athleteSessionRemoveArgsSchema, athleteSessionRemovedOutputSchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutBlockSchema, athleteWorkoutExerciseSchema, athleteWorkoutNoteArgsSchema, athleteWorkoutNoteObject, athleteWorkoutNoteOutputSchema, athleteWorkoutRangeArgsSchema, athleteWorkoutSummarySchema, athleteWorkoutViewSchema, athleteWorkoutsOutputSchema, blockSpecSchema, coachAthleteExerciseSchema, coachAthleteSessionSchema, coachAthleteTrainingOutputSchema, coachAthleteTrainingSchema, coachLogSessionArgsSchema, coachLogSetArgsSchema, coachPrescribeSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseCreatedOutputSchema, exerciseDeletedOutputSchema, exerciseForgottenOutputSchema, exerciseGetOutputSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseHistoryOutputSchema, exerciseLibraryResponseSchema, exerciseParamTypeSchema, exerciseResolveOutputSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, exerciseSwapOutputSchema, exerciseUpdateSchema, exerciseViewSchema, feedbackOutputSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSessionArgsSchema, logSetArgsSchema, logTargetsOutputSchema, loggedSetSchema, loggedSetWithSlotSchema, messageDeletedOutputSchema, messageDraftOutputSchema, messageSentOutputSchema, opaqueJsonOutputSchema, opaqueOutputSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, personalWorkoutCreatedOutputSchema, presentedExerciseHistorySchema, presentedExerciseSessionSchema, programCreateResponseSchema, programCreatedOutputSchema, programDeletedOutputSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, removedSessionOutputSchema, repMaxSchema, rosterActivityOutputSchema, rosterActivityRowSchema, sessionCreateResponseSchema, sessionLogOutputSchema, sessionTemplateCreateSchema, sessionTemplateCreatedOutputSchema, setLogOutputSchema, setPrescriptionOutputSchema, swapAthleteExerciseArgsSchema, teamPublishPatchObject, teamPublishPatchSchema, teamVolumeAthleteSchema, teamVolumeOutputSchema, teamVolumeReportSchema, toolOutputSchema, truncatedOutputSchema, truncationMarkerSchema, userSimpleSchema, workoutBuildOutputSchema, workoutPublishOutputSchema, workoutReadOutputSchema, workoutSpecSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trainheroic-unofficial/dto",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"zod": "^4.
|
|
25
|
+
"zod": "^4.6.3"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"tsdown": "^0.
|
|
28
|
+
"tsdown": "^0.23.0",
|
|
29
29
|
"vitest": "^4.1.11"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|