90dc-core 1.8.2 → 1.9.0

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.
Files changed (29) hide show
  1. package/dist/lib/dbmodels/nonconsprogram/NonConsumableProgram.d.ts +1 -0
  2. package/dist/lib/dbmodels/nonconsprogram/NonConsumableProgram.js +7 -0
  3. package/dist/lib/dbmodels/nonconsprogram/NonConsumableProgram.js.map +1 -1
  4. package/dist/lib/dbmodels/program/ChallengeBlueprint.d.ts +12 -0
  5. package/dist/lib/dbmodels/program/ChallengeBlueprint.js +75 -0
  6. package/dist/lib/dbmodels/program/ChallengeBlueprint.js.map +1 -0
  7. package/dist/lib/dbmodels/program/CustomProgramBlueprint.d.ts +15 -0
  8. package/dist/lib/dbmodels/program/CustomProgramBlueprint.js +66 -0
  9. package/dist/lib/dbmodels/program/CustomProgramBlueprint.js.map +1 -0
  10. package/dist/lib/dbmodels/program/CustomStrengthTest.d.ts +10 -0
  11. package/dist/lib/dbmodels/program/CustomStrengthTest.js +55 -0
  12. package/dist/lib/dbmodels/program/CustomStrengthTest.js.map +1 -0
  13. package/dist/lib/dbmodels/program/CustomStrengthTestExercises.d.ts +14 -0
  14. package/dist/lib/dbmodels/program/CustomStrengthTestExercises.js +69 -0
  15. package/dist/lib/dbmodels/program/CustomStrengthTestExercises.js.map +1 -0
  16. package/dist/lib/dbmodels/program/CustomWorkoutBlueprint.d.ts +15 -0
  17. package/dist/lib/dbmodels/program/CustomWorkoutBlueprint.js +58 -0
  18. package/dist/lib/dbmodels/program/CustomWorkoutBlueprint.js.map +1 -0
  19. package/dist/lib/dbmodels/program/RestDay.d.ts +7 -0
  20. package/dist/lib/dbmodels/program/RestDay.js +33 -0
  21. package/dist/lib/dbmodels/program/RestDay.js.map +1 -0
  22. package/package.json +1 -1
  23. package/src/lib/dbmodels/nonconsprogram/NonConsumableProgram.ts +3 -0
  24. package/src/lib/dbmodels/program/ChallengeBlueprint.ts +44 -0
  25. package/src/lib/dbmodels/program/CustomProgramBlueprint.ts +45 -0
  26. package/src/lib/dbmodels/program/CustomStrengthTest.ts +54 -0
  27. package/src/lib/dbmodels/program/CustomStrengthTestExercises.ts +53 -0
  28. package/src/lib/dbmodels/program/CustomWorkoutBlueprint.ts +38 -0
  29. package/src/lib/dbmodels/program/RestDay.ts +29 -0
@@ -16,6 +16,7 @@ export declare class NonConsumableProgram extends Model {
16
16
  type: ConsumableProgramTypes;
17
17
  isFree: boolean;
18
18
  isHighlighted: boolean;
19
+ is30DC: boolean;
19
20
  productIdAndroid: string | null;
20
21
  productIdIos: string | null;
21
22
  header: string | null;
@@ -83,6 +83,13 @@ __decorate([
83
83
  defaultValue: false
84
84
  })
85
85
  ], NonConsumableProgram.prototype, "isHighlighted", void 0);
86
+ __decorate([
87
+ Column({
88
+ type: DataType.BOOLEAN,
89
+ allowNull: false,
90
+ defaultValue: false
91
+ })
92
+ ], NonConsumableProgram.prototype, "is30DC", void 0);
86
93
  __decorate([
87
94
  Column({
88
95
  type: DataType.TEXT,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/dbmodels/nonconsprogram/NonConsumableProgram.ts"],"sourcesContent":["import {\n BelongsToMany,\n Column,\n DataType,\n Default,\n HasMany, HasOne,\n Model,\n Table,\n} from \"sequelize-typescript\";\nimport {\n ConsumableProgramGoals,\n ConsumableProgramTypes,\n ConsumableProgramWeightGoals,\n} from \"../../enums/ProgramEnums\";\nimport { TranslatedConsumableProgram } from \"./TranslatedConsumableProgram\";\nimport { UserPrograms } from \"./UserNonConsumableProgram\";\nimport { PersistedUser } from \"../PersistedUser\";\nimport {Program} from \"../program/Program\";\nimport {NonConsumableProgramWebContent} from \"./NonConsumableProgramWebContent\";\n\n@Table\nexport class NonConsumableProgram extends Model {\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n primaryKey: true,\n })\n declare uuid: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare description: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare coverImageUri: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false })\n declare order: number;\n\n @Column({ type: DataType.INTEGER, allowNull: false, defaultValue: 0 })\n declare popularityOrder: number;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare weightGoal: ConsumableProgramWeightGoals;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare goal: ConsumableProgramGoals;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare type: ConsumableProgramTypes;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false })\n declare isFree: boolean;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })\n declare isHighlighted: boolean;\n\n @Column({ type: DataType.TEXT, allowNull: true })\n declare productIdAndroid: string | null;\n\n @Column({ type: DataType.TEXT, allowNull: true })\n declare productIdIos: string | null;\n\n @Column({ type: DataType.TEXT, allowNull: true })\n declare header: string | null;\n\n @Column({ type: DataType.BOOLEAN, defaultValue: false })\n declare isCustom: boolean;\n\n @HasMany(() => TranslatedConsumableProgram)\n declare translatedPrograms: TranslatedConsumableProgram[];\n\n @HasOne(() => NonConsumableProgramWebContent)\n declare nonConsumableProgramWebContent: NonConsumableProgramWebContent;\n\n @BelongsToMany(() => PersistedUser, { through: () => UserPrograms })\n declare users: PersistedUser[];\n\n @HasMany(() => Program)\n declare programs: Program[];\n}\n"],"names":["BelongsToMany","Column","DataType","Default","HasMany","HasOne","Model","Table","TranslatedConsumableProgram","UserPrograms","PersistedUser","Program","NonConsumableProgramWebContent","NonConsumableProgram","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","TEXT","INTEGER","BOOLEAN","through"],"mappings":";;;;;;AAAA,SACEA,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,OAAO,EAAEC,MAAM,EACfC,KAAK,EACLC,KAAK,QACA,uBAAuB;AAM9B,SAASC,2BAA2B,QAAQ,gCAAgC;AAC5E,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,OAAO,QAAO,qBAAqB;AAC5C,SAAQC,8BAA8B,QAAO,mCAAmC;AAGhF,WAAaC,uBAAN,mCAAmCP;AA+D1C,EAAC;;IA9DEH,QAAQD,SAASY,MAAM;IACvBb,OAAO;QACNc,MAAMb,SAASc,IAAI;QACnBC,cAAcf,SAASc,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IAClB;GAPWN;;IAUVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,KAAK;IAAC;GAVrCL;;IAaVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,KAAK;IAAC;GAbrCL;;IAgBVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,KAAK;IAAC;GAhBrCL;;IAmBVZ,OAAO;QAAEc,MAAMb,SAASmB,OAAO;QAAEH,WAAW,KAAK;IAAC;GAnBxCL;;IAsBVZ,OAAO;QAAEc,MAAMb,SAASmB,OAAO;QAAEH,WAAW,KAAK;QAAED,cAAc;IAAE;GAtBzDJ;;IAyBVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,KAAK;IAAC;GAzBrCL;;IA4BVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,KAAK;IAAC;GA5BrCL;;IA+BVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,KAAK;IAAC;GA/BrCL;;IAkCVZ,OAAO;QAAEc,MAAMb,SAASoB,OAAO;QAAEJ,WAAW,KAAK;IAAC;GAlCxCL;;IAqCVZ,OAAO;QAAEc,MAAMb,SAASoB,OAAO;QAAEJ,WAAW,KAAK;QAAED,cAAc,KAAK;IAAC;GArC7DJ;;IAwCVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,IAAI;IAAC;GAxCpCL;;IA2CVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,IAAI;IAAC;GA3CpCL;;IA8CVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,IAAI;IAAC;GA9CpCL;;IAiDVZ,OAAO;QAAEc,MAAMb,SAASoB,OAAO;QAAEL,cAAc,KAAK;IAAC;GAjD3CJ;;IAoDVT,QAAQ,IAAMI;GApDJK;;IAuDVR,OAAO,IAAMO;GAvDHC;;IA0DVb,cAAc,IAAMU,eAAe;QAAEa,SAAS,IAAMd;IAAa;GA1DvDI;;IA6DVT,QAAQ,IAAMO;GA7DJE;AAAAA;IADZN;GACYM"}
1
+ {"version":3,"sources":["../../../../src/lib/dbmodels/nonconsprogram/NonConsumableProgram.ts"],"sourcesContent":["import {\n BelongsToMany,\n Column,\n DataType,\n Default,\n HasMany, HasOne,\n Model,\n Table,\n} from \"sequelize-typescript\";\nimport {\n ConsumableProgramGoals,\n ConsumableProgramTypes,\n ConsumableProgramWeightGoals,\n} from \"../../enums/ProgramEnums\";\nimport { TranslatedConsumableProgram } from \"./TranslatedConsumableProgram\";\nimport { UserPrograms } from \"./UserNonConsumableProgram\";\nimport { PersistedUser } from \"../PersistedUser\";\nimport {Program} from \"../program/Program\";\nimport {NonConsumableProgramWebContent} from \"./NonConsumableProgramWebContent\";\n\n@Table\nexport class NonConsumableProgram extends Model {\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n primaryKey: true,\n })\n declare uuid: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare description: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare coverImageUri: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false })\n declare order: number;\n\n @Column({ type: DataType.INTEGER, allowNull: false, defaultValue: 0 })\n declare popularityOrder: number;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare weightGoal: ConsumableProgramWeightGoals;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare goal: ConsumableProgramGoals;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare type: ConsumableProgramTypes;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false })\n declare isFree: boolean;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })\n declare isHighlighted: boolean;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })\n declare is30DC: boolean;\n\n @Column({ type: DataType.TEXT, allowNull: true })\n declare productIdAndroid: string | null;\n\n @Column({ type: DataType.TEXT, allowNull: true })\n declare productIdIos: string | null;\n\n @Column({ type: DataType.TEXT, allowNull: true })\n declare header: string | null;\n\n @Column({ type: DataType.BOOLEAN, defaultValue: false })\n declare isCustom: boolean;\n\n @HasMany(() => TranslatedConsumableProgram)\n declare translatedPrograms: TranslatedConsumableProgram[];\n\n @HasOne(() => NonConsumableProgramWebContent)\n declare nonConsumableProgramWebContent: NonConsumableProgramWebContent;\n\n @BelongsToMany(() => PersistedUser, { through: () => UserPrograms })\n declare users: PersistedUser[];\n\n @HasMany(() => Program)\n declare programs: Program[];\n}\n"],"names":["BelongsToMany","Column","DataType","Default","HasMany","HasOne","Model","Table","TranslatedConsumableProgram","UserPrograms","PersistedUser","Program","NonConsumableProgramWebContent","NonConsumableProgram","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","TEXT","INTEGER","BOOLEAN","through"],"mappings":";;;;;;AAAA,SACEA,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,OAAO,EAAEC,MAAM,EACfC,KAAK,EACLC,KAAK,QACA,uBAAuB;AAM9B,SAASC,2BAA2B,QAAQ,gCAAgC;AAC5E,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,OAAO,QAAO,qBAAqB;AAC5C,SAAQC,8BAA8B,QAAO,mCAAmC;AAGhF,WAAaC,uBAAN,mCAAmCP;AAkE1C,EAAC;;IAjEEH,QAAQD,SAASY,MAAM;IACvBb,OAAO;QACNc,MAAMb,SAASc,IAAI;QACnBC,cAAcf,SAASc,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IAClB;GAPWN;;IAUVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,KAAK;IAAC;GAVrCL;;IAaVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,KAAK;IAAC;GAbrCL;;IAgBVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,KAAK;IAAC;GAhBrCL;;IAmBVZ,OAAO;QAAEc,MAAMb,SAASmB,OAAO;QAAEH,WAAW,KAAK;IAAC;GAnBxCL;;IAsBVZ,OAAO;QAAEc,MAAMb,SAASmB,OAAO;QAAEH,WAAW,KAAK;QAAED,cAAc;IAAE;GAtBzDJ;;IAyBVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,KAAK;IAAC;GAzBrCL;;IA4BVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,KAAK;IAAC;GA5BrCL;;IA+BVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,KAAK;IAAC;GA/BrCL;;IAkCVZ,OAAO;QAAEc,MAAMb,SAASoB,OAAO;QAAEJ,WAAW,KAAK;IAAC;GAlCxCL;;IAqCVZ,OAAO;QAAEc,MAAMb,SAASoB,OAAO;QAAEJ,WAAW,KAAK;QAAED,cAAc,KAAK;IAAC;GArC7DJ;;IAwCVZ,OAAO;QAAEc,MAAMb,SAASoB,OAAO;QAAEJ,WAAW,KAAK;QAAED,cAAc,KAAK;IAAC;GAxC7DJ;;IA2CVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,IAAI;IAAC;GA3CpCL;;IA8CVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,IAAI;IAAC;GA9CpCL;;IAiDVZ,OAAO;QAAEc,MAAMb,SAASkB,IAAI;QAAEF,WAAW,IAAI;IAAC;GAjDpCL;;IAoDVZ,OAAO;QAAEc,MAAMb,SAASoB,OAAO;QAAEL,cAAc,KAAK;IAAC;GApD3CJ;;IAuDVT,QAAQ,IAAMI;GAvDJK;;IA0DVR,OAAO,IAAMO;GA1DHC;;IA6DVb,cAAc,IAAMU,eAAe;QAAEa,SAAS,IAAMd;IAAa;GA7DvDI;;IAgEVT,QAAQ,IAAMO;GAhEJE;AAAAA;IADZN;GACYM"}
@@ -0,0 +1,12 @@
1
+ import { Model } from 'sequelize-typescript';
2
+ export declare class ChallengeBlueprint extends Model {
3
+ uuid: string;
4
+ blueprintUuid: string;
5
+ title: string;
6
+ url: string;
7
+ pointer: string;
8
+ order: number;
9
+ timerTime: string;
10
+ showStopwatch: boolean;
11
+ progress: object;
12
+ }
@@ -0,0 +1,75 @@
1
+ var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { Column, DataType, Default, ForeignKey, Index, Model, Table } from "sequelize-typescript";
8
+ import { CustomProgramBlueprint } from "./CustomProgramBlueprint.js";
9
+ export let ChallengeBlueprint = class ChallengeBlueprint extends Model {
10
+ };
11
+ __decorate([
12
+ Default(DataType.UUIDV4),
13
+ Column({
14
+ type: DataType.UUID,
15
+ defaultValue: DataType.UUID,
16
+ allowNull: false,
17
+ primaryKey: true
18
+ })
19
+ ], ChallengeBlueprint.prototype, "uuid", void 0);
20
+ __decorate([
21
+ Index,
22
+ ForeignKey(()=>CustomProgramBlueprint),
23
+ Column({
24
+ type: DataType.UUID,
25
+ defaultValue: DataType.UUID,
26
+ allowNull: false
27
+ })
28
+ ], ChallengeBlueprint.prototype, "blueprintUuid", void 0);
29
+ __decorate([
30
+ Column({
31
+ type: DataType.STRING,
32
+ allowNull: false
33
+ })
34
+ ], ChallengeBlueprint.prototype, "title", void 0);
35
+ __decorate([
36
+ Column({
37
+ type: DataType.STRING,
38
+ allowNull: false
39
+ })
40
+ ], ChallengeBlueprint.prototype, "url", void 0);
41
+ __decorate([
42
+ Column({
43
+ type: DataType.TEXT,
44
+ allowNull: false
45
+ })
46
+ ], ChallengeBlueprint.prototype, "pointer", void 0);
47
+ __decorate([
48
+ Column({
49
+ type: DataType.INTEGER,
50
+ allowNull: false
51
+ })
52
+ ], ChallengeBlueprint.prototype, "order", void 0);
53
+ __decorate([
54
+ Column({
55
+ type: DataType.STRING,
56
+ allowNull: false
57
+ })
58
+ ], ChallengeBlueprint.prototype, "timerTime", void 0);
59
+ __decorate([
60
+ Column({
61
+ type: DataType.BOOLEAN,
62
+ allowNull: false
63
+ })
64
+ ], ChallengeBlueprint.prototype, "showStopwatch", void 0);
65
+ __decorate([
66
+ Column({
67
+ type: DataType.JSONB,
68
+ allowNull: true
69
+ })
70
+ ], ChallengeBlueprint.prototype, "progress", void 0);
71
+ ChallengeBlueprint = __decorate([
72
+ Table
73
+ ], ChallengeBlueprint);
74
+
75
+ //# sourceMappingURL=ChallengeBlueprint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/dbmodels/program/ChallengeBlueprint.ts"],"sourcesContent":["import {Column, DataType, Default, ForeignKey, Index, Model, Table} from 'sequelize-typescript';\nimport {CustomProgramBlueprint} from \"./CustomProgramBlueprint.js\";\n\n@Table\nexport class ChallengeBlueprint extends Model{\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n primaryKey: true\n })\n declare uuid: string;\n\n @Index\n @ForeignKey(() => CustomProgramBlueprint)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n })\n declare blueprintUuid: string;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare url: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare pointer: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false })\n declare order: number;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare timerTime: string;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false })\n declare showStopwatch: boolean;\n\n @Column({ type: DataType.JSONB, allowNull: true })\n declare progress: object;\n}\n"],"names":["Column","DataType","Default","ForeignKey","Index","Model","Table","CustomProgramBlueprint","ChallengeBlueprint","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","STRING","TEXT","INTEGER","BOOLEAN","JSONB"],"mappings":";;;;;;AAAA,SAAQA,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK,QAAO,uBAAuB;AAChG,SAAQC,sBAAsB,QAAO,8BAA8B;AAGnE,WAAaC,qBAAN,iCAAiCH;AAuCxC,EAAC;;IAtCIH,QAAQD,SAASQ,MAAM;IACvBT,OAAO;QACJU,MAAMT,SAASU,IAAI;QACnBC,cAAcX,SAASU,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IACpB;GAPSN;;IAURJ;IACAD,WAAW,IAAMI;IACjBP,OAAO;QACJU,MAAMT,SAASU,IAAI;QACnBC,cAAcX,SAASU,IAAI;QAC3BE,WAAW,KAAK;IACpB;GAhBSL;;IAmBRR,OAAO;QAAEU,MAAMT,SAASc,MAAM;QAAEF,WAAW,KAAK;IAAC;GAnBzCL;;IAsBRR,OAAO;QAAEU,MAAMT,SAASc,MAAM;QAAEF,WAAW,KAAK;IAAC;GAtBzCL;;IAyBRR,OAAO;QAAEU,MAAMT,SAASe,IAAI;QAAEH,WAAW,KAAK;IAAC;GAzBvCL;;IA4BRR,OAAO;QAAEU,MAAMT,SAASgB,OAAO;QAAEJ,WAAW,KAAK;IAAC;GA5B1CL;;IA+BRR,OAAO;QAAEU,MAAMT,SAASc,MAAM;QAAEF,WAAW,KAAK;IAAC;GA/BzCL;;IAkCRR,OAAO;QAAEU,MAAMT,SAASiB,OAAO;QAAEL,WAAW,KAAK;IAAC;GAlC1CL;;IAqCRR,OAAO;QAAEU,MAAMT,SAASkB,KAAK;QAAEN,WAAW,IAAI;IAAC;GArCvCL;AAAAA;IADZF;GACYE"}
@@ -0,0 +1,15 @@
1
+ import { Model } from "sequelize-typescript";
2
+ import { RestDay } from "./RestDay.js";
3
+ import { ChallengeBlueprint } from "./ChallengeBlueprint.js";
4
+ import { CustomStrengthTest } from "./CustomStrengthTest.js";
5
+ import { CustomWorkoutBlueprint } from "./CustomWorkoutBlueprint.js";
6
+ export declare class CustomProgramBlueprint extends Model {
7
+ uuid: string;
8
+ title: string;
9
+ level: string;
10
+ numberOfDays: number;
11
+ workouts: CustomWorkoutBlueprint[];
12
+ restDays: RestDay[];
13
+ challenges: ChallengeBlueprint[];
14
+ strengthTests: CustomStrengthTest[];
15
+ }
@@ -0,0 +1,66 @@
1
+ var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { Column, DataType, Default, HasMany, Model, Table } from "sequelize-typescript";
8
+ import { RestDay } from "./RestDay.js";
9
+ import { ChallengeBlueprint } from "./ChallengeBlueprint.js";
10
+ import { CustomStrengthTest } from "./CustomStrengthTest.js";
11
+ import { CustomWorkoutBlueprint } from "./CustomWorkoutBlueprint.js";
12
+ export let CustomProgramBlueprint = class CustomProgramBlueprint extends Model {
13
+ };
14
+ __decorate([
15
+ Default(DataType.UUIDV4),
16
+ Column({
17
+ type: DataType.UUID,
18
+ defaultValue: DataType.UUID,
19
+ allowNull: false,
20
+ primaryKey: true
21
+ })
22
+ ], CustomProgramBlueprint.prototype, "uuid", void 0);
23
+ __decorate([
24
+ Column({
25
+ type: DataType.STRING,
26
+ allowNull: false,
27
+ unique: true
28
+ })
29
+ ], CustomProgramBlueprint.prototype, "title", void 0);
30
+ __decorate([
31
+ Column({
32
+ type: DataType.STRING,
33
+ allowNull: false
34
+ })
35
+ ], CustomProgramBlueprint.prototype, "level", void 0);
36
+ __decorate([
37
+ Column({
38
+ type: DataType.INTEGER,
39
+ allowNull: false
40
+ })
41
+ ], CustomProgramBlueprint.prototype, "numberOfDays", void 0);
42
+ __decorate([
43
+ HasMany(()=>CustomWorkoutBlueprint, {
44
+ foreignKey: "blueprintUuid"
45
+ })
46
+ ], CustomProgramBlueprint.prototype, "workouts", void 0);
47
+ __decorate([
48
+ HasMany(()=>RestDay, {
49
+ foreignKey: "blueprintUuid"
50
+ })
51
+ ], CustomProgramBlueprint.prototype, "restDays", void 0);
52
+ __decorate([
53
+ HasMany(()=>ChallengeBlueprint, {
54
+ foreignKey: "blueprintUuid"
55
+ })
56
+ ], CustomProgramBlueprint.prototype, "challenges", void 0);
57
+ __decorate([
58
+ HasMany(()=>CustomStrengthTest, {
59
+ foreignKey: "blueprintUuid"
60
+ })
61
+ ], CustomProgramBlueprint.prototype, "strengthTests", void 0);
62
+ CustomProgramBlueprint = __decorate([
63
+ Table
64
+ ], CustomProgramBlueprint);
65
+
66
+ //# sourceMappingURL=CustomProgramBlueprint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/dbmodels/program/CustomProgramBlueprint.ts"],"sourcesContent":["import {\n Column,\n DataType,\n Default,\n HasMany, Index,\n Model,\n Table,\n} from \"sequelize-typescript\";\nimport {RestDay} from \"./RestDay.js\";\nimport {ChallengeBlueprint} from \"./ChallengeBlueprint.js\";\nimport {CustomStrengthTest} from \"./CustomStrengthTest.js\";\nimport {CustomWorkoutBlueprint} from \"./CustomWorkoutBlueprint.js\";\n\n@Table\nexport class CustomProgramBlueprint extends Model {\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n primaryKey: true,\n })\n declare uuid: string;\n\n @Column({ type: DataType.STRING, allowNull: false, unique: true })\n declare title: string;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare level: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false })\n declare numberOfDays: number;\n\n @HasMany(() => CustomWorkoutBlueprint, { foreignKey: \"blueprintUuid\" })\n declare workouts: CustomWorkoutBlueprint[];\n\n @HasMany(() => RestDay, { foreignKey: \"blueprintUuid\" })\n declare restDays: RestDay[];\n\n @HasMany(() => ChallengeBlueprint, { foreignKey: \"blueprintUuid\" })\n declare challenges: ChallengeBlueprint[];\n\n @HasMany(() => CustomStrengthTest, { foreignKey: \"blueprintUuid\" })\n declare strengthTests: CustomStrengthTest[];\n}\n"],"names":["Column","DataType","Default","HasMany","Model","Table","RestDay","ChallengeBlueprint","CustomStrengthTest","CustomWorkoutBlueprint","CustomProgramBlueprint","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","STRING","unique","INTEGER","foreignKey"],"mappings":";;;;;;AAAA,SACIA,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,OAAO,EACPC,KAAK,EACLC,KAAK,QACF,uBAAuB;AAC9B,SAAQC,OAAO,QAAO,eAAe;AACrC,SAAQC,kBAAkB,QAAO,0BAA0B;AAC3D,SAAQC,kBAAkB,QAAO,0BAA0B;AAC3D,SAAQC,sBAAsB,QAAO,8BAA8B;AAGnE,WAAaC,yBAAN,qCAAqCN;AA8B5C,EAAC;;IA7BIF,QAAQD,SAASU,MAAM;IACvBX,OAAO;QACJY,MAAMX,SAASY,IAAI;QACnBC,cAAcb,SAASY,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IACpB;GAPSN;;IAURV,OAAO;QAAEY,MAAMX,SAASgB,MAAM;QAAEF,WAAW,KAAK;QAAEG,QAAQ,IAAI;IAAC;GAVvDR;;IAaRV,OAAO;QAAEY,MAAMX,SAASgB,MAAM;QAAEF,WAAW,KAAK;IAAC;GAbzCL;;IAgBRV,OAAO;QAAEY,MAAMX,SAASkB,OAAO;QAAEJ,WAAW,KAAK;IAAC;GAhB1CL;;IAmBRP,QAAQ,IAAMM,wBAAwB;QAAEW,YAAY;IAAgB;GAnB5DV;;IAsBRP,QAAQ,IAAMG,SAAS;QAAEc,YAAY;IAAgB;GAtB7CV;;IAyBRP,QAAQ,IAAMI,oBAAoB;QAAEa,YAAY;IAAgB;GAzBxDV;;IA4BRP,QAAQ,IAAMK,oBAAoB;QAAEY,YAAY;IAAgB;GA5BxDV;AAAAA;IADZL;GACYK"}
@@ -0,0 +1,10 @@
1
+ import { Model } from "sequelize-typescript";
2
+ import { CustomStrengthTestExercise } from "./CustomStrengthTestExercises.js";
3
+ export declare class CustomStrengthTest extends Model {
4
+ uuid: string;
5
+ blueprintUuid: string;
6
+ type: string;
7
+ order: number;
8
+ exercises: CustomStrengthTestExercise[];
9
+ isFinished: boolean;
10
+ }
@@ -0,0 +1,55 @@
1
+ var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { Column, DataType, Default, ForeignKey, HasMany, Index, Model, Table } from "sequelize-typescript";
8
+ import { CustomProgramBlueprint } from "./CustomProgramBlueprint.js";
9
+ import { CustomStrengthTestExercise } from "./CustomStrengthTestExercises.js";
10
+ export let CustomStrengthTest = class CustomStrengthTest extends Model {
11
+ };
12
+ __decorate([
13
+ Default(DataType.UUIDV4),
14
+ Column({
15
+ type: DataType.UUID,
16
+ defaultValue: DataType.UUID,
17
+ allowNull: false,
18
+ primaryKey: true
19
+ })
20
+ ], CustomStrengthTest.prototype, "uuid", void 0);
21
+ __decorate([
22
+ Index,
23
+ ForeignKey(()=>CustomProgramBlueprint),
24
+ Column({
25
+ type: DataType.UUID,
26
+ defaultValue: DataType.UUID,
27
+ allowNull: false
28
+ })
29
+ ], CustomStrengthTest.prototype, "blueprintUuid", void 0);
30
+ __decorate([
31
+ Column({
32
+ type: DataType.STRING,
33
+ allowNull: false
34
+ })
35
+ ], CustomStrengthTest.prototype, "type", void 0);
36
+ __decorate([
37
+ Column({
38
+ type: DataType.INTEGER,
39
+ allowNull: true
40
+ })
41
+ ], CustomStrengthTest.prototype, "order", void 0);
42
+ __decorate([
43
+ HasMany(()=>CustomStrengthTestExercise)
44
+ ], CustomStrengthTest.prototype, "exercises", void 0);
45
+ __decorate([
46
+ Column({
47
+ type: DataType.BOOLEAN,
48
+ allowNull: false
49
+ })
50
+ ], CustomStrengthTest.prototype, "isFinished", void 0);
51
+ CustomStrengthTest = __decorate([
52
+ Table
53
+ ], CustomStrengthTest);
54
+
55
+ //# sourceMappingURL=CustomStrengthTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/dbmodels/program/CustomStrengthTest.ts"],"sourcesContent":["import {\n Column,\n DataType,\n Default,\n ForeignKey,\n HasMany,\n Index,\n Model,\n Table,\n} from \"sequelize-typescript\";\nimport {CustomProgramBlueprint} from \"./CustomProgramBlueprint.js\";\nimport {CustomStrengthTestExercise} from \"./CustomStrengthTestExercises.js\";\n\n@Table\nexport class CustomStrengthTest extends Model {\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n primaryKey: true,\n })\n declare uuid: string;\n\n @Index\n @ForeignKey(() => CustomProgramBlueprint)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n })\n declare blueprintUuid: string;\n\n @Column({\n type: DataType.STRING,\n allowNull: false,\n })\n declare type: string;\n\n @Column({\n type: DataType.INTEGER,\n allowNull: true,\n })\n declare order: number;\n\n @HasMany(() => CustomStrengthTestExercise)\n declare exercises: CustomStrengthTestExercise[];\n\n @Column({\n type: DataType.BOOLEAN,\n allowNull: false,\n })\n declare isFinished: boolean;\n}\n"],"names":["Column","DataType","Default","ForeignKey","HasMany","Index","Model","Table","CustomProgramBlueprint","CustomStrengthTestExercise","CustomStrengthTest","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","STRING","INTEGER","BOOLEAN"],"mappings":";;;;;;AAAA,SACIA,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,OAAO,EACPC,KAAK,EACLC,KAAK,EACLC,KAAK,QACF,uBAAuB;AAC9B,SAAQC,sBAAsB,QAAO,8BAA8B;AACnE,SAAQC,0BAA0B,QAAO,mCAAmC;AAG5E,WAAaC,qBAAN,iCAAiCJ;AAuCxC,EAAC;;IAtCIJ,QAAQD,SAASU,MAAM;IACvBX,OAAO;QACJY,MAAMX,SAASY,IAAI;QACnBC,cAAcb,SAASY,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IACpB;GAPSN;;IAURL;IACAF,WAAW,IAAMK;IACjBR,OAAO;QACJY,MAAMX,SAASY,IAAI;QACnBC,cAAcb,SAASY,IAAI;QAC3BE,WAAW,KAAK;IACpB;GAhBSL;;IAmBRV,OAAO;QACJY,MAAMX,SAASgB,MAAM;QACrBF,WAAW,KAAK;IACpB;GAtBSL;;IAyBRV,OAAO;QACJY,MAAMX,SAASiB,OAAO;QACtBH,WAAW,IAAI;IACnB;GA5BSL;;IA+BRN,QAAQ,IAAMK;GA/BNC;;IAkCRV,OAAO;QACJY,MAAMX,SAASkB,OAAO;QACtBJ,WAAW,KAAK;IACpB;GArCSL;AAAAA;IADZH;GACYG"}
@@ -0,0 +1,14 @@
1
+ import { Model } from "sequelize-typescript";
2
+ export declare class CustomStrengthTestExercise extends Model {
3
+ uuid: string;
4
+ stUuid: string;
5
+ url: string;
6
+ title: string;
7
+ order: number;
8
+ pointer: string;
9
+ timerTime: string;
10
+ progress: Progress;
11
+ }
12
+ export interface Progress {
13
+ [key: string]: number | string | undefined;
14
+ }
@@ -0,0 +1,69 @@
1
+ var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { Column, DataType, Default, ForeignKey, Index, Model, Table } from "sequelize-typescript";
8
+ import { CustomStrengthTest } from "./CustomStrengthTest.js";
9
+ export let CustomStrengthTestExercise = class CustomStrengthTestExercise extends Model {
10
+ };
11
+ __decorate([
12
+ Default(DataType.UUIDV4),
13
+ Column({
14
+ type: DataType.UUID,
15
+ defaultValue: DataType.UUID,
16
+ allowNull: false,
17
+ primaryKey: true
18
+ })
19
+ ], CustomStrengthTestExercise.prototype, "uuid", void 0);
20
+ __decorate([
21
+ Index,
22
+ ForeignKey(()=>CustomStrengthTest),
23
+ Column({
24
+ type: DataType.UUID,
25
+ defaultValue: DataType.UUID,
26
+ allowNull: false
27
+ })
28
+ ], CustomStrengthTestExercise.prototype, "stUuid", void 0);
29
+ __decorate([
30
+ Column({
31
+ type: DataType.STRING,
32
+ allowNull: false
33
+ })
34
+ ], CustomStrengthTestExercise.prototype, "url", void 0);
35
+ __decorate([
36
+ Column({
37
+ type: DataType.STRING,
38
+ allowNull: false
39
+ })
40
+ ], CustomStrengthTestExercise.prototype, "title", void 0);
41
+ __decorate([
42
+ Column({
43
+ type: DataType.INTEGER,
44
+ allowNull: false
45
+ })
46
+ ], CustomStrengthTestExercise.prototype, "order", void 0);
47
+ __decorate([
48
+ Column({
49
+ type: DataType.TEXT,
50
+ allowNull: false
51
+ })
52
+ ], CustomStrengthTestExercise.prototype, "pointer", void 0);
53
+ __decorate([
54
+ Column({
55
+ type: DataType.STRING,
56
+ allowNull: false
57
+ })
58
+ ], CustomStrengthTestExercise.prototype, "timerTime", void 0);
59
+ __decorate([
60
+ Column({
61
+ type: DataType.JSONB,
62
+ allowNull: true
63
+ })
64
+ ], CustomStrengthTestExercise.prototype, "progress", void 0);
65
+ CustomStrengthTestExercise = __decorate([
66
+ Table
67
+ ], CustomStrengthTestExercise);
68
+
69
+ //# sourceMappingURL=CustomStrengthTestExercises.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/dbmodels/program/CustomStrengthTestExercises.ts"],"sourcesContent":["import {\n Column,\n DataType,\n Default,\n ForeignKey, Index,\n Model,\n Table,\n} from \"sequelize-typescript\";\nimport {CustomStrengthTest} from \"./CustomStrengthTest.js\";\n\n@Table\nexport class CustomStrengthTestExercise extends Model {\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n primaryKey: true,\n })\n declare uuid: string;\n\n @Index\n @ForeignKey(() => CustomStrengthTest)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n })\n declare stUuid: string;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare url: string;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false })\n declare order: number;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare pointer: string;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare timerTime: string;\n\n @Column({ type: DataType.JSONB, allowNull: true })\n declare progress: Progress;\n\n}\n\nexport interface Progress {\n [key: string]: number | string | undefined;\n}"],"names":["Column","DataType","Default","ForeignKey","Index","Model","Table","CustomStrengthTest","CustomStrengthTestExercise","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","STRING","INTEGER","TEXT","JSONB"],"mappings":";;;;;;AAAA,SACIA,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EAAEC,KAAK,EACjBC,KAAK,EACLC,KAAK,QACF,uBAAuB;AAC9B,SAAQC,kBAAkB,QAAO,0BAA0B;AAG3D,WAAaC,6BAAN,yCAAyCH;AAqChD,EAAC;;IApCIH,QAAQD,SAASQ,MAAM;IACvBT,OAAO;QACJU,MAAMT,SAASU,IAAI;QACnBC,cAAcX,SAASU,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IACpB;GAPSN;;IAURJ;IACAD,WAAW,IAAMI;IACjBP,OAAO;QACJU,MAAMT,SAASU,IAAI;QACnBC,cAAcX,SAASU,IAAI;QAC3BE,WAAW,KAAK;IACpB;GAhBSL;;IAmBRR,OAAO;QAAEU,MAAMT,SAASc,MAAM;QAAEF,WAAW,KAAK;IAAC;GAnBzCL;;IAsBRR,OAAO;QAAEU,MAAMT,SAASc,MAAM;QAAEF,WAAW,KAAK;IAAC;GAtBzCL;;IAyBRR,OAAO;QAAEU,MAAMT,SAASe,OAAO;QAAEH,WAAW,KAAK;IAAC;GAzB1CL;;IA4BRR,OAAO;QAAEU,MAAMT,SAASgB,IAAI;QAAEJ,WAAW,KAAK;IAAC;GA5BvCL;;IA+BRR,OAAO;QAAEU,MAAMT,SAASc,MAAM;QAAEF,WAAW,KAAK;IAAC;GA/BzCL;;IAkCRR,OAAO;QAAEU,MAAMT,SAASiB,KAAK;QAAEL,WAAW,IAAI;IAAC;GAlCvCL;AAAAA;IADZF;GACYE"}
@@ -0,0 +1,15 @@
1
+ import { Model } from "sequelize-typescript";
2
+ import type { ExerciseBlueprint } from "../../models/BlueprintInterfaces.js";
3
+ export declare class CustomWorkoutBlueprint extends Model {
4
+ uuid: string;
5
+ blueprintUuid: string;
6
+ title: string;
7
+ duration: string;
8
+ order: number;
9
+ exercises: ExerciseBlueprint[];
10
+ superset: SupersetModel[];
11
+ }
12
+ export interface SupersetModel {
13
+ startPosition: number;
14
+ exercises: ExerciseBlueprint[];
15
+ }
@@ -0,0 +1,58 @@
1
+ var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { Column, DataType, Default, ForeignKey, Index, Model, Table } from "sequelize-typescript";
8
+ import { CustomProgramBlueprint } from "./CustomProgramBlueprint.js";
9
+ export let CustomWorkoutBlueprint = class CustomWorkoutBlueprint extends Model {
10
+ };
11
+ __decorate([
12
+ Default(DataType.UUIDV4),
13
+ Column({
14
+ type: DataType.UUID,
15
+ defaultValue: DataType.UUID,
16
+ allowNull: false,
17
+ primaryKey: true
18
+ })
19
+ ], CustomWorkoutBlueprint.prototype, "uuid", void 0);
20
+ __decorate([
21
+ Index,
22
+ ForeignKey(()=>CustomProgramBlueprint)
23
+ ], CustomWorkoutBlueprint.prototype, "blueprintUuid", void 0);
24
+ __decorate([
25
+ Column({
26
+ type: DataType.TEXT,
27
+ allowNull: false
28
+ })
29
+ ], CustomWorkoutBlueprint.prototype, "title", void 0);
30
+ __decorate([
31
+ Column({
32
+ type: DataType.TEXT,
33
+ allowNull: false
34
+ })
35
+ ], CustomWorkoutBlueprint.prototype, "duration", void 0);
36
+ __decorate([
37
+ Column({
38
+ type: DataType.INTEGER,
39
+ allowNull: true
40
+ })
41
+ ], CustomWorkoutBlueprint.prototype, "order", void 0);
42
+ __decorate([
43
+ Column({
44
+ type: DataType.ARRAY(DataType.JSONB),
45
+ allowNull: false
46
+ })
47
+ ], CustomWorkoutBlueprint.prototype, "exercises", void 0);
48
+ __decorate([
49
+ Column({
50
+ type: DataType.ARRAY(DataType.JSONB),
51
+ allowNull: true
52
+ })
53
+ ], CustomWorkoutBlueprint.prototype, "superset", void 0);
54
+ CustomWorkoutBlueprint = __decorate([
55
+ Table
56
+ ], CustomWorkoutBlueprint);
57
+
58
+ //# sourceMappingURL=CustomWorkoutBlueprint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/dbmodels/program/CustomWorkoutBlueprint.ts"],"sourcesContent":["import {Column, DataType, Default, ForeignKey, Index, Model, Table} from \"sequelize-typescript\";\nimport {CustomProgramBlueprint} from \"./CustomProgramBlueprint.js\";\nimport type {ExerciseBlueprint} from \"../../models/BlueprintInterfaces.js\";\n\n@Table\nexport class CustomWorkoutBlueprint extends Model {\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n primaryKey: true,\n })\n declare uuid: string;\n\n @Index\n @ForeignKey(() => CustomProgramBlueprint)\n declare blueprintUuid: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare duration: string;\n\n @Column({ type: DataType.INTEGER, allowNull: true })\n declare order: number;\n\n @Column({ type: DataType.ARRAY(DataType.JSONB), allowNull: false })\n declare exercises: ExerciseBlueprint[];\n\n @Column({ type: DataType.ARRAY(DataType.JSONB), allowNull: true })\n declare superset: SupersetModel[];\n}\nexport interface SupersetModel {\n startPosition: number;\n exercises: ExerciseBlueprint[];\n}\n"],"names":["Column","DataType","Default","ForeignKey","Index","Model","Table","CustomProgramBlueprint","CustomWorkoutBlueprint","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","TEXT","INTEGER","ARRAY","JSONB"],"mappings":";;;;;;AAAA,SAAQA,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK,QAAO,uBAAuB;AAChG,SAAQC,sBAAsB,QAAO,8BAA8B;AAInE,WAAaC,yBAAN,qCAAqCH;AA4B5C,EAAC;;IA3BIH,QAAQD,SAASQ,MAAM;IACvBT,OAAO;QACJU,MAAMT,SAASU,IAAI;QACnBC,cAAcX,SAASU,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IACpB;GAPSN;;IAURJ;IACAD,WAAW,IAAMI;GAXTC;;IAcRR,OAAO;QAAEU,MAAMT,SAASc,IAAI;QAAEF,WAAW,KAAK;IAAC;GAdvCL;;IAiBRR,OAAO;QAAEU,MAAMT,SAASc,IAAI;QAAEF,WAAW,KAAK;IAAC;GAjBvCL;;IAoBRR,OAAO;QAAEU,MAAMT,SAASe,OAAO;QAAEH,WAAW,IAAI;IAAC;GApBzCL;;IAuBRR,OAAO;QAAEU,MAAMT,SAASgB,KAAK,CAAChB,SAASiB,KAAK;QAAGL,WAAW,KAAK;IAAC;GAvBxDL;;IA0BRR,OAAO;QAAEU,MAAMT,SAASgB,KAAK,CAAChB,SAASiB,KAAK;QAAGL,WAAW,IAAI;IAAC;GA1BvDL;AAAAA;IADZF;GACYE"}
@@ -0,0 +1,7 @@
1
+ import { Model } from "sequelize-typescript";
2
+ export declare class RestDay extends Model {
3
+ uuid: string;
4
+ blueprintUuid: string;
5
+ isFinished: boolean;
6
+ order: number;
7
+ }
@@ -0,0 +1,33 @@
1
+ var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { Column, DataType, Default, ForeignKey, Index, Model, PrimaryKey, Table } from "sequelize-typescript";
8
+ import { CustomProgramBlueprint } from "./CustomProgramBlueprint.js";
9
+ export let RestDay = class RestDay extends Model {
10
+ };
11
+ __decorate([
12
+ PrimaryKey,
13
+ Default(DataType.UUIDV4),
14
+ Column(DataType.UUID)
15
+ ], RestDay.prototype, "uuid", void 0);
16
+ __decorate([
17
+ Index,
18
+ ForeignKey(()=>CustomProgramBlueprint),
19
+ Column(DataType.UUID)
20
+ ], RestDay.prototype, "blueprintUuid", void 0);
21
+ __decorate([
22
+ Column(DataType.BOOLEAN)
23
+ ], RestDay.prototype, "isFinished", void 0);
24
+ __decorate([
25
+ Column(DataType.INTEGER)
26
+ ], RestDay.prototype, "order", void 0);
27
+ RestDay = __decorate([
28
+ Table({
29
+ timestamps: true
30
+ })
31
+ ], RestDay);
32
+
33
+ //# sourceMappingURL=RestDay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/lib/dbmodels/program/RestDay.ts"],"sourcesContent":["import {\n Column,\n DataType,\n Default,\n ForeignKey, Index,\n Model,\n PrimaryKey,\n Table,\n} from \"sequelize-typescript\";\nimport {CustomProgramBlueprint} from \"./CustomProgramBlueprint.js\";\n\n@Table({ timestamps: true })\nexport class RestDay extends Model {\n @PrimaryKey\n @Default(DataType.UUIDV4)\n @Column(DataType.UUID)\n declare uuid: string;\n\n @Index\n @ForeignKey(() => CustomProgramBlueprint)\n @Column(DataType.UUID)\n declare blueprintUuid: string;\n\n @Column(DataType.BOOLEAN)\n declare isFinished: boolean;\n\n @Column(DataType.INTEGER)\n declare order: number;\n}\n"],"names":["Column","DataType","Default","ForeignKey","Index","Model","PrimaryKey","Table","CustomProgramBlueprint","RestDay","UUIDV4","UUID","BOOLEAN","INTEGER","timestamps"],"mappings":";;;;;;AAAA,SACEA,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EAAEC,KAAK,EACjBC,KAAK,EACLC,UAAU,EACVC,KAAK,QACA,uBAAuB;AAC9B,SAAQC,sBAAsB,QAAO,8BAA8B;AAGnE,WAAaC,UAAN,sBAAsBJ;AAgB7B,EAAC;;IAfEC;IACAJ,QAAQD,SAASS,MAAM;IACvBV,OAAOC,SAASU,IAAI;GAHVF;;IAMVL;IACAD,WAAW,IAAMK;IACjBR,OAAOC,SAASU,IAAI;GARVF;;IAWVT,OAAOC,SAASW,OAAO;GAXbH;;IAcVT,OAAOC,SAASY,OAAO;GAdbJ;AAAAA;IADZF,MAAM;QAAEO,YAAY,IAAI;IAAC;GACbL"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "90dc-core",
3
- "version": "1.8.2",
3
+ "version": "1.9.0",
4
4
  "description": "A package that contains utils and interfaces used to create 90dc",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -59,6 +59,9 @@ export class NonConsumableProgram extends Model {
59
59
  @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })
60
60
  declare isHighlighted: boolean;
61
61
 
62
+ @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })
63
+ declare is30DC: boolean;
64
+
62
65
  @Column({ type: DataType.TEXT, allowNull: true })
63
66
  declare productIdAndroid: string | null;
64
67
 
@@ -0,0 +1,44 @@
1
+ import {Column, DataType, Default, ForeignKey, Index, Model, Table} from 'sequelize-typescript';
2
+ import {CustomProgramBlueprint} from "./CustomProgramBlueprint.js";
3
+
4
+ @Table
5
+ export class ChallengeBlueprint extends Model{
6
+ @Default(DataType.UUIDV4)
7
+ @Column({
8
+ type: DataType.UUID,
9
+ defaultValue: DataType.UUID,
10
+ allowNull: false,
11
+ primaryKey: true
12
+ })
13
+ declare uuid: string;
14
+
15
+ @Index
16
+ @ForeignKey(() => CustomProgramBlueprint)
17
+ @Column({
18
+ type: DataType.UUID,
19
+ defaultValue: DataType.UUID,
20
+ allowNull: false,
21
+ })
22
+ declare blueprintUuid: string;
23
+
24
+ @Column({ type: DataType.STRING, allowNull: false })
25
+ declare title: string;
26
+
27
+ @Column({ type: DataType.STRING, allowNull: false })
28
+ declare url: string;
29
+
30
+ @Column({ type: DataType.TEXT, allowNull: false })
31
+ declare pointer: string;
32
+
33
+ @Column({ type: DataType.INTEGER, allowNull: false })
34
+ declare order: number;
35
+
36
+ @Column({ type: DataType.STRING, allowNull: false })
37
+ declare timerTime: string;
38
+
39
+ @Column({ type: DataType.BOOLEAN, allowNull: false })
40
+ declare showStopwatch: boolean;
41
+
42
+ @Column({ type: DataType.JSONB, allowNull: true })
43
+ declare progress: object;
44
+ }
@@ -0,0 +1,45 @@
1
+ import {
2
+ Column,
3
+ DataType,
4
+ Default,
5
+ HasMany, Index,
6
+ Model,
7
+ Table,
8
+ } from "sequelize-typescript";
9
+ import {RestDay} from "./RestDay.js";
10
+ import {ChallengeBlueprint} from "./ChallengeBlueprint.js";
11
+ import {CustomStrengthTest} from "./CustomStrengthTest.js";
12
+ import {CustomWorkoutBlueprint} from "./CustomWorkoutBlueprint.js";
13
+
14
+ @Table
15
+ export class CustomProgramBlueprint extends Model {
16
+ @Default(DataType.UUIDV4)
17
+ @Column({
18
+ type: DataType.UUID,
19
+ defaultValue: DataType.UUID,
20
+ allowNull: false,
21
+ primaryKey: true,
22
+ })
23
+ declare uuid: string;
24
+
25
+ @Column({ type: DataType.STRING, allowNull: false, unique: true })
26
+ declare title: string;
27
+
28
+ @Column({ type: DataType.STRING, allowNull: false })
29
+ declare level: string;
30
+
31
+ @Column({ type: DataType.INTEGER, allowNull: false })
32
+ declare numberOfDays: number;
33
+
34
+ @HasMany(() => CustomWorkoutBlueprint, { foreignKey: "blueprintUuid" })
35
+ declare workouts: CustomWorkoutBlueprint[];
36
+
37
+ @HasMany(() => RestDay, { foreignKey: "blueprintUuid" })
38
+ declare restDays: RestDay[];
39
+
40
+ @HasMany(() => ChallengeBlueprint, { foreignKey: "blueprintUuid" })
41
+ declare challenges: ChallengeBlueprint[];
42
+
43
+ @HasMany(() => CustomStrengthTest, { foreignKey: "blueprintUuid" })
44
+ declare strengthTests: CustomStrengthTest[];
45
+ }
@@ -0,0 +1,54 @@
1
+ import {
2
+ Column,
3
+ DataType,
4
+ Default,
5
+ ForeignKey,
6
+ HasMany,
7
+ Index,
8
+ Model,
9
+ Table,
10
+ } from "sequelize-typescript";
11
+ import {CustomProgramBlueprint} from "./CustomProgramBlueprint.js";
12
+ import {CustomStrengthTestExercise} from "./CustomStrengthTestExercises.js";
13
+
14
+ @Table
15
+ export class CustomStrengthTest extends Model {
16
+ @Default(DataType.UUIDV4)
17
+ @Column({
18
+ type: DataType.UUID,
19
+ defaultValue: DataType.UUID,
20
+ allowNull: false,
21
+ primaryKey: true,
22
+ })
23
+ declare uuid: string;
24
+
25
+ @Index
26
+ @ForeignKey(() => CustomProgramBlueprint)
27
+ @Column({
28
+ type: DataType.UUID,
29
+ defaultValue: DataType.UUID,
30
+ allowNull: false,
31
+ })
32
+ declare blueprintUuid: string;
33
+
34
+ @Column({
35
+ type: DataType.STRING,
36
+ allowNull: false,
37
+ })
38
+ declare type: string;
39
+
40
+ @Column({
41
+ type: DataType.INTEGER,
42
+ allowNull: true,
43
+ })
44
+ declare order: number;
45
+
46
+ @HasMany(() => CustomStrengthTestExercise)
47
+ declare exercises: CustomStrengthTestExercise[];
48
+
49
+ @Column({
50
+ type: DataType.BOOLEAN,
51
+ allowNull: false,
52
+ })
53
+ declare isFinished: boolean;
54
+ }
@@ -0,0 +1,53 @@
1
+ import {
2
+ Column,
3
+ DataType,
4
+ Default,
5
+ ForeignKey, Index,
6
+ Model,
7
+ Table,
8
+ } from "sequelize-typescript";
9
+ import {CustomStrengthTest} from "./CustomStrengthTest.js";
10
+
11
+ @Table
12
+ export class CustomStrengthTestExercise extends Model {
13
+ @Default(DataType.UUIDV4)
14
+ @Column({
15
+ type: DataType.UUID,
16
+ defaultValue: DataType.UUID,
17
+ allowNull: false,
18
+ primaryKey: true,
19
+ })
20
+ declare uuid: string;
21
+
22
+ @Index
23
+ @ForeignKey(() => CustomStrengthTest)
24
+ @Column({
25
+ type: DataType.UUID,
26
+ defaultValue: DataType.UUID,
27
+ allowNull: false,
28
+ })
29
+ declare stUuid: string;
30
+
31
+ @Column({ type: DataType.STRING, allowNull: false })
32
+ declare url: string;
33
+
34
+ @Column({ type: DataType.STRING, allowNull: false })
35
+ declare title: string;
36
+
37
+ @Column({ type: DataType.INTEGER, allowNull: false })
38
+ declare order: number;
39
+
40
+ @Column({ type: DataType.TEXT, allowNull: false })
41
+ declare pointer: string;
42
+
43
+ @Column({ type: DataType.STRING, allowNull: false })
44
+ declare timerTime: string;
45
+
46
+ @Column({ type: DataType.JSONB, allowNull: true })
47
+ declare progress: Progress;
48
+
49
+ }
50
+
51
+ export interface Progress {
52
+ [key: string]: number | string | undefined;
53
+ }
@@ -0,0 +1,38 @@
1
+ import {Column, DataType, Default, ForeignKey, Index, Model, Table} from "sequelize-typescript";
2
+ import {CustomProgramBlueprint} from "./CustomProgramBlueprint.js";
3
+ import type {ExerciseBlueprint} from "../../models/BlueprintInterfaces.js";
4
+
5
+ @Table
6
+ export class CustomWorkoutBlueprint extends Model {
7
+ @Default(DataType.UUIDV4)
8
+ @Column({
9
+ type: DataType.UUID,
10
+ defaultValue: DataType.UUID,
11
+ allowNull: false,
12
+ primaryKey: true,
13
+ })
14
+ declare uuid: string;
15
+
16
+ @Index
17
+ @ForeignKey(() => CustomProgramBlueprint)
18
+ declare blueprintUuid: string;
19
+
20
+ @Column({ type: DataType.TEXT, allowNull: false })
21
+ declare title: string;
22
+
23
+ @Column({ type: DataType.TEXT, allowNull: false })
24
+ declare duration: string;
25
+
26
+ @Column({ type: DataType.INTEGER, allowNull: true })
27
+ declare order: number;
28
+
29
+ @Column({ type: DataType.ARRAY(DataType.JSONB), allowNull: false })
30
+ declare exercises: ExerciseBlueprint[];
31
+
32
+ @Column({ type: DataType.ARRAY(DataType.JSONB), allowNull: true })
33
+ declare superset: SupersetModel[];
34
+ }
35
+ export interface SupersetModel {
36
+ startPosition: number;
37
+ exercises: ExerciseBlueprint[];
38
+ }
@@ -0,0 +1,29 @@
1
+ import {
2
+ Column,
3
+ DataType,
4
+ Default,
5
+ ForeignKey, Index,
6
+ Model,
7
+ PrimaryKey,
8
+ Table,
9
+ } from "sequelize-typescript";
10
+ import {CustomProgramBlueprint} from "./CustomProgramBlueprint.js";
11
+
12
+ @Table({ timestamps: true })
13
+ export class RestDay extends Model {
14
+ @PrimaryKey
15
+ @Default(DataType.UUIDV4)
16
+ @Column(DataType.UUID)
17
+ declare uuid: string;
18
+
19
+ @Index
20
+ @ForeignKey(() => CustomProgramBlueprint)
21
+ @Column(DataType.UUID)
22
+ declare blueprintUuid: string;
23
+
24
+ @Column(DataType.BOOLEAN)
25
+ declare isFinished: boolean;
26
+
27
+ @Column(DataType.INTEGER)
28
+ declare order: number;
29
+ }