@plus45/types 1.1.45 → 1.1.46
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/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Exercise } from "./types/exercise/exercise";
|
|
2
|
-
import ExerciseType from "./types/exercise/exercise_types";
|
|
2
|
+
import { ExerciseType } from "./types/exercise/exercise_types";
|
|
3
3
|
import { AccessToken } from "./types/user/access_token";
|
|
4
4
|
import { User } from "./types/user/user";
|
|
5
5
|
import {
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
WorkoutExecution
|
|
19
19
|
} from "./types/workout/workout_execution";
|
|
20
20
|
import { WeekLayout } from "./types/generics/week_layout";
|
|
21
|
-
import AuthType from "./types/authorization/authorization";
|
|
21
|
+
import { AuthType } from "./types/authorization/authorization";
|
|
22
22
|
|
|
23
23
|
export {
|
|
24
24
|
// User Type Structures
|
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export default AuthType;
|
|
1
|
+
export const AuthType = {
|
|
2
|
+
PASSWORD_CHANGE: "PASSWORD_CHANGE"
|
|
3
|
+
} as const;
|
|
4
|
+
export type AuthType = typeof AuthType[keyof typeof AuthType];
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
+
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
3
|
+
* Object for different types of exercises.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
+
export const ExerciseType = {
|
|
5
6
|
/**
|
|
6
7
|
* Sets-Reps based exercise (e.g. 3x10)
|
|
7
8
|
*/
|
|
8
|
-
STRENGTH
|
|
9
|
+
STRENGTH: "STRENGTH",
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Time based exercise (e.g. 3x30s)
|
|
12
13
|
*/
|
|
13
|
-
TIME
|
|
14
|
+
TIME: "TIME",
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Distance based exercise (e.g. 3x400m)
|
|
17
18
|
*/
|
|
18
|
-
DISTANCE
|
|
19
|
+
DISTANCE: "DISTANCE",
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Custom exercise (uses string as data)
|
|
22
23
|
*/
|
|
23
|
-
CUSTOM
|
|
24
|
-
}
|
|
24
|
+
CUSTOM: "CUSTOM"
|
|
25
|
+
} as const;
|
|
25
26
|
|
|
26
|
-
export
|
|
27
|
+
export type ExerciseType = typeof ExerciseType[keyof typeof ExerciseType];
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const ExerciseUnit = {
|
|
2
2
|
// Time
|
|
3
|
-
seconds
|
|
4
|
-
minutes
|
|
3
|
+
seconds: "SECONDS",
|
|
4
|
+
minutes: "MINUTES",
|
|
5
5
|
|
|
6
6
|
// Weight
|
|
7
|
-
pounds
|
|
8
|
-
kilograms
|
|
7
|
+
pounds: "POUNDS",
|
|
8
|
+
kilograms: "KILOGRAMS",
|
|
9
9
|
|
|
10
10
|
// Distance
|
|
11
|
-
miles
|
|
12
|
-
kilometers
|
|
13
|
-
yards
|
|
14
|
-
feet
|
|
15
|
-
meters
|
|
16
|
-
}
|
|
11
|
+
miles: "MILES",
|
|
12
|
+
kilometers: "KILOMETERS",
|
|
13
|
+
yards: "YARDS",
|
|
14
|
+
feet: "FEET",
|
|
15
|
+
meters: "METERS"
|
|
16
|
+
} as const;
|
|
17
|
+
export type ExerciseUnit = (typeof ExerciseUnit)[keyof typeof ExerciseUnit];
|
|
17
18
|
|
|
18
19
|
export const WeightUnits = [ExerciseUnit.pounds, ExerciseUnit.kilograms];
|
|
19
|
-
|
|
20
20
|
export const TimeUnits = [ExerciseUnit.seconds, ExerciseUnit.minutes];
|
|
21
|
-
|
|
22
21
|
export const DistanceUnits = [
|
|
23
22
|
ExerciseUnit.miles,
|
|
24
23
|
ExerciseUnit.kilometers,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
1
|
+
export const ScheduleDay = {
|
|
2
|
+
SUNDAY: 0,
|
|
3
|
+
MONDAY: 1,
|
|
4
|
+
TUESDAY: 2,
|
|
5
|
+
WEDNESDAY: 3,
|
|
6
|
+
THURSDAY: 4,
|
|
7
|
+
FRIDAY: 5,
|
|
8
|
+
SATURDAY: 6
|
|
9
|
+
} as const;
|
|
10
|
+
export type ScheduleDay = (typeof ScheduleDay)[keyof typeof ScheduleDay];
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
BIWEEKLY
|
|
4
|
-
}
|
|
1
|
+
export const ScheduleRecurrence = {
|
|
2
|
+
WEEKLY: "WEEKLY",
|
|
3
|
+
BIWEEKLY: "BIWEEKLY"
|
|
4
|
+
} as const;
|
|
5
|
+
export type ScheduleRecurrence =
|
|
6
|
+
(typeof ScheduleRecurrence)[keyof typeof ScheduleRecurrence];
|