@trainheroic-unofficial/dto 3.3.3 → 3.4.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
@@ -370,6 +370,26 @@ declare const athleteSessionRemoveArgsSchema: z.ZodObject<{
370
370
  date: z.ZodString;
371
371
  }, z.core.$strip>;
372
372
  type AthleteSessionRemoveArgs = z.infer<typeof athleteSessionRemoveArgsSchema>;
373
+ /**
374
+ * Args for the athlete session-note write. `programWorkoutId` is the range item's top-level `id`
375
+ * (athlete_workouts); `date` locates that day so the SDK can resolve the saved-workout id the PUT
376
+ * targets. `notes` is the free-text box on the workout screen (empty string clears it). `rpe` is
377
+ * the session RPE (1–10). At least one of `notes` / `rpe` is required — a notes-only PUT leaves
378
+ * rpe untouched and vice versa.
379
+ */
380
+ declare const athleteWorkoutNoteObject: z.ZodObject<{
381
+ date: z.ZodString;
382
+ programWorkoutId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
383
+ notes: z.ZodOptional<z.ZodString>;
384
+ rpe: z.ZodOptional<z.ZodNumber>;
385
+ }, z.core.$strip>;
386
+ declare const athleteWorkoutNoteArgsSchema: z.ZodObject<{
387
+ date: z.ZodString;
388
+ programWorkoutId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
389
+ notes: z.ZodOptional<z.ZodString>;
390
+ rpe: z.ZodOptional<z.ZodNumber>;
391
+ }, z.core.$strip>;
392
+ type AthleteWorkoutNoteArgs = z.infer<typeof athleteWorkoutNoteArgsSchema>;
373
393
  /** Flattened exercise within a presented workout: prescriptions, logged results, units. */
374
394
  declare const athleteWorkoutExerciseSchema: z.ZodObject<{
375
395
  exerciseId: z.ZodNullable<z.ZodNumber>;
@@ -402,6 +422,8 @@ declare const athleteWorkoutViewSchema: z.ZodObject<{
402
422
  program: z.ZodNullable<z.ZodString>;
403
423
  team: z.ZodNullable<z.ZodString>;
404
424
  instruction: z.ZodNullable<z.ZodString>;
425
+ notes: z.ZodNullable<z.ZodString>;
426
+ rpe: z.ZodNullable<z.ZodNumber>;
405
427
  logged: z.ZodBoolean;
406
428
  personal: z.ZodBoolean;
407
429
  blocks: z.ZodArray<z.ZodObject<{
@@ -450,6 +472,8 @@ declare const athleteWorkoutsOutputSchema: z.ZodUnion<readonly [z.ZodArray<z.Zod
450
472
  program: z.ZodNullable<z.ZodString>;
451
473
  team: z.ZodNullable<z.ZodString>;
452
474
  instruction: z.ZodNullable<z.ZodString>;
475
+ notes: z.ZodNullable<z.ZodString>;
476
+ rpe: z.ZodNullable<z.ZodNumber>;
453
477
  logged: z.ZodBoolean;
454
478
  personal: z.ZodBoolean;
455
479
  blocks: z.ZodArray<z.ZodObject<{
@@ -1074,6 +1098,14 @@ declare const personalWorkoutCreatedOutputSchema: z.ZodObject<{
1074
1098
  groupId: z.ZodNumber;
1075
1099
  date: z.ZodString;
1076
1100
  }, z.core.$strip>;
1101
+ declare const athleteWorkoutNoteOutputSchema: z.ZodObject<{
1102
+ programWorkoutId: z.ZodNumber;
1103
+ savedWorkoutId: z.ZodNumber;
1104
+ date: z.ZodString;
1105
+ notes: z.ZodString;
1106
+ rpe: z.ZodNullable<z.ZodNumber>;
1107
+ }, z.core.$strip>;
1108
+ type AthleteWorkoutNoteOutput = z.infer<typeof athleteWorkoutNoteOutputSchema>;
1077
1109
  declare const workoutReadOutputSchema: z.ZodObject<{
1078
1110
  pwId: z.ZodNumber;
1079
1111
  date: z.ZodString;
@@ -1336,4 +1368,4 @@ declare const sessionTemplateCreateSchema: z.ZodObject<{
1336
1368
  }, z.core.$strip>;
1337
1369
  type SessionTemplateCreate = z.infer<typeof sessionTemplateCreateSchema>;
1338
1370
  //#endregion
1339
- export { Advisory, AthletePrefs, AthletePrescribeSetArgs, AthleteProfileSummary, AthleteSessionRemoveArgs, AthleteUser, AthleteWorkingMax, AthleteWorkoutBlock, AthleteWorkoutExercise, AthleteWorkoutRangeArgs, AthleteWorkoutSummary, AthleteWorkoutView, BlockSpec, CoachAthleteExercise, CoachAthleteSession, CoachAthleteTraining, CoachLogSessionArgs, CoachLogSetArgs, CoachPrescribeSetArgs, CommentDraft, ExerciseCreate, ExerciseGetOutput, ExerciseHistoryDetail, ExerciseHistoryListItem, ExerciseRow, ExerciseSpec, ExerciseStats, ExerciseView, ExportBlock, ExportExercise, ExportSet, ExportSetParam, ExportSetSide, Id, LeaderboardSpec, LogSessionArgs, LogSetArgs, PersonalRecord, PresentedExerciseHistory, PresentedExerciseSession, ProgramWorkout, ReadBlock, ReadExercise, ReadResult, ResolveResult, RosterActivityRow, SessionTemplateCreate, SwapAthleteExerciseArgs, TeamPublishPatch, TeamVolumeAthlete, TeamVolumeReport, UserSimple, WorkoutDate, WorkoutHistoryExport, WorkoutSpec, athleteExerciseCatalogOutputSchema, athleteInviteOutputSchema, athleteMainLiftPrsOutputSchema, athletePrefsSchema, athletePrescribeSetArgsSchema, athleteProfileOutputSchema, athleteProfileSummarySchema, athleteSessionRemoveArgsSchema, athleteSessionRemovedOutputSchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutBlockSchema, athleteWorkoutExerciseSchema, athleteWorkoutRangeArgsSchema, athleteWorkoutSummarySchema, athleteWorkoutViewSchema, athleteWorkoutsOutputSchema, blockSpecSchema, coachAthleteExerciseSchema, coachAthleteSessionSchema, coachAthleteTrainingOutputSchema, coachAthleteTrainingSchema, coachLogSessionArgsSchema, coachLogSetArgsSchema, coachPrescribeSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseCreatedOutputSchema, exerciseDeletedOutputSchema, exerciseForgottenOutputSchema, exerciseGetOutputSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseHistoryOutputSchema, exerciseLibraryResponseSchema, exerciseResolveOutputSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, exerciseSwapOutputSchema, exerciseViewSchema, feedbackOutputSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSessionArgsSchema, logSetArgsSchema, logTargetsOutputSchema, loggedSetSchema, loggedSetWithSlotSchema, messageDeletedOutputSchema, messageDraftOutputSchema, messageSentOutputSchema, opaqueJsonOutputSchema, opaqueOutputSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, personalWorkoutCreatedOutputSchema, presentedExerciseHistorySchema, presentedExerciseSessionSchema, programCreateResponseSchema, programCreatedOutputSchema, programDeletedOutputSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, removedSessionOutputSchema, repMaxSchema, rosterActivityOutputSchema, rosterActivityRowSchema, sessionCreateResponseSchema, sessionLogOutputSchema, sessionTemplateCreateSchema, sessionTemplateCreatedOutputSchema, setLogOutputSchema, setPrescriptionOutputSchema, swapAthleteExerciseArgsSchema, teamPublishPatchObject, teamPublishPatchSchema, teamVolumeAthleteSchema, teamVolumeOutputSchema, teamVolumeReportSchema, toolOutputSchema, truncatedOutputSchema, truncationMarkerSchema, userSimpleSchema, workoutBuildOutputSchema, workoutPublishOutputSchema, workoutReadOutputSchema, workoutSpecSchema };
1371
+ export { Advisory, AthletePrefs, AthletePrescribeSetArgs, AthleteProfileSummary, AthleteSessionRemoveArgs, AthleteUser, AthleteWorkingMax, AthleteWorkoutBlock, AthleteWorkoutExercise, AthleteWorkoutNoteArgs, AthleteWorkoutNoteOutput, AthleteWorkoutRangeArgs, AthleteWorkoutSummary, AthleteWorkoutView, BlockSpec, CoachAthleteExercise, CoachAthleteSession, CoachAthleteTraining, CoachLogSessionArgs, CoachLogSetArgs, CoachPrescribeSetArgs, CommentDraft, ExerciseCreate, ExerciseGetOutput, ExerciseHistoryDetail, ExerciseHistoryListItem, ExerciseRow, ExerciseSpec, ExerciseStats, ExerciseView, ExportBlock, ExportExercise, ExportSet, ExportSetParam, ExportSetSide, Id, LeaderboardSpec, LogSessionArgs, LogSetArgs, PersonalRecord, PresentedExerciseHistory, PresentedExerciseSession, ProgramWorkout, ReadBlock, ReadExercise, ReadResult, ResolveResult, RosterActivityRow, SessionTemplateCreate, SwapAthleteExerciseArgs, TeamPublishPatch, TeamVolumeAthlete, TeamVolumeReport, UserSimple, WorkoutDate, WorkoutHistoryExport, WorkoutSpec, athleteExerciseCatalogOutputSchema, athleteInviteOutputSchema, athleteMainLiftPrsOutputSchema, athletePrefsSchema, athletePrescribeSetArgsSchema, athleteProfileOutputSchema, athleteProfileSummarySchema, athleteSessionRemoveArgsSchema, athleteSessionRemovedOutputSchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutBlockSchema, athleteWorkoutExerciseSchema, athleteWorkoutNoteArgsSchema, athleteWorkoutNoteObject, athleteWorkoutNoteOutputSchema, athleteWorkoutRangeArgsSchema, athleteWorkoutSummarySchema, athleteWorkoutViewSchema, athleteWorkoutsOutputSchema, blockSpecSchema, coachAthleteExerciseSchema, coachAthleteSessionSchema, coachAthleteTrainingOutputSchema, coachAthleteTrainingSchema, coachLogSessionArgsSchema, coachLogSetArgsSchema, coachPrescribeSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseCreatedOutputSchema, exerciseDeletedOutputSchema, exerciseForgottenOutputSchema, exerciseGetOutputSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseHistoryOutputSchema, exerciseLibraryResponseSchema, exerciseResolveOutputSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, exerciseSwapOutputSchema, exerciseViewSchema, feedbackOutputSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSessionArgsSchema, logSetArgsSchema, logTargetsOutputSchema, loggedSetSchema, loggedSetWithSlotSchema, messageDeletedOutputSchema, messageDraftOutputSchema, messageSentOutputSchema, opaqueJsonOutputSchema, opaqueOutputSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, personalWorkoutCreatedOutputSchema, presentedExerciseHistorySchema, presentedExerciseSessionSchema, programCreateResponseSchema, programCreatedOutputSchema, programDeletedOutputSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, removedSessionOutputSchema, repMaxSchema, rosterActivityOutputSchema, rosterActivityRowSchema, sessionCreateResponseSchema, sessionLogOutputSchema, sessionTemplateCreateSchema, sessionTemplateCreatedOutputSchema, setLogOutputSchema, setPrescriptionOutputSchema, swapAthleteExerciseArgsSchema, teamPublishPatchObject, teamPublishPatchSchema, teamVolumeAthleteSchema, teamVolumeOutputSchema, teamVolumeReportSchema, toolOutputSchema, truncatedOutputSchema, truncationMarkerSchema, userSimpleSchema, workoutBuildOutputSchema, workoutPublishOutputSchema, workoutReadOutputSchema, workoutSpecSchema };
package/dist/index.mjs CHANGED
@@ -264,6 +264,20 @@ const athleteSessionRemoveArgsSchema = z.object({
264
264
  programWorkoutId: idArgSchema,
265
265
  date: dateString
266
266
  });
267
+ /**
268
+ * Args for the athlete session-note write. `programWorkoutId` is the range item's top-level `id`
269
+ * (athlete_workouts); `date` locates that day so the SDK can resolve the saved-workout id the PUT
270
+ * targets. `notes` is the free-text box on the workout screen (empty string clears it). `rpe` is
271
+ * the session RPE (1–10). At least one of `notes` / `rpe` is required — a notes-only PUT leaves
272
+ * rpe untouched and vice versa.
273
+ */
274
+ const athleteWorkoutNoteObject = z.object({
275
+ date: dateString,
276
+ programWorkoutId: idArgSchema,
277
+ notes: z.string().optional(),
278
+ rpe: z.number().int().min(1).max(10).optional()
279
+ });
280
+ const athleteWorkoutNoteArgsSchema = athleteWorkoutNoteObject.refine((v) => v.notes !== void 0 || v.rpe !== void 0, { message: "Provide notes and/or rpe" });
267
281
  const presentedNullNumber = z.number().nullable();
268
282
  const presentedNullString = z.string().nullable();
269
283
  /** Flattened exercise within a presented workout: prescriptions, logged results, units. */
@@ -289,6 +303,8 @@ const athleteWorkoutViewSchema = z.object({
289
303
  program: presentedNullString,
290
304
  team: presentedNullString,
291
305
  instruction: presentedNullString,
306
+ notes: presentedNullString,
307
+ rpe: presentedNullNumber,
292
308
  logged: z.boolean(),
293
309
  personal: z.boolean(),
294
310
  blocks: z.array(athleteWorkoutBlockSchema)
@@ -602,6 +618,13 @@ const personalWorkoutCreatedOutputSchema = z.object({
602
618
  groupId: z.number(),
603
619
  date: z.string()
604
620
  });
621
+ const athleteWorkoutNoteOutputSchema = z.object({
622
+ programWorkoutId: z.number(),
623
+ savedWorkoutId: z.number(),
624
+ date: z.string(),
625
+ notes: z.string(),
626
+ rpe: nullableNumber
627
+ });
605
628
  const workoutReadExerciseOutputSchema = z.object({
606
629
  order: z.number(),
607
630
  title: z.string(),
@@ -761,4 +784,4 @@ const sessionTemplateCreateSchema = z.object({
761
784
  instruction: z.string().optional()
762
785
  });
763
786
  //#endregion
764
- export { athleteExerciseCatalogOutputSchema, athleteInviteOutputSchema, athleteMainLiftPrsOutputSchema, athletePrefsSchema, athletePrescribeSetArgsSchema, athleteProfileOutputSchema, athleteProfileSummarySchema, athleteSessionRemoveArgsSchema, athleteSessionRemovedOutputSchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutBlockSchema, athleteWorkoutExerciseSchema, athleteWorkoutRangeArgsSchema, athleteWorkoutSummarySchema, athleteWorkoutViewSchema, athleteWorkoutsOutputSchema, blockSpecSchema, coachAthleteExerciseSchema, coachAthleteSessionSchema, coachAthleteTrainingOutputSchema, coachAthleteTrainingSchema, coachLogSessionArgsSchema, coachLogSetArgsSchema, coachPrescribeSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseCreatedOutputSchema, exerciseDeletedOutputSchema, exerciseForgottenOutputSchema, exerciseGetOutputSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseHistoryOutputSchema, exerciseLibraryResponseSchema, exerciseResolveOutputSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, exerciseSwapOutputSchema, exerciseViewSchema, feedbackOutputSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSessionArgsSchema, logSetArgsSchema, logTargetsOutputSchema, loggedSetSchema, loggedSetWithSlotSchema, messageDeletedOutputSchema, messageDraftOutputSchema, messageSentOutputSchema, opaqueJsonOutputSchema, opaqueOutputSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, personalWorkoutCreatedOutputSchema, presentedExerciseHistorySchema, presentedExerciseSessionSchema, programCreateResponseSchema, programCreatedOutputSchema, programDeletedOutputSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, removedSessionOutputSchema, repMaxSchema, rosterActivityOutputSchema, rosterActivityRowSchema, sessionCreateResponseSchema, sessionLogOutputSchema, sessionTemplateCreateSchema, sessionTemplateCreatedOutputSchema, setLogOutputSchema, setPrescriptionOutputSchema, swapAthleteExerciseArgsSchema, teamPublishPatchObject, teamPublishPatchSchema, teamVolumeAthleteSchema, teamVolumeOutputSchema, teamVolumeReportSchema, toolOutputSchema, truncatedOutputSchema, truncationMarkerSchema, userSimpleSchema, workoutBuildOutputSchema, workoutPublishOutputSchema, workoutReadOutputSchema, workoutSpecSchema };
787
+ export { athleteExerciseCatalogOutputSchema, athleteInviteOutputSchema, athleteMainLiftPrsOutputSchema, athletePrefsSchema, athletePrescribeSetArgsSchema, athleteProfileOutputSchema, athleteProfileSummarySchema, athleteSessionRemoveArgsSchema, athleteSessionRemovedOutputSchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutBlockSchema, athleteWorkoutExerciseSchema, athleteWorkoutNoteArgsSchema, athleteWorkoutNoteObject, athleteWorkoutNoteOutputSchema, athleteWorkoutRangeArgsSchema, athleteWorkoutSummarySchema, athleteWorkoutViewSchema, athleteWorkoutsOutputSchema, blockSpecSchema, coachAthleteExerciseSchema, coachAthleteSessionSchema, coachAthleteTrainingOutputSchema, coachAthleteTrainingSchema, coachLogSessionArgsSchema, coachLogSetArgsSchema, coachPrescribeSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseCreatedOutputSchema, exerciseDeletedOutputSchema, exerciseForgottenOutputSchema, exerciseGetOutputSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseHistoryOutputSchema, exerciseLibraryResponseSchema, exerciseResolveOutputSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, exerciseSwapOutputSchema, exerciseViewSchema, feedbackOutputSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSessionArgsSchema, logSetArgsSchema, logTargetsOutputSchema, loggedSetSchema, loggedSetWithSlotSchema, messageDeletedOutputSchema, messageDraftOutputSchema, messageSentOutputSchema, opaqueJsonOutputSchema, opaqueOutputSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, personalWorkoutCreatedOutputSchema, presentedExerciseHistorySchema, presentedExerciseSessionSchema, programCreateResponseSchema, programCreatedOutputSchema, programDeletedOutputSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, removedSessionOutputSchema, repMaxSchema, rosterActivityOutputSchema, rosterActivityRowSchema, sessionCreateResponseSchema, sessionLogOutputSchema, sessionTemplateCreateSchema, sessionTemplateCreatedOutputSchema, setLogOutputSchema, setPrescriptionOutputSchema, swapAthleteExerciseArgsSchema, teamPublishPatchObject, teamPublishPatchSchema, teamVolumeAthleteSchema, teamVolumeOutputSchema, teamVolumeReportSchema, toolOutputSchema, truncatedOutputSchema, truncationMarkerSchema, userSimpleSchema, workoutBuildOutputSchema, workoutPublishOutputSchema, workoutReadOutputSchema, workoutSpecSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trainheroic-unofficial/dto",
3
- "version": "3.3.3",
3
+ "version": "3.4.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "tsdown": "^0.22.14",
29
- "vitest": "^4.1.10"
29
+ "vitest": "^4.1.11"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsdown",