@trainheroic-unofficial/dto 1.6.1 → 1.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.
Files changed (2) hide show
  1. package/dist/index.d.mts +63 -1
  2. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -525,6 +525,68 @@ type PresentedExerciseHistory = {
525
525
  }>;
526
526
  sessions: PresentedExerciseSession[];
527
527
  };
528
+ /**
529
+ * One positional parameter of a set, carrying its unit label and raw value. TrainHeroic stores
530
+ * each set as two generic slots (`param_1`/`param_2`); the unit tells you what the slot means
531
+ * (`reps`, `lb`, `sec`, `%max`, `RPE`, …). The value is kept raw: a number when the slot holds a
532
+ * number, or a string for a non-numeric prescription such as `AMRAP` or a rep range like `8-12`.
533
+ */
534
+ type ExportSetParam = {
535
+ unit: string | null;
536
+ value: number | string | null;
537
+ };
538
+ /**
539
+ * One side (prescribed or performed) of a single set. `reps`/`weight` are pulled out of the two
540
+ * generic params by unit for the common lifting case; `params` keeps both slots verbatim so a
541
+ * time/distance/percentage exercise loses nothing. `display` is the readable `"5 @ 225"` form used
542
+ * by the text export.
543
+ */
544
+ type ExportSetSide = {
545
+ reps: number | string | null;
546
+ weight: number | string | null;
547
+ weightUnit: string | null;
548
+ params: ExportSetParam[];
549
+ display: string;
550
+ };
551
+ /**
552
+ * A single set of an exercise, aligned by its positional slot (1-based). `prescribed` is what the
553
+ * coach programmed and `performed` is what the athlete logged; either can be null (a skipped set
554
+ * has no `performed`; athlete-added work has no `prescribed`).
555
+ */
556
+ type ExportSet = {
557
+ set: number;
558
+ prescribed: ExportSetSide | null;
559
+ performed: ExportSetSide | null;
560
+ };
561
+ /** An exercise within an exported workout: its unit labels and the per-set prescribed/performed. */
562
+ type ExportExercise = {
563
+ exerciseId: number | null;
564
+ title: string;
565
+ units: Array<string | null>;
566
+ sets: ExportSet[];
567
+ };
568
+ /** A block (workout set / superset) within an exported workout. */
569
+ type ExportBlock = {
570
+ order: number;
571
+ title: string | null;
572
+ isTest: boolean;
573
+ exercises: ExportExercise[];
574
+ };
575
+ /**
576
+ * A single workout flattened for a history export: the same session `presentAthleteWorkout`
577
+ * produces, but with structured numeric sets (reps/weight broken out) instead of joined strings,
578
+ * so it serializes cleanly to CSV and JSON. Produced by `presentAthleteWorkoutsExport` in `js`.
579
+ */
580
+ type WorkoutHistoryExport = {
581
+ id: number | null;
582
+ date: string;
583
+ title: string;
584
+ program: string | null;
585
+ team: string | null;
586
+ logged: boolean;
587
+ personal: boolean;
588
+ blocks: ExportBlock[];
589
+ };
528
590
  //#endregion
529
591
  //#region src/common.d.ts
530
592
  /** An entity id as it arrives over the wire — a number or a numeric string. */
@@ -724,4 +786,4 @@ type ReadResult = {
724
786
  blocks: ReadBlock[];
725
787
  };
726
788
  //#endregion
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 };
789
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trainheroic-unofficial/dto",
3
- "version": "1.6.1",
3
+ "version": "1.7.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",