@dgpholdings/greatoak-shared 1.2.68 → 1.2.69

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,4 +1,4 @@
1
- import { TAiIntentChip, TAiSleepQuality } from "../constants/AiExerciseVocabulary";
1
+ import { TAiIntentChip, TAiSleepQuality, TAiUserInjury } from "../constants/AiExerciseVocabulary";
2
2
  import { TTemplate } from "./TApiTemplateData";
3
3
  export type TApiAiQuickStartWorkoutReq = {
4
4
  /**
@@ -20,7 +20,31 @@ export type TApiAiQuickStartWorkoutReq = {
20
20
  * Crucial for correctly fetching "yesterday's" workout history from DynamoDB.
21
21
  */
22
22
  timezone: string;
23
- workoutTime: string;
23
+ /**
24
+ * Whether the user intends to work out at home or at the gym today.
25
+ */
26
+ workoutLocation: "home" | "gym";
27
+ /**
28
+ * The general time of day the user is working out.
29
+ * Can influence warm-up duration and intensity (e.g., morning stiffness vs. evening fatigue, Afternoon: (Peak Performance)).
30
+ */
31
+ workoutTime: "morning" | "afternoon" | "evening" | "night";
32
+ };
33
+ export type TAiEnrichedContext = {
34
+ qdrantFilters: {
35
+ must: Record<string, any>[];
36
+ mustNot: Record<string, any>[];
37
+ };
38
+ aiContext: {
39
+ age: number;
40
+ gender: string;
41
+ fitnessLevel: string;
42
+ sleepQuality: string;
43
+ fatigueMap: Record<string, any>;
44
+ activeInjuries: TAiUserInjury[];
45
+ avoidedAreas: string[];
46
+ yesterdaysExercises: string[];
47
+ };
24
48
  };
25
49
  export type TApiAiQuickStartWorkoutRes = {
26
50
  status: 200;
@@ -32,6 +56,11 @@ export type TApiAiQuickStartWorkoutRes = {
32
56
  plan: Extract<TTemplate, {
33
57
  type: "ai-generated";
34
58
  }>;
59
+ /**
60
+ * Debug / Transparency information indicating exactly what filters
61
+ * and context variables the backend fed into the semantic search and LLM.
62
+ */
63
+ enrichedContext: TAiEnrichedContext;
35
64
  } | {
36
65
  status: 400 | 403 | 500;
37
66
  state: "failed" | "unauthorized";
@@ -1,5 +1,5 @@
1
- import type { TAiFitnessGoal } from "../constants/AiExerciseVocabulary";
2
- import { TAuthType, TGender, TProfessionalCategory, TUserMetric, TUserType, TActivityLevel } from "./TApiUser";
1
+ import type { TAiFitnessGoal, TAiBodyArea } from "../constants/AiExerciseVocabulary";
2
+ import { TAuthType, TGender, TProfessionalCategory, TUserMetric, TUserType, TActivityLevel, TInjuryInfo } from "./TApiUser";
3
3
  export type TOnboardingData = {
4
4
  userWeightKg: number;
5
5
  dob: Date;
@@ -9,7 +9,9 @@ export type TOnboardingData = {
9
9
  bodyFatPercentage: number;
10
10
  fitnessGoals: TAiFitnessGoal[];
11
11
  fitnessLevel: TActivityLevel;
12
- gdprEssential: boolean;
12
+ avoidBodyAreas?: TAiBodyArea[];
13
+ injuryInfo?: TInjuryInfo;
14
+ gdprEssential?: boolean;
13
15
  gdprAnalytics: boolean;
14
16
  gdprMarketing: boolean;
15
17
  userCode: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dgpholdings/greatoak-shared",
3
- "version": "1.2.68",
3
+ "version": "1.2.69",
4
4
  "description": "Shared TypeScript types and utilities for @dgpholdings projects",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",