@trainheroic-unofficial/dto 1.5.0 → 1.6.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 +20 -2
- package/dist/index.mjs +11 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -350,6 +350,17 @@ declare const coachLogSessionArgsSchema: z.ZodObject<{
|
|
|
350
350
|
athleteId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
351
351
|
}, z.core.$strip>;
|
|
352
352
|
type CoachLogSessionArgs = z.infer<typeof coachLogSessionArgsSchema>;
|
|
353
|
+
/**
|
|
354
|
+
* Args for removing a personal (athlete-created) workout session. `programWorkoutId` is the
|
|
355
|
+
* range item's top-level `id`; `date` is that session's day, used to look the item back up so the
|
|
356
|
+
* write can confirm it is a personal session (`personal_cal === true`) before deleting. A
|
|
357
|
+
* coach-scheduled workout is never removed this way.
|
|
358
|
+
*/
|
|
359
|
+
declare const athleteSessionRemoveArgsSchema: z.ZodObject<{
|
|
360
|
+
programWorkoutId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
361
|
+
date: z.ZodString;
|
|
362
|
+
}, z.core.$strip>;
|
|
363
|
+
type AthleteSessionRemoveArgs = z.infer<typeof athleteSessionRemoveArgsSchema>;
|
|
353
364
|
/** A flattened exercise within a presented workout: prescriptions, logged results, units. */
|
|
354
365
|
type AthleteWorkoutExercise = {
|
|
355
366
|
exerciseId: number | null;
|
|
@@ -387,6 +398,12 @@ type AthleteWorkoutView = {
|
|
|
387
398
|
* the API's own completion flags are unreliable.
|
|
388
399
|
*/
|
|
389
400
|
logged: boolean;
|
|
401
|
+
/**
|
|
402
|
+
* True when this is a personal session the athlete created (the API's `personal_cal` flag),
|
|
403
|
+
* rather than a coach-scheduled workout. Only a personal session can be removed with
|
|
404
|
+
* `athlete_session_remove`; its `id` is the `programWorkoutId` that tool takes.
|
|
405
|
+
*/
|
|
406
|
+
personal: boolean;
|
|
390
407
|
blocks: AthleteWorkoutBlock[];
|
|
391
408
|
};
|
|
392
409
|
/**
|
|
@@ -402,7 +419,8 @@ type AthleteWorkoutSummary = {
|
|
|
402
419
|
title: string;
|
|
403
420
|
program: string | null;
|
|
404
421
|
team: string | null; /** True when the athlete logged at least one set on this workout. */
|
|
405
|
-
logged: boolean; /**
|
|
422
|
+
logged: boolean; /** True when this is a personal session the athlete created, not a coach-scheduled workout. */
|
|
423
|
+
personal: boolean; /** Total prescribed exercises across all blocks. */
|
|
406
424
|
exerciseCount: number;
|
|
407
425
|
/**
|
|
408
426
|
* How many of those exercises have at least one logged set. Read it against exerciseCount
|
|
@@ -706,4 +724,4 @@ type ReadResult = {
|
|
|
706
724
|
blocks: ReadBlock[];
|
|
707
725
|
};
|
|
708
726
|
//#endregion
|
|
709
|
-
export { Advisory, AthletePrefs, AthleteProfileSummary, AthleteUser, AthleteWorkingMax, AthleteWorkoutBlock, AthleteWorkoutExercise, AthleteWorkoutRangeArgs, AthleteWorkoutSummary, AthleteWorkoutView, BlockSpec, CoachAthleteExercise, CoachAthleteSession, CoachAthleteTraining, CoachLogSessionArgs, CoachLogSetArgs, CoachPrescribeSetArgs, CommentDraft, ExerciseCreate, ExerciseHistoryDetail, ExerciseHistoryListItem, ExerciseRow, ExerciseSpec, ExerciseStats, ExerciseView, Id, LeaderboardSpec, LogSessionArgs, LogSetArgs, PersonalRecord, PresentedExerciseHistory, PresentedExerciseSession, ProgramWorkout, ReadBlock, ReadExercise, ReadResult, ResolveResult, RosterActivityRow, SwapAthleteExerciseArgs, TeamVolumeAthlete, TeamVolumeReport, UserSimple, WorkoutDate, WorkoutSpec, athletePrefsSchema, athleteProfileSummarySchema, 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 };
|
|
727
|
+
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, Id, LeaderboardSpec, LogSessionArgs, LogSetArgs, PersonalRecord, PresentedExerciseHistory, PresentedExerciseSession, ProgramWorkout, ReadBlock, ReadExercise, ReadResult, ResolveResult, RosterActivityRow, SwapAthleteExerciseArgs, TeamVolumeAthlete, TeamVolumeReport, UserSimple, WorkoutDate, 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -242,6 +242,16 @@ const logSessionArgsSchema = z.object({
|
|
|
242
242
|
* `athleteId` whose session is being logged on their behalf.
|
|
243
243
|
*/
|
|
244
244
|
const coachLogSessionArgsSchema = logSessionArgsSchema.extend({ athleteId: idArgSchema });
|
|
245
|
+
/**
|
|
246
|
+
* Args for removing a personal (athlete-created) workout session. `programWorkoutId` is the
|
|
247
|
+
* range item's top-level `id`; `date` is that session's day, used to look the item back up so the
|
|
248
|
+
* write can confirm it is a personal session (`personal_cal === true`) before deleting. A
|
|
249
|
+
* coach-scheduled workout is never removed this way.
|
|
250
|
+
*/
|
|
251
|
+
const athleteSessionRemoveArgsSchema = z.object({
|
|
252
|
+
programWorkoutId: idArgSchema,
|
|
253
|
+
date: dateString
|
|
254
|
+
});
|
|
245
255
|
//#endregion
|
|
246
256
|
//#region src/exercise.ts
|
|
247
257
|
/** Body for creating a custom exercise; extra fields the API accepts are preserved. */
|
|
@@ -344,4 +354,4 @@ function parseWorkoutDate(s) {
|
|
|
344
354
|
];
|
|
345
355
|
}
|
|
346
356
|
//#endregion
|
|
347
|
-
export { athletePrefsSchema, athleteProfileSummarySchema, 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 };
|
|
357
|
+
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 };
|