@aneuhold/core-ts-db-lib 5.0.4 → 5.0.6
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/CHANGELOG.md +19 -0
- package/lib/ctos/workout/WorkoutExerciseCTO.d.ts +40 -0
- package/lib/ctos/workout/WorkoutExerciseCTO.d.ts.map +1 -1
- package/lib/ctos/workout/WorkoutExerciseCTO.js +26 -6
- package/lib/ctos/workout/WorkoutExerciseCTO.js.map +1 -1
- package/lib/ctos/workout/WorkoutExerciseCTO.ts +28 -6
- package/lib/services/workout/SessionExercise/WorkoutSessionExerciseService.d.ts +1 -1
- package/lib/services/workout/SessionExercise/WorkoutSessionExerciseService.js +3 -3
- package/lib/services/workout/SessionExercise/WorkoutSessionExerciseService.js.map +1 -1
- package/lib/services/workout/SessionExercise/WorkoutSessionExerciseService.ts +4 -4
- package/lib/services/workout/Set/WorkoutSetService.js +3 -3
- package/lib/services/workout/Set/WorkoutSetService.js.map +1 -1
- package/lib/services/workout/Set/WorkoutSetService.ts +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 🔖 [5.0.6] (2026-04-17)
|
|
9
|
+
|
|
10
|
+
### 🏗️ Changed
|
|
11
|
+
|
|
12
|
+
- Updated set recommendation logic in `WorkoutSessionExerciseService`: soreness=1 + performance=1 now recommends +1 set (was +0).
|
|
13
|
+
|
|
14
|
+
## 🔖 [5.0.5] (2026-04-15)
|
|
15
|
+
|
|
16
|
+
### ✅ Added
|
|
17
|
+
|
|
18
|
+
- Added `lastSessionExercise` and `lastSessionSets` fields to `WorkoutExerciseCTO` representing the literal most recent completed session exercise (including deload and free-form sessions).
|
|
19
|
+
|
|
20
|
+
### 🏗️ Changed
|
|
21
|
+
|
|
22
|
+
- *Breaking Change:* Renamed `lastSessionExercise` → `lastAccumulationSessionExercise` and `lastSessionSets` → `lastAccumulationSessionSets` in `WorkoutExerciseCTO`; these fields now exclusively reflect the most recent non-deload accumulation session.
|
|
23
|
+
- `WorkoutSetService` now uses `lastAccumulationSessionSets` for first-microcycle progression and autoregulation calculations.
|
|
24
|
+
|
|
8
25
|
## 🔖 [5.0.4] (2026-03-26)
|
|
9
26
|
|
|
10
27
|
### ✅ Added
|
|
@@ -428,6 +445,8 @@ Updated dependency: now requires `@aneuhold/core-ts-lib@^2.3.11`.
|
|
|
428
445
|
- Updated workflow permissions to allow repository write access
|
|
429
446
|
|
|
430
447
|
<!-- Link References -->
|
|
448
|
+
[5.0.6]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v5.0.5...core-ts-db-lib-v5.0.6
|
|
449
|
+
[5.0.5]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v5.0.4...core-ts-db-lib-v5.0.5
|
|
431
450
|
[5.0.4]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v5.0.3...core-ts-db-lib-v5.0.4
|
|
432
451
|
[5.0.3]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v5.0.2...core-ts-db-lib-v5.0.3
|
|
433
452
|
[5.0.2]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v5.0.1...core-ts-db-lib-v5.0.2
|
|
@@ -88,6 +88,46 @@ export declare const WorkoutExerciseCTOSchema: z.ZodObject<{
|
|
|
88
88
|
_id: z.ZodPipe<z.ZodDefault<z.ZodUUID>, z.ZodTransform<`${string}-${string}-${string}-${string}-${string}`, string>>;
|
|
89
89
|
userId: z.ZodPipe<z.ZodUUID, z.ZodTransform<`${string}-${string}-${string}-${string}-${string}`, string>>;
|
|
90
90
|
}, z.core.$strip>>>;
|
|
91
|
+
lastAccumulationSessionExercise: z.ZodNullable<z.ZodObject<{
|
|
92
|
+
docType: z.ZodDefault<z.ZodLiteral<"workoutSessionExercise">>;
|
|
93
|
+
workoutSessionId: z.ZodPipe<z.ZodUUID, z.ZodTransform<`${string}-${string}-${string}-${string}-${string}`, string>>;
|
|
94
|
+
workoutExerciseId: z.ZodPipe<z.ZodUUID, z.ZodTransform<`${string}-${string}-${string}-${string}-${string}`, string>>;
|
|
95
|
+
setOrder: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodUUID, z.ZodTransform<`${string}-${string}-${string}-${string}-${string}`, string>>>>;
|
|
96
|
+
rsm: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
97
|
+
mindMuscleConnection: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
98
|
+
pump: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
99
|
+
disruption: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
100
|
+
}, z.core.$strip>>>;
|
|
101
|
+
fatigue: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
102
|
+
jointAndTissueDisruption: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
103
|
+
perceivedEffort: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
104
|
+
unusedMusclePerformance: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
105
|
+
}, z.core.$strip>>>;
|
|
106
|
+
sorenessScore: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
107
|
+
performanceScore: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
108
|
+
isRecoveryExercise: z.ZodDefault<z.ZodBoolean>;
|
|
109
|
+
createdDate: z.ZodDefault<z.ZodDate>;
|
|
110
|
+
lastUpdatedDate: z.ZodDefault<z.ZodDate>;
|
|
111
|
+
_id: z.ZodPipe<z.ZodDefault<z.ZodUUID>, z.ZodTransform<`${string}-${string}-${string}-${string}-${string}`, string>>;
|
|
112
|
+
userId: z.ZodPipe<z.ZodUUID, z.ZodTransform<`${string}-${string}-${string}-${string}-${string}`, string>>;
|
|
113
|
+
}, z.core.$strip>>;
|
|
114
|
+
lastAccumulationSessionSets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
115
|
+
docType: z.ZodDefault<z.ZodLiteral<"workoutSet">>;
|
|
116
|
+
workoutExerciseId: z.ZodPipe<z.ZodUUID, z.ZodTransform<`${string}-${string}-${string}-${string}-${string}`, string>>;
|
|
117
|
+
workoutSessionId: z.ZodPipe<z.ZodUUID, z.ZodTransform<`${string}-${string}-${string}-${string}-${string}`, string>>;
|
|
118
|
+
workoutSessionExerciseId: z.ZodPipe<z.ZodUUID, z.ZodTransform<`${string}-${string}-${string}-${string}-${string}`, string>>;
|
|
119
|
+
plannedReps: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
120
|
+
plannedWeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
121
|
+
plannedRir: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
122
|
+
actualReps: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
123
|
+
actualWeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
124
|
+
rir: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
125
|
+
exerciseProperties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
126
|
+
createdDate: z.ZodDefault<z.ZodDate>;
|
|
127
|
+
lastUpdatedDate: z.ZodDefault<z.ZodDate>;
|
|
128
|
+
_id: z.ZodPipe<z.ZodDefault<z.ZodUUID>, z.ZodTransform<`${string}-${string}-${string}-${string}-${string}`, string>>;
|
|
129
|
+
userId: z.ZodPipe<z.ZodUUID, z.ZodTransform<`${string}-${string}-${string}-${string}-${string}`, string>>;
|
|
130
|
+
}, z.core.$strip>>>;
|
|
91
131
|
docType: z.ZodDefault<z.ZodLiteral<"workoutExercise">>;
|
|
92
132
|
exerciseName: z.ZodString;
|
|
93
133
|
workoutEquipmentTypeId: z.ZodPipe<z.ZodUUID, z.ZodTransform<`${string}-${string}-${string}-${string}-${string}`, string>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkoutExerciseCTO.d.ts","sourceRoot":"","sources":["../../../src/ctos/workout/WorkoutExerciseCTO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"WorkoutExerciseCTO.d.ts","sourceRoot":"","sources":["../../../src/ctos/workout/WorkoutExerciseCTO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoEnC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -34,6 +34,24 @@ export const WorkoutExerciseCTOSchema = z.object({
|
|
|
34
34
|
* provides the raw source data for 1RM comparison.
|
|
35
35
|
*/
|
|
36
36
|
bestSet: WorkoutSetSchema.nullable(),
|
|
37
|
+
/**
|
|
38
|
+
* The most recent completed WorkoutSessionExercise for this exercise,
|
|
39
|
+
* regardless of cycle type or deload status. Includes free-form, deload,
|
|
40
|
+
* and accumulation sessions — whichever was performed most recently.
|
|
41
|
+
*
|
|
42
|
+
* Null if the exercise has never been performed.
|
|
43
|
+
*
|
|
44
|
+
* Contains: sorenessScore, performanceScore, rsm, fatigue, setOrder, etc.
|
|
45
|
+
*/
|
|
46
|
+
lastSessionExercise: WorkoutSessionExerciseSchema.nullable(),
|
|
47
|
+
/**
|
|
48
|
+
* All WorkoutSets from the lastSessionExercise's setOrder. Represents the
|
|
49
|
+
* literal most recent prior performance — suitable for "what did I do
|
|
50
|
+
* last time" displays.
|
|
51
|
+
*
|
|
52
|
+
* Empty array if no previous performance exists.
|
|
53
|
+
*/
|
|
54
|
+
lastSessionSets: z.array(WorkoutSetSchema).default([]),
|
|
37
55
|
/**
|
|
38
56
|
* The most recent completed WorkoutSessionExercise for this exercise,
|
|
39
57
|
* from a non-deload accumulation session. Deload sessions (where all sets
|
|
@@ -42,16 +60,18 @@ export const WorkoutExerciseCTOSchema = z.object({
|
|
|
42
60
|
*
|
|
43
61
|
* Null if the exercise has never been performed in an accumulation session.
|
|
44
62
|
*
|
|
45
|
-
*
|
|
63
|
+
* Used by autoregulation / progression logic that requires a meaningful
|
|
64
|
+
* non-deload baseline.
|
|
46
65
|
*/
|
|
47
|
-
|
|
66
|
+
lastAccumulationSessionExercise: WorkoutSessionExerciseSchema.nullable(),
|
|
48
67
|
/**
|
|
49
|
-
* All WorkoutSets from the
|
|
50
|
-
* averaged across all sets for a holistic performance signal
|
|
51
|
-
* autoregulation (the first set alone can mask poor later-set
|
|
68
|
+
* All WorkoutSets from the lastAccumulationSessionExercise's setOrder.
|
|
69
|
+
* Surplus is averaged across all sets for a holistic performance signal
|
|
70
|
+
* during autoregulation (the first set alone can mask poor later-set
|
|
71
|
+
* performance).
|
|
52
72
|
*
|
|
53
73
|
* Empty array if no previous accumulation performance exists.
|
|
54
74
|
*/
|
|
55
|
-
|
|
75
|
+
lastAccumulationSessionSets: z.array(WorkoutSetSchema).default([])
|
|
56
76
|
});
|
|
57
77
|
//# sourceMappingURL=WorkoutExerciseCTO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkoutExerciseCTO.js","sourceRoot":"","sources":["../../../src/ctos/workout/WorkoutExerciseCTO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC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AgB,CAAC,QAAQ,EAAE;IAEpC;;;;;;;;OAQG;IACH,mBAAmB,EAAE,4BAA4B,CAAC,QAAQ,EAAE;IAE5D;;;;;;OAMG;IACH,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAEtD;;;;;;;;;;OAUG;IACH,+BAA+B,EAAE,4BAA4B,CAAC,QAAQ,EAAE;IAExE;;;;;;;OAOG;IACH,2BAA2B,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CACnE,CAAC,CAAC"}
|
|
@@ -39,6 +39,26 @@ export const WorkoutExerciseCTOSchema = z.object({
|
|
|
39
39
|
*/
|
|
40
40
|
bestSet: WorkoutSetSchema.nullable(),
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* The most recent completed WorkoutSessionExercise for this exercise,
|
|
44
|
+
* regardless of cycle type or deload status. Includes free-form, deload,
|
|
45
|
+
* and accumulation sessions — whichever was performed most recently.
|
|
46
|
+
*
|
|
47
|
+
* Null if the exercise has never been performed.
|
|
48
|
+
*
|
|
49
|
+
* Contains: sorenessScore, performanceScore, rsm, fatigue, setOrder, etc.
|
|
50
|
+
*/
|
|
51
|
+
lastSessionExercise: WorkoutSessionExerciseSchema.nullable(),
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* All WorkoutSets from the lastSessionExercise's setOrder. Represents the
|
|
55
|
+
* literal most recent prior performance — suitable for "what did I do
|
|
56
|
+
* last time" displays.
|
|
57
|
+
*
|
|
58
|
+
* Empty array if no previous performance exists.
|
|
59
|
+
*/
|
|
60
|
+
lastSessionSets: z.array(WorkoutSetSchema).default([]),
|
|
61
|
+
|
|
42
62
|
/**
|
|
43
63
|
* The most recent completed WorkoutSessionExercise for this exercise,
|
|
44
64
|
* from a non-deload accumulation session. Deload sessions (where all sets
|
|
@@ -47,18 +67,20 @@ export const WorkoutExerciseCTOSchema = z.object({
|
|
|
47
67
|
*
|
|
48
68
|
* Null if the exercise has never been performed in an accumulation session.
|
|
49
69
|
*
|
|
50
|
-
*
|
|
70
|
+
* Used by autoregulation / progression logic that requires a meaningful
|
|
71
|
+
* non-deload baseline.
|
|
51
72
|
*/
|
|
52
|
-
|
|
73
|
+
lastAccumulationSessionExercise: WorkoutSessionExerciseSchema.nullable(),
|
|
53
74
|
|
|
54
75
|
/**
|
|
55
|
-
* All WorkoutSets from the
|
|
56
|
-
* averaged across all sets for a holistic performance signal
|
|
57
|
-
* autoregulation (the first set alone can mask poor later-set
|
|
76
|
+
* All WorkoutSets from the lastAccumulationSessionExercise's setOrder.
|
|
77
|
+
* Surplus is averaged across all sets for a holistic performance signal
|
|
78
|
+
* during autoregulation (the first set alone can mask poor later-set
|
|
79
|
+
* performance).
|
|
58
80
|
*
|
|
59
81
|
* Empty array if no previous accumulation performance exists.
|
|
60
82
|
*/
|
|
61
|
-
|
|
83
|
+
lastAccumulationSessionSets: z.array(WorkoutSetSchema).default([])
|
|
62
84
|
});
|
|
63
85
|
|
|
64
86
|
/**
|
|
@@ -61,7 +61,7 @@ export default class WorkoutSessionExerciseService {
|
|
|
61
61
|
* | Soreness Score ↓ \ Performance Score → | 0 | 1 | 2 | 3 |
|
|
62
62
|
|---|---|---|---|---|
|
|
63
63
|
| **0** | Add 1–3 sets | Add 0–2 sets | Do not add sets | Employ recovery sessions (see Fatigue Management) |
|
|
64
|
-
| **1** | Add 1–2 sets | Add
|
|
64
|
+
| **1** | Add 1–2 sets | Add 1 set | Do not add sets | Employ recovery sessions (see Fatigue Management) |
|
|
65
65
|
| **2** | Do not add sets | Do not add sets | Do not add sets | Employ recovery sessions (see Fatigue Management) |
|
|
66
66
|
| **3** | Do not add sets | Do not add sets | Do not add sets | Employ recovery sessions (see Fatigue Management) |
|
|
67
67
|
*/
|
|
@@ -111,7 +111,7 @@ export default class WorkoutSessionExerciseService {
|
|
|
111
111
|
* | Soreness Score ↓ \ Performance Score → | 0 | 1 | 2 | 3 |
|
|
112
112
|
|---|---|---|---|---|
|
|
113
113
|
| **0** | Add 1–3 sets | Add 0–2 sets | Do not add sets | Employ recovery sessions (see Fatigue Management) |
|
|
114
|
-
| **1** | Add 1–2 sets | Add
|
|
114
|
+
| **1** | Add 1–2 sets | Add 1 set | Do not add sets | Employ recovery sessions (see Fatigue Management) |
|
|
115
115
|
| **2** | Do not add sets | Do not add sets | Do not add sets | Employ recovery sessions (see Fatigue Management) |
|
|
116
116
|
| **3** | Do not add sets | Do not add sets | Do not add sets | Employ recovery sessions (see Fatigue Management) |
|
|
117
117
|
*/
|
|
@@ -125,8 +125,8 @@ export default class WorkoutSessionExerciseService {
|
|
|
125
125
|
const table = [
|
|
126
126
|
// Soreness 0: [Add 1-3, Add 0-2, Do not add, Recovery]
|
|
127
127
|
[2, 1, 0, -1],
|
|
128
|
-
// Soreness 1: [Add 1-2, Add
|
|
129
|
-
[1,
|
|
128
|
+
// Soreness 1: [Add 1-2, Add 1, Do not add, Recovery]
|
|
129
|
+
[1, 1, 0, -1],
|
|
130
130
|
// Soreness 2: [Do not add, Do not add, Do not add, Recovery]
|
|
131
131
|
[0, 0, 0, -1],
|
|
132
132
|
// Soreness 3: [Do not add, Do not add, Do not add, Recovery]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkoutSessionExerciseService.js","sourceRoot":"","sources":["../../../../src/services/workout/SessionExercise/WorkoutSessionExerciseService.ts"],"names":[],"mappings":"AAEA,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AAEjE;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,6BAA6B;IAChD;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,eAAuC;QACxD,OAAO,iBAAiB,CAAC,WAAW,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAAC,eAAuC;QAC5D,OAAO,iBAAiB,CAAC,eAAe,CAAC,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,"file":"WorkoutSessionExerciseService.js","sourceRoot":"","sources":["../../../../src/services/workout/SessionExercise/WorkoutSessionExerciseService.ts"],"names":[],"mappings":"AAEA,OAAO,iBAAiB,MAAM,kCAAkC,CAAC;AAEjE;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,6BAA6B;IAChD;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,eAAuC;QACxD,OAAO,iBAAiB,CAAC,WAAW,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAAC,eAAuC;QAC5D,OAAO,iBAAiB,CAAC,eAAe,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,eAAuC;QACnD,OAAO,iBAAiB,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,mBAAmB,CAAC,IAAkB;QAC3C,MAAM,SAAS,GAAa,EAAE,CAAC;QAE/B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,IACE,GAAG,CAAC,WAAW,IAAI,IAAI;gBACvB,GAAG,CAAC,UAAU,IAAI,IAAI;gBACtB,GAAG,CAAC,UAAU,IAAI,IAAI;gBACtB,GAAG,CAAC,GAAG,IAAI,IAAI,EACf,CAAC;gBACD,SAAS;YACX,CAAC;YAED,IAAI,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;gBACrC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAClB,SAAS;YACX,CAAC;YAED,MAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,CACtC,GAAG,CAAC,UAAU,EACd,GAAG,CAAC,WAAW,EACf,GAAG,CAAC,GAAG,EACP,GAAG,CAAC,UAAU,CACf,CAAC;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AAuB,IAAI,IAAI;YACxD,eAAe,CAAC,gBAAgB,IAAI,IAAI,CACzC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,0BAA0B,CAC/B,eAAuC,EACvC,YAA0B;QAE1B,IAAI,CAAC,6BAA6B,CAAC,0BAA0B,CAAC,eAAe,EAAE,YAAY,CAAC,EAAE,CAAC;YAC7F,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,6BAA6B,CAAC,gBAAgB,CAAC,YAAY,CAAC;YAAE,OAAO,IAAI,CAAC;QAC9E,OAAO,CACL,eAAe,CAAC,GAAG,EAAE,UAAU,IAAI,IAAI;YACvC,eAAe,CAAC,OAAO,EAAE,wBAAwB,IAAI,IAAI;YACzD,eAAe,CAAC,OAAO,CAAC,eAAe,IAAI,IAAI;YAC/C,eAAe,CAAC,aAAa,IAAI,IAAI,CACtC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACK,MAAM,CAAC,mBAAmB,CAChC,UAAkB,EAClB,WAAmB,EACnB,GAAW,EACX,UAAkB;QAElB,OAAO,UAAU,GAAG,WAAW,GAAG,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC;IACvD,CAAC;CACF"}
|
|
@@ -132,11 +132,11 @@ export default class WorkoutSessionExerciseService {
|
|
|
132
132
|
* - Returns `null` when insufficient data is available.
|
|
133
133
|
*
|
|
134
134
|
* The table is:
|
|
135
|
-
*
|
|
135
|
+
*
|
|
136
136
|
* | Soreness Score ↓ \ Performance Score → | 0 | 1 | 2 | 3 |
|
|
137
137
|
|---|---|---|---|---|
|
|
138
138
|
| **0** | Add 1–3 sets | Add 0–2 sets | Do not add sets | Employ recovery sessions (see Fatigue Management) |
|
|
139
|
-
| **1** | Add 1–2 sets | Add
|
|
139
|
+
| **1** | Add 1–2 sets | Add 1 set | Do not add sets | Employ recovery sessions (see Fatigue Management) |
|
|
140
140
|
| **2** | Do not add sets | Do not add sets | Do not add sets | Employ recovery sessions (see Fatigue Management) |
|
|
141
141
|
| **3** | Do not add sets | Do not add sets | Do not add sets | Employ recovery sessions (see Fatigue Management) |
|
|
142
142
|
*/
|
|
@@ -153,8 +153,8 @@ export default class WorkoutSessionExerciseService {
|
|
|
153
153
|
const table: number[][] = [
|
|
154
154
|
// Soreness 0: [Add 1-3, Add 0-2, Do not add, Recovery]
|
|
155
155
|
[2, 1, 0, -1],
|
|
156
|
-
// Soreness 1: [Add 1-2, Add
|
|
157
|
-
[1,
|
|
156
|
+
// Soreness 1: [Add 1-2, Add 1, Do not add, Recovery]
|
|
157
|
+
[1, 1, 0, -1],
|
|
158
158
|
// Soreness 2: [Do not add, Do not add, Do not add, Recovery]
|
|
159
159
|
[0, 0, 0, -1],
|
|
160
160
|
// Soreness 3: [Do not add, Do not add, Do not add, Recovery]
|
|
@@ -17,10 +17,10 @@ export default class WorkoutSetService {
|
|
|
17
17
|
throw new Error(`No calibration found for exercise ${exerciseCTO._id}, ${exerciseCTO.exerciseName}`);
|
|
18
18
|
}
|
|
19
19
|
const sets = [];
|
|
20
|
-
// For the first microcycle, use the CTO's previous performance
|
|
21
|
-
// For subsequent microcycles, look up all previous sets from the context.
|
|
20
|
+
// For the first microcycle, use the CTO's previous accumulation performance
|
|
21
|
+
// data. For subsequent microcycles, look up all previous sets from the context.
|
|
22
22
|
const previousSets = microcycleIndex === 0
|
|
23
|
-
? exerciseCTO.
|
|
23
|
+
? exerciseCTO.lastAccumulationSessionSets
|
|
24
24
|
: this.findPreviousSets(context, exerciseCTO._id, microcycleIndex);
|
|
25
25
|
// Calculate progressed targets for the first set.
|
|
26
26
|
// Autoregulation/forecasting handles progression from the previous sets' data.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkoutSetService.js","sourceRoot":"","sources":["../../../../src/services/workout/Set/WorkoutSetService.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,0CAA0C,CAAC;AAC7F,OAAO,2BAA2B,MAAM,iDAAiD,CAAC;AAC1F,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAG3E,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC;;;;;;;;OAQG;IACH,MAAM,CAAC,8BAA8B,CAAC,EACpC,OAAO,EACP,WAAW,EACX,OAAO,EACP,eAAe,EACf,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,kBAAkB,EAWnB;QACC,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,WAAW,CAAC;QACvD,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CACb,qCAAqC,WAAW,CAAC,GAAG,KAAK,WAAW,CAAC,YAAY,EAAE,CACpF,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GAAiB,EAAE,CAAC;QAE9B,
|
|
1
|
+
{"version":3,"file":"WorkoutSetService.js","sourceRoot":"","sources":["../../../../src/services/workout/Set/WorkoutSetService.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,0CAA0C,CAAC;AAC7F,OAAO,2BAA2B,MAAM,iDAAiD,CAAC;AAC1F,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAG3E,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC;;;;;;;;OAQG;IACH,MAAM,CAAC,8BAA8B,CAAC,EACpC,OAAO,EACP,WAAW,EACX,OAAO,EACP,eAAe,EACf,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,kBAAkB,EAWnB;QACC,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,WAAW,CAAC;QACvD,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CACb,qCAAqC,WAAW,CAAC,GAAG,KAAK,WAAW,CAAC,YAAY,EAAE,CACpF,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GAAiB,EAAE,CAAC;QAE9B,4EAA4E;QAC5E,gFAAgF;QAChF,MAAM,YAAY,GAChB,eAAe,KA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AW,GAAG,IAAI,CAAC,KAAK,CAAC,yBAAyB,GAAG,CAAC,CAAC,CAAC;YACxD,+DAA+D;YAC/D,+BAA+B;YAC/B,IAAI,UAAU,CAAC,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,gCAAgC,GAAG,CAAC,CAAC,EAAE,CAAC;gBAC3F,MAAM,YAAY,GAAG,aAAa,GAAG,CAAC,CAAC;gBACvC,MAAM,aAAa,GAAG,2BAA2B,CAAC,iBAAiB,CACjE,SAAS,EACT,YAAY,EACZ,aAAa,CACd,CAAC;gBACF,aAAa,GAAG,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;QAED,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC;IACpE,CAAC;CACF"}
|
|
@@ -49,11 +49,11 @@ export default class WorkoutSetService {
|
|
|
49
49
|
|
|
50
50
|
const sets: WorkoutSet[] = [];
|
|
51
51
|
|
|
52
|
-
// For the first microcycle, use the CTO's previous performance
|
|
53
|
-
// For subsequent microcycles, look up all previous sets from the context.
|
|
52
|
+
// For the first microcycle, use the CTO's previous accumulation performance
|
|
53
|
+
// data. For subsequent microcycles, look up all previous sets from the context.
|
|
54
54
|
const previousSets =
|
|
55
55
|
microcycleIndex === 0
|
|
56
|
-
? exerciseCTO.
|
|
56
|
+
? exerciseCTO.lastAccumulationSessionSets
|
|
57
57
|
: this.findPreviousSets(context, exerciseCTO._id, microcycleIndex);
|
|
58
58
|
|
|
59
59
|
// Calculate progressed targets for the first set.
|
package/package.json
CHANGED