90dc-core 1.1.2 → 1.1.3

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