@dgpholdings/greatoak-shared 1.2.81 → 1.2.83
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 +1 -1
- package/dist/types/TApiAuth.d.ts +18 -30
- package/dist/types/TApiExercise.d.ts +3 -0
- package/package.json +1 -1
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` |
|
|
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 |
|
package/dist/types/TApiAuth.d.ts
CHANGED
|
@@ -1,47 +1,35 @@
|
|
|
1
|
-
import type { TAiFitnessGoal
|
|
1
|
+
import type { TAiFitnessGoal } from "../constants/AiExerciseVocabulary";
|
|
2
2
|
import { TAuthType, TGender, TProfessionalCategory, TUserMetric, TUserType, TInjuryInfo } from "./TApiUser";
|
|
3
|
-
import { TActivityLevel
|
|
3
|
+
import { TActivityLevel } from "./TUserPreferences";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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
|
|
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";
|
|
@@ -112,6 +112,9 @@ export type TExercise = {
|
|
|
112
112
|
paceFactors?: {
|
|
113
113
|
[key: string]: number;
|
|
114
114
|
};
|
|
115
|
+
movementPattern?: "push" | "pull" | "hinge" | "squat" | "lunge" | "rotation" | "carry" | "isolation";
|
|
116
|
+
stabilityDemand?: "low" | "moderate" | "high";
|
|
117
|
+
progressionTier?: "beginner" | "intermediate" | "advanced" | "elite";
|
|
115
118
|
};
|
|
116
119
|
youtubeVideoUrl: string[];
|
|
117
120
|
modelVideoUrl: string;
|