@dgpholdings/greatoak-shared 1.1.37 → 1.1.39

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,5 +1,4 @@
1
- export type TAuthType = "email" | "apple" | "anonymous";
2
- export type TGender = "male" | "female" | "unmentioned";
1
+ import { TAuthType, TGender, TUser } from "./TApiUser";
3
2
  export type TApiSignupReq = {
4
3
  email: string;
5
4
  password: string;
@@ -69,31 +68,6 @@ export type TApiSignInTokenRes = {
69
68
  } | {
70
69
  status: 500;
71
70
  });
72
- export type TUser = {
73
- username?: string;
74
- email: string;
75
- isVerified: boolean;
76
- password: string;
77
- appLanguage: string;
78
- billingPlanType: "monthly" | "annually" | "free";
79
- billingPlanVersion?: string;
80
- billingPlanGeoCountryCode: string;
81
- fitnessLevel?: number;
82
- paymentMethod?: "credit_card" | "paypal" | "apple_pay" | "upi";
83
- billingPlanNextDueDate?: string;
84
- devices: {
85
- model: string;
86
- deviceId: string;
87
- }[];
88
- recoveryIssuedTimeStamp: number;
89
- recoveryVerifyToken: string;
90
- authMethod: TAuthType;
91
- gender?: TGender;
92
- dob?: Date;
93
- weightKg?: number;
94
- heightCm?: number;
95
- bodyFatPercentage?: number;
96
- };
97
71
  export type TUserSignInData = Pick<TUser, "email" | "isVerified" | "appLanguage" | "billingPlanType" | "billingPlanVersion" | "paymentMethod" | "authMethod" | "dob" | "weightKg" | "gender"> & {
98
72
  createdAt: Date;
99
73
  updatedAt?: Date;
@@ -52,7 +52,6 @@ export type TApiExerciseRecordUpdateReq = {
52
52
  config: TRecordConfig;
53
53
  exerciseNote: string;
54
54
  restTimeSecs?: number;
55
- difficultyScoreMultiplier: number;
56
55
  record: TRecord[];
57
56
  }[];
58
57
  };
@@ -1,4 +1,6 @@
1
- import { TGender } from "./TApiAuth";
1
+ export type TAuthType = "email" | "apple" | "anonymous";
2
+ export type TGender = "male" | "female" | "unmentioned";
3
+ export type TUserFitnessGoal = "strength" | "hypertrophy" | "endurance" | "general";
2
4
  export type TUserMetric = {
3
5
  dob: Date;
4
6
  weightKg?: number;
@@ -25,3 +27,29 @@ export type TApiGetUserProfileRes = {
25
27
  } | {
26
28
  status: 400;
27
29
  };
30
+ export type TUser = {
31
+ username?: string;
32
+ email: string;
33
+ isVerified: boolean;
34
+ password: string;
35
+ appLanguage: string;
36
+ billingPlanType: "monthly" | "annually" | "free";
37
+ billingPlanVersion?: string;
38
+ billingPlanGeoCountryCode: string;
39
+ fitnessLevel?: number;
40
+ paymentMethod?: "credit_card" | "paypal" | "apple_pay" | "upi";
41
+ billingPlanNextDueDate?: string;
42
+ devices: {
43
+ model: string;
44
+ deviceId: string;
45
+ }[];
46
+ recoveryIssuedTimeStamp: number;
47
+ recoveryVerifyToken: string;
48
+ authMethod: TAuthType;
49
+ gender?: TGender;
50
+ dob?: Date;
51
+ weightKg?: number;
52
+ heightCm?: number;
53
+ bodyFatPercentage?: number;
54
+ fitnessGoal: TUserFitnessGoal;
55
+ };
@@ -1,5 +1,5 @@
1
1
  import { TRefinedRecord } from "./record.utils";
2
- import { TExercise, TGender, TUserMetric } from "../types";
2
+ import { TExercise, TGender, TUserFitnessGoal, TUserMetric } from "../types";
3
3
  export type TUserProfile = {
4
4
  age?: number;
5
5
  gender?: TGender;
@@ -7,7 +7,7 @@ export type TUserProfile = {
7
7
  heightCm?: number;
8
8
  bodyFatPercentage?: number;
9
9
  fitnessLevel?: TUserMetric["fitnessLevel"];
10
- fitnessGoal?: "strength" | "hypertrophy" | "endurance" | "general";
10
+ fitnessGoal?: TUserFitnessGoal;
11
11
  };
12
12
  export type TScoreBreakdown = {
13
13
  baseScore: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dgpholdings/greatoak-shared",
3
- "version": "1.1.37",
3
+ "version": "1.1.39",
4
4
  "description": "Shared TypeScript types and utilities for @dgpholdings projects",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",