@dgpholdings/greatoak-shared 1.0.0 → 1.0.2
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/TApiAuth.d.ts +30 -0
- package/dist/TApiAuth.js +2 -0
- package/dist/TApiExercise.d.ts +64 -0
- package/dist/TApiExercise.js +32 -0
- package/dist/TApiRecord.d.ts +26 -0
- package/dist/TApiRecord.js +2 -0
- package/dist/TApiTemplate.d.ts +29 -0
- package/dist/TApiTemplate.js +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +20 -0
- package/dist/maps/bodyparts.d.ts +28 -0
- package/dist/maps/bodyparts.js +31 -0
- package/dist/types/TApiAuth.d.ts +30 -0
- package/dist/types/TApiAuth.js +2 -0
- package/dist/types/TApiExercise.d.ts +64 -0
- package/dist/types/TApiExercise.js +32 -0
- package/dist/types/TApiRecord.d.ts +26 -0
- package/dist/types/TApiRecord.js +2 -0
- package/dist/types/TApiTemplate.d.ts +29 -0
- package/dist/types/TApiTemplate.js +2 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +20 -0
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type TApiSignupReq = {
|
|
2
|
+
email: string;
|
|
3
|
+
password: string;
|
|
4
|
+
model: string;
|
|
5
|
+
deviceUniqueId: string;
|
|
6
|
+
};
|
|
7
|
+
export type TApiSignupRes = {
|
|
8
|
+
token?: string;
|
|
9
|
+
status: 400 | 201 | 500;
|
|
10
|
+
message?: string;
|
|
11
|
+
};
|
|
12
|
+
export type TApiSigninEmailReq = {
|
|
13
|
+
email: string;
|
|
14
|
+
password: string;
|
|
15
|
+
model: string;
|
|
16
|
+
deviceUniqueId: string;
|
|
17
|
+
};
|
|
18
|
+
export type TApiSigninEmailRes = {
|
|
19
|
+
message?: string;
|
|
20
|
+
token?: string;
|
|
21
|
+
status?: 400 | 200 | 500;
|
|
22
|
+
};
|
|
23
|
+
export type TApiSignInTokenReq = {
|
|
24
|
+
deviceUniqueId: string;
|
|
25
|
+
};
|
|
26
|
+
export type TApiSignInTokenRes = {
|
|
27
|
+
message: string;
|
|
28
|
+
token?: string;
|
|
29
|
+
status: 200 | 500;
|
|
30
|
+
};
|
package/dist/TApiAuth.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { TRecord } from "./TApiRecord";
|
|
2
|
+
export type TBodyPart = "Chest" | "Core" | "Shoulders" | "Back" | "Bicep" | "Tricep" | "Fore arm" | "Legs" | "Cardio" | "Grip";
|
|
3
|
+
export type TBodyPartDetail = keyof EBodyParts;
|
|
4
|
+
export declare enum EBodyParts {
|
|
5
|
+
"pectoralis-major" = "Pectoralis upper",
|
|
6
|
+
"pectoralis-minor" = "Pectoralis lower",
|
|
7
|
+
"abs-upper" = "Abs upper",
|
|
8
|
+
"abs-lower" = "Abs lower",
|
|
9
|
+
"obliques" = "Obliques",
|
|
10
|
+
"latissimus-dorsi" = "Latissimus dorsi",
|
|
11
|
+
"rhomboids" = "Rhomboids",
|
|
12
|
+
"trapezius" = "Trapezius",
|
|
13
|
+
"bicep-short-inner" = "Bicep short (inner)",
|
|
14
|
+
"bicep-long-outer" = "Bicep long (outer)",
|
|
15
|
+
"brachii-long-outer" = "Brachii long (outer)",
|
|
16
|
+
"brachii-lateral-rear" = "Brachii lateral (rear)",
|
|
17
|
+
"medial-rear-2" = "Medial (rear 2)",
|
|
18
|
+
"fore-arm-inner" = "Fore arm inner",
|
|
19
|
+
"fore-arm-outer" = "Fore arm outer",
|
|
20
|
+
"deltoids-front" = "Deltoids front",
|
|
21
|
+
"lateral-deltoids-center" = "Lateral deltoids (center)",
|
|
22
|
+
"deltoids-rear" = "Deltoids rear",
|
|
23
|
+
"calf-inner" = "Calf inner",
|
|
24
|
+
"calf-outer" = "Calf outer",
|
|
25
|
+
"hamstrings" = "Hamstrings",
|
|
26
|
+
"quadriceps" = "Quadriceps",
|
|
27
|
+
"medius-upper" = "Gluteus medius (upper)",
|
|
28
|
+
"maximus-lower" = "Gluteus Maximus (lower)",
|
|
29
|
+
"cardio" = "Cardio",
|
|
30
|
+
"grip" = "Grip"
|
|
31
|
+
}
|
|
32
|
+
export type TExercise = {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
recordType: TRecord["type"];
|
|
36
|
+
primaryMuscles: TBodyPartDetail[];
|
|
37
|
+
secondaryMuscles: TBodyPartDetail[];
|
|
38
|
+
otherName?: string;
|
|
39
|
+
videoUrl?: string[];
|
|
40
|
+
thumbnailUrl?: string;
|
|
41
|
+
};
|
|
42
|
+
export type TBodyPartExercises = {
|
|
43
|
+
id: string;
|
|
44
|
+
bodyPart: TBodyPart;
|
|
45
|
+
exercises: Record<string, TExercise>;
|
|
46
|
+
};
|
|
47
|
+
export type TApiCreateExerciseReq = {
|
|
48
|
+
bodyPart: TBodyPart;
|
|
49
|
+
exercise: Omit<TExercise, "id">;
|
|
50
|
+
};
|
|
51
|
+
export type TApiCreateExerciseRes = {
|
|
52
|
+
success: boolean;
|
|
53
|
+
message: string;
|
|
54
|
+
};
|
|
55
|
+
export type TApiListExercisesReq = null;
|
|
56
|
+
export type TApiListExercisesRes = {
|
|
57
|
+
data: {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
bodyPart: string;
|
|
61
|
+
primaryMuscles: string[];
|
|
62
|
+
thumbnailUrl: string | null;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EBodyParts = void 0;
|
|
4
|
+
var EBodyParts;
|
|
5
|
+
(function (EBodyParts) {
|
|
6
|
+
EBodyParts["pectoralis-major"] = "Pectoralis upper";
|
|
7
|
+
EBodyParts["pectoralis-minor"] = "Pectoralis lower";
|
|
8
|
+
EBodyParts["abs-upper"] = "Abs upper";
|
|
9
|
+
EBodyParts["abs-lower"] = "Abs lower";
|
|
10
|
+
EBodyParts["obliques"] = "Obliques";
|
|
11
|
+
EBodyParts["latissimus-dorsi"] = "Latissimus dorsi";
|
|
12
|
+
EBodyParts["rhomboids"] = "Rhomboids";
|
|
13
|
+
EBodyParts["trapezius"] = "Trapezius";
|
|
14
|
+
EBodyParts["bicep-short-inner"] = "Bicep short (inner)";
|
|
15
|
+
EBodyParts["bicep-long-outer"] = "Bicep long (outer)";
|
|
16
|
+
EBodyParts["brachii-long-outer"] = "Brachii long (outer)";
|
|
17
|
+
EBodyParts["brachii-lateral-rear"] = "Brachii lateral (rear)";
|
|
18
|
+
EBodyParts["medial-rear-2"] = "Medial (rear 2)";
|
|
19
|
+
EBodyParts["fore-arm-inner"] = "Fore arm inner";
|
|
20
|
+
EBodyParts["fore-arm-outer"] = "Fore arm outer";
|
|
21
|
+
EBodyParts["deltoids-front"] = "Deltoids front";
|
|
22
|
+
EBodyParts["lateral-deltoids-center"] = "Lateral deltoids (center)";
|
|
23
|
+
EBodyParts["deltoids-rear"] = "Deltoids rear";
|
|
24
|
+
EBodyParts["calf-inner"] = "Calf inner";
|
|
25
|
+
EBodyParts["calf-outer"] = "Calf outer";
|
|
26
|
+
EBodyParts["hamstrings"] = "Hamstrings";
|
|
27
|
+
EBodyParts["quadriceps"] = "Quadriceps";
|
|
28
|
+
EBodyParts["medius-upper"] = "Gluteus medius (upper)";
|
|
29
|
+
EBodyParts["maximus-lower"] = "Gluteus Maximus (lower)";
|
|
30
|
+
EBodyParts["cardio"] = "Cardio";
|
|
31
|
+
EBodyParts["grip"] = "Grip";
|
|
32
|
+
})(EBodyParts || (exports.EBodyParts = EBodyParts = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type TRecord = {
|
|
2
|
+
id: string;
|
|
3
|
+
} & ({
|
|
4
|
+
type: "weight-reps";
|
|
5
|
+
kg: string;
|
|
6
|
+
reps: string;
|
|
7
|
+
} | {
|
|
8
|
+
type: "duration";
|
|
9
|
+
durationSecs: string;
|
|
10
|
+
goalDuration: string;
|
|
11
|
+
} | {
|
|
12
|
+
type: "reps-only";
|
|
13
|
+
reps: string;
|
|
14
|
+
});
|
|
15
|
+
export type TRecordForm = TRecord & {
|
|
16
|
+
isDone: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type TRecordDuration = Extract<TRecord, {
|
|
19
|
+
type: "duration";
|
|
20
|
+
}>;
|
|
21
|
+
export type TRecordWeight = Extract<TRecord, {
|
|
22
|
+
type: "weight-reps";
|
|
23
|
+
}>;
|
|
24
|
+
export type TRecordBodyWeight = Extract<TRecord, {
|
|
25
|
+
type: "reps-only";
|
|
26
|
+
}>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TExercise } from "./TApiExercise";
|
|
2
|
+
export type TTemplate = {
|
|
3
|
+
name: string;
|
|
4
|
+
id: string;
|
|
5
|
+
lastUsed?: string;
|
|
6
|
+
};
|
|
7
|
+
export type TTemplateExercise = {
|
|
8
|
+
template: TTemplate;
|
|
9
|
+
exercise: TExercise[];
|
|
10
|
+
};
|
|
11
|
+
export type TApiTemplateCreateReq = {
|
|
12
|
+
name: string;
|
|
13
|
+
exerciseIds: string[];
|
|
14
|
+
};
|
|
15
|
+
export type TApiTemplateCreateRes = {
|
|
16
|
+
status: number;
|
|
17
|
+
success?: boolean;
|
|
18
|
+
message?: string;
|
|
19
|
+
};
|
|
20
|
+
export type TApiTemplateUpdateReq = {
|
|
21
|
+
templateId: string;
|
|
22
|
+
name: string;
|
|
23
|
+
exerciseIds: string[];
|
|
24
|
+
};
|
|
25
|
+
export type TApiTemplateUpdateRes = {
|
|
26
|
+
status: number;
|
|
27
|
+
success?: boolean;
|
|
28
|
+
message?: string;
|
|
29
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./TApiAuth"), exports);
|
|
18
|
+
__exportStar(require("./TApiExercise"), exports);
|
|
19
|
+
__exportStar(require("./TApiRecord"), exports);
|
|
20
|
+
__exportStar(require("./TApiTemplate"), exports);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const bodyParts: {
|
|
2
|
+
readonly "pectoralis-major": "Pectoralis upper";
|
|
3
|
+
readonly "pectoralis-minor": "Pectoralis lower";
|
|
4
|
+
readonly "abs-upper": "Abs upper";
|
|
5
|
+
readonly "abs-lower": "Abs lower";
|
|
6
|
+
readonly obliques: "Obliques";
|
|
7
|
+
readonly "latissimus-dorsi": "Latissimus dorsi";
|
|
8
|
+
readonly rhomboids: "Rhomboids";
|
|
9
|
+
readonly trapezius: "Trapezius";
|
|
10
|
+
readonly "bicep-short-inner": "Bicep short (inner)";
|
|
11
|
+
readonly "bicep-long-outer": "Bicep long (outer)";
|
|
12
|
+
readonly "brachii-long-outer": "Brachii long (outer)";
|
|
13
|
+
readonly "brachii-lateral-rear": "Brachii lateral (rear)";
|
|
14
|
+
readonly "medial-rear-2": "Medial (rear 2)";
|
|
15
|
+
readonly "fore-arm-inner": "Fore arm inner";
|
|
16
|
+
readonly "fore-arm-outer": "Fore arm outer";
|
|
17
|
+
readonly "deltoids-front": "Deltoids front";
|
|
18
|
+
readonly "lateral-deltoids-center": "Lateral deltoids (center)";
|
|
19
|
+
readonly "deltoids-rear": "Deltoids rear";
|
|
20
|
+
readonly "calf-inner": "Calf inner";
|
|
21
|
+
readonly "calf-outer": "Calf outer";
|
|
22
|
+
readonly hamstrings: "Hamstrings";
|
|
23
|
+
readonly quadriceps: "Quadriceps";
|
|
24
|
+
readonly "medius-upper": "Gluteus medius (upper)";
|
|
25
|
+
readonly "maximus-lower": "Gluteus Maximus (lower)";
|
|
26
|
+
readonly cardio: "Cardio";
|
|
27
|
+
readonly wrist: "Wrist";
|
|
28
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bodyParts = void 0;
|
|
4
|
+
exports.bodyParts = {
|
|
5
|
+
"pectoralis-major": "Pectoralis upper",
|
|
6
|
+
"pectoralis-minor": "Pectoralis lower",
|
|
7
|
+
"abs-upper": "Abs upper",
|
|
8
|
+
"abs-lower": "Abs lower",
|
|
9
|
+
obliques: "Obliques",
|
|
10
|
+
"latissimus-dorsi": "Latissimus dorsi",
|
|
11
|
+
rhomboids: "Rhomboids",
|
|
12
|
+
trapezius: "Trapezius",
|
|
13
|
+
"bicep-short-inner": "Bicep short (inner)",
|
|
14
|
+
"bicep-long-outer": "Bicep long (outer)",
|
|
15
|
+
"brachii-long-outer": "Brachii long (outer)",
|
|
16
|
+
"brachii-lateral-rear": "Brachii lateral (rear)",
|
|
17
|
+
"medial-rear-2": "Medial (rear 2)",
|
|
18
|
+
"fore-arm-inner": "Fore arm inner",
|
|
19
|
+
"fore-arm-outer": "Fore arm outer",
|
|
20
|
+
"deltoids-front": "Deltoids front",
|
|
21
|
+
"lateral-deltoids-center": "Lateral deltoids (center)",
|
|
22
|
+
"deltoids-rear": "Deltoids rear",
|
|
23
|
+
"calf-inner": "Calf inner",
|
|
24
|
+
"calf-outer": "Calf outer",
|
|
25
|
+
hamstrings: "Hamstrings",
|
|
26
|
+
quadriceps: "Quadriceps",
|
|
27
|
+
"medius-upper": "Gluteus medius (upper)",
|
|
28
|
+
"maximus-lower": "Gluteus Maximus (lower)",
|
|
29
|
+
cardio: "Cardio",
|
|
30
|
+
wrist: "Wrist",
|
|
31
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type TApiSignupReq = {
|
|
2
|
+
email: string;
|
|
3
|
+
password: string;
|
|
4
|
+
model: string;
|
|
5
|
+
deviceUniqueId: string;
|
|
6
|
+
};
|
|
7
|
+
export type TApiSignupRes = {
|
|
8
|
+
token?: string;
|
|
9
|
+
status: 400 | 201 | 500;
|
|
10
|
+
message?: string;
|
|
11
|
+
};
|
|
12
|
+
export type TApiSigninEmailReq = {
|
|
13
|
+
email: string;
|
|
14
|
+
password: string;
|
|
15
|
+
model: string;
|
|
16
|
+
deviceUniqueId: string;
|
|
17
|
+
};
|
|
18
|
+
export type TApiSigninEmailRes = {
|
|
19
|
+
message?: string;
|
|
20
|
+
token?: string;
|
|
21
|
+
status?: 400 | 200 | 500;
|
|
22
|
+
};
|
|
23
|
+
export type TApiSignInTokenReq = {
|
|
24
|
+
deviceUniqueId: string;
|
|
25
|
+
};
|
|
26
|
+
export type TApiSignInTokenRes = {
|
|
27
|
+
message: string;
|
|
28
|
+
token?: string;
|
|
29
|
+
status: 200 | 500;
|
|
30
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { TRecord } from "./TApiRecord";
|
|
2
|
+
export type TBodyPart = "Chest" | "Core" | "Shoulders" | "Back" | "Bicep" | "Tricep" | "Fore arm" | "Legs" | "Cardio" | "Grip";
|
|
3
|
+
export type TBodyPartDetail = keyof EBodyParts;
|
|
4
|
+
export declare enum EBodyParts {
|
|
5
|
+
"pectoralis-major" = "Pectoralis upper",
|
|
6
|
+
"pectoralis-minor" = "Pectoralis lower",
|
|
7
|
+
"abs-upper" = "Abs upper",
|
|
8
|
+
"abs-lower" = "Abs lower",
|
|
9
|
+
"obliques" = "Obliques",
|
|
10
|
+
"latissimus-dorsi" = "Latissimus dorsi",
|
|
11
|
+
"rhomboids" = "Rhomboids",
|
|
12
|
+
"trapezius" = "Trapezius",
|
|
13
|
+
"bicep-short-inner" = "Bicep short (inner)",
|
|
14
|
+
"bicep-long-outer" = "Bicep long (outer)",
|
|
15
|
+
"brachii-long-outer" = "Brachii long (outer)",
|
|
16
|
+
"brachii-lateral-rear" = "Brachii lateral (rear)",
|
|
17
|
+
"medial-rear-2" = "Medial (rear 2)",
|
|
18
|
+
"fore-arm-inner" = "Fore arm inner",
|
|
19
|
+
"fore-arm-outer" = "Fore arm outer",
|
|
20
|
+
"deltoids-front" = "Deltoids front",
|
|
21
|
+
"lateral-deltoids-center" = "Lateral deltoids (center)",
|
|
22
|
+
"deltoids-rear" = "Deltoids rear",
|
|
23
|
+
"calf-inner" = "Calf inner",
|
|
24
|
+
"calf-outer" = "Calf outer",
|
|
25
|
+
"hamstrings" = "Hamstrings",
|
|
26
|
+
"quadriceps" = "Quadriceps",
|
|
27
|
+
"medius-upper" = "Gluteus medius (upper)",
|
|
28
|
+
"maximus-lower" = "Gluteus Maximus (lower)",
|
|
29
|
+
"cardio" = "Cardio",
|
|
30
|
+
wrist = "Wrist"
|
|
31
|
+
}
|
|
32
|
+
export type TExercise = {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
recordType: TRecord["type"];
|
|
36
|
+
primaryMuscles: TBodyPartDetail[];
|
|
37
|
+
secondaryMuscles: TBodyPartDetail[];
|
|
38
|
+
otherName?: string;
|
|
39
|
+
videoUrl?: string[];
|
|
40
|
+
thumbnailUrl?: string;
|
|
41
|
+
};
|
|
42
|
+
export type TBodyPartExercises = {
|
|
43
|
+
id: string;
|
|
44
|
+
bodyPart: TBodyPart;
|
|
45
|
+
exercises: Record<string, TExercise>;
|
|
46
|
+
};
|
|
47
|
+
export type TApiCreateExerciseReq = {
|
|
48
|
+
bodyPart: TBodyPart;
|
|
49
|
+
exercise: Omit<TExercise, "id">;
|
|
50
|
+
};
|
|
51
|
+
export type TApiCreateExerciseRes = {
|
|
52
|
+
success: boolean;
|
|
53
|
+
message: string;
|
|
54
|
+
};
|
|
55
|
+
export type TApiListExercisesReq = null;
|
|
56
|
+
export type TApiListExercisesRes = {
|
|
57
|
+
data: {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
bodyPart: string;
|
|
61
|
+
primaryMuscles: string[];
|
|
62
|
+
thumbnailUrl: string | null;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EBodyParts = void 0;
|
|
4
|
+
var EBodyParts;
|
|
5
|
+
(function (EBodyParts) {
|
|
6
|
+
EBodyParts["pectoralis-major"] = "Pectoralis upper";
|
|
7
|
+
EBodyParts["pectoralis-minor"] = "Pectoralis lower";
|
|
8
|
+
EBodyParts["abs-upper"] = "Abs upper";
|
|
9
|
+
EBodyParts["abs-lower"] = "Abs lower";
|
|
10
|
+
EBodyParts["obliques"] = "Obliques";
|
|
11
|
+
EBodyParts["latissimus-dorsi"] = "Latissimus dorsi";
|
|
12
|
+
EBodyParts["rhomboids"] = "Rhomboids";
|
|
13
|
+
EBodyParts["trapezius"] = "Trapezius";
|
|
14
|
+
EBodyParts["bicep-short-inner"] = "Bicep short (inner)";
|
|
15
|
+
EBodyParts["bicep-long-outer"] = "Bicep long (outer)";
|
|
16
|
+
EBodyParts["brachii-long-outer"] = "Brachii long (outer)";
|
|
17
|
+
EBodyParts["brachii-lateral-rear"] = "Brachii lateral (rear)";
|
|
18
|
+
EBodyParts["medial-rear-2"] = "Medial (rear 2)";
|
|
19
|
+
EBodyParts["fore-arm-inner"] = "Fore arm inner";
|
|
20
|
+
EBodyParts["fore-arm-outer"] = "Fore arm outer";
|
|
21
|
+
EBodyParts["deltoids-front"] = "Deltoids front";
|
|
22
|
+
EBodyParts["lateral-deltoids-center"] = "Lateral deltoids (center)";
|
|
23
|
+
EBodyParts["deltoids-rear"] = "Deltoids rear";
|
|
24
|
+
EBodyParts["calf-inner"] = "Calf inner";
|
|
25
|
+
EBodyParts["calf-outer"] = "Calf outer";
|
|
26
|
+
EBodyParts["hamstrings"] = "Hamstrings";
|
|
27
|
+
EBodyParts["quadriceps"] = "Quadriceps";
|
|
28
|
+
EBodyParts["medius-upper"] = "Gluteus medius (upper)";
|
|
29
|
+
EBodyParts["maximus-lower"] = "Gluteus Maximus (lower)";
|
|
30
|
+
EBodyParts["cardio"] = "Cardio";
|
|
31
|
+
EBodyParts["wrist"] = "Wrist";
|
|
32
|
+
})(EBodyParts || (exports.EBodyParts = EBodyParts = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type TRecord = {
|
|
2
|
+
id: string;
|
|
3
|
+
} & ({
|
|
4
|
+
type: "weight-reps";
|
|
5
|
+
kg: string;
|
|
6
|
+
reps: string;
|
|
7
|
+
} | {
|
|
8
|
+
type: "duration";
|
|
9
|
+
durationSecs: string;
|
|
10
|
+
goalDuration: string;
|
|
11
|
+
} | {
|
|
12
|
+
type: "reps-only";
|
|
13
|
+
reps: string;
|
|
14
|
+
});
|
|
15
|
+
export type TRecordForm = TRecord & {
|
|
16
|
+
isDone: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type TRecordDuration = Extract<TRecord, {
|
|
19
|
+
type: "duration";
|
|
20
|
+
}>;
|
|
21
|
+
export type TRecordWeight = Extract<TRecord, {
|
|
22
|
+
type: "weight-reps";
|
|
23
|
+
}>;
|
|
24
|
+
export type TRecordBodyWeight = Extract<TRecord, {
|
|
25
|
+
type: "reps-only";
|
|
26
|
+
}>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TExercise } from "./TApiExercise";
|
|
2
|
+
export type TTemplate = {
|
|
3
|
+
name: string;
|
|
4
|
+
id: string;
|
|
5
|
+
lastUsed?: string;
|
|
6
|
+
};
|
|
7
|
+
export type TTemplateExercise = {
|
|
8
|
+
template: TTemplate;
|
|
9
|
+
exercise: TExercise[];
|
|
10
|
+
};
|
|
11
|
+
export type TApiTemplateCreateReq = {
|
|
12
|
+
name: string;
|
|
13
|
+
exerciseIds: string[];
|
|
14
|
+
};
|
|
15
|
+
export type TApiTemplateCreateRes = {
|
|
16
|
+
status: number;
|
|
17
|
+
success?: boolean;
|
|
18
|
+
message?: string;
|
|
19
|
+
};
|
|
20
|
+
export type TApiTemplateUpdateReq = {
|
|
21
|
+
templateId: string;
|
|
22
|
+
name: string;
|
|
23
|
+
exerciseIds: string[];
|
|
24
|
+
};
|
|
25
|
+
export type TApiTemplateUpdateRes = {
|
|
26
|
+
status: number;
|
|
27
|
+
success?: boolean;
|
|
28
|
+
message?: string;
|
|
29
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./TApiAuth"), exports);
|
|
18
|
+
__exportStar(require("./TApiExercise"), exports);
|
|
19
|
+
__exportStar(require("./TApiRecord"), exports);
|
|
20
|
+
__exportStar(require("./TApiTemplate"), exports);
|