@trainheroic-unofficial/dto 1.1.1 → 1.2.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 CHANGED
@@ -262,6 +262,39 @@ declare const coachLogSetArgsSchema: z.ZodObject<{
262
262
  athleteId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
263
263
  }, z.core.$strip>;
264
264
  type CoachLogSetArgs = z.infer<typeof coachLogSetArgsSchema>;
265
+ /**
266
+ * Args for the coach prescription-override write. Structurally the same as
267
+ * {@link coachLogSetArgsSchema} (athleteId + date + savedWorkoutSetId + per-exercise `sets`), but
268
+ * the values are prescribed targets (param1 = reps, param2 = weight) written to the athlete's
269
+ * plan without marking the set performed. It is a separate schema (not an alias) so a future
270
+ * prescribe-only constraint can be added here without changing the log args, and the write
271
+ * replaces the slot's prescribed values for this athlete only.
272
+ */
273
+ declare const coachPrescribeSetArgsSchema: z.ZodObject<{
274
+ date: z.ZodString;
275
+ savedWorkoutSetId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
276
+ results: z.ZodArray<z.ZodObject<{
277
+ savedWorkoutSetExerciseId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
278
+ sets: z.ZodArray<z.ZodObject<{
279
+ param1: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
280
+ param2: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
281
+ }, z.core.$strip>>;
282
+ }, z.core.$strip>>;
283
+ athleteId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
284
+ }, z.core.$strip>;
285
+ type CoachPrescribeSetArgs = z.infer<typeof coachPrescribeSetArgsSchema>;
286
+ /**
287
+ * Args for the coach per-athlete exercise swap: replace the exercise prescribed in one of a
288
+ * roster athlete's saved-workout slots with a different exercise, the API equivalent of the
289
+ * app's per-athlete "swap exercise". `savedWorkoutSetExerciseId` is that athlete's own slot id
290
+ * (the same id `coachLogSetArgsSchema` uses, read off athlete_saved_workouts raw);
291
+ * `exerciseId` is the replacement exercise. The team/program prescription is left untouched.
292
+ */
293
+ declare const swapAthleteExerciseArgsSchema: z.ZodObject<{
294
+ savedWorkoutSetExerciseId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
295
+ exerciseId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
296
+ }, z.core.$strip>;
297
+ type SwapAthleteExerciseArgs = z.infer<typeof swapAthleteExerciseArgsSchema>;
265
298
  /**
266
299
  * Args for logging a whole session by exercise (rather than by saved-workout-set id). Each
267
300
  * exercise carries its entered sets and an optional 1-based `order`. The athlete path creates
@@ -652,4 +685,4 @@ type ReadResult = {
652
685
  blocks: ReadBlock[];
653
686
  };
654
687
  //#endregion
655
- export { Advisory, AthletePrefs, AthleteProfileSummary, AthleteUser, AthleteWorkingMax, AthleteWorkoutBlock, AthleteWorkoutExercise, AthleteWorkoutRangeArgs, AthleteWorkoutSummary, AthleteWorkoutView, BlockSpec, CoachAthleteExercise, CoachAthleteSession, CoachAthleteTraining, CoachLogSessionArgs, CoachLogSetArgs, CommentDraft, ExerciseCreate, ExerciseHistoryDetail, ExerciseHistoryListItem, ExerciseRow, ExerciseSpec, ExerciseStats, ExerciseView, Id, LeaderboardSpec, LogSessionArgs, LogSetArgs, PersonalRecord, PresentedExerciseHistory, PresentedExerciseSession, ProgramWorkout, ReadBlock, ReadExercise, ReadResult, ResolveResult, RosterActivityRow, TeamVolumeAthlete, TeamVolumeReport, UserSimple, WorkoutDate, WorkoutSpec, athletePrefsSchema, athleteProfileSummarySchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutRangeArgsSchema, blockSpecSchema, coachLogSessionArgsSchema, coachLogSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseLibraryResponseSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSessionArgsSchema, logSetArgsSchema, loggedSetSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, userSimpleSchema, workoutSpecSchema };
688
+ 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, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, swapAthleteExerciseArgsSchema, userSimpleSchema, workoutSpecSchema };
package/dist/index.mjs CHANGED
@@ -182,6 +182,26 @@ const logSetArgsSchema = z.object({
182
182
  */
183
183
  const coachLogSetArgsSchema = logSetArgsSchema.extend({ athleteId: idArgSchema });
184
184
  /**
185
+ * Args for the coach prescription-override write. Structurally the same as
186
+ * {@link coachLogSetArgsSchema} (athleteId + date + savedWorkoutSetId + per-exercise `sets`), but
187
+ * the values are prescribed targets (param1 = reps, param2 = weight) written to the athlete's
188
+ * plan without marking the set performed. It is a separate schema (not an alias) so a future
189
+ * prescribe-only constraint can be added here without changing the log args, and the write
190
+ * replaces the slot's prescribed values for this athlete only.
191
+ */
192
+ const coachPrescribeSetArgsSchema = logSetArgsSchema.extend({ athleteId: idArgSchema });
193
+ /**
194
+ * Args for the coach per-athlete exercise swap: replace the exercise prescribed in one of a
195
+ * roster athlete's saved-workout slots with a different exercise, the API equivalent of the
196
+ * app's per-athlete "swap exercise". `savedWorkoutSetExerciseId` is that athlete's own slot id
197
+ * (the same id `coachLogSetArgsSchema` uses, read off athlete_saved_workouts raw);
198
+ * `exerciseId` is the replacement exercise. The team/program prescription is left untouched.
199
+ */
200
+ const swapAthleteExerciseArgsSchema = z.object({
201
+ savedWorkoutSetExerciseId: idArgSchema,
202
+ exerciseId: idArgSchema
203
+ });
204
+ /**
185
205
  * Args for logging a whole session by exercise (rather than by saved-workout-set id). Each
186
206
  * exercise carries its entered sets and an optional 1-based `order`. The athlete path creates
187
207
  * or reuses a personal session for the date and logs against it; the coach path resolves each
@@ -302,4 +322,4 @@ function parseWorkoutDate(s) {
302
322
  ];
303
323
  }
304
324
  //#endregion
305
- export { athletePrefsSchema, athleteProfileSummarySchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutRangeArgsSchema, blockSpecSchema, coachLogSessionArgsSchema, coachLogSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseLibraryResponseSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSessionArgsSchema, logSetArgsSchema, loggedSetSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, userSimpleSchema, workoutSpecSchema };
325
+ 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, 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.1.1",
3
+ "version": "1.2.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",