@dgpholdings/greatoak-shared 1.1.98 → 1.1.101
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/constants/BodyCategories.js +3 -0
- package/dist/types/TApiAuth.d.ts +7 -41
- package/dist/types/TApiClientProgress.d.ts +64 -0
- package/dist/types/TApiClientProgress.js +2 -0
- package/dist/types/TApiExercise.d.ts +8 -5
- package/dist/types/TApiExercise.js +3 -0
- package/dist/types/TApiTemplateShop.d.ts +2 -0
- package/dist/types/TApiUser.d.ts +2 -34
- package/dist/types/commonTypes.d.ts +15 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -55,6 +55,9 @@ exports.bodySubCatNaming = {
|
|
|
55
55
|
"deltoids-anterior": "Deltoids anterior",
|
|
56
56
|
"deltoids-middle": "Deltoids middle",
|
|
57
57
|
"lower-back": "Lower back",
|
|
58
|
+
"glutes-maximus": "Gluteus Maximus (lower)",
|
|
59
|
+
"glutes-medius": "Gluteus medius (upper)",
|
|
60
|
+
calves: "Calves",
|
|
58
61
|
};
|
|
59
62
|
exports.trainingTypes = [
|
|
60
63
|
"band",
|
package/dist/types/TApiAuth.d.ts
CHANGED
|
@@ -1,58 +1,31 @@
|
|
|
1
|
+
import { TGdprData } from "./commonTypes";
|
|
1
2
|
import { TAuthType, TFitnessGoal, TGender, TProfessionalCategory, TUserMetric, TUserType } from "./TApiUser";
|
|
2
|
-
export type TApiSignupReq = {
|
|
3
|
-
email: string;
|
|
4
|
-
password: string;
|
|
5
|
-
model: string;
|
|
6
|
-
appLanguage: string;
|
|
7
|
-
deviceUniqueId: string;
|
|
8
|
-
captchaToken: string;
|
|
9
|
-
};
|
|
10
3
|
export type TOnboardingData = {
|
|
11
4
|
userWeightKg: number;
|
|
12
5
|
dob: Date;
|
|
13
6
|
gender: TGender;
|
|
14
7
|
fitnessGoal: TFitnessGoal;
|
|
15
8
|
fitnessLevel: number;
|
|
9
|
+
gdprShareWorkoutHistory: boolean;
|
|
10
|
+
gdprSharePersonalInfo: boolean;
|
|
16
11
|
userCode: string;
|
|
17
12
|
userType: TUserType;
|
|
18
13
|
professionType?: TProfessionalCategory;
|
|
19
14
|
email?: string;
|
|
20
15
|
};
|
|
21
|
-
export type TApiSignupRes = TApiSigninRes & {
|
|
22
|
-
authType: "email";
|
|
23
|
-
};
|
|
24
16
|
export type TApiSignupAnonymousReq = Omit<TOnboardingData, "userCode"> & {
|
|
25
17
|
model: string;
|
|
26
18
|
appLanguage: string;
|
|
27
19
|
deviceUniqueId: string;
|
|
28
20
|
};
|
|
29
|
-
export type TApiSignupAnonymousRes =
|
|
21
|
+
export type TApiSignupAnonymousRes = TSignInRes & {
|
|
30
22
|
authType: "anonymous";
|
|
31
23
|
};
|
|
32
|
-
export type
|
|
33
|
-
email?: string;
|
|
34
|
-
identityToken: string;
|
|
35
|
-
model: string;
|
|
36
|
-
appLanguage: string;
|
|
37
|
-
deviceUniqueId: string;
|
|
38
|
-
};
|
|
39
|
-
export type TApiSigninAppleRes = TApiSigninRes & {
|
|
40
|
-
authType: "apple";
|
|
41
|
-
};
|
|
42
|
-
export type TApiSigninEmailReq = {
|
|
43
|
-
email: string;
|
|
44
|
-
password: string;
|
|
45
|
-
model: string;
|
|
46
|
-
deviceUniqueId: string;
|
|
47
|
-
captchaToken: string;
|
|
48
|
-
};
|
|
49
|
-
export type TApiSigninEmailRes = TApiSigninRes & {
|
|
50
|
-
authType: "email";
|
|
51
|
-
};
|
|
52
|
-
export type TApiSigninRes = {
|
|
24
|
+
export type TSignInRes = {
|
|
53
25
|
status: 200;
|
|
54
26
|
token: string;
|
|
55
27
|
user: TUserMetric;
|
|
28
|
+
gdpr: TGdprData;
|
|
56
29
|
authType: TAuthType;
|
|
57
30
|
} | {
|
|
58
31
|
status: 400 | 500;
|
|
@@ -66,11 +39,4 @@ export type TApiSignInTokenReq = {
|
|
|
66
39
|
};
|
|
67
40
|
export type TApiSignInTokenRes = {
|
|
68
41
|
message: string;
|
|
69
|
-
} &
|
|
70
|
-
status: 200;
|
|
71
|
-
token: string;
|
|
72
|
-
user?: TUserMetric;
|
|
73
|
-
authType: TAuthType;
|
|
74
|
-
} | {
|
|
75
|
-
status: 500;
|
|
76
|
-
});
|
|
42
|
+
} & TApiSignInTokenReq;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { TRecord } from "./commonTypes";
|
|
2
|
+
export type TClientData = {
|
|
3
|
+
clientId: string;
|
|
4
|
+
trainerPlanId: string;
|
|
5
|
+
planName: string;
|
|
6
|
+
planCode: string;
|
|
7
|
+
fullName?: string;
|
|
8
|
+
clientEmail?: string;
|
|
9
|
+
totalSessions: number;
|
|
10
|
+
lastWorkoutDate: Date;
|
|
11
|
+
};
|
|
12
|
+
export type TClientSessionData = {
|
|
13
|
+
exerciseId: string;
|
|
14
|
+
records: TRecord[];
|
|
15
|
+
};
|
|
16
|
+
export type TApiClientProgressSaveReq = {
|
|
17
|
+
planId?: string;
|
|
18
|
+
planName?: string;
|
|
19
|
+
planCode?: string;
|
|
20
|
+
sessionRecord: TClientSessionData[];
|
|
21
|
+
sessionStartTimestamp: string;
|
|
22
|
+
};
|
|
23
|
+
export type TApiClientProgressSaveRes = {
|
|
24
|
+
status: 200 | 500;
|
|
25
|
+
message?: string;
|
|
26
|
+
state: "success" | "failed";
|
|
27
|
+
};
|
|
28
|
+
export type TClientWorkoutHistory = {
|
|
29
|
+
clientId: string;
|
|
30
|
+
trainerId?: string;
|
|
31
|
+
planId?: string;
|
|
32
|
+
planName: string;
|
|
33
|
+
planCode: string;
|
|
34
|
+
fullName?: string;
|
|
35
|
+
clientEmail?: string;
|
|
36
|
+
totalCompletedSessions: number;
|
|
37
|
+
lastWorkoutDate: Date;
|
|
38
|
+
sessions: {
|
|
39
|
+
sessionRecord: TClientSessionData[];
|
|
40
|
+
userDuration: number;
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
}[];
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
updatedAt: Date;
|
|
45
|
+
};
|
|
46
|
+
export type TApiGetTrainerClientListReq = {};
|
|
47
|
+
export type TApiGetTrainerClientListRes = {
|
|
48
|
+
status: 200 | 400 | 500;
|
|
49
|
+
message?: string;
|
|
50
|
+
state: "success" | "failed";
|
|
51
|
+
clients: TClientData[];
|
|
52
|
+
};
|
|
53
|
+
export type TApiTrainerGetClientWorkoutHistoryReq = {
|
|
54
|
+
clientId: string;
|
|
55
|
+
};
|
|
56
|
+
export type TApiTrainerGetClientWorkoutHistoryRes = {
|
|
57
|
+
status: 200 | 400 | 500;
|
|
58
|
+
message?: string;
|
|
59
|
+
state: "success" | "failed";
|
|
60
|
+
clientId: string;
|
|
61
|
+
fullName?: string;
|
|
62
|
+
clientEmail?: string;
|
|
63
|
+
history: Pick<TClientWorkoutHistory, "totalCompletedSessions" | "planId" | "sessions">[];
|
|
64
|
+
};
|
|
@@ -20,11 +20,14 @@ export declare enum EBodyParts {
|
|
|
20
20
|
"deltoids-middle" = "Deltoids middle",
|
|
21
21
|
"calf-inner" = "Calf inner",
|
|
22
22
|
"calf-outer" = "Calf outer",
|
|
23
|
+
"calves" = "Calf inner",
|
|
23
24
|
"hamstrings" = "Hamstrings",
|
|
24
25
|
"adductors" = "Adductors",
|
|
25
26
|
"quadriceps" = "Quadriceps",
|
|
26
27
|
"medius-upper" = "Gluteus medius",
|
|
27
28
|
"maximus-lower" = "Gluteus maximus",
|
|
29
|
+
"glutes-maximus" = "Gluteus maximus",
|
|
30
|
+
"glutes-medius" = "Gluteus medius",
|
|
28
31
|
"lower-back" = "Lower back"
|
|
29
32
|
}
|
|
30
33
|
export type TBodyPartKeys = Array<keyof typeof EBodyParts>;
|
|
@@ -101,11 +104,11 @@ export type TExercise = {
|
|
|
101
104
|
longDuration: number;
|
|
102
105
|
};
|
|
103
106
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
"5.0": 4.3, // 5 km/h walking = 4.3 MET
|
|
108
|
+
"8.0": 8.3, // 8 km/h jogging = 8.3 MET
|
|
109
|
+
"12.0": 11.0, // 12 km/h running = 11.0 MET
|
|
110
|
+
"16.0": 15.0 // 16 km/h fast running = 15.0 MET
|
|
111
|
+
*/
|
|
109
112
|
paceFactors?: {
|
|
110
113
|
[key: string]: number;
|
|
111
114
|
};
|
|
@@ -22,10 +22,13 @@ var EBodyParts;
|
|
|
22
22
|
EBodyParts["deltoids-middle"] = "Deltoids middle";
|
|
23
23
|
EBodyParts["calf-inner"] = "Calf inner";
|
|
24
24
|
EBodyParts["calf-outer"] = "Calf outer";
|
|
25
|
+
EBodyParts["calves"] = "Calf inner";
|
|
25
26
|
EBodyParts["hamstrings"] = "Hamstrings";
|
|
26
27
|
EBodyParts["adductors"] = "Adductors";
|
|
27
28
|
EBodyParts["quadriceps"] = "Quadriceps";
|
|
28
29
|
EBodyParts["medius-upper"] = "Gluteus medius";
|
|
29
30
|
EBodyParts["maximus-lower"] = "Gluteus maximus";
|
|
31
|
+
EBodyParts["glutes-maximus"] = "Gluteus maximus";
|
|
32
|
+
EBodyParts["glutes-medius"] = "Gluteus medius";
|
|
30
33
|
EBodyParts["lower-back"] = "Lower back";
|
|
31
34
|
})(EBodyParts || (exports.EBodyParts = EBodyParts = {}));
|
|
@@ -17,6 +17,7 @@ export type TTemplateShopDb = {
|
|
|
17
17
|
es?: string;
|
|
18
18
|
fr?: string;
|
|
19
19
|
};
|
|
20
|
+
version: string;
|
|
20
21
|
planCode: string;
|
|
21
22
|
gender: "male" | "female" | "all";
|
|
22
23
|
slug: string;
|
|
@@ -38,6 +39,7 @@ export type TTemplateShopDb = {
|
|
|
38
39
|
thumbnailImageUrl: string;
|
|
39
40
|
isPremium: boolean;
|
|
40
41
|
} | {
|
|
42
|
+
version: number;
|
|
41
43
|
avatarImgName: string;
|
|
42
44
|
type: "trainer-created";
|
|
43
45
|
ownerId: string;
|
package/dist/types/TApiUser.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TGdprData } from "./commonTypes";
|
|
1
2
|
export type TAuthType = "email" | "apple" | "anonymous";
|
|
2
3
|
export type TGender = "male" | "female" | "unmentioned";
|
|
3
4
|
export type TUserType = "regular" | "professional";
|
|
@@ -30,6 +31,7 @@ export type TUserMetric = {
|
|
|
30
31
|
subscriptionWillRenew: boolean;
|
|
31
32
|
subscriptionStore: TAppStore;
|
|
32
33
|
subscriptionLastUpdatedAt: number;
|
|
34
|
+
gdpr: TGdprData;
|
|
33
35
|
createdAt: Date;
|
|
34
36
|
updatedAt?: Date;
|
|
35
37
|
};
|
|
@@ -50,37 +52,3 @@ export type TApiIsUserExistsRes = {
|
|
|
50
52
|
state: boolean;
|
|
51
53
|
status: 403 | 404 | 400 | 200;
|
|
52
54
|
};
|
|
53
|
-
export type TApiGetUserProfileReq = {};
|
|
54
|
-
export type TApiGetUserProfileRes = {
|
|
55
|
-
user: TUserMetric;
|
|
56
|
-
status: 200;
|
|
57
|
-
} | {
|
|
58
|
-
status: 400;
|
|
59
|
-
message?: string;
|
|
60
|
-
};
|
|
61
|
-
export type TUser = {
|
|
62
|
-
username?: string;
|
|
63
|
-
email: string;
|
|
64
|
-
isVerified: boolean;
|
|
65
|
-
password: string;
|
|
66
|
-
appLanguage: string;
|
|
67
|
-
billingPlanType: "monthly" | "annually" | "free";
|
|
68
|
-
billingPlanVersion?: string;
|
|
69
|
-
billingPlanGeoCountryCode: string;
|
|
70
|
-
paymentMethod?: "credit_card" | "paypal" | "apple_pay" | "upi";
|
|
71
|
-
billingPlanNextDueDate?: string;
|
|
72
|
-
devices: {
|
|
73
|
-
model: string;
|
|
74
|
-
deviceId: string;
|
|
75
|
-
}[];
|
|
76
|
-
recoveryIssuedTimeStamp: number;
|
|
77
|
-
recoveryVerifyToken: string;
|
|
78
|
-
authMethod: TAuthType;
|
|
79
|
-
gender?: TGender;
|
|
80
|
-
dob?: Date;
|
|
81
|
-
weightKg?: number;
|
|
82
|
-
heightCm?: number;
|
|
83
|
-
bodyFatPercentage?: number;
|
|
84
|
-
fitnessGoal: TFitnessGoal;
|
|
85
|
-
fitnessLevel: number;
|
|
86
|
-
};
|
|
@@ -61,3 +61,18 @@ export type TTemplateExercise = {
|
|
|
61
61
|
restTimeSecs?: number;
|
|
62
62
|
initialRecords: TRecord[];
|
|
63
63
|
};
|
|
64
|
+
export type TGdprData = {
|
|
65
|
+
consentVersion: string;
|
|
66
|
+
consentTimestamp: string;
|
|
67
|
+
consentStatus: "full" | "minimal" | "withdrawn";
|
|
68
|
+
dataSharing: {
|
|
69
|
+
withTrainers: boolean;
|
|
70
|
+
marketplaceAnalytics: boolean;
|
|
71
|
+
marketingCommunications: boolean;
|
|
72
|
+
};
|
|
73
|
+
consentHistory: Array<{
|
|
74
|
+
version: string;
|
|
75
|
+
status: string;
|
|
76
|
+
timestamp: string;
|
|
77
|
+
}>;
|
|
78
|
+
};
|
package/dist/types/index.d.ts
CHANGED