@dgpholdings/greatoak-shared 1.2.66 → 1.2.68

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.
@@ -1,41 +1,48 @@
1
1
  export declare const AI_FITNESS_GOALS: readonly ["strength", "hypertrophy", "fat_loss", "endurance", "mobility", "rehabilitation", "sport_performance", "general_fitness", "core_strength"];
2
- export type TAiFitnessGoal = typeof AI_FITNESS_GOALS[number];
2
+ export type TAiFitnessGoal = (typeof AI_FITNESS_GOALS)[number];
3
3
  export declare const AI_FITNESS_GOAL_LABELS: Record<TAiFitnessGoal, string>;
4
4
  export declare const AI_EQUIPMENT_TYPES: readonly ["none", "dumbbell", "barbell", "resistance_band", "cable_machine", "standard_machine", "suspension_trainer", "pull_up_bar", "bench", "kettlebell", "niche_machine", "exercise_ball", "ez_bar", "cardio_machine", "smith_machine", "weight_plate", "jump_rope", "battle_ropes", "medicine_ball", "ab_wheel", "plyo_box", "parallel_bars"];
5
- export type TAiEquipmentType = typeof AI_EQUIPMENT_TYPES[number];
5
+ export type TAiEquipmentType = (typeof AI_EQUIPMENT_TYPES)[number];
6
6
  export declare const AI_HOME_EQUIPMENT: TAiEquipmentType[];
7
7
  export declare const AI_MOVEMENT_PATTERNS: readonly ["push_horizontal", "push_vertical", "pull_horizontal", "pull_vertical", "squat", "hinge", "lunge", "rotation", "carry", "isolation", "plyo", "cardio", "mobility", "balance", "core_stability"];
8
- export type TAiMovementPattern = typeof AI_MOVEMENT_PATTERNS[number];
8
+ export type TAiMovementPattern = (typeof AI_MOVEMENT_PATTERNS)[number];
9
9
  export declare const AI_PUSH_PATTERNS: TAiMovementPattern[];
10
10
  export declare const AI_PULL_PATTERNS: TAiMovementPattern[];
11
11
  export declare const AI_LEG_PATTERNS: TAiMovementPattern[];
12
12
  export declare const AI_CORE_PATTERNS: TAiMovementPattern[];
13
13
  export declare const AI_WORKOUT_PLACEMENTS: readonly ["primary_compound", "secondary_compound", "accessory", "finisher", "warmup", "cooldown"];
14
- export type TAiWorkoutPlacement = typeof AI_WORKOUT_PLACEMENTS[number];
14
+ export type TAiWorkoutPlacement = (typeof AI_WORKOUT_PLACEMENTS)[number];
15
15
  export declare const AI_SESSION_ORDER: TAiWorkoutPlacement[];
16
16
  export declare const AI_DIFFICULTY_LEVELS: readonly ["beginner", "intermediate", "advanced", "expert"];
17
- export type TAiDifficultyLevel = typeof AI_DIFFICULTY_LEVELS[number];
17
+ export type TAiDifficultyLevel = (typeof AI_DIFFICULTY_LEVELS)[number];
18
18
  export declare const AI_FITNESS_LEVELS: readonly ["beginner", "intermediate", "advanced"];
19
- export type TAiFitnessLevel = typeof AI_FITNESS_LEVELS[number];
19
+ export type TAiFitnessLevel = (typeof AI_FITNESS_LEVELS)[number];
20
20
  export declare const AI_DIFFICULTY_FILTER: Record<TAiFitnessLevel, TAiDifficultyLevel[]>;
21
21
  export declare const AI_INTENSITY_LEVELS: readonly ["low", "moderate", "high"];
22
- export type TAiIntensityLevel = typeof AI_INTENSITY_LEVELS[number];
23
- export declare const AI_SLEEP_TO_MAX_CNS: Record<'good' | 'disturbed' | 'poor', TAiIntensityLevel>;
22
+ export type TAiIntensityLevel = (typeof AI_INTENSITY_LEVELS)[number];
23
+ export declare const AI_SLEEP_TO_MAX_CNS: Record<"good" | "disturbed" | "poor", TAiIntensityLevel>;
24
24
  export declare const AI_MET_THRESHOLDS: {
25
25
  readonly low: 3;
26
26
  readonly moderate: 6;
27
27
  readonly high: 6;
28
28
  };
29
29
  export declare const AI_BODY_AREAS: readonly ["lower back", "upper back", "shoulders", "neck", "elbows", "wrists", "hips", "hip flexors", "knees", "ankles", "hamstrings", "achilles tendon", "forearms", "groin", "calf muscles", "chest", "core"];
30
- export type TAiBodyArea = typeof AI_BODY_AREAS[number];
30
+ export type TAiBodyArea = (typeof AI_BODY_AREAS)[number];
31
31
  export declare const AI_BODY_AREA_LABELS: Record<TAiBodyArea, string>;
32
32
  export declare const AI_BODY_ISSUE_TYPES: readonly ["general_soreness", "joint_pain", "old_injury", "diagnosed_condition"];
33
- export type TAiBodyIssueType = typeof AI_BODY_ISSUE_TYPES[number];
33
+ export type TAiBodyIssueType = (typeof AI_BODY_ISSUE_TYPES)[number];
34
34
  export declare const AI_BODY_ISSUE_LABELS: Record<TAiBodyIssueType, string>;
35
35
  export declare const AI_POPULAR_THRESHOLD = 75;
36
+ export declare const AI_INJURY_SEVERITY: readonly ["mild", "moderate", "severe", "acute_broken"];
37
+ export type TAiInjurySeverity = (typeof AI_INJURY_SEVERITY)[number];
38
+ export declare const AI_INJURY_SEVERITY_LABELS: Record<TAiInjurySeverity, string>;
39
+ export declare const AI_INJURY_DURATION: readonly ["1_5_days", "1_4_weeks", "1_3_months", "3_6_months", "6_plus_months"];
40
+ export type TAiInjuryDuration = (typeof AI_INJURY_DURATION)[number];
41
+ export declare const AI_INJURY_DURATION_LABELS: Record<TAiInjuryDuration, string>;
36
42
  export interface TAiUserInjury {
37
43
  bodyArea: TAiBodyArea;
38
- issueType: TAiBodyIssueType;
44
+ severity: TAiInjurySeverity;
45
+ duration: TAiInjuryDuration;
39
46
  note?: string;
40
47
  isActive: boolean;
41
48
  }
@@ -55,7 +62,7 @@ export interface TAiUserProfile {
55
62
  onboardingVersion: string;
56
63
  }
57
64
  export declare const AI_SLEEP_QUALITY_OPTIONS: readonly ["good", "disturbed", "poor"];
58
- export type TAiSleepQuality = typeof AI_SLEEP_QUALITY_OPTIONS[number];
65
+ export type TAiSleepQuality = (typeof AI_SLEEP_QUALITY_OPTIONS)[number];
59
66
  export declare const AI_SLEEP_QUALITY_LABELS: Record<TAiSleepQuality, string>;
60
- export declare const AI_INTENT_CHIPS: readonly ["Leg day", "Upper body", "Full body", "Push day", "Pull day", "Core & abs", "Something light", "Surprise me"];
61
- export type TAiIntentChip = typeof AI_INTENT_CHIPS[number];
67
+ export declare const AI_INTENT_CHIPS: readonly ["leg-day", "upper-body", "full-body", "push-day", "pull-day", "cardio-focused", "back-and-biceps", "chest-and-triceps", "legs-and-glutes", "core-and-abs", "mobility-and-flexibility", "Surprise me"];
68
+ export type TAiIntentChip = (typeof AI_INTENT_CHIPS)[number];
@@ -7,127 +7,140 @@
7
7
  // Verified against 701 active exercises from exercises-v2_3_PURE.json
8
8
  // Do not add values here without also ensuring they exist in the data.
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.AI_INTENT_CHIPS = exports.AI_SLEEP_QUALITY_LABELS = exports.AI_SLEEP_QUALITY_OPTIONS = exports.AI_POPULAR_THRESHOLD = exports.AI_BODY_ISSUE_LABELS = exports.AI_BODY_ISSUE_TYPES = exports.AI_BODY_AREA_LABELS = exports.AI_BODY_AREAS = exports.AI_MET_THRESHOLDS = exports.AI_SLEEP_TO_MAX_CNS = exports.AI_INTENSITY_LEVELS = exports.AI_DIFFICULTY_FILTER = exports.AI_FITNESS_LEVELS = exports.AI_DIFFICULTY_LEVELS = exports.AI_SESSION_ORDER = exports.AI_WORKOUT_PLACEMENTS = exports.AI_CORE_PATTERNS = exports.AI_LEG_PATTERNS = exports.AI_PULL_PATTERNS = exports.AI_PUSH_PATTERNS = exports.AI_MOVEMENT_PATTERNS = exports.AI_HOME_EQUIPMENT = exports.AI_EQUIPMENT_TYPES = exports.AI_FITNESS_GOAL_LABELS = exports.AI_FITNESS_GOALS = void 0;
10
+ exports.AI_INTENT_CHIPS = exports.AI_SLEEP_QUALITY_LABELS = exports.AI_SLEEP_QUALITY_OPTIONS = exports.AI_INJURY_DURATION_LABELS = exports.AI_INJURY_DURATION = exports.AI_INJURY_SEVERITY_LABELS = exports.AI_INJURY_SEVERITY = exports.AI_POPULAR_THRESHOLD = exports.AI_BODY_ISSUE_LABELS = exports.AI_BODY_ISSUE_TYPES = exports.AI_BODY_AREA_LABELS = exports.AI_BODY_AREAS = exports.AI_MET_THRESHOLDS = exports.AI_SLEEP_TO_MAX_CNS = exports.AI_INTENSITY_LEVELS = exports.AI_DIFFICULTY_FILTER = exports.AI_FITNESS_LEVELS = exports.AI_DIFFICULTY_LEVELS = exports.AI_SESSION_ORDER = exports.AI_WORKOUT_PLACEMENTS = exports.AI_CORE_PATTERNS = exports.AI_LEG_PATTERNS = exports.AI_PULL_PATTERNS = exports.AI_PUSH_PATTERNS = exports.AI_MOVEMENT_PATTERNS = exports.AI_HOME_EQUIPMENT = exports.AI_EQUIPMENT_TYPES = exports.AI_FITNESS_GOAL_LABELS = exports.AI_FITNESS_GOALS = void 0;
11
11
  // ── FITNESS GOALS ────────────────────────────────────────────────────────────
12
12
  exports.AI_FITNESS_GOALS = [
13
- 'strength',
14
- 'hypertrophy',
15
- 'fat_loss',
16
- 'endurance',
17
- 'mobility',
18
- 'rehabilitation',
19
- 'sport_performance',
20
- 'general_fitness',
21
- 'core_strength',
13
+ "strength",
14
+ "hypertrophy",
15
+ "fat_loss",
16
+ "endurance",
17
+ "mobility",
18
+ "rehabilitation",
19
+ "sport_performance",
20
+ "general_fitness",
21
+ "core_strength",
22
22
  ];
23
23
  exports.AI_FITNESS_GOAL_LABELS = {
24
- strength: 'Get stronger',
25
- hypertrophy: 'Build muscle',
26
- fat_loss: 'Lose fat',
27
- endurance: 'Improve endurance',
28
- mobility: 'Improve flexibility & mobility',
29
- rehabilitation: 'Recover from injury',
30
- sport_performance: 'Sport performance',
31
- general_fitness: 'General fitness',
32
- core_strength: 'Build core strength',
24
+ strength: "Get stronger",
25
+ hypertrophy: "Build muscle",
26
+ fat_loss: "Lose fat",
27
+ endurance: "Improve endurance",
28
+ mobility: "Improve flexibility & mobility",
29
+ rehabilitation: "Recover from injury",
30
+ sport_performance: "Sport performance",
31
+ general_fitness: "General fitness",
32
+ core_strength: "Build core strength",
33
33
  };
34
34
  // ── EQUIPMENT TYPES ──────────────────────────────────────────────────────────
35
35
  exports.AI_EQUIPMENT_TYPES = [
36
- 'none',
37
- 'dumbbell',
38
- 'barbell',
39
- 'resistance_band',
40
- 'cable_machine',
41
- 'standard_machine',
42
- 'suspension_trainer',
43
- 'pull_up_bar',
44
- 'bench',
45
- 'kettlebell',
46
- 'niche_machine',
47
- 'exercise_ball',
48
- 'ez_bar',
49
- 'cardio_machine',
50
- 'smith_machine',
51
- 'weight_plate',
52
- 'jump_rope',
53
- 'battle_ropes',
54
- 'medicine_ball',
55
- 'ab_wheel',
56
- 'plyo_box',
57
- 'parallel_bars',
36
+ "none",
37
+ "dumbbell",
38
+ "barbell",
39
+ "resistance_band",
40
+ "cable_machine",
41
+ "standard_machine",
42
+ "suspension_trainer",
43
+ "pull_up_bar",
44
+ "bench",
45
+ "kettlebell",
46
+ "niche_machine",
47
+ "exercise_ball",
48
+ "ez_bar",
49
+ "cardio_machine",
50
+ "smith_machine",
51
+ "weight_plate",
52
+ "jump_rope",
53
+ "battle_ropes",
54
+ "medicine_ball",
55
+ "ab_wheel",
56
+ "plyo_box",
57
+ "parallel_bars",
58
58
  ];
59
59
  exports.AI_HOME_EQUIPMENT = [
60
- 'none',
61
- 'dumbbell',
62
- 'resistance_band',
63
- 'pull_up_bar',
64
- 'bench',
65
- 'kettlebell',
66
- 'exercise_ball',
67
- 'jump_rope',
60
+ "none",
61
+ "dumbbell",
62
+ "resistance_band",
63
+ "pull_up_bar",
64
+ "bench",
65
+ "kettlebell",
66
+ "exercise_ball",
67
+ "jump_rope",
68
68
  ];
69
69
  // ── MOVEMENT PATTERNS ────────────────────────────────────────────────────────
70
70
  exports.AI_MOVEMENT_PATTERNS = [
71
- 'push_horizontal',
72
- 'push_vertical',
73
- 'pull_horizontal',
74
- 'pull_vertical',
75
- 'squat',
76
- 'hinge',
77
- 'lunge',
78
- 'rotation',
79
- 'carry',
80
- 'isolation',
81
- 'plyo',
82
- 'cardio',
83
- 'mobility',
84
- 'balance',
85
- 'core_stability',
86
- ];
87
- exports.AI_PUSH_PATTERNS = ['push_horizontal', 'push_vertical'];
88
- exports.AI_PULL_PATTERNS = ['pull_horizontal', 'pull_vertical'];
89
- exports.AI_LEG_PATTERNS = ['squat', 'hinge', 'lunge'];
90
- exports.AI_CORE_PATTERNS = ['core_stability', 'rotation'];
71
+ "push_horizontal",
72
+ "push_vertical",
73
+ "pull_horizontal",
74
+ "pull_vertical",
75
+ "squat",
76
+ "hinge",
77
+ "lunge",
78
+ "rotation",
79
+ "carry",
80
+ "isolation",
81
+ "plyo",
82
+ "cardio",
83
+ "mobility",
84
+ "balance",
85
+ "core_stability",
86
+ ];
87
+ exports.AI_PUSH_PATTERNS = [
88
+ "push_horizontal",
89
+ "push_vertical",
90
+ ];
91
+ exports.AI_PULL_PATTERNS = [
92
+ "pull_horizontal",
93
+ "pull_vertical",
94
+ ];
95
+ exports.AI_LEG_PATTERNS = [
96
+ "squat",
97
+ "hinge",
98
+ "lunge",
99
+ ];
100
+ exports.AI_CORE_PATTERNS = [
101
+ "core_stability",
102
+ "rotation",
103
+ ];
91
104
  // ── WORKOUT PLACEMENT ────────────────────────────────────────────────────────
92
105
  exports.AI_WORKOUT_PLACEMENTS = [
93
- 'primary_compound',
94
- 'secondary_compound',
95
- 'accessory',
96
- 'finisher',
97
- 'warmup',
98
- 'cooldown',
106
+ "primary_compound",
107
+ "secondary_compound",
108
+ "accessory",
109
+ "finisher",
110
+ "warmup",
111
+ "cooldown",
99
112
  ];
100
113
  exports.AI_SESSION_ORDER = [
101
- 'warmup',
102
- 'primary_compound',
103
- 'secondary_compound',
104
- 'accessory',
105
- 'finisher',
106
- 'cooldown',
114
+ "warmup",
115
+ "primary_compound",
116
+ "secondary_compound",
117
+ "accessory",
118
+ "finisher",
119
+ "cooldown",
107
120
  ];
108
121
  // ── DIFFICULTY LEVELS ────────────────────────────────────────────────────────
109
122
  exports.AI_DIFFICULTY_LEVELS = [
110
- 'beginner',
111
- 'intermediate',
112
- 'advanced',
113
- 'expert',
123
+ "beginner",
124
+ "intermediate",
125
+ "advanced",
126
+ "expert",
114
127
  ];
115
128
  exports.AI_FITNESS_LEVELS = [
116
- 'beginner',
117
- 'intermediate',
118
- 'advanced',
129
+ "beginner",
130
+ "intermediate",
131
+ "advanced",
119
132
  ];
120
133
  exports.AI_DIFFICULTY_FILTER = {
121
- beginner: ['beginner'],
122
- intermediate: ['beginner', 'intermediate'],
123
- advanced: ['beginner', 'intermediate', 'advanced', 'expert'],
134
+ beginner: ["beginner"],
135
+ intermediate: ["beginner", "intermediate"],
136
+ advanced: ["beginner", "intermediate", "advanced", "expert"],
124
137
  };
125
138
  // ── INTENSITY LEVELS ─────────────────────────────────────────────────────────
126
- exports.AI_INTENSITY_LEVELS = ['low', 'moderate', 'high'];
139
+ exports.AI_INTENSITY_LEVELS = ["low", "moderate", "high"];
127
140
  exports.AI_SLEEP_TO_MAX_CNS = {
128
- good: 'high',
129
- disturbed: 'moderate',
130
- poor: 'low',
141
+ good: "high",
142
+ disturbed: "moderate",
143
+ poor: "low",
131
144
  };
132
145
  // ── MET VALUES ───────────────────────────────────────────────────────────────
133
146
  exports.AI_MET_THRESHOLDS = {
@@ -137,73 +150,105 @@ exports.AI_MET_THRESHOLDS = {
137
150
  };
138
151
  // ── BODY AREAS ───────────────────────────────────────────────────────────────
139
152
  exports.AI_BODY_AREAS = [
140
- 'lower back',
141
- 'upper back',
142
- 'shoulders',
143
- 'neck',
144
- 'elbows',
145
- 'wrists',
146
- 'hips',
147
- 'hip flexors',
148
- 'knees',
149
- 'ankles',
150
- 'hamstrings',
151
- 'achilles tendon',
152
- 'forearms',
153
- 'groin',
154
- 'calf muscles',
155
- 'chest',
156
- 'core',
153
+ "lower back",
154
+ "upper back",
155
+ "shoulders",
156
+ "neck",
157
+ "elbows",
158
+ "wrists",
159
+ "hips",
160
+ "hip flexors",
161
+ "knees",
162
+ "ankles",
163
+ "hamstrings",
164
+ "achilles tendon",
165
+ "forearms",
166
+ "groin",
167
+ "calf muscles",
168
+ "chest",
169
+ "core",
157
170
  ];
158
171
  exports.AI_BODY_AREA_LABELS = {
159
- 'lower back': 'Lower back',
160
- 'upper back': 'Upper back',
161
- 'shoulders': 'Shoulder',
162
- 'neck': 'Neck',
163
- 'elbows': 'Elbow',
164
- 'wrists': 'Wrist',
165
- 'hips': 'Hip',
166
- 'hip flexors': 'Hip flexor',
167
- 'knees': 'Knee',
168
- 'ankles': 'Ankle',
169
- 'hamstrings': 'Hamstring',
170
- 'achilles tendon': 'Achilles / calf',
171
- 'forearms': 'Forearm',
172
- 'groin': 'Groin',
173
- 'calf muscles': 'Calf',
174
- 'chest': 'Chest',
175
- 'core': 'Core / abdomen',
172
+ "lower back": "Lower back",
173
+ "upper back": "Upper back",
174
+ shoulders: "Shoulder",
175
+ neck: "Neck",
176
+ elbows: "Elbow",
177
+ wrists: "Wrist",
178
+ hips: "Hip",
179
+ "hip flexors": "Hip flexor",
180
+ knees: "Knee",
181
+ ankles: "Ankle",
182
+ hamstrings: "Hamstring",
183
+ "achilles tendon": "Achilles / calf",
184
+ forearms: "Forearm",
185
+ groin: "Groin",
186
+ "calf muscles": "Calf",
187
+ chest: "Chest",
188
+ core: "Core / abdomen",
176
189
  };
177
190
  // ── BODY ISSUE TYPES ─────────────────────────────────────────────────────────
178
191
  exports.AI_BODY_ISSUE_TYPES = [
179
- 'general_soreness',
180
- 'joint_pain',
181
- 'old_injury',
182
- 'diagnosed_condition',
192
+ "general_soreness",
193
+ "joint_pain",
194
+ "old_injury",
195
+ "diagnosed_condition",
183
196
  ];
184
197
  exports.AI_BODY_ISSUE_LABELS = {
185
- general_soreness: 'General soreness or tightness',
186
- joint_pain: 'Joint pain or clicking',
187
- old_injury: 'Old / healed injury (just to note)',
188
- diagnosed_condition: 'Doctor-diagnosed condition',
198
+ general_soreness: "General soreness or tightness",
199
+ joint_pain: "Joint pain or clicking",
200
+ old_injury: "Old / healed injury (just to note)",
201
+ diagnosed_condition: "Doctor-diagnosed condition",
189
202
  };
190
203
  // ── POPULARITY ───────────────────────────────────────────────────────────────
191
204
  exports.AI_POPULAR_THRESHOLD = 75;
205
+ // ── INJURY SEVERITY / INTENSITY ────────────────────────────────────────────────
206
+ exports.AI_INJURY_SEVERITY = [
207
+ "mild",
208
+ "moderate",
209
+ "severe",
210
+ "acute_broken",
211
+ ];
212
+ exports.AI_INJURY_SEVERITY_LABELS = {
213
+ mild: "Mild (Discomfort / Tightness)",
214
+ moderate: "Moderate (Painful but manageable)",
215
+ severe: "Severe (Sharp pain / Limited mobility)",
216
+ acute_broken: "Acute / Broken (Recent trauma or surgery)",
217
+ };
218
+ // ── INJURY DURATION / AGE ────────────────────────────────────────────────────
219
+ exports.AI_INJURY_DURATION = [
220
+ "1_5_days",
221
+ "1_4_weeks",
222
+ "1_3_months",
223
+ "3_6_months",
224
+ "6_plus_months",
225
+ ];
226
+ exports.AI_INJURY_DURATION_LABELS = {
227
+ "1_5_days": "1-5 days (Acute)",
228
+ "1_4_weeks": "1-4 weeks",
229
+ "1_3_months": "1-3 months",
230
+ "3_6_months": "3-6 months",
231
+ "6_plus_months": "6+ months (Chronic / Permanent)",
232
+ };
192
233
  // ── SLEEP QUALITY ────────────────────────────────────────────────────────────
193
- exports.AI_SLEEP_QUALITY_OPTIONS = ['good', 'disturbed', 'poor'];
234
+ exports.AI_SLEEP_QUALITY_OPTIONS = ["good", "disturbed", "poor"];
194
235
  exports.AI_SLEEP_QUALITY_LABELS = {
195
- good: 'Slept well',
196
- disturbed: 'Lightly disturbed',
197
- poor: 'Poor sleep',
236
+ good: "Slept well",
237
+ disturbed: "Lightly disturbed",
238
+ poor: "Poor sleep",
198
239
  };
199
240
  // ── USER INTENT CHIPS ────────────────────────────────────────────────────────
200
241
  exports.AI_INTENT_CHIPS = [
201
- 'Leg day',
202
- 'Upper body',
203
- 'Full body',
204
- 'Push day',
205
- 'Pull day',
206
- 'Core & abs',
207
- 'Something light',
208
- 'Surprise me',
242
+ "leg-day",
243
+ "upper-body",
244
+ "full-body",
245
+ "push-day",
246
+ "pull-day",
247
+ "cardio-focused",
248
+ "back-and-biceps",
249
+ "chest-and-triceps",
250
+ "legs-and-glutes",
251
+ "core-and-abs",
252
+ "mobility-and-flexibility",
253
+ "Surprise me",
209
254
  ];
@@ -0,0 +1,39 @@
1
+ import { TAiIntentChip, TAiSleepQuality } from "../constants/AiExerciseVocabulary";
2
+ import { TTemplate } from "./TApiTemplateData";
3
+ export type TApiAiQuickStartWorkoutReq = {
4
+ /**
5
+ * What the user wants to focus on today.
6
+ * e.g., "Leg day", "Upper body", "Surprise me"
7
+ */
8
+ intentChip: TAiIntentChip;
9
+ /**
10
+ * How the user slept last night. Used by the AI to modulate volume and intensity.
11
+ */
12
+ sleepQuality: TAiSleepQuality;
13
+ /**
14
+ * Optional: How much time the user has for the workout.
15
+ * Helps the AI determine the number of exercises and sets.
16
+ */
17
+ availableTimeMinutes?: number;
18
+ /**
19
+ * The user's local timezone (e.g., "America/New_York").
20
+ * Crucial for correctly fetching "yesterday's" workout history from DynamoDB.
21
+ */
22
+ timezone: string;
23
+ workoutTime: string;
24
+ };
25
+ export type TApiAiQuickStartWorkoutRes = {
26
+ status: 200;
27
+ state: "success";
28
+ /**
29
+ * The fully generated, hyper-personalized workout plan.
30
+ * Guaranteed to be of type "ai-generated" and include the `aiContext`.
31
+ */
32
+ plan: Extract<TTemplate, {
33
+ type: "ai-generated";
34
+ }>;
35
+ } | {
36
+ status: 400 | 403 | 500;
37
+ state: "failed" | "unauthorized";
38
+ message: string;
39
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,6 +7,13 @@ export type TTemplateDb = TTemplate & {
7
7
  createAt: Date;
8
8
  updatedAt: Date;
9
9
  };
10
+ export type TAiPlanContext = {
11
+ reasoning: string;
12
+ targetMuscles: string[];
13
+ protectedAreas: string[];
14
+ intendedIntensity: "recovery" | "light" | "moderate" | "vigorous" | "max_effort";
15
+ adaptationNote?: string;
16
+ };
10
17
  export type TTemplate = {
11
18
  name: string;
12
19
  description?: string;
@@ -35,6 +42,17 @@ export type TTemplate = {
35
42
  avatarImgName?: never;
36
43
  thumbnailImageUrl?: never;
37
44
  version?: never;
45
+ } | {
46
+ type: "ai-generated";
47
+ aiContext: TAiPlanContext;
48
+ colorHex?: never;
49
+ sourcePlanId?: never;
50
+ sourcePlanCode?: never;
51
+ sourceGroupId?: never;
52
+ sourceDifficultyLevel?: never;
53
+ avatarImgName?: never;
54
+ thumbnailImageUrl?: string;
55
+ version?: never;
38
56
  });
39
57
  export type TApiTemplateCreateReq = Omit<TTemplate, "templateId" | "lastUsed" | "createdAt">;
40
58
  export type TApiTemplateCreateRes = {
@@ -1,4 +1,4 @@
1
- import type { TAiFitnessGoal } from "../constants/AiExerciseVocabulary";
1
+ import type { TAiFitnessGoal, TAiUserInjury } from "../constants/AiExerciseVocabulary";
2
2
  import { TGdprData } from "./commonTypes";
3
3
  export type TAuthType = "email" | "apple" | "anonymous" | "token";
4
4
  export type TGender = "male" | "female" | "unmentioned";
@@ -12,6 +12,10 @@ export type TSubscriptionType = "monthly" | "yearly" | "trial";
12
12
  export type TSubscriptionTier = "enthusiast" | "pro" | "none";
13
13
  export type TAppStore = "app_store" | "play_store" | null;
14
14
  export type TActivityLevel = "sedentary" | "lightly-active" | "moderately-active" | "very-active";
15
+ export type TInjuryInfo = {
16
+ injuries: TAiUserInjury[];
17
+ createdAt: Date;
18
+ };
15
19
  export type TUserMetric = {
16
20
  userId: string;
17
21
  dob: Date;
@@ -28,6 +32,7 @@ export type TUserMetric = {
28
32
  fitnessLevel?: TActivityLevel;
29
33
  bodyFatPercentage?: number;
30
34
  metricSystem: "US" | "EU";
35
+ injuryInfo?: TInjuryInfo;
31
36
  subscriptionStatus: TSubscriptionStatus;
32
37
  subscriptionType: TSubscriptionType;
33
38
  subscriptionTier: TSubscriptionTier;
@@ -66,6 +66,7 @@ export type TTemplateExercise = {
66
66
  restTimeSecs?: number;
67
67
  initialRecords: TRecord[];
68
68
  isAutoScaled?: boolean;
69
+ aiRationale?: string;
69
70
  };
70
71
  export type TGdprData = {
71
72
  consentVersion: string;
@@ -13,3 +13,4 @@ export type * from "./TApiProPlan";
13
13
  export type * from "./TApiSales";
14
14
  export type * from "./TApiAiExerciseAnalysis";
15
15
  export type * from "./TApiAdminAiHelp";
16
+ export type * from "./TApiAiQuickStartWorkout";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dgpholdings/greatoak-shared",
3
- "version": "1.2.66",
3
+ "version": "1.2.68",
4
4
  "description": "Shared TypeScript types and utilities for @dgpholdings projects",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",