@trainheroic-unofficial/dto 3.1.0 → 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 +35 -1
- package/dist/index.mjs +28 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -688,6 +688,34 @@ declare const programsEditResponseSchema: z.ZodObject<{
|
|
|
688
688
|
sets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
689
689
|
}, z.core.$loose>>>;
|
|
690
690
|
}, z.core.$loose>;
|
|
691
|
+
/** A standalone program create response (container id + usable calendar/program id). */
|
|
692
|
+
declare const programCreateResponseSchema: z.ZodObject<{
|
|
693
|
+
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
694
|
+
title: z.ZodString;
|
|
695
|
+
programId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
696
|
+
group_program: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
697
|
+
type: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
698
|
+
program: z.ZodOptional<z.ZodObject<{
|
|
699
|
+
id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
700
|
+
program_type: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
701
|
+
}, z.core.$loose>>;
|
|
702
|
+
}, z.core.$loose>;
|
|
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>;
|
|
691
719
|
//#endregion
|
|
692
720
|
//#region src/workout.d.ts
|
|
693
721
|
/** A single exercise prescription inside a block. */
|
|
@@ -806,5 +834,11 @@ type ReadResult = {
|
|
|
806
834
|
instruction: string;
|
|
807
835
|
blocks: ReadBlock[];
|
|
808
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>;
|
|
809
843
|
//#endregion
|
|
810
|
-
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, 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
|
@@ -309,6 +309,28 @@ const programWorkoutResponseSchema = z.looseObject({
|
|
|
309
309
|
});
|
|
310
310
|
/** The calendar edit-view response we read sessions back from. */
|
|
311
311
|
const programsEditResponseSchema = z.looseObject({ programWorkouts: z.array(programWorkoutResponseSchema).optional() });
|
|
312
|
+
/** A standalone program create response (container id + usable calendar/program id). */
|
|
313
|
+
const programCreateResponseSchema = z.looseObject({
|
|
314
|
+
id: intLike,
|
|
315
|
+
title: z.string(),
|
|
316
|
+
programId: intLike,
|
|
317
|
+
group_program: intLike,
|
|
318
|
+
type: intLike,
|
|
319
|
+
program: z.looseObject({
|
|
320
|
+
id: intLike,
|
|
321
|
+
program_type: intLike
|
|
322
|
+
}).optional()
|
|
323
|
+
});
|
|
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" });
|
|
312
334
|
//#endregion
|
|
313
335
|
//#region src/workout.ts
|
|
314
336
|
/** A single exercise prescription inside a block. */
|
|
@@ -376,5 +398,10 @@ function parseWorkoutDate(s) {
|
|
|
376
398
|
parts[2]
|
|
377
399
|
];
|
|
378
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
|
+
});
|
|
379
406
|
//#endregion
|
|
380
|
-
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, 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 };
|