@trainheroic-unofficial/dto 3.0.1 → 3.1.0
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 +19 -9
- package/dist/index.mjs +8 -10
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -281,18 +281,27 @@ declare const coachLogSetArgsSchema: z.ZodObject<{
|
|
|
281
281
|
}, z.core.$strip>;
|
|
282
282
|
type CoachLogSetArgs = z.infer<typeof coachLogSetArgsSchema>;
|
|
283
283
|
/**
|
|
284
|
-
* Args for the
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
* positional and sequential by definition: it deliberately omits the log path's `slot` field (a
|
|
289
|
-
* sparse, slot-targeted prescription has no meaning here) by building its results off
|
|
290
|
-
* {@link loggedSetSchema} rather than {@link loggedSetWithSlotSchema}.
|
|
284
|
+
* Args for changing the logged-in athlete's prescribed targets without marking the set performed.
|
|
285
|
+
* The write replaces the exercise's whole prescription, so its sets are positional and sequential
|
|
286
|
+
* by definition: it deliberately omits the log path's `slot` field because a sparse prescription
|
|
287
|
+
* has no meaning here.
|
|
291
288
|
*/
|
|
289
|
+
declare const athletePrescribeSetArgsSchema: z.ZodObject<{
|
|
290
|
+
date: z.ZodString;
|
|
291
|
+
savedWorkoutSetId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
292
|
+
results: z.ZodArray<z.ZodObject<{
|
|
293
|
+
savedWorkoutSetExerciseId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
294
|
+
sets: z.ZodArray<z.ZodObject<{
|
|
295
|
+
param1: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
296
|
+
param2: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
297
|
+
}, z.core.$strip>>;
|
|
298
|
+
}, z.core.$strip>>;
|
|
299
|
+
}, z.core.$strip>;
|
|
300
|
+
type AthletePrescribeSetArgs = z.infer<typeof athletePrescribeSetArgsSchema>;
|
|
301
|
+
/** Coach variant of {@link athletePrescribeSetArgsSchema}, with the roster athlete to update. */
|
|
292
302
|
declare const coachPrescribeSetArgsSchema: z.ZodObject<{
|
|
293
303
|
date: z.ZodString;
|
|
294
304
|
savedWorkoutSetId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
295
|
-
athleteId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
296
305
|
results: z.ZodArray<z.ZodObject<{
|
|
297
306
|
savedWorkoutSetExerciseId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
298
307
|
sets: z.ZodArray<z.ZodObject<{
|
|
@@ -300,6 +309,7 @@ declare const coachPrescribeSetArgsSchema: z.ZodObject<{
|
|
|
300
309
|
param2: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
301
310
|
}, z.core.$strip>>;
|
|
302
311
|
}, z.core.$strip>>;
|
|
312
|
+
athleteId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
303
313
|
}, z.core.$strip>;
|
|
304
314
|
type CoachPrescribeSetArgs = z.infer<typeof coachPrescribeSetArgsSchema>;
|
|
305
315
|
/**
|
|
@@ -797,4 +807,4 @@ type ReadResult = {
|
|
|
797
807
|
blocks: ReadBlock[];
|
|
798
808
|
};
|
|
799
809
|
//#endregion
|
|
800
|
-
export { Advisory, AthletePrefs, AthleteProfileSummary, AthleteSessionRemoveArgs, AthleteUser, AthleteWorkingMax, AthleteWorkoutBlock, AthleteWorkoutExercise, AthleteWorkoutRangeArgs, AthleteWorkoutSummary, AthleteWorkoutView, BlockSpec, CoachAthleteExercise, CoachAthleteSession, CoachAthleteTraining, CoachLogSessionArgs, CoachLogSetArgs, CoachPrescribeSetArgs, CommentDraft, ExerciseCreate, ExerciseHistoryDetail, ExerciseHistoryListItem, ExerciseRow, ExerciseSpec, ExerciseStats, ExerciseView, ExportBlock, ExportExercise, ExportSet, ExportSetParam, ExportSetSide, Id, LeaderboardSpec, LogSessionArgs, LogSetArgs, PersonalRecord, PresentedExerciseHistory, PresentedExerciseSession, ProgramWorkout, ReadBlock, ReadExercise, ReadResult, ResolveResult, RosterActivityRow, SwapAthleteExerciseArgs, TeamVolumeAthlete, TeamVolumeReport, UserSimple, WorkoutDate, WorkoutHistoryExport, WorkoutSpec, athletePrefsSchema, athleteProfileSummarySchema, athleteSessionRemoveArgsSchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutRangeArgsSchema, blockSpecSchema, coachLogSessionArgsSchema, coachLogSetArgsSchema, coachPrescribeSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseLibraryResponseSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSessionArgsSchema, logSetArgsSchema, loggedSetSchema, loggedSetWithSlotSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, swapAthleteExerciseArgsSchema, userSimpleSchema, workoutSpecSchema };
|
|
810
|
+
export { Advisory, AthletePrefs, AthletePrescribeSetArgs, AthleteProfileSummary, AthleteSessionRemoveArgs, AthleteUser, AthleteWorkingMax, AthleteWorkoutBlock, AthleteWorkoutExercise, AthleteWorkoutRangeArgs, AthleteWorkoutSummary, AthleteWorkoutView, BlockSpec, CoachAthleteExercise, CoachAthleteSession, CoachAthleteTraining, CoachLogSessionArgs, CoachLogSetArgs, CoachPrescribeSetArgs, CommentDraft, ExerciseCreate, ExerciseHistoryDetail, ExerciseHistoryListItem, ExerciseRow, ExerciseSpec, ExerciseStats, ExerciseView, ExportBlock, ExportExercise, ExportSet, ExportSetParam, ExportSetSide, Id, LeaderboardSpec, LogSessionArgs, LogSetArgs, PersonalRecord, PresentedExerciseHistory, PresentedExerciseSession, ProgramWorkout, ReadBlock, ReadExercise, ReadResult, ResolveResult, RosterActivityRow, SwapAthleteExerciseArgs, TeamVolumeAthlete, TeamVolumeReport, UserSimple, WorkoutDate, WorkoutHistoryExport, WorkoutSpec, athletePrefsSchema, athletePrescribeSetArgsSchema, athleteProfileSummarySchema, athleteSessionRemoveArgsSchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutRangeArgsSchema, blockSpecSchema, coachLogSessionArgsSchema, coachLogSetArgsSchema, coachPrescribeSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseLibraryResponseSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSessionArgsSchema, logSetArgsSchema, loggedSetSchema, loggedSetWithSlotSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, swapAthleteExerciseArgsSchema, userSimpleSchema, workoutSpecSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -212,20 +212,18 @@ const logSetArgsSchema = z.object({
|
|
|
212
212
|
*/
|
|
213
213
|
const coachLogSetArgsSchema = logSetArgsSchema.extend({ athleteId: idArgSchema });
|
|
214
214
|
/**
|
|
215
|
-
* Args for the
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* positional and sequential by definition: it deliberately omits the log path's `slot` field (a
|
|
220
|
-
* sparse, slot-targeted prescription has no meaning here) by building its results off
|
|
221
|
-
* {@link loggedSetSchema} rather than {@link loggedSetWithSlotSchema}.
|
|
215
|
+
* Args for changing the logged-in athlete's prescribed targets without marking the set performed.
|
|
216
|
+
* The write replaces the exercise's whole prescription, so its sets are positional and sequential
|
|
217
|
+
* by definition: it deliberately omits the log path's `slot` field because a sparse prescription
|
|
218
|
+
* has no meaning here.
|
|
222
219
|
*/
|
|
223
|
-
const
|
|
220
|
+
const athletePrescribeSetArgsSchema = z.object({
|
|
224
221
|
date: dateString,
|
|
225
222
|
savedWorkoutSetId: idArgSchema,
|
|
226
|
-
athleteId: idArgSchema,
|
|
227
223
|
results: prescribedExerciseResultsSchema
|
|
228
224
|
});
|
|
225
|
+
/** Coach variant of {@link athletePrescribeSetArgsSchema}, with the roster athlete to update. */
|
|
226
|
+
const coachPrescribeSetArgsSchema = athletePrescribeSetArgsSchema.extend({ athleteId: idArgSchema });
|
|
229
227
|
/**
|
|
230
228
|
* Args for the coach per-athlete exercise swap: replace the exercise prescribed in one of a
|
|
231
229
|
* roster athlete's saved-workout slots with a different exercise, the API equivalent of the
|
|
@@ -379,4 +377,4 @@ function parseWorkoutDate(s) {
|
|
|
379
377
|
];
|
|
380
378
|
}
|
|
381
379
|
//#endregion
|
|
382
|
-
export { athletePrefsSchema, athleteProfileSummarySchema, athleteSessionRemoveArgsSchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutRangeArgsSchema, blockSpecSchema, coachLogSessionArgsSchema, coachLogSetArgsSchema, coachPrescribeSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseLibraryResponseSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSessionArgsSchema, logSetArgsSchema, loggedSetSchema, loggedSetWithSlotSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, swapAthleteExerciseArgsSchema, userSimpleSchema, workoutSpecSchema };
|
|
380
|
+
export { athletePrefsSchema, athletePrescribeSetArgsSchema, athleteProfileSummarySchema, athleteSessionRemoveArgsSchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutRangeArgsSchema, blockSpecSchema, coachLogSessionArgsSchema, coachLogSetArgsSchema, coachPrescribeSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseLibraryResponseSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSessionArgsSchema, logSetArgsSchema, loggedSetSchema, loggedSetWithSlotSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, swapAthleteExerciseArgsSchema, userSimpleSchema, workoutSpecSchema };
|