@dgpholdings/greatoak-shared 1.2.81 → 1.2.82

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/README.md CHANGED
@@ -39,7 +39,7 @@ import { calculateExerciseScoreV2, calculateTotalVolume, isDefined, toError } fr
39
39
  | `commonTypes.ts` | `TRecord`, `TExerciseConfig`, `TTemplateExercise`, `TGdprData`, `TDayKey` |
40
40
  | `TApiExercise.ts` | `TExercise`, `TBodyPart`, `EBodyParts`, `TTrainingType`, `TTimingGuardrails` |
41
41
  | `TApiUser.ts` | `TUserMetric`, `TFitnessGoal`, `TUserType`, `TSubscriptionStatus`, `TGender` |
42
- | `TApiAuth.ts` | `TOnboardingData`, signup/signin request & response types |
42
+ | `TApiAuth.ts` | Signup/signin request & response types (`TApiSignupAnonymousReq`, `TSignInRes`, etc.) |
43
43
  | `TApiExerciseRecord.ts` | Record save/fetch request & response types |
44
44
  | `TApiTemplateData.ts` | `TTemplate`, `TTemplateDb`, `TTemplateData`, `TExerciseLatestRecord` |
45
45
  | `TApiProPlan.ts` | `TProPlan`, pro plan CRUD request & response types |
@@ -1,47 +1,35 @@
1
- import type { TAiFitnessGoal, TAiBodyArea } from "../constants/AiExerciseVocabulary";
1
+ import type { TAiFitnessGoal } from "../constants/AiExerciseVocabulary";
2
2
  import { TAuthType, TGender, TProfessionalCategory, TUserMetric, TUserType, TInjuryInfo } from "./TApiUser";
3
- import { TActivityLevel, TStablePreferences, TFemaleHealthContext } from "./TUserPreferences";
3
+ import { TActivityLevel } from "./TUserPreferences";
4
4
  /**
5
- * TOnboardingData: Core user profile data collected during onboarding
6
- * Does NOT include workout preferences - those come from TStablePreferences
5
+ * Anonymous signup request.
6
+ *
7
+ * Only fields actually collected during onboarding are declared here.
8
+ * Workout preferences (preferredEquipment, preferredDurationMinutes, warmup
9
+ * style, etc.) are populated server-side with sensible defaults — see
10
+ * `loginAnonymousController` and `core/constants.ts` in the backend.
11
+ *
12
+ * Essential GDPR consent is implicit at anonymous signup (the user can't
13
+ * proceed without it), so it isn't part of the wire contract.
7
14
  */
8
- export type TOnboardingData = {
15
+ export type TApiSignupAnonymousReq = {
16
+ model: string;
17
+ deviceUniqueId: string;
18
+ appLanguage: string;
19
+ fullName?: string;
20
+ userType: TUserType;
21
+ professionType?: TProfessionalCategory;
9
22
  weightKg: number;
10
23
  heightCm: number;
11
24
  dob: Date;
12
25
  gender: TGender;
13
26
  bodyFatPercentage: number;
14
27
  metricSystem: "US" | "EU";
15
- appLanguage: string;
16
28
  fitnessGoals: TAiFitnessGoal[];
17
29
  fitnessLevel: TActivityLevel;
18
- avoidBodyAreas?: TAiBodyArea[];
19
30
  injuryInfo?: TInjuryInfo;
20
- gdprEssential?: boolean;
21
31
  gdprAnalytics: boolean;
22
32
  gdprMarketing: boolean;
23
- userCode: string;
24
- userType: TUserType;
25
- professionType?: TProfessionalCategory;
26
- email?: string;
27
- fullName?: string;
28
- };
29
- /**
30
- * Anonymous signup request
31
- * = Core onboarding data + device info + OPTIONAL workout preferences
32
- */
33
- export type TApiSignupAnonymousReq = Omit<TOnboardingData, "userCode"> & {
34
- model: string;
35
- deviceUniqueId: string;
36
- preferredDurationMinutes?: TStablePreferences["preferredDurationMinutes"];
37
- preferredEquipment?: TStablePreferences["preferredEquipment"];
38
- preferCompoundMovements?: TStablePreferences["preferCompoundMovements"];
39
- includeWarmup?: TStablePreferences["includeWarmup"];
40
- includeCooldown?: TStablePreferences["includeCooldown"];
41
- warmupStyle?: TStablePreferences["warmupStyle"];
42
- favouriteMuscleGroups?: TStablePreferences["favouriteMuscleGroups"];
43
- blacklistedExerciseIds?: TStablePreferences["blacklistedExerciseIds"];
44
- femaleHealth?: TFemaleHealthContext | null;
45
33
  };
46
34
  export type TApiSignupAnonymousRes = TSignInRes & {
47
35
  authType: "anonymous";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dgpholdings/greatoak-shared",
3
- "version": "1.2.81",
3
+ "version": "1.2.82",
4
4
  "description": "Shared TypeScript types and utilities for @dgpholdings projects",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",