@trainheroic-unofficial/dto 0.6.3 → 0.6.5
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 +31 -1
- package/dist/index.mjs +6 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -237,6 +237,23 @@ declare const logSetArgsSchema: z.ZodObject<{
|
|
|
237
237
|
}, z.core.$strip>>;
|
|
238
238
|
}, z.core.$strip>;
|
|
239
239
|
type LogSetArgs = z.infer<typeof logSetArgsSchema>;
|
|
240
|
+
/**
|
|
241
|
+
* Args for the coach "log for athlete" write — the same shape as logSetArgsSchema plus the
|
|
242
|
+
* roster `athleteId` whose set is being logged on their behalf.
|
|
243
|
+
*/
|
|
244
|
+
declare const coachLogSetArgsSchema: z.ZodObject<{
|
|
245
|
+
date: z.ZodString;
|
|
246
|
+
savedWorkoutSetId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
247
|
+
results: z.ZodArray<z.ZodObject<{
|
|
248
|
+
savedWorkoutSetExerciseId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
249
|
+
sets: z.ZodArray<z.ZodObject<{
|
|
250
|
+
param1: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
251
|
+
param2: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
252
|
+
}, z.core.$strip>>;
|
|
253
|
+
}, z.core.$strip>>;
|
|
254
|
+
athleteId: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
255
|
+
}, z.core.$strip>;
|
|
256
|
+
type CoachLogSetArgs = z.infer<typeof coachLogSetArgsSchema>;
|
|
240
257
|
/** A flattened exercise within a presented workout: prescriptions, logged results, units. */
|
|
241
258
|
type AthleteWorkoutExercise = {
|
|
242
259
|
exerciseId: number | null;
|
|
@@ -329,6 +346,19 @@ type CoachAthleteTraining = {
|
|
|
329
346
|
month: number;
|
|
330
347
|
sessions: CoachAthleteSession[];
|
|
331
348
|
};
|
|
349
|
+
/**
|
|
350
|
+
* One athlete's all-time training snapshot in a coach's roster-activity ranking. `lastLoggedDate`
|
|
351
|
+
* is the real training-recency signal (null means the athlete has never logged a session),
|
|
352
|
+
* distinct from `list_athletes`'s `daysSinceLastLogin`, which is app-login recency.
|
|
353
|
+
*/
|
|
354
|
+
type RosterActivityRow = {
|
|
355
|
+
athleteId: number;
|
|
356
|
+
sessionsCount: number | null;
|
|
357
|
+
firstLoggedDate: string | null;
|
|
358
|
+
lastLoggedDate: string | null;
|
|
359
|
+
totalReps: number | null;
|
|
360
|
+
totalVolume: number | null;
|
|
361
|
+
};
|
|
332
362
|
/** One performed session in a presented exercise history. */
|
|
333
363
|
type PresentedExerciseSession = {
|
|
334
364
|
date: string;
|
|
@@ -548,4 +578,4 @@ type ReadResult = {
|
|
|
548
578
|
blocks: ReadBlock[];
|
|
549
579
|
};
|
|
550
580
|
//#endregion
|
|
551
|
-
export { Advisory, AthletePrefs, AthleteProfileSummary, AthleteUser, AthleteWorkingMax, AthleteWorkoutBlock, AthleteWorkoutExercise, AthleteWorkoutRangeArgs, AthleteWorkoutSummary, AthleteWorkoutView, BlockSpec, CoachAthleteExercise, CoachAthleteSession, CoachAthleteTraining, CommentDraft, ExerciseCreate, ExerciseHistoryDetail, ExerciseHistoryListItem, ExerciseRow, ExerciseSpec, ExerciseStats, ExerciseView, Id, LeaderboardSpec, LogSetArgs, PersonalRecord, PresentedExerciseHistory, PresentedExerciseSession, ProgramWorkout, ReadBlock, ReadExercise, ReadResult, ResolveResult, UserSimple, WorkoutDate, WorkoutSpec, athletePrefsSchema, athleteProfileSummarySchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutRangeArgsSchema, blockSpecSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseLibraryResponseSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSetArgsSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, userSimpleSchema, workoutSpecSchema };
|
|
581
|
+
export { Advisory, AthletePrefs, AthleteProfileSummary, AthleteUser, AthleteWorkingMax, AthleteWorkoutBlock, AthleteWorkoutExercise, AthleteWorkoutRangeArgs, AthleteWorkoutSummary, AthleteWorkoutView, BlockSpec, CoachAthleteExercise, CoachAthleteSession, CoachAthleteTraining, CoachLogSetArgs, CommentDraft, ExerciseCreate, ExerciseHistoryDetail, ExerciseHistoryListItem, ExerciseRow, ExerciseSpec, ExerciseStats, ExerciseView, Id, LeaderboardSpec, LogSetArgs, PersonalRecord, PresentedExerciseHistory, PresentedExerciseSession, ProgramWorkout, ReadBlock, ReadExercise, ReadResult, ResolveResult, RosterActivityRow, UserSimple, WorkoutDate, WorkoutSpec, athletePrefsSchema, athleteProfileSummarySchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutRangeArgsSchema, blockSpecSchema, coachLogSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseLibraryResponseSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSetArgsSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, userSimpleSchema, workoutSpecSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -171,6 +171,11 @@ const logSetArgsSchema = z.object({
|
|
|
171
171
|
})).min(1)
|
|
172
172
|
})).min(1)
|
|
173
173
|
});
|
|
174
|
+
/**
|
|
175
|
+
* Args for the coach "log for athlete" write — the same shape as logSetArgsSchema plus the
|
|
176
|
+
* roster `athleteId` whose set is being logged on their behalf.
|
|
177
|
+
*/
|
|
178
|
+
const coachLogSetArgsSchema = logSetArgsSchema.extend({ athleteId: idArgSchema });
|
|
174
179
|
//#endregion
|
|
175
180
|
//#region src/exercise.ts
|
|
176
181
|
/** Body for creating a custom exercise; extra fields the API accepts are preserved. */
|
|
@@ -273,4 +278,4 @@ function parseWorkoutDate(s) {
|
|
|
273
278
|
];
|
|
274
279
|
}
|
|
275
280
|
//#endregion
|
|
276
|
-
export { athletePrefsSchema, athleteProfileSummarySchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutRangeArgsSchema, blockSpecSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseLibraryResponseSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSetArgsSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, userSimpleSchema, workoutSpecSchema };
|
|
281
|
+
export { athletePrefsSchema, athleteProfileSummarySchema, athleteUserSchema, athleteWorkingMaxListSchema, athleteWorkingMaxSchema, athleteWorkoutRangeArgsSchema, blockSpecSchema, coachLogSetArgsSchema, commentDraftSchema, dateString, exerciseCreateSchema, exerciseHistoryDetailSchema, exerciseHistoryListItemSchema, exerciseHistoryListSchema, exerciseLibraryResponseSchema, exerciseResponseSchema, exerciseSpecSchema, exerciseStatsSchema, historyEntrySchema, historySetSchema, idArgSchema, idSchema, leaderboardSpecSchema, liftPRSchema, logSetArgsSchema, parseWorkoutDate, personalRecordListSchema, personalRecordSchema, programWorkoutListSchema, programWorkoutResponseSchema, programWorkoutSchema, programsEditResponseSchema, repMaxSchema, sessionCreateResponseSchema, userSimpleSchema, workoutSpecSchema };
|