@dgpholdings/greatoak-shared 1.2.87 → 1.2.88
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/__mocks__/catalog.fixture.d.ts +2 -0
- package/dist/__mocks__/catalog.fixture.js +208 -0
- package/dist/__mocks__/exercises.mock.d.ts +4 -11
- package/dist/__mocks__/exercises.mock.js +82 -42
- package/dist/__mocks__/sessions.mock.d.ts +28 -0
- package/dist/__mocks__/sessions.mock.js +394 -0
- package/dist/__mocks__/testIds.d.ts +9 -0
- package/dist/__mocks__/testIds.js +13 -0
- package/dist/__mocks__/user.mock.js +3 -1
- package/dist/constants/goalJourney.d.ts +108 -0
- package/dist/constants/goalJourney.js +443 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/types/TApiUser.d.ts +2 -0
- package/dist/utils/adoptionEngine/scaleProPlan.util.js +9 -4
- package/dist/utils/constellation/computeNormalisedLoad.test.d.ts +1 -0
- package/dist/utils/constellation/computeNormalisedLoad.test.js +218 -0
- package/dist/utils/constellation/evaluateConstellation.js +1 -1
- package/dist/utils/constellation/evaluateConstellation.test.d.ts +1 -0
- package/dist/utils/constellation/evaluateConstellation.test.js +93 -0
- package/dist/utils/constellation/index.d.ts +1 -0
- package/dist/utils/constellation/index.js +4 -1
- package/dist/utils/constellation/starFoundation.test.d.ts +1 -0
- package/dist/utils/constellation/starFoundation.test.js +75 -0
- package/dist/utils/constellation/stars/consistency.test.d.ts +1 -0
- package/dist/utils/constellation/stars/consistency.test.js +94 -0
- package/dist/utils/constellation/stars/quality.test.d.ts +1 -0
- package/dist/utils/constellation/stars/quality.test.js +113 -0
- package/dist/utils/constellation/stars/recovery.test.d.ts +1 -0
- package/dist/utils/constellation/stars/recovery.test.js +131 -0
- package/dist/utils/constellation/strengthStar.test.d.ts +1 -0
- package/dist/utils/constellation/strengthStar.test.js +190 -0
- package/dist/utils/exerciseRecord/recordValidator.integration.test.js +1 -1
- package/dist/utils/exerciseRecord/recordValidator.js +1 -1
- package/dist/utils/exerciseRecord/recordValidator.test.js +8 -8
- package/dist/utils/scoringWorkout/scoringWorkout.integration.test.js +19 -19
- package/package.json +1 -1
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.testCatalog = void 0;
|
|
4
|
+
exports.testCatalog = {
|
|
5
|
+
"-SR_ogujWtdkH6EtCe2OQ": {
|
|
6
|
+
exerciseId: "-SR_ogujWtdkH6EtCe2OQ",
|
|
7
|
+
name: "Diamond Push Up",
|
|
8
|
+
primaryMuscles: ["tricep-brachii-long", "tricep-brachii-lateral"],
|
|
9
|
+
secondaryMuscles: [
|
|
10
|
+
"pectoralis-major",
|
|
11
|
+
"pectoralis-minor",
|
|
12
|
+
"deltoids-anterior",
|
|
13
|
+
"serratus-anterior",
|
|
14
|
+
"abs-upper",
|
|
15
|
+
],
|
|
16
|
+
difficultyLevel: 3,
|
|
17
|
+
movementPattern: "push_horizontal",
|
|
18
|
+
exerciseType: "bodyweight",
|
|
19
|
+
isUnilateral: false,
|
|
20
|
+
bodyweightDependency: null,
|
|
21
|
+
weightMultiplier: null,
|
|
22
|
+
status: "active",
|
|
23
|
+
},
|
|
24
|
+
"2tprDDd4_BsnK6gbMVWTQ": {
|
|
25
|
+
exerciseId: "2tprDDd4_BsnK6gbMVWTQ",
|
|
26
|
+
name: "Arm Circles Backward",
|
|
27
|
+
primaryMuscles: ["deltoids-middle", "deltoids-anterior"],
|
|
28
|
+
secondaryMuscles: ["trapezius", "rhomboids", "serratus-anterior"],
|
|
29
|
+
difficultyLevel: 1,
|
|
30
|
+
movementPattern: "mobility",
|
|
31
|
+
exerciseType: "mobility",
|
|
32
|
+
isUnilateral: false,
|
|
33
|
+
bodyweightDependency: null,
|
|
34
|
+
weightMultiplier: null,
|
|
35
|
+
status: "active",
|
|
36
|
+
},
|
|
37
|
+
"3CkW5o5VQbCodRFmByeMc": {
|
|
38
|
+
exerciseId: "3CkW5o5VQbCodRFmByeMc",
|
|
39
|
+
name: "Jump Squats",
|
|
40
|
+
primaryMuscles: ["quadriceps", "glutes-maximus", "calves"],
|
|
41
|
+
secondaryMuscles: ["hamstrings", "abs-lower", "hip-flexors"],
|
|
42
|
+
difficultyLevel: 3,
|
|
43
|
+
movementPattern: "plyo",
|
|
44
|
+
exerciseType: "plyometric",
|
|
45
|
+
isUnilateral: false,
|
|
46
|
+
bodyweightDependency: "high",
|
|
47
|
+
weightMultiplier: null,
|
|
48
|
+
status: "active",
|
|
49
|
+
},
|
|
50
|
+
"5LyI0el3TUJta6xLYdoua": {
|
|
51
|
+
exerciseId: "5LyI0el3TUJta6xLYdoua",
|
|
52
|
+
name: "Arnold Press",
|
|
53
|
+
primaryMuscles: ["deltoids-anterior", "deltoids-middle"],
|
|
54
|
+
secondaryMuscles: [
|
|
55
|
+
"deltoids-anterior",
|
|
56
|
+
"tricep-brachii-long",
|
|
57
|
+
"serratus-anterior",
|
|
58
|
+
],
|
|
59
|
+
difficultyLevel: 3,
|
|
60
|
+
movementPattern: "push_vertical",
|
|
61
|
+
exerciseType: "compound",
|
|
62
|
+
isUnilateral: false,
|
|
63
|
+
bodyweightDependency: null,
|
|
64
|
+
weightMultiplier: null,
|
|
65
|
+
status: "active",
|
|
66
|
+
},
|
|
67
|
+
"9W7Yon0FWh1Eqd52yjHV9": {
|
|
68
|
+
exerciseId: "9W7Yon0FWh1Eqd52yjHV9",
|
|
69
|
+
name: "Child Pose",
|
|
70
|
+
primaryMuscles: ["lower-back", "latissimus-dorsi"],
|
|
71
|
+
secondaryMuscles: ["deltoids-middle", "rhomboids", "abs-upper"],
|
|
72
|
+
difficultyLevel: 0,
|
|
73
|
+
movementPattern: "mobility",
|
|
74
|
+
exerciseType: "mobility",
|
|
75
|
+
isUnilateral: false,
|
|
76
|
+
bodyweightDependency: null,
|
|
77
|
+
weightMultiplier: null,
|
|
78
|
+
status: "active",
|
|
79
|
+
},
|
|
80
|
+
"D3XVV-ypHfraYO52eH9ur": {
|
|
81
|
+
exerciseId: "D3XVV-ypHfraYO52eH9ur",
|
|
82
|
+
name: "Bulgarian Split Squat",
|
|
83
|
+
primaryMuscles: ["quadriceps", "glutes-maximus"],
|
|
84
|
+
secondaryMuscles: ["hamstrings", "glutes-medius", "calves", "abs-lower"],
|
|
85
|
+
difficultyLevel: 2,
|
|
86
|
+
movementPattern: "lunge",
|
|
87
|
+
exerciseType: "bodyweight",
|
|
88
|
+
isUnilateral: false,
|
|
89
|
+
bodyweightDependency: "high",
|
|
90
|
+
weightMultiplier: null,
|
|
91
|
+
status: "active",
|
|
92
|
+
},
|
|
93
|
+
EA9B8p_H60pQPRBevjRj6: {
|
|
94
|
+
exerciseId: "EA9B8p_H60pQPRBevjRj6",
|
|
95
|
+
name: "Close Grip Push Up",
|
|
96
|
+
primaryMuscles: ["tricep-brachii-long", "tricep-brachii-lateral"],
|
|
97
|
+
secondaryMuscles: [
|
|
98
|
+
"pectoralis-major",
|
|
99
|
+
"pectoralis-minor",
|
|
100
|
+
"deltoids-anterior",
|
|
101
|
+
"serratus-anterior",
|
|
102
|
+
"abs-upper",
|
|
103
|
+
],
|
|
104
|
+
difficultyLevel: 3,
|
|
105
|
+
movementPattern: "push_horizontal",
|
|
106
|
+
exerciseType: "bodyweight",
|
|
107
|
+
isUnilateral: false,
|
|
108
|
+
bodyweightDependency: "high",
|
|
109
|
+
weightMultiplier: null,
|
|
110
|
+
status: "active",
|
|
111
|
+
},
|
|
112
|
+
RQCNQi0sw8icSqyhzytyS: {
|
|
113
|
+
exerciseId: "RQCNQi0sw8icSqyhzytyS",
|
|
114
|
+
name: "Machine Fly (Pec Deck)",
|
|
115
|
+
primaryMuscles: ["pectoralis-major", "pectoralis-minor"],
|
|
116
|
+
secondaryMuscles: ["deltoids-anterior", "serratus-anterior"],
|
|
117
|
+
difficultyLevel: 1,
|
|
118
|
+
movementPattern: "push_horizontal",
|
|
119
|
+
exerciseType: "isolation",
|
|
120
|
+
isUnilateral: false,
|
|
121
|
+
bodyweightDependency: "none",
|
|
122
|
+
weightMultiplier: {
|
|
123
|
+
female: 0.18,
|
|
124
|
+
male: 0.3,
|
|
125
|
+
default: 0.24,
|
|
126
|
+
},
|
|
127
|
+
status: "active",
|
|
128
|
+
},
|
|
129
|
+
"S7Edj-DnCvOgYNv_0SlzP": {
|
|
130
|
+
exerciseId: "S7Edj-DnCvOgYNv_0SlzP",
|
|
131
|
+
name: "Plank Up-Downs",
|
|
132
|
+
primaryMuscles: ["abs-upper", "abs-lower"],
|
|
133
|
+
secondaryMuscles: [
|
|
134
|
+
"deltoids-anterior",
|
|
135
|
+
"tricep-brachii-long",
|
|
136
|
+
"obliques",
|
|
137
|
+
"serratus-anterior",
|
|
138
|
+
],
|
|
139
|
+
difficultyLevel: 3,
|
|
140
|
+
movementPattern: "core_stability",
|
|
141
|
+
exerciseType: "bodyweight",
|
|
142
|
+
isUnilateral: false,
|
|
143
|
+
bodyweightDependency: null,
|
|
144
|
+
weightMultiplier: null,
|
|
145
|
+
status: "active",
|
|
146
|
+
},
|
|
147
|
+
_pz6syBDTeH36DFmg2VRy: {
|
|
148
|
+
exerciseId: "_pz6syBDTeH36DFmg2VRy",
|
|
149
|
+
name: "Treadmill Running",
|
|
150
|
+
primaryMuscles: ["quadriceps", "hamstrings", "calf-inner", "calf-outer"],
|
|
151
|
+
secondaryMuscles: [
|
|
152
|
+
"maximus-lower",
|
|
153
|
+
"medius-upper",
|
|
154
|
+
"abs-upper",
|
|
155
|
+
"abs-lower",
|
|
156
|
+
],
|
|
157
|
+
difficultyLevel: 1,
|
|
158
|
+
movementPattern: "cardio",
|
|
159
|
+
exerciseType: "cardio",
|
|
160
|
+
isUnilateral: false,
|
|
161
|
+
bodyweightDependency: "high",
|
|
162
|
+
weightMultiplier: null,
|
|
163
|
+
status: "active",
|
|
164
|
+
},
|
|
165
|
+
cICiD8ldTl3TVKl_SZV4y: {
|
|
166
|
+
exerciseId: "cICiD8ldTl3TVKl_SZV4y",
|
|
167
|
+
name: "Tricep Extension Machine",
|
|
168
|
+
primaryMuscles: ["tricep-brachii-long", "tricep-brachii-lateral"],
|
|
169
|
+
secondaryMuscles: ["fore-arm-inner"],
|
|
170
|
+
difficultyLevel: 1,
|
|
171
|
+
movementPattern: "push_horizontal",
|
|
172
|
+
exerciseType: "isolation",
|
|
173
|
+
isUnilateral: false,
|
|
174
|
+
bodyweightDependency: "none",
|
|
175
|
+
weightMultiplier: {
|
|
176
|
+
female: 0.15,
|
|
177
|
+
male: 0.25,
|
|
178
|
+
default: 0.2,
|
|
179
|
+
},
|
|
180
|
+
status: "active",
|
|
181
|
+
},
|
|
182
|
+
cXExEzqEAF8YrFN2kAnIq: {
|
|
183
|
+
exerciseId: "cXExEzqEAF8YrFN2kAnIq",
|
|
184
|
+
name: "Alternating Lunges with Pause",
|
|
185
|
+
primaryMuscles: ["quadriceps", "glutes-maximus"],
|
|
186
|
+
secondaryMuscles: ["hamstrings", "calves", "glutes-medius", "abs-lower"],
|
|
187
|
+
difficultyLevel: 2,
|
|
188
|
+
movementPattern: "lunge",
|
|
189
|
+
exerciseType: "bodyweight",
|
|
190
|
+
isUnilateral: false,
|
|
191
|
+
bodyweightDependency: "high",
|
|
192
|
+
weightMultiplier: null,
|
|
193
|
+
status: "active",
|
|
194
|
+
},
|
|
195
|
+
"xNvol6-lFnHQUMCfxFMBD": {
|
|
196
|
+
exerciseId: "xNvol6-lFnHQUMCfxFMBD",
|
|
197
|
+
name: "Bodyweight Squat",
|
|
198
|
+
primaryMuscles: ["quadriceps", "glutes-maximus"],
|
|
199
|
+
secondaryMuscles: ["hamstrings", "calves", "abs-lower"],
|
|
200
|
+
difficultyLevel: 1,
|
|
201
|
+
movementPattern: "squat",
|
|
202
|
+
exerciseType: "bodyweight",
|
|
203
|
+
isUnilateral: false,
|
|
204
|
+
bodyweightDependency: null,
|
|
205
|
+
weightMultiplier: null,
|
|
206
|
+
status: "active",
|
|
207
|
+
},
|
|
208
|
+
};
|
|
@@ -5,31 +5,24 @@ import { TExercise } from "../types";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const mockExerciseWeightReps: TExercise;
|
|
7
7
|
/**
|
|
8
|
-
* MOCK EXERCISE: Reps-Only
|
|
9
|
-
* Simulates a bodyweight movement (e.g., Push-up).
|
|
8
|
+
* MOCK EXERCISE: Reps-Only (bodyweight push)
|
|
10
9
|
*/
|
|
11
10
|
export declare const mockExerciseRepsOnly: TExercise;
|
|
12
11
|
/**
|
|
13
|
-
* MOCK EXERCISE: Duration
|
|
14
|
-
* Simulates an isometric hold (e.g., Plank).
|
|
12
|
+
* MOCK EXERCISE: Duration (isometric hold)
|
|
15
13
|
*/
|
|
16
14
|
export declare const mockExerciseDuration: TExercise;
|
|
17
15
|
/**
|
|
18
16
|
* MOCK EXERCISE: Cardio-Machine
|
|
19
|
-
* Simulates a machine cardio session (e.g., Treadmill).
|
|
20
17
|
*/
|
|
21
18
|
export declare const mockExerciseCardioMachine: TExercise;
|
|
22
19
|
/**
|
|
23
20
|
* MOCK EXERCISE: Cardio-Free
|
|
24
|
-
* Simulates an outdoor/untracked cardio session (e.g., Outdoor Run).
|
|
25
21
|
*/
|
|
26
22
|
export declare const mockExerciseCardioFree: TExercise;
|
|
27
23
|
/**
|
|
28
|
-
* MOCK EXERCISE: No Guardrails
|
|
29
|
-
* Simulates an older DB entry or custom exercise missing guardrails.
|
|
24
|
+
* MOCK EXERCISE: No Guardrails (legacy/custom entry)
|
|
30
25
|
*/
|
|
31
26
|
export declare const mockExerciseNoGuardrails: TExercise;
|
|
32
|
-
/**
|
|
33
|
-
* Helper dictionary containing all mock exercises mapped by their ID.
|
|
34
|
-
*/
|
|
27
|
+
/** All mock exercises mapped by id. */
|
|
35
28
|
export declare const mockExercisesDictionary: Record<string, TExercise>;
|
|
@@ -5,7 +5,6 @@ exports.mockExercisesDictionary = exports.mockExerciseNoGuardrails = exports.moc
|
|
|
5
5
|
* MOCK EXERCISE: Weight-Reps
|
|
6
6
|
* Simulates a standard compound lift (e.g., Barbell Squat).
|
|
7
7
|
*/
|
|
8
|
-
// @ts-ignore
|
|
9
8
|
exports.mockExerciseWeightReps = {
|
|
10
9
|
exerciseId: "mock-exercise-weight-reps-123",
|
|
11
10
|
name: "Generic Barbell Squat",
|
|
@@ -41,11 +40,7 @@ exports.mockExerciseWeightReps = {
|
|
|
41
40
|
maximum: 300,
|
|
42
41
|
optimalRange: [90, 180],
|
|
43
42
|
},
|
|
44
|
-
singleRep: {
|
|
45
|
-
min: 2.0,
|
|
46
|
-
max: 5.0,
|
|
47
|
-
typical: 3.5,
|
|
48
|
-
},
|
|
43
|
+
singleRep: { min: 2.0, max: 5.0, typical: 3.5 },
|
|
49
44
|
},
|
|
50
45
|
youtubeVideoUrl: ["https://youtube.com/watch?v=mock1"],
|
|
51
46
|
modelVideoUrl: "https://example.com/mock-video.mp4",
|
|
@@ -53,12 +48,30 @@ exports.mockExerciseWeightReps = {
|
|
|
53
48
|
instructionsHtml: "<ul><li>Mock instruction 1</li></ul>",
|
|
54
49
|
importantTipsHtml: "<ul><li>Mock tip 1</li></ul>",
|
|
55
50
|
popularityIndex: 90,
|
|
51
|
+
// Fields previously missing (the @ts-ignore):
|
|
52
|
+
movementPattern: "squat",
|
|
53
|
+
exerciseType: "compound",
|
|
54
|
+
stabilityDemand: "moderate",
|
|
55
|
+
progressionTier: "beginner",
|
|
56
56
|
};
|
|
57
57
|
/**
|
|
58
|
-
* MOCK EXERCISE: Reps-Only
|
|
59
|
-
* Simulates a bodyweight movement (e.g., Push-up).
|
|
58
|
+
* MOCK EXERCISE: Reps-Only (bodyweight push)
|
|
60
59
|
*/
|
|
61
|
-
exports.mockExerciseRepsOnly =
|
|
60
|
+
exports.mockExerciseRepsOnly = {
|
|
61
|
+
...exports.mockExerciseWeightReps,
|
|
62
|
+
exerciseId: "mock-exercise-reps-only-456",
|
|
63
|
+
name: "Generic Push-Up",
|
|
64
|
+
status: "active",
|
|
65
|
+
bodyPart: ["Chest", "Core"],
|
|
66
|
+
recordType: "reps-only",
|
|
67
|
+
primaryMuscles: ["pectoralis-major"],
|
|
68
|
+
secondaryMuscles: ["tricep-brachii-lateral", "abs-lower"],
|
|
69
|
+
trainingTypes: ["body-weight"],
|
|
70
|
+
movementPattern: "push_horizontal",
|
|
71
|
+
exerciseType: "bodyweight",
|
|
72
|
+
bodyweightDependency: "high",
|
|
73
|
+
weightMultiplier: { male: 0.65, female: 0.6, default: 0.62 },
|
|
74
|
+
timingGuardrails: {
|
|
62
75
|
type: "reps-only",
|
|
63
76
|
stressRestBonus: 2,
|
|
64
77
|
fatigueMultiplier: 1.05,
|
|
@@ -69,17 +82,25 @@ exports.mockExerciseRepsOnly = Object.assign(Object.assign({}, exports.mockExerc
|
|
|
69
82
|
maximum: 180,
|
|
70
83
|
optimalRange: [45, 90],
|
|
71
84
|
},
|
|
72
|
-
singleRep: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
typical: 1.8,
|
|
76
|
-
},
|
|
77
|
-
} });
|
|
85
|
+
singleRep: { min: 1.0, max: 3.0, typical: 1.8 },
|
|
86
|
+
},
|
|
87
|
+
};
|
|
78
88
|
/**
|
|
79
|
-
* MOCK EXERCISE: Duration
|
|
80
|
-
* Simulates an isometric hold (e.g., Plank).
|
|
89
|
+
* MOCK EXERCISE: Duration (isometric hold)
|
|
81
90
|
*/
|
|
82
|
-
exports.mockExerciseDuration =
|
|
91
|
+
exports.mockExerciseDuration = {
|
|
92
|
+
...exports.mockExerciseWeightReps,
|
|
93
|
+
exerciseId: "mock-exercise-duration-789",
|
|
94
|
+
name: "Generic Forearm Plank",
|
|
95
|
+
status: "active",
|
|
96
|
+
bodyPart: ["Core"],
|
|
97
|
+
recordType: "duration",
|
|
98
|
+
primaryMuscles: ["abs-lower", "abs-upper"],
|
|
99
|
+
secondaryMuscles: ["lower-back"],
|
|
100
|
+
trainingTypes: ["body-weight", "isometric"],
|
|
101
|
+
movementPattern: "core_stability",
|
|
102
|
+
exerciseType: "isometric",
|
|
103
|
+
timingGuardrails: {
|
|
83
104
|
type: "duration",
|
|
84
105
|
stressRestBonus: 3,
|
|
85
106
|
fatigueMultiplier: 1.1,
|
|
@@ -90,17 +111,25 @@ exports.mockExerciseDuration = Object.assign(Object.assign({}, exports.mockExerc
|
|
|
90
111
|
maximum: 120,
|
|
91
112
|
optimalRange: [45, 60],
|
|
92
113
|
},
|
|
93
|
-
setDuration: {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
typical: 60,
|
|
97
|
-
},
|
|
98
|
-
} });
|
|
114
|
+
setDuration: { min: 15, max: 300, typical: 60 },
|
|
115
|
+
},
|
|
116
|
+
};
|
|
99
117
|
/**
|
|
100
118
|
* MOCK EXERCISE: Cardio-Machine
|
|
101
|
-
* Simulates a machine cardio session (e.g., Treadmill).
|
|
102
119
|
*/
|
|
103
|
-
exports.mockExerciseCardioMachine =
|
|
120
|
+
exports.mockExerciseCardioMachine = {
|
|
121
|
+
...exports.mockExerciseWeightReps,
|
|
122
|
+
exerciseId: "mock-exercise-cardio-machine-101",
|
|
123
|
+
name: "Generic Treadmill Run",
|
|
124
|
+
status: "active",
|
|
125
|
+
bodyPart: ["Legs"],
|
|
126
|
+
recordType: "cardio-machine",
|
|
127
|
+
primaryMuscles: ["quadriceps", "hamstrings", "calves"],
|
|
128
|
+
secondaryMuscles: ["glutes-maximus"],
|
|
129
|
+
trainingTypes: ["cardio"],
|
|
130
|
+
movementPattern: "cardio",
|
|
131
|
+
exerciseType: "cardio",
|
|
132
|
+
timingGuardrails: {
|
|
104
133
|
type: "cardio-machine",
|
|
105
134
|
stressRestBonus: 0,
|
|
106
135
|
fatigueMultiplier: 1.0,
|
|
@@ -111,31 +140,42 @@ exports.mockExerciseCardioMachine = Object.assign(Object.assign({}, exports.mock
|
|
|
111
140
|
maximum: 300,
|
|
112
141
|
optimalRange: [0, 60],
|
|
113
142
|
},
|
|
114
|
-
}
|
|
143
|
+
},
|
|
144
|
+
};
|
|
115
145
|
/**
|
|
116
146
|
* MOCK EXERCISE: Cardio-Free
|
|
117
|
-
* Simulates an outdoor/untracked cardio session (e.g., Outdoor Run).
|
|
118
147
|
*/
|
|
119
|
-
exports.mockExerciseCardioFree =
|
|
148
|
+
exports.mockExerciseCardioFree = {
|
|
149
|
+
...exports.mockExerciseWeightReps,
|
|
150
|
+
exerciseId: "mock-exercise-cardio-free-202",
|
|
151
|
+
name: "Generic Outdoor Jog",
|
|
152
|
+
status: "active",
|
|
153
|
+
bodyPart: ["Legs"],
|
|
154
|
+
recordType: "cardio-free",
|
|
155
|
+
primaryMuscles: ["quadriceps", "hamstrings", "calves"],
|
|
156
|
+
secondaryMuscles: ["glutes-maximus"],
|
|
157
|
+
trainingTypes: ["cardio"],
|
|
158
|
+
movementPattern: "cardio",
|
|
159
|
+
exerciseType: "cardio",
|
|
160
|
+
timingGuardrails: {
|
|
120
161
|
type: "cardio-free",
|
|
121
162
|
stressRestBonus: 0,
|
|
122
163
|
fatigueMultiplier: 1.0,
|
|
123
164
|
setupTypicalSecs: 0,
|
|
124
|
-
restPeriods: {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
maximum: 300,
|
|
128
|
-
optimalRange: [0, 0],
|
|
129
|
-
},
|
|
130
|
-
} });
|
|
131
|
-
/**
|
|
132
|
-
* MOCK EXERCISE: No Guardrails
|
|
133
|
-
* Simulates an older DB entry or custom exercise missing guardrails.
|
|
134
|
-
*/
|
|
135
|
-
exports.mockExerciseNoGuardrails = Object.assign(Object.assign({}, exports.mockExerciseWeightReps), { exerciseId: "mock-exercise-no-guardrails-303", name: "Legacy Exercise", status: "active", timingGuardrails: undefined });
|
|
165
|
+
restPeriods: { minimum: 0, typical: 0, maximum: 300, optimalRange: [0, 0] },
|
|
166
|
+
},
|
|
167
|
+
};
|
|
136
168
|
/**
|
|
137
|
-
*
|
|
169
|
+
* MOCK EXERCISE: No Guardrails (legacy/custom entry)
|
|
138
170
|
*/
|
|
171
|
+
exports.mockExerciseNoGuardrails = {
|
|
172
|
+
...exports.mockExerciseWeightReps,
|
|
173
|
+
exerciseId: "mock-exercise-no-guardrails-303",
|
|
174
|
+
name: "Legacy Exercise",
|
|
175
|
+
status: "active",
|
|
176
|
+
timingGuardrails: undefined,
|
|
177
|
+
};
|
|
178
|
+
/** All mock exercises mapped by id. */
|
|
139
179
|
exports.mockExercisesDictionary = {
|
|
140
180
|
[exports.mockExerciseWeightReps.exerciseId]: exports.mockExerciseWeightReps,
|
|
141
181
|
[exports.mockExerciseRepsOnly.exerciseId]: exports.mockExerciseRepsOnly,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Real workout-session records (verbatim shape as stored in CLIENT_WORKOUTS_TABLE),
|
|
3
|
+
* used to test the session loader's mapping and the constellation end-to-end
|
|
4
|
+
* against the real exercise catalog. clientId is rewired to MOCK_USER_ID.
|
|
5
|
+
*
|
|
6
|
+
* These reference real exercise IDs that exist in the production exercise
|
|
7
|
+
* snapshot, with real movement patterns (push_horizontal, squat, lunge, etc.).
|
|
8
|
+
*/
|
|
9
|
+
export interface IStoredWorkoutSession {
|
|
10
|
+
pk: string;
|
|
11
|
+
sk: string;
|
|
12
|
+
clientId: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
sessionId: string;
|
|
15
|
+
sessionRecord: {
|
|
16
|
+
exerciseId: string;
|
|
17
|
+
records: Record<string, unknown>[];
|
|
18
|
+
}[];
|
|
19
|
+
userDuration?: number;
|
|
20
|
+
expirationTime?: number;
|
|
21
|
+
}
|
|
22
|
+
/** Upper/push + accessory session (bench-pattern, triceps, shoulders). */
|
|
23
|
+
export declare const mockSessionPush: IStoredWorkoutSession;
|
|
24
|
+
/** Lower-body session (squat, lunge, plyo) — note several sets isDone:false. */
|
|
25
|
+
export declare const mockSessionLegs: IStoredWorkoutSession;
|
|
26
|
+
/** Short mixed session (abs, cardio-machine, duration) — recent. */
|
|
27
|
+
export declare const mockSessionMixed: IStoredWorkoutSession;
|
|
28
|
+
export declare const mockStoredSessions: IStoredWorkoutSession[];
|