@trainheroic-unofficial/dto 0.6.0 → 0.6.2

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
@@ -237,13 +237,20 @@ declare const logSetArgsSchema: z.ZodObject<{
237
237
  }, z.core.$strip>>;
238
238
  }, z.core.$strip>;
239
239
  type LogSetArgs = z.infer<typeof logSetArgsSchema>;
240
- /** A flattened exercise within a presented workout: prescriptions per set + positional units. */
240
+ /** A flattened exercise within a presented workout: prescriptions, logged results, units. */
241
241
  type AthleteWorkoutExercise = {
242
242
  exerciseId: number | null;
243
243
  title: string;
244
244
  instruction: string | null;
245
245
  units: Array<string | null>; /** Per-set prescriptions, e.g. ["5 @ 225 lb", "3 @ 245 lb"] or ["AMRAP"]. */
246
246
  prescribed: string[];
247
+ /**
248
+ * Per-set values the athlete actually logged, same shape as `prescribed`. Empty when
249
+ * nothing was recorded for this exercise. This — not any "completed" flag — is the
250
+ * reliable signal that a set was performed (the API leaves completion flags at 0 even
251
+ * when results were entered).
252
+ */
253
+ performed: string[];
247
254
  };
248
255
  /** A block (workout set) within a presented workout. */
249
256
  type AthleteWorkoutBlock = {
@@ -261,6 +268,12 @@ type AthleteWorkoutView = {
261
268
  program: string | null;
262
269
  team: string | null;
263
270
  instruction: string | null;
271
+ /**
272
+ * True when the athlete logged at least one set on this workout (any exercise has
273
+ * `performed` values). Use this to tell a recorded session from a merely scheduled one;
274
+ * the API's own completion flags are unreliable.
275
+ */
276
+ logged: boolean;
264
277
  blocks: AthleteWorkoutBlock[];
265
278
  };
266
279
  /** One performed session in a presented exercise history. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trainheroic-unofficial/dto",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",