@plus45/types 1.1.33 → 1.1.35
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 +48 -48
- package/package.json +6 -6
- package/types/schedule/schedule.ts +8 -2
- package/types/workout/workout_execution.ts +2 -1
package/index.ts
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { Exercise } from "./types/exercise/exercise";
|
|
2
|
-
import ExerciseType from "./types/exercise/exercise_types";
|
|
3
|
-
import { AccessToken } from "./types/user/access_token";
|
|
4
|
-
import { User } from "./types/user/user";
|
|
5
|
-
import {
|
|
6
|
-
DistanceUnits,
|
|
7
|
-
ExerciseUnit,
|
|
8
|
-
TimeUnits,
|
|
9
|
-
WeightUnits
|
|
10
|
-
} from "./types/exercise/exercise_units";
|
|
11
|
-
import { Workout } from "./types/workout/workout";
|
|
12
|
-
import { Schedule } from "./types/schedule/schedule";
|
|
13
|
-
import { ScheduleDay } from "./types/schedule/schedule_days";
|
|
14
|
-
import { ScheduleRecurrence } from "./types/schedule/schedule_recurrence";
|
|
15
|
-
import { UserSessionInfo } from "./types/user/session_info";
|
|
16
|
-
import {
|
|
17
|
-
CompletedExercise,
|
|
18
|
-
WorkoutExecution
|
|
19
|
-
} from "./types/workout/workout_execution";
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
// User Type Structures
|
|
23
|
-
type User,
|
|
24
|
-
type UserSessionInfo,
|
|
25
|
-
type AccessToken,
|
|
26
|
-
|
|
27
|
-
// Exercise Type Structures
|
|
28
|
-
type Exercise,
|
|
29
|
-
type CompletedExercise,
|
|
30
|
-
|
|
31
|
-
// Workout Type Structures
|
|
32
|
-
type Workout,
|
|
33
|
-
type WorkoutExecution,
|
|
34
|
-
|
|
35
|
-
// Schedule Type Structures
|
|
36
|
-
type Schedule,
|
|
37
|
-
|
|
38
|
-
// Enums
|
|
39
|
-
ExerciseType,
|
|
40
|
-
ExerciseUnit,
|
|
41
|
-
ScheduleDay,
|
|
42
|
-
ScheduleRecurrence,
|
|
43
|
-
|
|
44
|
-
// Collections
|
|
45
|
-
WeightUnits,
|
|
46
|
-
DistanceUnits,
|
|
47
|
-
TimeUnits
|
|
48
|
-
};
|
|
1
|
+
import { Exercise } from "./types/exercise/exercise";
|
|
2
|
+
import ExerciseType from "./types/exercise/exercise_types";
|
|
3
|
+
import { AccessToken } from "./types/user/access_token";
|
|
4
|
+
import { User } from "./types/user/user";
|
|
5
|
+
import {
|
|
6
|
+
DistanceUnits,
|
|
7
|
+
ExerciseUnit,
|
|
8
|
+
TimeUnits,
|
|
9
|
+
WeightUnits
|
|
10
|
+
} from "./types/exercise/exercise_units";
|
|
11
|
+
import { Workout } from "./types/workout/workout";
|
|
12
|
+
import { Schedule } from "./types/schedule/schedule";
|
|
13
|
+
import { ScheduleDay } from "./types/schedule/schedule_days";
|
|
14
|
+
import { ScheduleRecurrence } from "./types/schedule/schedule_recurrence";
|
|
15
|
+
import { UserSessionInfo } from "./types/user/session_info";
|
|
16
|
+
import {
|
|
17
|
+
CompletedExercise,
|
|
18
|
+
WorkoutExecution
|
|
19
|
+
} from "./types/workout/workout_execution";
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
// User Type Structures
|
|
23
|
+
type User,
|
|
24
|
+
type UserSessionInfo,
|
|
25
|
+
type AccessToken,
|
|
26
|
+
|
|
27
|
+
// Exercise Type Structures
|
|
28
|
+
type Exercise,
|
|
29
|
+
type CompletedExercise,
|
|
30
|
+
|
|
31
|
+
// Workout Type Structures
|
|
32
|
+
type Workout,
|
|
33
|
+
type WorkoutExecution,
|
|
34
|
+
|
|
35
|
+
// Schedule Type Structures
|
|
36
|
+
type Schedule,
|
|
37
|
+
|
|
38
|
+
// Enums
|
|
39
|
+
ExerciseType,
|
|
40
|
+
ExerciseUnit,
|
|
41
|
+
ScheduleDay,
|
|
42
|
+
ScheduleRecurrence,
|
|
43
|
+
|
|
44
|
+
// Collections
|
|
45
|
+
WeightUnits,
|
|
46
|
+
DistanceUnits,
|
|
47
|
+
TimeUnits
|
|
48
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@plus45/types",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"main": "index.ts",
|
|
5
|
-
"types": "index.ts"
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@plus45/types",
|
|
3
|
+
"version": "1.1.35",
|
|
4
|
+
"main": "index.ts",
|
|
5
|
+
"types": "index.ts"
|
|
6
|
+
}
|
|
@@ -3,9 +3,15 @@ export type Schedule = {
|
|
|
3
3
|
user_id: string;
|
|
4
4
|
workout_id: string;
|
|
5
5
|
days_of_week: number[];
|
|
6
|
-
start_time: string | null;
|
|
7
|
-
recurrence: number;
|
|
8
6
|
created_at: string;
|
|
9
7
|
start_week: number;
|
|
10
8
|
start_year: number;
|
|
11
9
|
};
|
|
10
|
+
|
|
11
|
+
export type AssignedSchedule = {
|
|
12
|
+
schedule_id: string;
|
|
13
|
+
schedule: Schedule;
|
|
14
|
+
user_id: string;
|
|
15
|
+
start_time: Date;
|
|
16
|
+
recurrence: number;
|
|
17
|
+
};
|
|
@@ -9,11 +9,12 @@ export type WorkoutExecution = {
|
|
|
9
9
|
/**
|
|
10
10
|
* Completions are a record that point the exercise id (as the key) to the completion containing the value entered as well as the unit.
|
|
11
11
|
*/
|
|
12
|
-
completions: Record<
|
|
12
|
+
completions: Record<number, CompletedExercise>;
|
|
13
13
|
completed?: boolean;
|
|
14
14
|
} & Workout;
|
|
15
15
|
|
|
16
16
|
export type CompletedExercise = {
|
|
17
|
+
id: string;
|
|
17
18
|
value?: number;
|
|
18
19
|
unit?: ExerciseUnit;
|
|
19
20
|
};
|