@trainheroic-unofficial/dto 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -61,7 +61,7 @@ re-exported through `index.ts`. The central pieces:
61
61
 
62
62
  ## Develop
63
63
 
64
- Run `pnpm install` once at the repo root (Node >= 22, pnpm 10), then from this package:
64
+ Run `pnpm install` once at the repo root (Node >= 24, pnpm 11), then from this package:
65
65
 
66
66
  ```bash
67
67
  pnpm build # tsdown -> dist (ESM + .d.mts)
package/dist/index.d.mts CHANGED
@@ -276,6 +276,59 @@ type AthleteWorkoutView = {
276
276
  logged: boolean;
277
277
  blocks: AthleteWorkoutBlock[];
278
278
  };
279
+ /**
280
+ * A compact per-workout header with no block/exercise detail. Produced by the summary
281
+ * projection so an overview question ("what's on my schedule this week", "what have I been
282
+ * training lately") returns one small row per session instead of the full prescribed/performed
283
+ * sets — a dense multi-program week of `AthleteWorkoutView`s can run tens of KB and force a
284
+ * follow-up drill-in.
285
+ */
286
+ type AthleteWorkoutSummary = {
287
+ id: number | null;
288
+ date: string;
289
+ title: string;
290
+ program: string | null;
291
+ team: string | null; /** True when the athlete logged at least one set on this workout. */
292
+ logged: boolean; /** Total prescribed exercises across all blocks. */
293
+ exerciseCount: number;
294
+ /**
295
+ * How many of those exercises have at least one logged set. Read it against exerciseCount
296
+ * (e.g. 1 of 12), not in isolation — a low number means the session was mostly unlogged, not
297
+ * that only one exercise was prescribed.
298
+ */
299
+ performedCount: number;
300
+ };
301
+ /** One exercise inside a coach-viewed athlete session (from the calendar summary). */
302
+ type CoachAthleteExercise = {
303
+ exerciseId: number | null;
304
+ title: string; /** The set summary the API returns, e.g. "5 x 2 @ 205 lb" or "3 x 5 @ 24 in". */
305
+ summary: string | null;
306
+ completed: boolean;
307
+ };
308
+ /** One session in a coach's view of a roster athlete's training month. */
309
+ type CoachAthleteSession = {
310
+ workoutId: number | null;
311
+ savedWorkoutId: number | null;
312
+ title: string; /** True when the athlete logged this session (the reliable did-they-train signal). */
313
+ logged: boolean;
314
+ completed: boolean;
315
+ rpe: number | null;
316
+ durationMin: number | null;
317
+ notes: string | null;
318
+ exercises: CoachAthleteExercise[];
319
+ };
320
+ /**
321
+ * A coach's month view of a roster athlete's training, presented from
322
+ * `/2.0/coach/athlete/calendar/summary`. Sessions are in calendar order within the month; the
323
+ * API carries no per-session date, so the month comes from year/month.
324
+ */
325
+ type CoachAthleteTraining = {
326
+ athleteId: number | null;
327
+ athleteName: string | null;
328
+ year: number;
329
+ month: number;
330
+ sessions: CoachAthleteSession[];
331
+ };
279
332
  /** One performed session in a presented exercise history. */
280
333
  type PresentedExerciseSession = {
281
334
  date: string;
@@ -495,4 +548,4 @@ type ReadResult = {
495
548
  blocks: ReadBlock[];
496
549
  };
497
550
  //#endregion
498
- export { Advisory, AthletePrefs, AthleteProfileSummary, AthleteUser, AthleteWorkingMax, AthleteWorkoutBlock, AthleteWorkoutExercise, AthleteWorkoutRangeArgs, AthleteWorkoutView, BlockSpec, CommentDraft, ExerciseCreate, ExerciseHistoryDetail, ExerciseHistoryListItem, ExerciseRow, ExerciseSpec, ExerciseStats, ExerciseView, Id, LeaderboardSpec, LogSetArgs, PersonalRecord, PresentedExerciseHistory, PresentedExerciseSession, ProgramWorkout, ReadBlock, ReadExercise, ReadResult, ResolveResult, UserSimple, WorkoutDate, WorkoutSpec, athletePrefsSchema, athleteProfileSummarySchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutRangeArgsSchema, blockSpecSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseLibraryResponseSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSetArgsSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, userSimpleSchema, workoutSpecSchema };
551
+ export { Advisory, AthletePrefs, AthleteProfileSummary, AthleteUser, AthleteWorkingMax, AthleteWorkoutBlock, AthleteWorkoutExercise, AthleteWorkoutRangeArgs, AthleteWorkoutSummary, AthleteWorkoutView, BlockSpec, CoachAthleteExercise, CoachAthleteSession, CoachAthleteTraining, CommentDraft, ExerciseCreate, ExerciseHistoryDetail, ExerciseHistoryListItem, ExerciseRow, ExerciseSpec, ExerciseStats, ExerciseView, Id, LeaderboardSpec, LogSetArgs, PersonalRecord, PresentedExerciseHistory, PresentedExerciseSession, ProgramWorkout, ReadBlock, ReadExercise, ReadResult, ResolveResult, UserSimple, WorkoutDate, WorkoutSpec, athletePrefsSchema, athleteProfileSummarySchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutRangeArgsSchema, blockSpecSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseLibraryResponseSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSetArgsSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, userSimpleSchema, workoutSpecSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trainheroic-unofficial/dto",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",