90dc-core 1.1.3 → 1.1.5

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.
@@ -4,48 +4,64 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { Column, DataType, Default, Model, Table } from "sequelize-typescript";
8
11
  let Exercise = class Exercise extends Model {
9
12
  };
10
13
  __decorate([
11
14
  Default(DataType.UUIDV4),
12
- Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true })
15
+ Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
16
+ __metadata("design:type", String)
13
17
  ], Exercise.prototype, "uuid", void 0);
14
18
  __decorate([
15
- Column({ type: DataType.STRING, allowNull: false })
19
+ Column({ type: DataType.STRING, allowNull: false }),
20
+ __metadata("design:type", String)
16
21
  ], Exercise.prototype, "name", void 0);
17
22
  __decorate([
18
- Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })
23
+ Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false }),
24
+ __metadata("design:type", Array)
19
25
  ], Exercise.prototype, "level", void 0);
20
26
  __decorate([
21
- Column({ type: DataType.BOOLEAN, allowNull: false })
27
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
28
+ __metadata("design:type", Boolean)
22
29
  ], Exercise.prototype, "hasPriority", void 0);
23
30
  __decorate([
24
- Column({ type: DataType.BOOLEAN, allowNull: false })
31
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
32
+ __metadata("design:type", Boolean)
25
33
  ], Exercise.prototype, "isCompound", void 0);
26
34
  __decorate([
27
- Column({ type: DataType.BOOLEAN, allowNull: false })
35
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
36
+ __metadata("design:type", Boolean)
28
37
  ], Exercise.prototype, "hasVariations", void 0);
29
38
  __decorate([
30
- Column({ type: DataType.BOOLEAN, allowNull: false })
39
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
40
+ __metadata("design:type", Boolean)
31
41
  ], Exercise.prototype, "needsEquipment", void 0);
32
42
  __decorate([
33
- Column({ type: DataType.JSONB, allowNull: false })
43
+ Column({ type: DataType.JSONB, allowNull: false }),
44
+ __metadata("design:type", Object)
34
45
  ], Exercise.prototype, "variations", void 0);
35
46
  __decorate([
36
- Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })
47
+ Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false }),
48
+ __metadata("design:type", Array)
37
49
  ], Exercise.prototype, "muscles", void 0);
38
50
  __decorate([
39
- Column({ type: DataType.STRING, allowNull: false })
51
+ Column({ type: DataType.STRING, allowNull: false }),
52
+ __metadata("design:type", String)
40
53
  ], Exercise.prototype, "reps", void 0);
41
54
  __decorate([
42
- Column({ type: DataType.STRING, allowNull: false })
55
+ Column({ type: DataType.STRING, allowNull: false }),
56
+ __metadata("design:type", String)
43
57
  ], Exercise.prototype, "sets", void 0);
44
58
  __decorate([
45
- Column({ type: DataType.INTEGER, allowNull: false })
59
+ Column({ type: DataType.INTEGER, allowNull: false }),
60
+ __metadata("design:type", Number)
46
61
  ], Exercise.prototype, "order", void 0);
47
62
  __decorate([
48
- Column({ type: DataType.BOOLEAN, allowNull: false })
63
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
64
+ __metadata("design:type", Boolean)
49
65
  ], Exercise.prototype, "homeWorkout", void 0);
50
66
  Exercise = __decorate([
51
67
  Table
@@ -4,6 +4,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { BelongsTo, Column, DataType, Default, Model, Table, } from "sequelize-typescript";
8
11
  import { ProgramBlueprint } from "./ProgramBlueprint";
9
12
  let ExerciseBlueprint = class ExerciseBlueprint extends Model {
@@ -15,37 +18,48 @@ __decorate([
15
18
  defaultValue: DataType.UUID,
16
19
  allowNull: false,
17
20
  primaryKey: true,
18
- })
21
+ }),
22
+ __metadata("design:type", String)
19
23
  ], ExerciseBlueprint.prototype, "uuid", void 0);
20
24
  __decorate([
21
- Column({ type: DataType.BOOLEAN, allowNull: false })
25
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
26
+ __metadata("design:type", Boolean)
22
27
  ], ExerciseBlueprint.prototype, "hasPriority", void 0);
23
28
  __decorate([
24
- Column({ type: DataType.BOOLEAN, allowNull: false })
29
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
30
+ __metadata("design:type", Boolean)
25
31
  ], ExerciseBlueprint.prototype, "isCompound", void 0);
26
32
  __decorate([
27
- Column({ type: DataType.BOOLEAN, allowNull: false })
33
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
34
+ __metadata("design:type", Boolean)
28
35
  ], ExerciseBlueprint.prototype, "needsEquipment", void 0);
29
36
  __decorate([
30
- Column({ type: DataType.BOOLEAN, allowNull: false })
37
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
38
+ __metadata("design:type", Boolean)
31
39
  ], ExerciseBlueprint.prototype, "isSuperset", void 0);
32
40
  __decorate([
33
- Column({ type: DataType.BOOLEAN, allowNull: false })
41
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
42
+ __metadata("design:type", Boolean)
34
43
  ], ExerciseBlueprint.prototype, "isFixed", void 0);
35
44
  __decorate([
36
- Column({ type: DataType.STRING, allowNull: false })
45
+ Column({ type: DataType.STRING, allowNull: false }),
46
+ __metadata("design:type", String)
37
47
  ], ExerciseBlueprint.prototype, "muscle", void 0);
38
48
  __decorate([
39
- Column({ type: DataType.INTEGER, allowNull: false })
49
+ Column({ type: DataType.INTEGER, allowNull: false }),
50
+ __metadata("design:type", Number)
40
51
  ], ExerciseBlueprint.prototype, "rir", void 0);
41
52
  __decorate([
42
- Column({ type: DataType.STRING, allowNull: false })
53
+ Column({ type: DataType.STRING, allowNull: false }),
54
+ __metadata("design:type", String)
43
55
  ], ExerciseBlueprint.prototype, "reps", void 0);
44
56
  __decorate([
45
- Column({ type: DataType.STRING, allowNull: false })
57
+ Column({ type: DataType.STRING, allowNull: false }),
58
+ __metadata("design:type", String)
46
59
  ], ExerciseBlueprint.prototype, "sets", void 0);
47
60
  __decorate([
48
- BelongsTo(() => ProgramBlueprint, { foreignKey: "programId" })
61
+ BelongsTo(() => ProgramBlueprint, { foreignKey: "programId" }),
62
+ __metadata("design:type", ProgramBlueprint)
49
63
  ], ExerciseBlueprint.prototype, "program", void 0);
50
64
  ExerciseBlueprint = __decorate([
51
65
  Table
@@ -4,6 +4,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { Column, DataType, Default, Model, Table } from "sequelize-typescript";
8
11
  let ExercisesModels = class ExercisesModels extends Model {
9
12
  };
@@ -14,37 +17,48 @@ __decorate([
14
17
  defaultValue: DataType.UUID,
15
18
  allowNull: false,
16
19
  primaryKey: true,
17
- })
20
+ }),
21
+ __metadata("design:type", String)
18
22
  ], ExercisesModels.prototype, "uuid", void 0);
19
23
  __decorate([
20
- Column({ type: DataType.STRING, allowNull: false })
24
+ Column({ type: DataType.STRING, allowNull: false }),
25
+ __metadata("design:type", String)
21
26
  ], ExercisesModels.prototype, "name", void 0);
22
27
  __decorate([
23
- Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })
28
+ Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false }),
29
+ __metadata("design:type", Array)
24
30
  ], ExercisesModels.prototype, "level", void 0);
25
31
  __decorate([
26
- Column({ type: DataType.BOOLEAN, allowNull: false })
32
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
33
+ __metadata("design:type", Boolean)
27
34
  ], ExercisesModels.prototype, "hasPriority", void 0);
28
35
  __decorate([
29
- Column({ type: DataType.BOOLEAN, allowNull: false })
36
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
37
+ __metadata("design:type", Boolean)
30
38
  ], ExercisesModels.prototype, "isCompound", void 0);
31
39
  __decorate([
32
- Column({ type: DataType.BOOLEAN, allowNull: false })
40
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
41
+ __metadata("design:type", Boolean)
33
42
  ], ExercisesModels.prototype, "hasVariations", void 0);
34
43
  __decorate([
35
- Column({ type: DataType.BOOLEAN, allowNull: false })
44
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
45
+ __metadata("design:type", Boolean)
36
46
  ], ExercisesModels.prototype, "needsEquipment", void 0);
37
47
  __decorate([
38
- Column({ type: DataType.JSONB, allowNull: false })
48
+ Column({ type: DataType.JSONB, allowNull: false }),
49
+ __metadata("design:type", Object)
39
50
  ], ExercisesModels.prototype, "variations", void 0);
40
51
  __decorate([
41
- Column({ type: DataType.JSONB, allowNull: false })
52
+ Column({ type: DataType.JSONB, allowNull: false }),
53
+ __metadata("design:type", Object)
42
54
  ], ExercisesModels.prototype, "variationIfNoVariations", void 0);
43
55
  __decorate([
44
- Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false })
56
+ Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false }),
57
+ __metadata("design:type", Array)
45
58
  ], ExercisesModels.prototype, "muscles", void 0);
46
59
  __decorate([
47
- Column({ type: DataType.BOOLEAN, allowNull: false })
60
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
61
+ __metadata("design:type", Boolean)
48
62
  ], ExercisesModels.prototype, "homeWorkout", void 0);
49
63
  ExercisesModels = __decorate([
50
64
  Table
@@ -4,29 +4,38 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { Column, DataType, Default, ForeignKey, Model, Table } from "sequelize-typescript";
8
11
  import { PersistedUser } from "./PersistedUser";
9
12
  let ExerciseProgress = class ExerciseProgress extends Model {
10
13
  };
11
14
  __decorate([
12
15
  Default(DataType.UUIDV4),
13
- Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true })
16
+ Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
17
+ __metadata("design:type", String)
14
18
  ], ExerciseProgress.prototype, "uuid", void 0);
15
19
  __decorate([
16
20
  ForeignKey(() => PersistedUser),
17
- Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false })
21
+ Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false }),
22
+ __metadata("design:type", String)
18
23
  ], ExerciseProgress.prototype, "userUuid", void 0);
19
24
  __decorate([
20
- Column({ type: DataType.TEXT, allowNull: false })
25
+ Column({ type: DataType.TEXT, allowNull: false }),
26
+ __metadata("design:type", String)
21
27
  ], ExerciseProgress.prototype, "exerciseUuid", void 0);
22
28
  __decorate([
23
- Column({ type: DataType.TEXT, allowNull: false })
29
+ Column({ type: DataType.TEXT, allowNull: false }),
30
+ __metadata("design:type", String)
24
31
  ], ExerciseProgress.prototype, "reps", void 0);
25
32
  __decorate([
26
- Column({ type: DataType.TEXT, allowNull: false })
33
+ Column({ type: DataType.TEXT, allowNull: false }),
34
+ __metadata("design:type", String)
27
35
  ], ExerciseProgress.prototype, "weight", void 0);
28
36
  __decorate([
29
- Column({ type: DataType.DATE, allowNull: false })
37
+ Column({ type: DataType.DATE, allowNull: false }),
38
+ __metadata("design:type", Date)
30
39
  ], ExerciseProgress.prototype, "date", void 0);
31
40
  ExerciseProgress = __decorate([
32
41
  Table
@@ -4,21 +4,28 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { Column, DataType, Default, Model, Table } from "sequelize-typescript";
8
11
  let ForgotPasswordTokens = class ForgotPasswordTokens extends Model {
9
12
  };
10
13
  __decorate([
11
14
  Default(DataType.UUIDV4),
12
- Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true })
15
+ Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
16
+ __metadata("design:type", String)
13
17
  ], ForgotPasswordTokens.prototype, "uuid", void 0);
14
18
  __decorate([
15
- Column({ type: DataType.UUID, allowNull: false })
19
+ Column({ type: DataType.UUID, allowNull: false }),
20
+ __metadata("design:type", String)
16
21
  ], ForgotPasswordTokens.prototype, "userUuid", void 0);
17
22
  __decorate([
18
- Column({ type: DataType.TEXT, allowNull: false })
23
+ Column({ type: DataType.TEXT, allowNull: false }),
24
+ __metadata("design:type", String)
19
25
  ], ForgotPasswordTokens.prototype, "token", void 0);
20
26
  __decorate([
21
- Column({ type: DataType.DATE, allowNull: false })
27
+ Column({ type: DataType.DATE, allowNull: false }),
28
+ __metadata("design:type", Date)
22
29
  ], ForgotPasswordTokens.prototype, "date", void 0);
23
30
  ForgotPasswordTokens = __decorate([
24
31
  Table
@@ -4,6 +4,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { Column, DataType, Default, HasMany, HasOne, Model, Table } from "sequelize-typescript";
8
11
  import { Program } from "./Program";
9
12
  import { UserInfo } from "./UserInfo";
@@ -12,61 +15,80 @@ let PersistedUser = class PersistedUser extends Model {
12
15
  };
13
16
  __decorate([
14
17
  Default(DataType.UUIDV4),
15
- Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true })
18
+ Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
19
+ __metadata("design:type", String)
16
20
  ], PersistedUser.prototype, "userUuid", void 0);
17
21
  __decorate([
18
- Column({ type: DataType.TEXT, allowNull: false, unique: true })
22
+ Column({ type: DataType.TEXT, allowNull: false, unique: true }),
23
+ __metadata("design:type", String)
19
24
  ], PersistedUser.prototype, "email", void 0);
20
25
  __decorate([
21
- Column({ type: DataType.TEXT, allowNull: false })
26
+ Column({ type: DataType.TEXT, allowNull: false }),
27
+ __metadata("design:type", String)
22
28
  ], PersistedUser.prototype, "password", void 0);
23
29
  __decorate([
24
- Column({ type: DataType.TEXT, allowNull: true })
30
+ Column({ type: DataType.TEXT, allowNull: true }),
31
+ __metadata("design:type", String)
25
32
  ], PersistedUser.prototype, "firstName", void 0);
26
33
  __decorate([
27
- Column({ type: DataType.TEXT, allowNull: true })
34
+ Column({ type: DataType.TEXT, allowNull: true }),
35
+ __metadata("design:type", String)
28
36
  ], PersistedUser.prototype, "lastName", void 0);
29
37
  __decorate([
30
- Column({ type: DataType.TEXT, allowNull: true })
38
+ Column({ type: DataType.TEXT, allowNull: true }),
39
+ __metadata("design:type", String)
31
40
  ], PersistedUser.prototype, "avatar", void 0);
32
41
  __decorate([
33
- Column({ type: DataType.TEXT, allowNull: true })
42
+ Column({ type: DataType.TEXT, allowNull: true }),
43
+ __metadata("design:type", String)
34
44
  ], PersistedUser.prototype, "sex", void 0);
35
45
  __decorate([
36
- Column({ type: DataType.TEXT, allowNull: true })
46
+ Column({ type: DataType.TEXT, allowNull: true }),
47
+ __metadata("design:type", String)
37
48
  ], PersistedUser.prototype, "goal", void 0);
38
49
  __decorate([
39
- Column({ type: DataType.TEXT, allowNull: true })
50
+ Column({ type: DataType.TEXT, allowNull: true }),
51
+ __metadata("design:type", String)
40
52
  ], PersistedUser.prototype, "weightGoal", void 0);
41
53
  __decorate([
42
- Column({ type: DataType.TEXT, allowNull: true })
54
+ Column({ type: DataType.TEXT, allowNull: true }),
55
+ __metadata("design:type", String)
43
56
  ], PersistedUser.prototype, "level", void 0);
44
57
  __decorate([
45
- Column({ type: DataType.TEXT, allowNull: true })
58
+ Column({ type: DataType.TEXT, allowNull: true }),
59
+ __metadata("design:type", String)
46
60
  ], PersistedUser.prototype, "type", void 0);
47
61
  __decorate([
48
- Column({ type: DataType.TEXT, allowNull: true })
62
+ Column({ type: DataType.TEXT, allowNull: true }),
63
+ __metadata("design:type", Number)
49
64
  ], PersistedUser.prototype, "days", void 0);
50
65
  __decorate([
51
- Column({ type: DataType.TEXT, allowNull: true })
66
+ Column({ type: DataType.TEXT, allowNull: true }),
67
+ __metadata("design:type", String)
52
68
  ], PersistedUser.prototype, "dateOfBirth", void 0);
53
69
  __decorate([
54
- Column({ type: DataType.TEXT, allowNull: true })
70
+ Column({ type: DataType.TEXT, allowNull: true }),
71
+ __metadata("design:type", String)
55
72
  ], PersistedUser.prototype, "metricSystem", void 0);
56
73
  __decorate([
57
- Column({ type: DataType.TEXT, allowNull: true })
74
+ Column({ type: DataType.TEXT, allowNull: true }),
75
+ __metadata("design:type", String)
58
76
  ], PersistedUser.prototype, "height", void 0);
59
77
  __decorate([
60
- Column({ type: DataType.TEXT, allowNull: true })
78
+ Column({ type: DataType.TEXT, allowNull: true }),
79
+ __metadata("design:type", String)
61
80
  ], PersistedUser.prototype, "weight", void 0);
62
81
  __decorate([
63
- HasOne(() => Program, { foreignKey: "userUuid" })
82
+ HasOne(() => Program, { foreignKey: "userUuid" }),
83
+ __metadata("design:type", Program)
64
84
  ], PersistedUser.prototype, "program", void 0);
65
85
  __decorate([
66
- HasOne(() => UserInfo, { foreignKey: "userUuid" })
86
+ HasOne(() => UserInfo, { foreignKey: "userUuid" }),
87
+ __metadata("design:type", UserInfo)
67
88
  ], PersistedUser.prototype, "userInfo", void 0);
68
89
  __decorate([
69
- HasMany(() => UserProgressPhoto, { foreignKey: "userUuid" })
90
+ HasMany(() => UserProgressPhoto, { foreignKey: "userUuid" }),
91
+ __metadata("design:type", Array)
70
92
  ], PersistedUser.prototype, "progressPhotos", void 0);
71
93
  PersistedUser = __decorate([
72
94
  Table
@@ -4,6 +4,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { Workout } from "./Workout";
8
11
  import { BelongsTo, Column, DataType, Default, HasMany, Model, Table } from "sequelize-typescript";
9
12
  import { PersistedUser } from "./PersistedUser";
@@ -11,16 +14,20 @@ let Program = class Program extends Model {
11
14
  };
12
15
  __decorate([
13
16
  Default(DataType.UUIDV4),
14
- Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true })
17
+ Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
18
+ __metadata("design:type", String)
15
19
  ], Program.prototype, "programId", void 0);
16
20
  __decorate([
17
- Column({ type: DataType.UUID, allowNull: false })
21
+ Column({ type: DataType.UUID, allowNull: false }),
22
+ __metadata("design:type", String)
18
23
  ], Program.prototype, "userUuid", void 0);
19
24
  __decorate([
20
- BelongsTo(() => PersistedUser, { foreignKey: "userUuid" })
25
+ BelongsTo(() => PersistedUser, { foreignKey: "userUuid" }),
26
+ __metadata("design:type", PersistedUser)
21
27
  ], Program.prototype, "user", void 0);
22
28
  __decorate([
23
- HasMany(() => Workout, { foreignKey: "programId" })
29
+ HasMany(() => Workout, { foreignKey: "programId" }),
30
+ __metadata("design:type", Array)
24
31
  ], Program.prototype, "workout", void 0);
25
32
  Program = __decorate([
26
33
  Table
@@ -4,6 +4,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { Column, DataType, Default, HasMany, Model, Table, } from "sequelize-typescript";
8
11
  import { ExerciseBlueprint } from "./ExerciseBlueprint";
9
12
  let ProgramBlueprint = class ProgramBlueprint extends Model {
@@ -15,25 +18,32 @@ __decorate([
15
18
  defaultValue: DataType.UUID,
16
19
  allowNull: false,
17
20
  primaryKey: true,
18
- })
21
+ }),
22
+ __metadata("design:type", String)
19
23
  ], ProgramBlueprint.prototype, "programId", void 0);
20
24
  __decorate([
21
- Column({ type: DataType.TEXT, allowNull: false, unique: true })
25
+ Column({ type: DataType.TEXT, allowNull: false, unique: true }),
26
+ __metadata("design:type", String)
22
27
  ], ProgramBlueprint.prototype, "title", void 0);
23
28
  __decorate([
24
- Column({ type: DataType.TEXT, allowNull: false })
29
+ Column({ type: DataType.TEXT, allowNull: false }),
30
+ __metadata("design:type", String)
25
31
  ], ProgramBlueprint.prototype, "level", void 0);
26
32
  __decorate([
27
- Column({ type: DataType.INTEGER, allowNull: false })
33
+ Column({ type: DataType.INTEGER, allowNull: false }),
34
+ __metadata("design:type", Number)
28
35
  ], ProgramBlueprint.prototype, "numberOfDays", void 0);
29
36
  __decorate([
30
- Column({ type: DataType.INTEGER, allowNull: false })
37
+ Column({ type: DataType.INTEGER, allowNull: false }),
38
+ __metadata("design:type", Number)
31
39
  ], ProgramBlueprint.prototype, "exercisesPerWorkout", void 0);
32
40
  __decorate([
33
- Column({ type: DataType.ARRAY(DataType.JSONB), allowNull: false })
41
+ Column({ type: DataType.ARRAY(DataType.JSONB), allowNull: false }),
42
+ __metadata("design:type", Array)
34
43
  ], ProgramBlueprint.prototype, "workoutNames", void 0);
35
44
  __decorate([
36
- HasMany(() => ExerciseBlueprint, { foreignKey: "programId" })
45
+ HasMany(() => ExerciseBlueprint, { foreignKey: "programId" }),
46
+ __metadata("design:type", Array)
37
47
  ], ProgramBlueprint.prototype, "exercises", void 0);
38
48
  ProgramBlueprint = __decorate([
39
49
  Table
@@ -4,11 +4,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { Column, DataType, Model, Table } from "sequelize-typescript";
8
11
  let RefreshToken = class RefreshToken extends Model {
9
12
  };
10
13
  __decorate([
11
- Column({ type: DataType.TEXT, allowNull: false })
14
+ Column({ type: DataType.TEXT, allowNull: false }),
15
+ __metadata("design:type", String)
12
16
  ], RefreshToken.prototype, "refreshToken", void 0);
13
17
  RefreshToken = __decorate([
14
18
  Table
@@ -4,6 +4,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { Exercise } from "./Exercise";
8
11
  import { SupersetExercise } from "./SupersetExercise";
9
12
  import { BelongsTo, BelongsToMany, Column, DataType, Default, Model, Table } from "sequelize-typescript";
@@ -12,13 +15,16 @@ let Superset = class Superset extends Model {
12
15
  };
13
16
  __decorate([
14
17
  Default(DataType.UUIDV4),
15
- Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true })
18
+ Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
19
+ __metadata("design:type", String)
16
20
  ], Superset.prototype, "uuid", void 0);
17
21
  __decorate([
18
- BelongsTo(() => Workout, { foreignKey: "uuid" })
22
+ BelongsTo(() => Workout, { foreignKey: "uuid" }),
23
+ __metadata("design:type", Array)
19
24
  ], Superset.prototype, "workout", void 0);
20
25
  __decorate([
21
- BelongsToMany(() => Exercise, () => SupersetExercise)
26
+ BelongsToMany(() => Exercise, () => SupersetExercise),
27
+ __metadata("design:type", Array)
22
28
  ], Superset.prototype, "exercise", void 0);
23
29
  Superset = __decorate([
24
30
  Table
@@ -4,6 +4,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { Exercise } from "./Exercise";
8
11
  import { Superset } from "./Superset";
9
12
  import { Column, DataType, ForeignKey, Model, Table } from "sequelize-typescript";
@@ -19,7 +22,8 @@ __decorate([
19
22
  model: "Superset",
20
23
  key: 'uuid'
21
24
  }
22
- })
25
+ }),
26
+ __metadata("design:type", String)
23
27
  ], SupersetExercise.prototype, "SupersetUuid", void 0);
24
28
  __decorate([
25
29
  ForeignKey(() => Exercise),
@@ -31,7 +35,8 @@ __decorate([
31
35
  model: "Exercise",
32
36
  key: 'uuid',
33
37
  }
34
- })
38
+ }),
39
+ __metadata("design:type", String)
35
40
  ], SupersetExercise.prototype, "ExerciseUuid", void 0);
36
41
  SupersetExercise = __decorate([
37
42
  Table
@@ -6,5 +6,5 @@ export declare class UserInfo extends Model {
6
6
  weight: string;
7
7
  beforePhoto: string;
8
8
  afterPhoto: string;
9
- user: PersistedUser;
9
+ user: PersistedUser[];
10
10
  }
@@ -4,28 +4,37 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { PersistedUser } from "./PersistedUser";
8
11
  import { BelongsTo, Column, DataType, Default, Model, Table } from "sequelize-typescript";
9
12
  let UserInfo = class UserInfo extends Model {
10
13
  };
11
14
  __decorate([
12
15
  Default(DataType.UUIDV4),
13
- Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true })
16
+ Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
17
+ __metadata("design:type", String)
14
18
  ], UserInfo.prototype, "userUuid", void 0);
15
19
  __decorate([
16
- Column({ type: DataType.TEXT, allowNull: false })
20
+ Column({ type: DataType.TEXT, allowNull: false }),
21
+ __metadata("design:type", String)
17
22
  ], UserInfo.prototype, "height", void 0);
18
23
  __decorate([
19
- Column({ type: DataType.TEXT, allowNull: false })
24
+ Column({ type: DataType.TEXT, allowNull: false }),
25
+ __metadata("design:type", String)
20
26
  ], UserInfo.prototype, "weight", void 0);
21
27
  __decorate([
22
- Column({ type: DataType.TEXT, allowNull: true })
28
+ Column({ type: DataType.TEXT, allowNull: true }),
29
+ __metadata("design:type", String)
23
30
  ], UserInfo.prototype, "beforePhoto", void 0);
24
31
  __decorate([
25
- Column({ type: DataType.TEXT, allowNull: true })
32
+ Column({ type: DataType.TEXT, allowNull: true }),
33
+ __metadata("design:type", String)
26
34
  ], UserInfo.prototype, "afterPhoto", void 0);
27
35
  __decorate([
28
- BelongsTo(() => PersistedUser, { foreignKey: "userUuid" })
36
+ BelongsTo(() => PersistedUser, { foreignKey: "userUuid" }),
37
+ __metadata("design:type", Array)
29
38
  ], UserInfo.prototype, "user", void 0);
30
39
  UserInfo = __decorate([
31
40
  Table
@@ -4,25 +4,33 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { PersistedUser } from "./PersistedUser";
8
11
  import { BelongsTo, Column, DataType, ForeignKey, Model, Table } from "sequelize-typescript";
9
12
  let UserProgressPhoto = class UserProgressPhoto extends Model {
10
13
  };
11
14
  __decorate([
12
- Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true })
15
+ Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
16
+ __metadata("design:type", String)
13
17
  ], UserProgressPhoto.prototype, "uuid", void 0);
14
18
  __decorate([
15
19
  ForeignKey(() => PersistedUser),
16
- Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false })
20
+ Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false }),
21
+ __metadata("design:type", String)
17
22
  ], UserProgressPhoto.prototype, "userUuid", void 0);
18
23
  __decorate([
19
- Column({ type: DataType.TEXT, allowNull: true })
24
+ Column({ type: DataType.TEXT, allowNull: true }),
25
+ __metadata("design:type", String)
20
26
  ], UserProgressPhoto.prototype, "progressPhoto", void 0);
21
27
  __decorate([
22
- Column({ type: DataType.DATE, allowNull: false })
28
+ Column({ type: DataType.DATE, allowNull: false }),
29
+ __metadata("design:type", Date)
23
30
  ], UserProgressPhoto.prototype, "date", void 0);
24
31
  __decorate([
25
- BelongsTo(() => PersistedUser, { foreignKey: "userUuid" })
32
+ BelongsTo(() => PersistedUser, { foreignKey: "userUuid" }),
33
+ __metadata("design:type", PersistedUser)
26
34
  ], UserProgressPhoto.prototype, "user", void 0);
27
35
  UserProgressPhoto = __decorate([
28
36
  Table
@@ -7,7 +7,7 @@ export declare class Workout extends Model implements WorkoutModel {
7
7
  uuid: string;
8
8
  isFinished: boolean;
9
9
  info: object;
10
- exercise: Exercise;
10
+ exercise: Exercise[];
11
11
  program: Program;
12
12
  superset: Superset[];
13
13
  }
@@ -4,6 +4,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { Exercise } from "./Exercise";
8
11
  import { Program } from "./Program";
9
12
  import { WorkoutExercise } from "./WorkoutExercise";
@@ -18,22 +21,28 @@ __decorate([
18
21
  defaultValue: DataType.UUID,
19
22
  allowNull: false,
20
23
  primaryKey: true,
21
- })
24
+ }),
25
+ __metadata("design:type", String)
22
26
  ], Workout.prototype, "uuid", void 0);
23
27
  __decorate([
24
- Column({ type: DataType.BOOLEAN, allowNull: false })
28
+ Column({ type: DataType.BOOLEAN, allowNull: false }),
29
+ __metadata("design:type", Boolean)
25
30
  ], Workout.prototype, "isFinished", void 0);
26
31
  __decorate([
27
- Column({ type: DataType.JSONB, allowNull: false })
32
+ Column({ type: DataType.JSONB, allowNull: false }),
33
+ __metadata("design:type", Object)
28
34
  ], Workout.prototype, "info", void 0);
29
35
  __decorate([
30
- BelongsToMany(() => Exercise, () => WorkoutExercise)
36
+ BelongsToMany(() => Exercise, () => WorkoutExercise),
37
+ __metadata("design:type", Array)
31
38
  ], Workout.prototype, "exercise", void 0);
32
39
  __decorate([
33
- BelongsTo(() => Program, { foreignKey: "programId" })
40
+ BelongsTo(() => Program, { foreignKey: "programId" }),
41
+ __metadata("design:type", Program)
34
42
  ], Workout.prototype, "program", void 0);
35
43
  __decorate([
36
- HasMany(() => Superset, { foreignKey: "uuid" })
44
+ HasMany(() => Superset, { foreignKey: "uuid" }),
45
+ __metadata("design:type", Array)
37
46
  ], Workout.prototype, "superset", void 0);
38
47
  Workout = __decorate([
39
48
  Table
@@ -4,6 +4,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
7
10
  import { Workout } from "./Workout";
8
11
  import { Exercise } from "./Exercise";
9
12
  import { Column, DataType, ForeignKey, Model, Table } from "sequelize-typescript";
@@ -19,7 +22,8 @@ __decorate([
19
22
  model: "Workout",
20
23
  key: 'uuid'
21
24
  }
22
- })
25
+ }),
26
+ __metadata("design:type", String)
23
27
  ], WorkoutExercise.prototype, "WorkoutUuid", void 0);
24
28
  __decorate([
25
29
  ForeignKey(() => Exercise),
@@ -31,7 +35,8 @@ __decorate([
31
35
  model: "Exercise",
32
36
  key: 'uuid',
33
37
  }
34
- })
38
+ }),
39
+ __metadata("design:type", String)
35
40
  ], WorkoutExercise.prototype, "ExerciseUuid", void 0);
36
41
  WorkoutExercise = __decorate([
37
42
  Table
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "90dc-core",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "A package that contains utils and interfaces used to create 90dc",
5
5
  "main": "build/index.js",
6
6
  "files": [