@trainheroic-unofficial/js 3.5.0 → 3.5.1
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 +19 -1
- package/dist/index.mjs +75 -7
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1005,6 +1005,12 @@ declare function definedProps<T extends object>(obj: T): { [K in keyof T]: Exclu
|
|
|
1005
1005
|
//#endregion
|
|
1006
1006
|
//#region src/workout-encode.d.ts
|
|
1007
1007
|
type AdvisoryIndex = Pick<ExerciseIndex, "defaultsMany" | "ensureFresh">;
|
|
1008
|
+
type SetSplit = {
|
|
1009
|
+
blockTitle: string;
|
|
1010
|
+
exerciseTitle: string;
|
|
1011
|
+
setCount: number;
|
|
1012
|
+
blockCount: number;
|
|
1013
|
+
};
|
|
1008
1014
|
declare const LEADERBOARD_TYPE: Readonly<Record<string, number>>;
|
|
1009
1015
|
declare const LEADERBOARD_LABEL: Readonly<Record<number, string>>;
|
|
1010
1016
|
type Leaderboard = {
|
|
@@ -1015,6 +1021,16 @@ type Leaderboard = {
|
|
|
1015
1021
|
};
|
|
1016
1022
|
declare function resolveLeaderboard(block: BlockSpec): Leaderboard;
|
|
1017
1023
|
declare function repsList(ex: ExerciseSpec): string[];
|
|
1024
|
+
/** Number of sets that the encoder will write for an exercise. */
|
|
1025
|
+
declare function exerciseSetCount(ex: ExerciseSpec): number;
|
|
1026
|
+
declare function findSetSplits(blocks: readonly BlockSpec[]): SetSplit[];
|
|
1027
|
+
declare function setSplitSummary(blocks: readonly BlockSpec[]): string | null;
|
|
1028
|
+
/**
|
|
1029
|
+
* Split blocks so no encoded exercise exceeds TrainHeroic's ten parameter slots.
|
|
1030
|
+
* Exercises in a superset stay aligned by set range; shorter exercises appear only in
|
|
1031
|
+
* chunks where they still have sets.
|
|
1032
|
+
*/
|
|
1033
|
+
declare function splitOversizedBlocks(blocks: readonly BlockSpec[]): BlockSpec[];
|
|
1018
1034
|
/** Build one saveWorkoutSetExercises payload entry with all ten param slots filled. */
|
|
1019
1035
|
declare function makeExercise(ex: ExerciseSpec, workoutSetId: number, order: number, key: string): Record<string, unknown>;
|
|
1020
1036
|
/** Block `type` values the coach calendar accepts (verified in workout-creation.md). */
|
|
@@ -1046,6 +1062,8 @@ type BuildOptions = {
|
|
|
1046
1062
|
date?: WorkoutDate;
|
|
1047
1063
|
timelineDay?: number;
|
|
1048
1064
|
publish?: boolean;
|
|
1065
|
+
/** Explicitly allow prescriptions above ten sets to become consecutive blocks. */
|
|
1066
|
+
confirmSetSplit?: boolean;
|
|
1049
1067
|
/** Optional session-level note ("Coach Instructions"), set after the blocks save. */
|
|
1050
1068
|
instruction?: string;
|
|
1051
1069
|
};
|
|
@@ -1107,4 +1125,4 @@ declare class ExerciseLibrary implements ExerciseIndex {
|
|
|
1107
1125
|
stats(): Promise<Record<string, unknown>>;
|
|
1108
1126
|
}
|
|
1109
1127
|
//#endregion
|
|
1110
|
-
export { ANALYTICS_METRIC_KEYS, AddedExercise, AnalyticsMetric, AnalyticsQueryArgs, ApiBase, AthleteMainLiftPRs, BLOCK_TYPE_CONDITIONING, BLOCK_TYPE_HYPERTROPHY, BuildOptions, ClientOptions, ClientResult, CoachAthleteCalendar, CoachRosterAthlete, CreatedProgram, DEFAULT_INVITE_MESSAGE, DeletedProgram, ExerciseDefaults, ExerciseIndex, ExerciseLibrary, type ExerciseSetInput, type ExerciseSetPayload, LEADERBOARD_LABEL, LEADERBOARD_TYPE, Leaderboard, LibraryCache, LibrarySnapshot, LogSessionResult, LogSetTarget, LoginOptions, MAIN_LIFT_FAMILIES, MAX_PARAM_SLOTS, MainLiftFamily, MainLiftFamilyKey, MainLiftPR, MainLiftResolution, MemoryLibraryCache, PARAM_NONE, PARAM_PCT_MAX, PARAM_REPS, PARAM_RPE, PARAM_UNIT, PARAM_WEIGHT, PROGRAM_KINDS, PersonalWorkoutCreated, ProgramKind, RequestOptions, ResolvedLift, SESSION_TEMPLATES_LIST_PATH, ScheduledAlternative, SerializedExport, SessionExercise, SetResult, type SetWriteMode, SwapExerciseResult, TeamPublishTarget, TrainHeroicAuthError, TrainHeroicClient, TrainHeroicHttpError, type TrainHeroicHttpErrorHandler, TrainHeroicSession, WorkoutExportFormat, addExercisesToWorkout, analyticsMetricCatalog, asExerciseList, buildBlockPayload, buildCommentPayload, buildExerciseSetPayload, buildSearchText, buildSession, buildSetCompletePayload, calendarWriteError, checkResponse, chunk, classifyMainLift, coerceInt, coerceNum, collectAdvisories, copySession, createPersonalWorkout, createProgram, createSessionTemplate, dateWindows, defaultBlockType, definedProps, deleteComment, deleteProgram, exerciseTitle, exerciseUnits, fetchAthleteCircuits, fetchAthleteMainLiftPRs, fetchAthletePrefs, fetchAthleteProfileSummary, fetchAthleteProgrammingPrograms, fetchAthleteUser, fetchAthleteWorkouts, fetchAthleteWorkoutsChunked, fetchCoachAthleteCalendar, fetchCoachAthleteCalendarSummary, fetchCoachAthleteWorkouts, fetchCoachRoster, fetchExerciseHistoryDetail, fetchExerciseHistoryList, fetchExerciseStats, fetchLeaderboard, fetchPersonalRecords, fetchRecentExercises, fetchRosterActivity, fetchRosterMainLiftPRs, fetchStreams, fetchTeamAthleteIds, fetchWorkingMaxes, findSavedWorkoutSet, inviteAthletes, isPersonalSession, isRecord, logAdHocSession, logAthleteSet, logForAthlete, logSessionForAthlete, loginTrainHeroic, makeExercise, mapPool, mergeWorkoutsById, prescribeAthleteSet, prescribeForAthlete, presentAthleteWorkout, presentAthleteWorkoutExport, presentAthleteWorkouts, presentAthleteWorkoutsExport, presentCoachAthleteTraining, presentExercise, presentExerciseHistory, presentLogTargets, programWorkoutOnDate, publishSession, queryAnalytics, rankSearch, readLive, readSession, removePersonalWorkout, removeSession, repsList, resolveAthleteMainLifts, resolveAthleteUserId, resolveBuildProgramId, resolveLeaderboard, savedWorkoutOf, searchExerciseHistory, selectWorkouts, selectWorkoutsByProgram, sendComment, serializeWorkoutHistory, setAthleteExerciseNote, setAthleteWorkoutNote, setSessionInstruction, sortRosterByRecency, str, summarizeAthleteWorkouts, swapAthleteExercise, teamPublishTarget, teamVolume, toSetResults, unitAdvisory, unitLabel, unwrapEnvelope, updateTeam, updateTeamPublishSettings, withUnits, workoutsToCsv, workoutsToJson, workoutsToText };
|
|
1128
|
+
export { ANALYTICS_METRIC_KEYS, AddedExercise, AnalyticsMetric, AnalyticsQueryArgs, ApiBase, AthleteMainLiftPRs, BLOCK_TYPE_CONDITIONING, BLOCK_TYPE_HYPERTROPHY, BuildOptions, ClientOptions, ClientResult, CoachAthleteCalendar, CoachRosterAthlete, CreatedProgram, DEFAULT_INVITE_MESSAGE, DeletedProgram, ExerciseDefaults, ExerciseIndex, ExerciseLibrary, type ExerciseSetInput, type ExerciseSetPayload, LEADERBOARD_LABEL, LEADERBOARD_TYPE, Leaderboard, LibraryCache, LibrarySnapshot, LogSessionResult, LogSetTarget, LoginOptions, MAIN_LIFT_FAMILIES, MAX_PARAM_SLOTS, MainLiftFamily, MainLiftFamilyKey, MainLiftPR, MainLiftResolution, MemoryLibraryCache, PARAM_NONE, PARAM_PCT_MAX, PARAM_REPS, PARAM_RPE, PARAM_UNIT, PARAM_WEIGHT, PROGRAM_KINDS, PersonalWorkoutCreated, ProgramKind, RequestOptions, ResolvedLift, SESSION_TEMPLATES_LIST_PATH, ScheduledAlternative, SerializedExport, SessionExercise, SetResult, SetSplit, type SetWriteMode, SwapExerciseResult, TeamPublishTarget, TrainHeroicAuthError, TrainHeroicClient, TrainHeroicHttpError, type TrainHeroicHttpErrorHandler, TrainHeroicSession, WorkoutExportFormat, addExercisesToWorkout, analyticsMetricCatalog, asExerciseList, buildBlockPayload, buildCommentPayload, buildExerciseSetPayload, buildSearchText, buildSession, buildSetCompletePayload, calendarWriteError, checkResponse, chunk, classifyMainLift, coerceInt, coerceNum, collectAdvisories, copySession, createPersonalWorkout, createProgram, createSessionTemplate, dateWindows, defaultBlockType, definedProps, deleteComment, deleteProgram, exerciseSetCount, exerciseTitle, exerciseUnits, fetchAthleteCircuits, fetchAthleteMainLiftPRs, fetchAthletePrefs, fetchAthleteProfileSummary, fetchAthleteProgrammingPrograms, fetchAthleteUser, fetchAthleteWorkouts, fetchAthleteWorkoutsChunked, fetchCoachAthleteCalendar, fetchCoachAthleteCalendarSummary, fetchCoachAthleteWorkouts, fetchCoachRoster, fetchExerciseHistoryDetail, fetchExerciseHistoryList, fetchExerciseStats, fetchLeaderboard, fetchPersonalRecords, fetchRecentExercises, fetchRosterActivity, fetchRosterMainLiftPRs, fetchStreams, fetchTeamAthleteIds, fetchWorkingMaxes, findSavedWorkoutSet, findSetSplits, inviteAthletes, isPersonalSession, isRecord, logAdHocSession, logAthleteSet, logForAthlete, logSessionForAthlete, loginTrainHeroic, makeExercise, mapPool, mergeWorkoutsById, prescribeAthleteSet, prescribeForAthlete, presentAthleteWorkout, presentAthleteWorkoutExport, presentAthleteWorkouts, presentAthleteWorkoutsExport, presentCoachAthleteTraining, presentExercise, presentExerciseHistory, presentLogTargets, programWorkoutOnDate, publishSession, queryAnalytics, rankSearch, readLive, readSession, removePersonalWorkout, removeSession, repsList, resolveAthleteMainLifts, resolveAthleteUserId, resolveBuildProgramId, resolveLeaderboard, savedWorkoutOf, searchExerciseHistory, selectWorkouts, selectWorkoutsByProgram, sendComment, serializeWorkoutHistory, setAthleteExerciseNote, setAthleteWorkoutNote, setSessionInstruction, setSplitSummary, sortRosterByRecency, splitOversizedBlocks, str, summarizeAthleteWorkouts, swapAthleteExercise, teamPublishTarget, teamVolume, toSetResults, unitAdvisory, unitLabel, unwrapEnvelope, updateTeam, updateTeamPublishSettings, withUnits, workoutsToCsv, workoutsToJson, workoutsToText };
|
package/dist/index.mjs
CHANGED
|
@@ -2062,9 +2062,75 @@ function repsList(ex) {
|
|
|
2062
2062
|
const reps = ex.reps;
|
|
2063
2063
|
if (Array.isArray(reps)) return reps.map((r) => String(r));
|
|
2064
2064
|
if (reps === void 0 || reps === null) return [];
|
|
2065
|
-
const sets = Math.max(1, Math.trunc(Number(ex.sets ?? 1)) || 1);
|
|
2065
|
+
const sets = Array.isArray(ex.weight) ? ex.weight.length : Math.max(1, Math.trunc(Number(ex.sets ?? 1)) || 1);
|
|
2066
2066
|
return Array.from({ length: sets }, () => String(reps));
|
|
2067
2067
|
}
|
|
2068
|
+
/** Number of sets that the encoder will write for an exercise. */
|
|
2069
|
+
function exerciseSetCount(ex) {
|
|
2070
|
+
if (Array.isArray(ex.reps) && ex.reps.length > 0) return ex.reps.length;
|
|
2071
|
+
if (Array.isArray(ex.weight)) return ex.weight.length;
|
|
2072
|
+
if (!Array.isArray(ex.reps) && ex.reps !== void 0 && ex.reps !== null || ex.weight !== void 0 && ex.weight !== null) return Math.max(1, Math.trunc(Number(ex.sets ?? 1)) || 1);
|
|
2073
|
+
return 0;
|
|
2074
|
+
}
|
|
2075
|
+
function findSetSplits(blocks) {
|
|
2076
|
+
return blocks.flatMap((block) => block.exercises.flatMap((exercise) => {
|
|
2077
|
+
const setCount = exerciseSetCount(exercise);
|
|
2078
|
+
if (setCount <= 10) return [];
|
|
2079
|
+
return [{
|
|
2080
|
+
blockTitle: block.title,
|
|
2081
|
+
exerciseTitle: exercise.title ?? String(exercise.id),
|
|
2082
|
+
setCount,
|
|
2083
|
+
blockCount: Math.ceil(setCount / 10)
|
|
2084
|
+
}];
|
|
2085
|
+
}));
|
|
2086
|
+
}
|
|
2087
|
+
function setSplitSummary(blocks) {
|
|
2088
|
+
const splits = findSetSplits(blocks);
|
|
2089
|
+
if (splits.length === 0) return null;
|
|
2090
|
+
return `TrainHeroic supports at most 10 sets per exercise block. The following will be split into consecutive same-titled blocks: ${splits.map(({ blockTitle, exerciseTitle, setCount, blockCount }) => `${blockTitle} / ${exerciseTitle}: ${setCount} sets into ${blockCount} blocks`).join("; ")}.`;
|
|
2091
|
+
}
|
|
2092
|
+
function sliceExercise(exercise, setCount, start) {
|
|
2093
|
+
if (start > 0 && setCount <= start) return null;
|
|
2094
|
+
const chunkCount = setCount === 0 ? 0 : Math.min(10, Math.max(0, setCount - start));
|
|
2095
|
+
const chunk = { ...exercise };
|
|
2096
|
+
const hasPerSetReps = Array.isArray(exercise.reps) && exercise.reps.length > 0;
|
|
2097
|
+
const hasScalarReps = !Array.isArray(exercise.reps) && exercise.reps !== void 0 && exercise.reps !== null;
|
|
2098
|
+
if (Array.isArray(exercise.reps) && exercise.reps.length > 0) {
|
|
2099
|
+
chunk.reps = exercise.reps.slice(start, start + 10);
|
|
2100
|
+
delete chunk.sets;
|
|
2101
|
+
} else if (hasScalarReps) chunk.sets = chunkCount;
|
|
2102
|
+
if (Array.isArray(exercise.weight)) {
|
|
2103
|
+
chunk.weight = exercise.weight.slice(start, start + 10);
|
|
2104
|
+
if (!hasPerSetReps && !hasScalarReps) delete chunk.sets;
|
|
2105
|
+
} else if (!hasPerSetReps && exercise.weight !== void 0 && exercise.weight !== null) chunk.sets = chunkCount;
|
|
2106
|
+
return chunk;
|
|
2107
|
+
}
|
|
2108
|
+
/**
|
|
2109
|
+
* Split blocks so no encoded exercise exceeds TrainHeroic's ten parameter slots.
|
|
2110
|
+
* Exercises in a superset stay aligned by set range; shorter exercises appear only in
|
|
2111
|
+
* chunks where they still have sets.
|
|
2112
|
+
*/
|
|
2113
|
+
function splitOversizedBlocks(blocks) {
|
|
2114
|
+
return blocks.flatMap((block) => {
|
|
2115
|
+
const setCounts = block.exercises.map(exerciseSetCount);
|
|
2116
|
+
const largestSetCount = Math.max(0, ...setCounts);
|
|
2117
|
+
const chunkCount = Math.max(1, Math.ceil(largestSetCount / 10));
|
|
2118
|
+
if (chunkCount === 1) return [block];
|
|
2119
|
+
return Array.from({ length: chunkCount }, (_, index) => {
|
|
2120
|
+
const start = index * 10;
|
|
2121
|
+
const exercises = block.exercises.map((exercise, exerciseIndex) => sliceExercise(exercise, setCounts[exerciseIndex] ?? 0, start)).filter((exercise) => exercise !== null);
|
|
2122
|
+
if (index === 0) return {
|
|
2123
|
+
...block,
|
|
2124
|
+
exercises
|
|
2125
|
+
};
|
|
2126
|
+
return {
|
|
2127
|
+
title: block.title,
|
|
2128
|
+
...block.type === void 0 ? {} : { type: block.type },
|
|
2129
|
+
exercises
|
|
2130
|
+
};
|
|
2131
|
+
});
|
|
2132
|
+
});
|
|
2133
|
+
}
|
|
2068
2134
|
/** Build one saveWorkoutSetExercises payload entry with all ten param slots filled. */
|
|
2069
2135
|
function makeExercise(ex, workoutSetId, order, key) {
|
|
2070
2136
|
const reps = repsList(ex);
|
|
@@ -2072,8 +2138,7 @@ function makeExercise(ex, workoutSetId, order, key) {
|
|
|
2072
2138
|
if (instruction === "" && ex.rpe !== void 0 && ex.rpe !== null) instruction = `RPE ${ex.rpe}`;
|
|
2073
2139
|
const hasWeight = ex.weight !== void 0 && ex.weight !== null;
|
|
2074
2140
|
const weightArr = Array.isArray(ex.weight) ? ex.weight : null;
|
|
2075
|
-
|
|
2076
|
-
if (count === 0 && hasWeight) count = weightArr ? weightArr.length : Math.max(1, Math.trunc(Number(ex.sets ?? 1)) || 1);
|
|
2141
|
+
const count = exerciseSetCount(ex);
|
|
2077
2142
|
let param2Type;
|
|
2078
2143
|
let param2Values;
|
|
2079
2144
|
if (hasWeight) {
|
|
@@ -2104,8 +2169,8 @@ function makeExercise(ex, workoutSetId, order, key) {
|
|
|
2104
2169
|
eType: "e",
|
|
2105
2170
|
use_count: 0
|
|
2106
2171
|
};
|
|
2107
|
-
const p1 = slots(reps);
|
|
2108
|
-
const p2 = slots(param2Values);
|
|
2172
|
+
const p1 = slots(reps, 10);
|
|
2173
|
+
const p2 = slots(param2Values, 10);
|
|
2109
2174
|
for (let i = 0; i < 10; i += 1) {
|
|
2110
2175
|
entry[`param_1_data_${i + 1}`] = p1[i] ?? "";
|
|
2111
2176
|
entry[`param_2_data_${i + 1}`] = p2[i] ?? "";
|
|
@@ -2226,7 +2291,10 @@ function createPath(opts) {
|
|
|
2226
2291
|
return `/2.0/coach/calendar/workout/createWorkoutForDay/${opts.programId}/${y}/${m}/${d}/0`;
|
|
2227
2292
|
}
|
|
2228
2293
|
async function buildSession(client, opts) {
|
|
2229
|
-
const
|
|
2294
|
+
const validatedBlocks = z.array(blockSpecSchema).parse(opts.blocks);
|
|
2295
|
+
const splitSummary = setSplitSummary(validatedBlocks);
|
|
2296
|
+
if (splitSummary !== null && opts.confirmSetSplit !== true) throw new Error(`${splitSummary} Set confirmSetSplit:true to allow this change.`);
|
|
2297
|
+
const blocks = splitSummary === null ? validatedBlocks : splitOversizedBlocks(validatedBlocks);
|
|
2230
2298
|
const sess = await req(client, "POST", createPath(opts), {});
|
|
2231
2299
|
checkResponse(sessionCreateResponseSchema, sess, "session create");
|
|
2232
2300
|
const workoutId = Number(sess.workout_id);
|
|
@@ -3273,4 +3341,4 @@ var ExerciseLibrary = class {
|
|
|
3273
3341
|
}
|
|
3274
3342
|
};
|
|
3275
3343
|
//#endregion
|
|
3276
|
-
export { ANALYTICS_METRIC_KEYS, BLOCK_TYPE_CONDITIONING, BLOCK_TYPE_HYPERTROPHY, DEFAULT_INVITE_MESSAGE, ExerciseLibrary, LEADERBOARD_LABEL, LEADERBOARD_TYPE, MAIN_LIFT_FAMILIES, MAX_PARAM_SLOTS, MemoryLibraryCache, PARAM_NONE, PARAM_PCT_MAX, PARAM_REPS, PARAM_RPE, PARAM_UNIT, PARAM_WEIGHT, PROGRAM_KINDS, SESSION_TEMPLATES_LIST_PATH, TrainHeroicAuthError, TrainHeroicClient, TrainHeroicHttpError, addExercisesToWorkout, analyticsMetricCatalog, asExerciseList, buildBlockPayload, buildCommentPayload, buildExerciseSetPayload, buildSearchText, buildSession, buildSetCompletePayload, calendarWriteError, checkResponse, chunk, classifyMainLift, coerceInt, coerceNum, collectAdvisories, copySession, createPersonalWorkout, createProgram, createSessionTemplate, dateWindows, defaultBlockType, definedProps, deleteComment, deleteProgram, exerciseTitle, exerciseUnits, fetchAthleteCircuits, fetchAthleteMainLiftPRs, fetchAthletePrefs, fetchAthleteProfileSummary, fetchAthleteProgrammingPrograms, fetchAthleteUser, fetchAthleteWorkouts, fetchAthleteWorkoutsChunked, fetchCoachAthleteCalendar, fetchCoachAthleteCalendarSummary, fetchCoachAthleteWorkouts, fetchCoachRoster, fetchExerciseHistoryDetail, fetchExerciseHistoryList, fetchExerciseStats, fetchLeaderboard, fetchPersonalRecords, fetchRecentExercises, fetchRosterActivity, fetchRosterMainLiftPRs, fetchStreams, fetchTeamAthleteIds, fetchWorkingMaxes, findSavedWorkoutSet, inviteAthletes, isPersonalSession, isRecord, logAdHocSession, logAthleteSet, logForAthlete, logSessionForAthlete, loginTrainHeroic, makeExercise, mapPool, mergeWorkoutsById, prescribeAthleteSet, prescribeForAthlete, presentAthleteWorkout, presentAthleteWorkoutExport, presentAthleteWorkouts, presentAthleteWorkoutsExport, presentCoachAthleteTraining, presentExercise, presentExerciseHistory, presentLogTargets, programWorkoutOnDate, publishSession, queryAnalytics, rankSearch, readLive, readSession, removePersonalWorkout, removeSession, repsList, resolveAthleteMainLifts, resolveAthleteUserId, resolveBuildProgramId, resolveLeaderboard, savedWorkoutOf, searchExerciseHistory, selectWorkouts, selectWorkoutsByProgram, sendComment, serializeWorkoutHistory, setAthleteExerciseNote, setAthleteWorkoutNote, setSessionInstruction, sortRosterByRecency, str, summarizeAthleteWorkouts, swapAthleteExercise, teamPublishTarget, teamVolume, toSetResults, unitAdvisory, unitLabel, unwrapEnvelope, updateTeam, updateTeamPublishSettings, withUnits, workoutsToCsv, workoutsToJson, workoutsToText };
|
|
3344
|
+
export { ANALYTICS_METRIC_KEYS, BLOCK_TYPE_CONDITIONING, BLOCK_TYPE_HYPERTROPHY, DEFAULT_INVITE_MESSAGE, ExerciseLibrary, LEADERBOARD_LABEL, LEADERBOARD_TYPE, MAIN_LIFT_FAMILIES, MAX_PARAM_SLOTS, MemoryLibraryCache, PARAM_NONE, PARAM_PCT_MAX, PARAM_REPS, PARAM_RPE, PARAM_UNIT, PARAM_WEIGHT, PROGRAM_KINDS, SESSION_TEMPLATES_LIST_PATH, TrainHeroicAuthError, TrainHeroicClient, TrainHeroicHttpError, addExercisesToWorkout, analyticsMetricCatalog, asExerciseList, buildBlockPayload, buildCommentPayload, buildExerciseSetPayload, buildSearchText, buildSession, buildSetCompletePayload, calendarWriteError, checkResponse, chunk, classifyMainLift, coerceInt, coerceNum, collectAdvisories, copySession, createPersonalWorkout, createProgram, createSessionTemplate, dateWindows, defaultBlockType, definedProps, deleteComment, deleteProgram, exerciseSetCount, exerciseTitle, exerciseUnits, fetchAthleteCircuits, fetchAthleteMainLiftPRs, fetchAthletePrefs, fetchAthleteProfileSummary, fetchAthleteProgrammingPrograms, fetchAthleteUser, fetchAthleteWorkouts, fetchAthleteWorkoutsChunked, fetchCoachAthleteCalendar, fetchCoachAthleteCalendarSummary, fetchCoachAthleteWorkouts, fetchCoachRoster, fetchExerciseHistoryDetail, fetchExerciseHistoryList, fetchExerciseStats, fetchLeaderboard, fetchPersonalRecords, fetchRecentExercises, fetchRosterActivity, fetchRosterMainLiftPRs, fetchStreams, fetchTeamAthleteIds, fetchWorkingMaxes, findSavedWorkoutSet, findSetSplits, inviteAthletes, isPersonalSession, isRecord, logAdHocSession, logAthleteSet, logForAthlete, logSessionForAthlete, loginTrainHeroic, makeExercise, mapPool, mergeWorkoutsById, prescribeAthleteSet, prescribeForAthlete, presentAthleteWorkout, presentAthleteWorkoutExport, presentAthleteWorkouts, presentAthleteWorkoutsExport, presentCoachAthleteTraining, presentExercise, presentExerciseHistory, presentLogTargets, programWorkoutOnDate, publishSession, queryAnalytics, rankSearch, readLive, readSession, removePersonalWorkout, removeSession, repsList, resolveAthleteMainLifts, resolveAthleteUserId, resolveBuildProgramId, resolveLeaderboard, savedWorkoutOf, searchExerciseHistory, selectWorkouts, selectWorkoutsByProgram, sendComment, serializeWorkoutHistory, setAthleteExerciseNote, setAthleteWorkoutNote, setSessionInstruction, setSplitSummary, sortRosterByRecency, splitOversizedBlocks, str, summarizeAthleteWorkouts, swapAthleteExercise, teamPublishTarget, teamVolume, toSetResults, unitAdvisory, unitLabel, unwrapEnvelope, updateTeam, updateTeamPublishSettings, withUnits, workoutsToCsv, workoutsToJson, workoutsToText };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trainheroic-unofficial/js",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"zod": "^4.4.3",
|
|
30
|
-
"@trainheroic-unofficial/dto": "3.5.
|
|
30
|
+
"@trainheroic-unofficial/dto": "3.5.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^26.3.0",
|