@trainheroic-unofficial/dto 3.1.1 → 3.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 +23 -1
- package/dist/index.mjs +16 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -701,6 +701,22 @@ declare const programCreateResponseSchema: z.ZodObject<{
|
|
|
701
701
|
}, z.core.$loose>>;
|
|
702
702
|
}, z.core.$loose>;
|
|
703
703
|
//#endregion
|
|
704
|
+
//#region src/team.d.ts
|
|
705
|
+
/** Fields merged onto the program object for `POST /1.0/coach/team/updatePublishSettings`. */
|
|
706
|
+
declare const teamPublishPatchObject: z.ZodObject<{
|
|
707
|
+
pub_enabled: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean]>>;
|
|
708
|
+
pub_days: z.ZodOptional<z.ZodUnknown>;
|
|
709
|
+
pub_time: z.ZodOptional<z.ZodUnknown>;
|
|
710
|
+
pub_timezone: z.ZodOptional<z.ZodString>;
|
|
711
|
+
}, z.core.$strip>;
|
|
712
|
+
declare const teamPublishPatchSchema: z.ZodObject<{
|
|
713
|
+
pub_enabled: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodBoolean]>>;
|
|
714
|
+
pub_days: z.ZodOptional<z.ZodUnknown>;
|
|
715
|
+
pub_time: z.ZodOptional<z.ZodUnknown>;
|
|
716
|
+
pub_timezone: z.ZodOptional<z.ZodString>;
|
|
717
|
+
}, z.core.$strip>;
|
|
718
|
+
type TeamPublishPatch = z.infer<typeof teamPublishPatchSchema>;
|
|
719
|
+
//#endregion
|
|
704
720
|
//#region src/workout.d.ts
|
|
705
721
|
/** A single exercise prescription inside a block. */
|
|
706
722
|
declare const exerciseSpecSchema: z.ZodObject<{
|
|
@@ -818,5 +834,11 @@ type ReadResult = {
|
|
|
818
834
|
instruction: string;
|
|
819
835
|
blocks: ReadBlock[];
|
|
820
836
|
};
|
|
837
|
+
/** Body for `POST /v5/sessions/template` (library create, not save-from-session). */
|
|
838
|
+
declare const sessionTemplateCreateSchema: z.ZodObject<{
|
|
839
|
+
title: z.ZodString;
|
|
840
|
+
instruction: z.ZodOptional<z.ZodString>;
|
|
841
|
+
}, z.core.$strip>;
|
|
842
|
+
type SessionTemplateCreate = z.infer<typeof sessionTemplateCreateSchema>;
|
|
821
843
|
//#endregion
|
|
822
|
-
export { Advisory, AthletePrefs, AthletePrescribeSetArgs, 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, athletePrescribeSetArgsSchema, 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, programCreateResponseSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, swapAthleteExerciseArgsSchema, userSimpleSchema, workoutSpecSchema };
|
|
844
|
+
export { Advisory, AthletePrefs, AthletePrescribeSetArgs, 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, SessionTemplateCreate, SwapAthleteExerciseArgs, TeamPublishPatch, TeamVolumeAthlete, TeamVolumeReport, UserSimple, WorkoutDate, WorkoutHistoryExport, WorkoutSpec, athletePrefsSchema, athletePrescribeSetArgsSchema, 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, programCreateResponseSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, sessionTemplateCreateSchema, swapAthleteExerciseArgsSchema, teamPublishPatchObject, teamPublishPatchSchema, userSimpleSchema, workoutSpecSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -322,6 +322,16 @@ const programCreateResponseSchema = z.looseObject({
|
|
|
322
322
|
}).optional()
|
|
323
323
|
});
|
|
324
324
|
//#endregion
|
|
325
|
+
//#region src/team.ts
|
|
326
|
+
/** Fields merged onto the program object for `POST /1.0/coach/team/updatePublishSettings`. */
|
|
327
|
+
const teamPublishPatchObject = z.object({
|
|
328
|
+
pub_enabled: z.union([z.number(), z.boolean()]).optional(),
|
|
329
|
+
pub_days: z.unknown().optional(),
|
|
330
|
+
pub_time: z.unknown().optional(),
|
|
331
|
+
pub_timezone: z.string().optional()
|
|
332
|
+
});
|
|
333
|
+
const teamPublishPatchSchema = teamPublishPatchObject.refine((v) => v.pub_enabled !== void 0 || v.pub_days !== void 0 || v.pub_time !== void 0 || v.pub_timezone !== void 0, { message: "Provide at least one pub_* field" });
|
|
334
|
+
//#endregion
|
|
325
335
|
//#region src/workout.ts
|
|
326
336
|
/** A single exercise prescription inside a block. */
|
|
327
337
|
const exerciseSpecSchema = z.object({
|
|
@@ -388,5 +398,10 @@ function parseWorkoutDate(s) {
|
|
|
388
398
|
parts[2]
|
|
389
399
|
];
|
|
390
400
|
}
|
|
401
|
+
/** Body for `POST /v5/sessions/template` (library create, not save-from-session). */
|
|
402
|
+
const sessionTemplateCreateSchema = z.object({
|
|
403
|
+
title: z.string().min(1),
|
|
404
|
+
instruction: z.string().optional()
|
|
405
|
+
});
|
|
391
406
|
//#endregion
|
|
392
|
-
export { athletePrefsSchema, athletePrescribeSetArgsSchema, 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, programCreateResponseSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, swapAthleteExerciseArgsSchema, userSimpleSchema, workoutSpecSchema };
|
|
407
|
+
export { athletePrefsSchema, athletePrescribeSetArgsSchema, 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, programCreateResponseSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, sessionTemplateCreateSchema, swapAthleteExerciseArgsSchema, teamPublishPatchObject, teamPublishPatchSchema, userSimpleSchema, workoutSpecSchema };
|