@krampa/common 0.11.0 → 0.13.0

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.
@@ -6,14 +6,11 @@ export declare const GOAL_TYPES: {
6
6
  readonly WEIGHT_LOSS: "weight/loss";
7
7
  readonly WEIGHT_GAIN: "weight/gain";
8
8
  readonly WEIGHT_MAINTAIN: "weight/maintain";
9
- readonly WORKOUT_STRENGTH: "workout/strength";
10
- readonly WORKOUT_CARDIO: "workout/cardio";
11
- readonly WORKOUT_OTHER: "workout/other";
12
9
  readonly WORKOUT: "workout";
13
10
  readonly ACHIEVEMENT_PR: "achievement/pr";
14
11
  readonly STEPS_DAILY: "steps/daily";
15
12
  readonly MEASUREMENT_BODY: "measurement/body";
16
13
  readonly CUSTOM_OTHER: "custom/other";
17
14
  };
18
- export declare const GOAL_TYPE_VALUES: readonly ["weight/loss", "weight/gain", "weight/maintain", "workout/strength", "workout/cardio", "workout/other", "workout", "achievement/pr", "steps/daily", "measurement/body", "custom/other"];
15
+ export declare const GOAL_TYPE_VALUES: readonly ["weight/loss", "weight/gain", "weight/maintain", "workout", "achievement/pr", "steps/daily", "measurement/body", "custom/other"];
19
16
  export type GoalType = (typeof GOAL_TYPE_VALUES)[number];
@@ -11,10 +11,6 @@ exports.GOAL_TYPES = {
11
11
  WEIGHT_LOSS: "weight/loss",
12
12
  WEIGHT_GAIN: "weight/gain",
13
13
  WEIGHT_MAINTAIN: "weight/maintain",
14
- // Workout goals (distance/time embedded in cardio)
15
- WORKOUT_STRENGTH: "workout/strength",
16
- WORKOUT_CARDIO: "workout/cardio",
17
- WORKOUT_OTHER: "workout/other",
18
14
  // New workout type
19
15
  WORKOUT: "workout",
20
16
  // Achievement goals
@@ -29,9 +25,6 @@ exports.GOAL_TYPE_VALUES = [
29
25
  exports.GOAL_TYPES.WEIGHT_LOSS,
30
26
  exports.GOAL_TYPES.WEIGHT_GAIN,
31
27
  exports.GOAL_TYPES.WEIGHT_MAINTAIN,
32
- exports.GOAL_TYPES.WORKOUT_STRENGTH,
33
- exports.GOAL_TYPES.WORKOUT_CARDIO,
34
- exports.GOAL_TYPES.WORKOUT_OTHER,
35
28
  exports.GOAL_TYPES.WORKOUT,
36
29
  exports.GOAL_TYPES.ACHIEVEMENT_PR,
37
30
  exports.GOAL_TYPES.STEPS_DAILY,
@@ -6,20 +6,9 @@ import { GOAL_TYPES } from "./goal-types";
6
6
  export type WeightValue = {
7
7
  targetWeight: number;
8
8
  };
9
- export type WorkoutCardioValue = {
9
+ export type WorkoutValue = {
10
10
  activityName: string;
11
11
  weeklyTarget: number;
12
- weeklyDistance?: number;
13
- weeklyTime?: number;
14
- workoutTypes: string[];
15
- };
16
- export type WorkoutOtherValue = {
17
- activityName: string;
18
- weeklyTarget: number;
19
- };
20
- export type WorkoutStrengthValue = {
21
- weeklyTarget: number;
22
- workoutTypes: string[];
23
12
  };
24
13
  export type StepsGoalValue = {
25
14
  targetSteps: number;
@@ -37,21 +26,13 @@ export type WeightMaintainGoal = BaseGoal & {
37
26
  type: typeof GOAL_TYPES.WEIGHT_MAINTAIN;
38
27
  value: WeightValue;
39
28
  };
40
- export type WorkoutStrengthGoal = BaseGoal & {
41
- type: typeof GOAL_TYPES.WORKOUT_STRENGTH;
42
- value: WorkoutStrengthValue;
43
- };
44
- export type WorkoutCardioGoal = BaseGoal & {
45
- type: typeof GOAL_TYPES.WORKOUT_CARDIO;
46
- value: WorkoutCardioValue;
47
- };
48
- export type WorkoutOtherGoal = BaseGoal & {
49
- type: typeof GOAL_TYPES.WORKOUT_OTHER;
50
- value: WorkoutOtherValue;
29
+ export type WorkoutGoal = BaseGoal & {
30
+ type: typeof GOAL_TYPES.WORKOUT;
31
+ value: WorkoutValue;
51
32
  };
52
33
  export type StepsGoal = BaseGoal & {
53
34
  type: typeof GOAL_TYPES.STEPS_DAILY;
54
35
  value: StepsGoalValue;
55
36
  };
56
- export type Goal = WeightLossGoal | WeightGainGoal | WeightMaintainGoal | WorkoutStrengthGoal | WorkoutCardioGoal | WorkoutOtherGoal | StepsGoal;
37
+ export type Goal = WeightLossGoal | WeightGainGoal | WeightMaintainGoal | WorkoutGoal | StepsGoal;
57
38
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krampa/common",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "Shared types and constants for Krampa fitness challenge app",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",