@trainheroic-unofficial/js 3.0.0 → 3.1.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 +18 -2
- package/dist/index.mjs +37 -36
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -480,6 +480,22 @@ declare function logAthleteSet(client: TrainHeroicClient, args: {
|
|
|
480
480
|
exercisesLogged: number;
|
|
481
481
|
setCompleted: boolean;
|
|
482
482
|
}>;
|
|
483
|
+
/**
|
|
484
|
+
* Set the logged-in athlete's prescribed reps/weight for one saved workout set WITHOUT marking it
|
|
485
|
+
* performed. This is the athlete-side equivalent of editing target values in the app: it writes
|
|
486
|
+
* `param_N_data_M` with every made/completed flag cleared and skips the set-completion PUT.
|
|
487
|
+
*
|
|
488
|
+
* The write replaces the selected exercise's whole prescription, so callers must pass every set
|
|
489
|
+
* they want to keep. An omitted param is cleared rather than preserved.
|
|
490
|
+
*/
|
|
491
|
+
declare function prescribeAthleteSet(client: TrainHeroicClient, args: {
|
|
492
|
+
date: string;
|
|
493
|
+
savedWorkoutSetId: number;
|
|
494
|
+
results: readonly SetResult[];
|
|
495
|
+
}): Promise<{
|
|
496
|
+
savedWorkoutSetId: number;
|
|
497
|
+
exercisesPrescribed: number;
|
|
498
|
+
}>;
|
|
483
499
|
/**
|
|
484
500
|
* Coach "Log for Athlete": record set results for a roster athlete on their behalf, via the
|
|
485
501
|
* coach surface — `PUT /1.0/coach/savedworkoutsetexercise/{id}/{athleteId}` (the data write)
|
|
@@ -958,7 +974,7 @@ declare function fetchStreams(client: TrainHeroicClient): Promise<Array<{
|
|
|
958
974
|
declare function buildCommentPayload(streamId: number, text: string, replyTo?: number | null): Record<string, unknown>;
|
|
959
975
|
declare function sendComment(client: TrainHeroicClient, streamId: number, text: string, replyTo?: number | null): Promise<Record<string, unknown>>;
|
|
960
976
|
declare function deleteComment(client: TrainHeroicClient, streamId: number, commentId: number): Promise<unknown>;
|
|
961
|
-
declare function readLive(client: TrainHeroicClient, streamId: number, limit?: number): Promise<unknown[]>;
|
|
977
|
+
declare function readLive(client: TrainHeroicClient, streamId: number, limit?: number, afterCommentId?: number): Promise<unknown[]>;
|
|
962
978
|
//#endregion
|
|
963
979
|
//#region src/exercise-index.d.ts
|
|
964
980
|
/**
|
|
@@ -980,4 +996,4 @@ declare class ExerciseLibrary implements ExerciseIndex {
|
|
|
980
996
|
stats(): Promise<Record<string, unknown>>;
|
|
981
997
|
}
|
|
982
998
|
//#endregion
|
|
983
|
-
export { ANALYTICS_METRIC_KEYS, AddedExercise, AnalyticsMetric, AnalyticsQueryArgs, ApiBase, AthleteMainLiftPRs, BLOCK_TYPE_CONDITIONING, BLOCK_TYPE_HYPERTROPHY, BuildOptions, ClientOptions, ClientResult, CoachAthleteCalendar, CoachRosterAthlete, DEFAULT_INVITE_MESSAGE, 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, PersonalWorkoutCreated, RequestOptions, ResolvedLift, ScheduledAlternative, SerializedExport, SessionExercise, SetResult, type SetWriteMode, SwapExerciseResult, 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, dateWindows, defaultBlockType, definedProps, deleteComment, exerciseTitle, exerciseUnits, fetchAthleteMainLiftPRs, fetchAthletePrefs, fetchAthleteProfileSummary, fetchAthleteUser, fetchAthleteWorkouts, fetchAthleteWorkoutsChunked, fetchCoachAthleteCalendar, fetchCoachAthleteCalendarSummary, fetchCoachAthleteWorkouts, fetchCoachRoster, fetchExerciseHistoryDetail, fetchExerciseHistoryList, fetchExerciseStats, fetchLeaderboard, fetchPersonalRecords, fetchRosterActivity, fetchRosterMainLiftPRs, fetchStreams, fetchTeamAthleteIds, fetchWorkingMaxes, findSavedWorkoutSet, inviteAthletes, isPersonalSession, isRecord, logAdHocSession, logAthleteSet, logForAthlete, logSessionForAthlete, loginTrainHeroic, makeExercise, mapPool, mergeWorkoutsById, prescribeForAthlete, presentAthleteWorkout, presentAthleteWorkoutExport, presentAthleteWorkouts, presentAthleteWorkoutsExport, presentCoachAthleteTraining, presentExercise, presentExerciseHistory, presentLogTargets, publishSession, queryAnalytics, rankSearch, readLive, readSession, removePersonalWorkout, removeSession, repsList, resolveAthleteMainLifts, resolveAthleteUserId, resolveBuildProgramId, resolveLeaderboard, searchExerciseHistory, selectWorkouts, selectWorkoutsByProgram, sendComment, serializeWorkoutHistory, setSessionInstruction, sortRosterByRecency, str, summarizeAthleteWorkouts, swapAthleteExercise, teamVolume, toSetResults, unitAdvisory, unitLabel, unwrapEnvelope, updateTeam, withUnits, workoutsToCsv, workoutsToJson, workoutsToText };
|
|
999
|
+
export { ANALYTICS_METRIC_KEYS, AddedExercise, AnalyticsMetric, AnalyticsQueryArgs, ApiBase, AthleteMainLiftPRs, BLOCK_TYPE_CONDITIONING, BLOCK_TYPE_HYPERTROPHY, BuildOptions, ClientOptions, ClientResult, CoachAthleteCalendar, CoachRosterAthlete, DEFAULT_INVITE_MESSAGE, 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, PersonalWorkoutCreated, RequestOptions, ResolvedLift, ScheduledAlternative, SerializedExport, SessionExercise, SetResult, type SetWriteMode, SwapExerciseResult, 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, dateWindows, defaultBlockType, definedProps, deleteComment, exerciseTitle, exerciseUnits, fetchAthleteMainLiftPRs, fetchAthletePrefs, fetchAthleteProfileSummary, fetchAthleteUser, fetchAthleteWorkouts, fetchAthleteWorkoutsChunked, fetchCoachAthleteCalendar, fetchCoachAthleteCalendarSummary, fetchCoachAthleteWorkouts, fetchCoachRoster, fetchExerciseHistoryDetail, fetchExerciseHistoryList, fetchExerciseStats, fetchLeaderboard, fetchPersonalRecords, 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, publishSession, queryAnalytics, rankSearch, readLive, readSession, removePersonalWorkout, removeSession, repsList, resolveAthleteMainLifts, resolveAthleteUserId, resolveBuildProgramId, resolveLeaderboard, searchExerciseHistory, selectWorkouts, selectWorkoutsByProgram, sendComment, serializeWorkoutHistory, setSessionInstruction, sortRosterByRecency, str, summarizeAthleteWorkouts, swapAthleteExercise, teamVolume, toSetResults, unitAdvisory, unitLabel, unwrapEnvelope, updateTeam, withUnits, workoutsToCsv, workoutsToJson, workoutsToText };
|
package/dist/index.mjs
CHANGED
|
@@ -439,8 +439,9 @@ function sortRosterByRecency(rows) {
|
|
|
439
439
|
async function fetchRosterActivity(client, athleteIds, useMetric = false) {
|
|
440
440
|
const rows = [];
|
|
441
441
|
const concurrency = 6;
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
const uniqueAthleteIds = [...new Set(athleteIds)];
|
|
443
|
+
for (let i = 0; i < uniqueAthleteIds.length; i += concurrency) {
|
|
444
|
+
const chunk = uniqueAthleteIds.slice(i, i + concurrency);
|
|
444
445
|
const settled = await Promise.all(chunk.map(async (id) => {
|
|
445
446
|
try {
|
|
446
447
|
return {
|
|
@@ -1300,6 +1301,21 @@ async function logAthleteSet(client, args) {
|
|
|
1300
1301
|
};
|
|
1301
1302
|
}
|
|
1302
1303
|
/**
|
|
1304
|
+
* Set the logged-in athlete's prescribed reps/weight for one saved workout set WITHOUT marking it
|
|
1305
|
+
* performed. This is the athlete-side equivalent of editing target values in the app: it writes
|
|
1306
|
+
* `param_N_data_M` with every made/completed flag cleared and skips the set-completion PUT.
|
|
1307
|
+
*
|
|
1308
|
+
* The write replaces the selected exercise's whole prescription, so callers must pass every set
|
|
1309
|
+
* they want to keep. An omitted param is cleared rather than preserved.
|
|
1310
|
+
*/
|
|
1311
|
+
async function prescribeAthleteSet(client, args) {
|
|
1312
|
+
const r = await writeSetResults(client, { role: "athlete" }, await fetchAthleteWorkouts(client, args.date, args.date), args.savedWorkoutSetId, args.results, "prescribe");
|
|
1313
|
+
return {
|
|
1314
|
+
savedWorkoutSetId: r.savedWorkoutSetId,
|
|
1315
|
+
exercisesPrescribed: r.exercisesWritten
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
/**
|
|
1303
1319
|
* Coach "Log for Athlete": record set results for a roster athlete on their behalf, via the
|
|
1304
1320
|
* coach surface — `PUT /1.0/coach/savedworkoutsetexercise/{id}/{athleteId}` (the data write)
|
|
1305
1321
|
* then `PUT /1.0/coach/savedworkoutset/{id}/{athleteId}` (mark complete). Same two-step
|
|
@@ -1384,9 +1400,10 @@ async function swapAthleteExercise(client, args) {
|
|
|
1384
1400
|
};
|
|
1385
1401
|
}
|
|
1386
1402
|
/**
|
|
1387
|
-
* Shared set-write behind {@link logAthleteSet}, {@link
|
|
1388
|
-
* {@link prescribeForAthlete}. `target` selects the surface: `athlete`
|
|
1389
|
-
* `coach` writes `/1.0/coach/...{athleteId}` and stamps `athleteId` into
|
|
1403
|
+
* Shared set-write behind {@link logAthleteSet}, {@link prescribeAthleteSet},
|
|
1404
|
+
* {@link logForAthlete}, and {@link prescribeForAthlete}. `target` selects the surface: `athlete`
|
|
1405
|
+
* writes `/1.0/athlete/...`; `coach` writes `/1.0/coach/...{athleteId}` and stamps `athleteId` into
|
|
1406
|
+
* each body.
|
|
1390
1407
|
*
|
|
1391
1408
|
* Step 1 PUTs each exercise's per-set values to its own endpoint (the only path that actually
|
|
1392
1409
|
* stores reps and weight). `mode` decides what those values mean: `"log"` records them as a
|
|
@@ -1618,7 +1635,7 @@ function prescribedExerciseLabels(workouts) {
|
|
|
1618
1635
|
return labels;
|
|
1619
1636
|
}
|
|
1620
1637
|
/** Group resolved exercises by saved set and write each set via the given log target. */
|
|
1621
|
-
async function logResolvedExercises(client, target,
|
|
1638
|
+
async function logResolvedExercises(client, target, workouts, resolved) {
|
|
1622
1639
|
const bySet = /* @__PURE__ */ new Map();
|
|
1623
1640
|
for (const r of resolved) {
|
|
1624
1641
|
const list = bySet.get(r.savedWorkoutSetId) ?? [];
|
|
@@ -1630,19 +1647,10 @@ async function logResolvedExercises(client, target, date, resolved) {
|
|
|
1630
1647
|
}
|
|
1631
1648
|
const out = [];
|
|
1632
1649
|
for (const [savedWorkoutSetId, results] of bySet) {
|
|
1633
|
-
const written =
|
|
1634
|
-
athleteId: target.athleteId,
|
|
1635
|
-
date,
|
|
1636
|
-
savedWorkoutSetId,
|
|
1637
|
-
results
|
|
1638
|
-
}) : await logAthleteSet(client, {
|
|
1639
|
-
date,
|
|
1640
|
-
savedWorkoutSetId,
|
|
1641
|
-
results
|
|
1642
|
-
});
|
|
1650
|
+
const written = await writeSetResults(client, target, workouts, savedWorkoutSetId, results, "log");
|
|
1643
1651
|
out.push({
|
|
1644
1652
|
savedWorkoutSetId: written.savedWorkoutSetId,
|
|
1645
|
-
exercisesLogged: written.
|
|
1653
|
+
exercisesLogged: written.exercisesWritten
|
|
1646
1654
|
});
|
|
1647
1655
|
}
|
|
1648
1656
|
return out;
|
|
@@ -1680,7 +1688,7 @@ async function logAdHocSession(client, args) {
|
|
|
1680
1688
|
sets: e.sets
|
|
1681
1689
|
};
|
|
1682
1690
|
});
|
|
1683
|
-
const sets = await logResolvedExercises(client, { role: "athlete" }, args.date, resolved);
|
|
1691
|
+
const sets = await logResolvedExercises(client, { role: "athlete" }, await fetchAthleteWorkouts(client, args.date, args.date), resolved);
|
|
1684
1692
|
const result = {
|
|
1685
1693
|
date: args.date,
|
|
1686
1694
|
created,
|
|
@@ -1718,7 +1726,7 @@ async function logSessionForAthlete(client, args) {
|
|
|
1718
1726
|
const sets = await logResolvedExercises(client, {
|
|
1719
1727
|
role: "coach",
|
|
1720
1728
|
athleteId: args.athleteId
|
|
1721
|
-
},
|
|
1729
|
+
}, day, resolved);
|
|
1722
1730
|
return {
|
|
1723
1731
|
date: args.date,
|
|
1724
1732
|
created: false,
|
|
@@ -2081,6 +2089,7 @@ async function collectAdvisories(blocks, index) {
|
|
|
2081
2089
|
}
|
|
2082
2090
|
//#endregion
|
|
2083
2091
|
//#region src/workout-session.ts
|
|
2092
|
+
const EXERCISE_SAVE_CONCURRENCY = 4;
|
|
2084
2093
|
/**
|
|
2085
2094
|
* Coach calendar writes (`createWorkoutForDay`, timeline create, `copyProgramWorkout`) 500/401
|
|
2086
2095
|
* on personal calendars (Coach Plan / `personal_cal`). Shared by `buildSession` and
|
|
@@ -2114,15 +2123,14 @@ async function buildSession(client, opts) {
|
|
|
2114
2123
|
const created = await req(client, "POST", "/2.0/coach/calendar/saveProgramWorkoutSets", buildBlockPayload(blocks, workoutId));
|
|
2115
2124
|
const byOrder = new Map(created.map((b) => [b.order, b.id]));
|
|
2116
2125
|
let counter = 0;
|
|
2117
|
-
|
|
2126
|
+
await mapPool(blocks.map((block, i) => {
|
|
2118
2127
|
const wsid = byOrder.get(i + 1);
|
|
2119
2128
|
if (wsid === void 0) throw new Error(`No saved block for order ${i + 1}.`);
|
|
2120
2129
|
return block.exercises.map((ex, j) => {
|
|
2121
2130
|
counter += 1;
|
|
2122
2131
|
return makeExercise(ex, wsid, j + 1, `k::${workoutId}${String(counter).padStart(3, "0")}`);
|
|
2123
2132
|
});
|
|
2124
|
-
});
|
|
2125
|
-
await Promise.all(payloads.filter((p) => p.length > 0).map((p) => req(client, "POST", "/2.0/coach/calendar/saveWorkoutSetExercises", p)));
|
|
2133
|
+
}).filter((p) => p.length > 0), EXERCISE_SAVE_CONCURRENCY, (payload) => req(client, "POST", "/2.0/coach/calendar/saveWorkoutSetExercises", payload));
|
|
2126
2134
|
if (opts.instruction !== void 0 && opts.instruction !== "") {
|
|
2127
2135
|
const blockIds = [...byOrder.entries()].sort((a, b) => a[0] - b[0]).map(([, id]) => id);
|
|
2128
2136
|
await setSessionInstruction(client, workoutId, sess, opts.instruction, blockIds);
|
|
@@ -2831,9 +2839,11 @@ async function deleteComment(client, streamId, commentId) {
|
|
|
2831
2839
|
if (!res.ok) throw new Error(`Message delete failed (HTTP ${res.status}).`);
|
|
2832
2840
|
return res.data;
|
|
2833
2841
|
}
|
|
2834
|
-
async function readLive(client, streamId, limit) {
|
|
2835
|
-
const
|
|
2842
|
+
async function readLive(client, streamId, limit, afterCommentId) {
|
|
2843
|
+
const cursor = afterCommentId === void 0 ? "" : String(afterCommentId);
|
|
2844
|
+
const res = await client.request("GET", `/v5/messaging/streams/${streamId}/comments?lastCommentId=${cursor}`);
|
|
2836
2845
|
if (!res.ok || !Array.isArray(res.data)) throw new Error(`Message read failed (HTTP ${res.status}).`);
|
|
2846
|
+
if (afterCommentId !== void 0) return limit !== void 0 && limit > 0 ? res.data.slice(0, limit) : res.data;
|
|
2837
2847
|
return limit !== void 0 && limit > 0 ? res.data.slice(-limit) : res.data;
|
|
2838
2848
|
}
|
|
2839
2849
|
//#endregion
|
|
@@ -2964,21 +2974,12 @@ var ExerciseLibrary = class {
|
|
|
2964
2974
|
}
|
|
2965
2975
|
async resolve(name) {
|
|
2966
2976
|
await this.ensureFresh();
|
|
2967
|
-
|
|
2977
|
+
const hit = this.#exact(name);
|
|
2968
2978
|
if (hit) return {
|
|
2969
2979
|
match: hit,
|
|
2970
2980
|
candidates: [hit]
|
|
2971
2981
|
};
|
|
2972
|
-
|
|
2973
|
-
if (candidates.length === 0) {
|
|
2974
|
-
await this.refresh();
|
|
2975
|
-
hit = this.#exact(name);
|
|
2976
|
-
if (hit) return {
|
|
2977
|
-
match: hit,
|
|
2978
|
-
candidates: [hit]
|
|
2979
|
-
};
|
|
2980
|
-
candidates = this.#searchOnly(name, 20);
|
|
2981
|
-
}
|
|
2982
|
+
const candidates = this.#searchOnly(name, 20);
|
|
2982
2983
|
if (candidates.length === 1) return {
|
|
2983
2984
|
match: candidates[0] ?? null,
|
|
2984
2985
|
candidates
|
|
@@ -3019,4 +3020,4 @@ var ExerciseLibrary = class {
|
|
|
3019
3020
|
}
|
|
3020
3021
|
};
|
|
3021
3022
|
//#endregion
|
|
3022
|
-
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, TrainHeroicAuthError, TrainHeroicClient, TrainHeroicHttpError, addExercisesToWorkout, analyticsMetricCatalog, asExerciseList, buildBlockPayload, buildCommentPayload, buildExerciseSetPayload, buildSearchText, buildSession, buildSetCompletePayload, calendarWriteError, checkResponse, chunk, classifyMainLift, coerceInt, coerceNum, collectAdvisories, copySession, createPersonalWorkout, dateWindows, defaultBlockType, definedProps, deleteComment, exerciseTitle, exerciseUnits, fetchAthleteMainLiftPRs, fetchAthletePrefs, fetchAthleteProfileSummary, fetchAthleteUser, fetchAthleteWorkouts, fetchAthleteWorkoutsChunked, fetchCoachAthleteCalendar, fetchCoachAthleteCalendarSummary, fetchCoachAthleteWorkouts, fetchCoachRoster, fetchExerciseHistoryDetail, fetchExerciseHistoryList, fetchExerciseStats, fetchLeaderboard, fetchPersonalRecords, fetchRosterActivity, fetchRosterMainLiftPRs, fetchStreams, fetchTeamAthleteIds, fetchWorkingMaxes, findSavedWorkoutSet, inviteAthletes, isPersonalSession, isRecord, logAdHocSession, logAthleteSet, logForAthlete, logSessionForAthlete, loginTrainHeroic, makeExercise, mapPool, mergeWorkoutsById, prescribeForAthlete, presentAthleteWorkout, presentAthleteWorkoutExport, presentAthleteWorkouts, presentAthleteWorkoutsExport, presentCoachAthleteTraining, presentExercise, presentExerciseHistory, presentLogTargets, publishSession, queryAnalytics, rankSearch, readLive, readSession, removePersonalWorkout, removeSession, repsList, resolveAthleteMainLifts, resolveAthleteUserId, resolveBuildProgramId, resolveLeaderboard, searchExerciseHistory, selectWorkouts, selectWorkoutsByProgram, sendComment, serializeWorkoutHistory, setSessionInstruction, sortRosterByRecency, str, summarizeAthleteWorkouts, swapAthleteExercise, teamVolume, toSetResults, unitAdvisory, unitLabel, unwrapEnvelope, updateTeam, withUnits, workoutsToCsv, workoutsToJson, workoutsToText };
|
|
3023
|
+
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, TrainHeroicAuthError, TrainHeroicClient, TrainHeroicHttpError, addExercisesToWorkout, analyticsMetricCatalog, asExerciseList, buildBlockPayload, buildCommentPayload, buildExerciseSetPayload, buildSearchText, buildSession, buildSetCompletePayload, calendarWriteError, checkResponse, chunk, classifyMainLift, coerceInt, coerceNum, collectAdvisories, copySession, createPersonalWorkout, dateWindows, defaultBlockType, definedProps, deleteComment, exerciseTitle, exerciseUnits, fetchAthleteMainLiftPRs, fetchAthletePrefs, fetchAthleteProfileSummary, fetchAthleteUser, fetchAthleteWorkouts, fetchAthleteWorkoutsChunked, fetchCoachAthleteCalendar, fetchCoachAthleteCalendarSummary, fetchCoachAthleteWorkouts, fetchCoachRoster, fetchExerciseHistoryDetail, fetchExerciseHistoryList, fetchExerciseStats, fetchLeaderboard, fetchPersonalRecords, 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, publishSession, queryAnalytics, rankSearch, readLive, readSession, removePersonalWorkout, removeSession, repsList, resolveAthleteMainLifts, resolveAthleteUserId, resolveBuildProgramId, resolveLeaderboard, searchExerciseHistory, selectWorkouts, selectWorkoutsByProgram, sendComment, serializeWorkoutHistory, setSessionInstruction, sortRosterByRecency, str, summarizeAthleteWorkouts, swapAthleteExercise, teamVolume, toSetResults, unitAdvisory, unitLabel, unwrapEnvelope, updateTeam, withUnits, workoutsToCsv, workoutsToJson, workoutsToText };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trainheroic-unofficial/js",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
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.
|
|
30
|
+
"@trainheroic-unofficial/dto": "3.1.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^26.2.0",
|