@runnerpro/backend 1.16.12 → 1.17.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 (52) hide show
  1. package/lib/cjs/db/index.js +3 -3
  2. package/lib/cjs/types/workout/estructuraWorkout.d.ts +1 -4
  3. package/lib/cjs/types/workout/estructuraWorkout.d.ts.map +1 -1
  4. package/lib/cjs/types/workout/planificacionPrueba7dias/10k/getPlanificacionPrueba7dias10k.d.ts +57 -2
  5. package/lib/cjs/types/workout/planificacionPrueba7dias/10k/getPlanificacionPrueba7dias10k.d.ts.map +1 -1
  6. package/lib/cjs/types/workout/planificacionPrueba7dias/10k/getPlanificacionPrueba7dias10kMas50.d.ts +57 -2
  7. package/lib/cjs/types/workout/planificacionPrueba7dias/10k/getPlanificacionPrueba7dias10kMas50.d.ts.map +1 -1
  8. package/lib/cjs/types/workout/planificacionPrueba7dias/10k/getPlanificacionPrueba7dias10kPrimer.d.ts +57 -2
  9. package/lib/cjs/types/workout/planificacionPrueba7dias/10k/getPlanificacionPrueba7dias10kPrimer.d.ts.map +1 -1
  10. package/lib/cjs/types/workout/planificacionPrueba7dias/10k/getPlanificacionPrueba7dias10kSub50.d.ts +19 -2
  11. package/lib/cjs/types/workout/planificacionPrueba7dias/10k/getPlanificacionPrueba7dias10kSub50.d.ts.map +1 -1
  12. package/lib/cjs/types/workout/planificacionPrueba7dias/21k/getPlanificacionPrueba7dias21k.d.ts +27 -2
  13. package/lib/cjs/types/workout/planificacionPrueba7dias/21k/getPlanificacionPrueba7dias21k.d.ts.map +1 -1
  14. package/lib/cjs/types/workout/planificacionPrueba7dias/21k/getPlanificacionPrueba7dias21kMas105.d.ts +27 -2
  15. package/lib/cjs/types/workout/planificacionPrueba7dias/21k/getPlanificacionPrueba7dias21kMas105.d.ts.map +1 -1
  16. package/lib/cjs/types/workout/planificacionPrueba7dias/21k/getPlanificacionPrueba7dias21kPrimer.d.ts +19 -2
  17. package/lib/cjs/types/workout/planificacionPrueba7dias/21k/getPlanificacionPrueba7dias21kPrimer.d.ts.map +1 -1
  18. package/lib/cjs/types/workout/planificacionPrueba7dias/21k/getPlanificacionPrueba7dias21kSub105.d.ts +27 -2
  19. package/lib/cjs/types/workout/planificacionPrueba7dias/21k/getPlanificacionPrueba7dias21kSub105.d.ts.map +1 -1
  20. package/lib/cjs/types/workout/planificacionPrueba7dias/42k/getPlanificacionPrueba7dias42kMas210.d.ts +51 -2
  21. package/lib/cjs/types/workout/planificacionPrueba7dias/42k/getPlanificacionPrueba7dias42kMas210.d.ts.map +1 -1
  22. package/lib/cjs/types/workout/planificacionPrueba7dias/42k/getPlanificacionPrueba7dias42kPrimer.d.ts.map +1 -1
  23. package/lib/cjs/types/workout/planificacionPrueba7dias/42k/getPlanificacionPrueba7dias42kSub210.d.ts +19 -2
  24. package/lib/cjs/types/workout/planificacionPrueba7dias/42k/getPlanificacionPrueba7dias42kSub210.d.ts.map +1 -1
  25. package/lib/cjs/types/workout/planificacionPrueba7dias/5k/getPlanificacionPrueba7dias5k.d.ts +19 -2
  26. package/lib/cjs/types/workout/planificacionPrueba7dias/5k/getPlanificacionPrueba7dias5k.d.ts.map +1 -1
  27. package/lib/cjs/types/workout/planificacionPrueba7dias/5k/getPlanificacionPrueba7dias5kPrimer.d.ts +19 -2
  28. package/lib/cjs/types/workout/planificacionPrueba7dias/5k/getPlanificacionPrueba7dias5kPrimer.d.ts.map +1 -1
  29. package/lib/cjs/types/workout/planificacionPrueba7dias/5k/getPlanificacionPrueba7dias5kSub30.d.ts +19 -2
  30. package/lib/cjs/types/workout/planificacionPrueba7dias/5k/getPlanificacionPrueba7dias5kSub30.d.ts.map +1 -1
  31. package/lib/cjs/types/workout/planificacionPrueba7dias/common.d.ts +4 -4
  32. package/lib/cjs/types/workout/planificacionPrueba7dias/common.d.ts.map +1 -1
  33. package/lib/cjs/types/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer1.d.ts.map +1 -1
  34. package/lib/cjs/types/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer2.d.ts.map +1 -1
  35. package/lib/cjs/types/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer3.d.ts.map +1 -1
  36. package/lib/cjs/workout/estructuraWorkout.js +1 -130
  37. package/lib/cjs/workout/planificacionPrueba7dias/10k/getPlanificacionPrueba7dias10kMas50.js +22 -13
  38. package/lib/cjs/workout/planificacionPrueba7dias/10k/getPlanificacionPrueba7dias10kPrimer.js +37 -31
  39. package/lib/cjs/workout/planificacionPrueba7dias/10k/getPlanificacionPrueba7dias10kSub50.js +22 -14
  40. package/lib/cjs/workout/planificacionPrueba7dias/21k/getPlanificacionPrueba7dias21kMas105.js +24 -14
  41. package/lib/cjs/workout/planificacionPrueba7dias/21k/getPlanificacionPrueba7dias21kPrimer.js +21 -12
  42. package/lib/cjs/workout/planificacionPrueba7dias/21k/getPlanificacionPrueba7dias21kSub105.js +26 -16
  43. package/lib/cjs/workout/planificacionPrueba7dias/42k/getPlanificacionPrueba7dias42kMas210.js +24 -15
  44. package/lib/cjs/workout/planificacionPrueba7dias/42k/getPlanificacionPrueba7dias42kPrimer.js +20 -12
  45. package/lib/cjs/workout/planificacionPrueba7dias/42k/getPlanificacionPrueba7dias42kSub210.js +18 -10
  46. package/lib/cjs/workout/planificacionPrueba7dias/5k/getPlanificacionPrueba7dias5kPrimer.js +24 -14
  47. package/lib/cjs/workout/planificacionPrueba7dias/5k/getPlanificacionPrueba7dias5kSub30.js +22 -13
  48. package/lib/cjs/workout/planificacionPrueba7dias/common.js +20 -47
  49. package/lib/cjs/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer1.js +9 -6
  50. package/lib/cjs/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer2.js +9 -6
  51. package/lib/cjs/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer3.js +9 -6
  52. package/package.json +1 -1
@@ -1,10 +1,27 @@
1
- declare const getPlanificacionPrueba7dias5kSub30: (c: any) => {
1
+ declare const getPlanificacionPrueba7dias5kSub30: (c: any) => ({
2
+ title: string;
3
+ description: string;
4
+ shortDescription: string;
5
+ type: string;
6
+ distancePlanned: number;
7
+ durationPlanned: number;
8
+ structure: {
9
+ index: number;
10
+ type: number;
11
+ typeMetric1: number;
12
+ valueMetric1: number;
13
+ typeMetric2: number;
14
+ valueMetric2: any;
15
+ zoneMetric2: number;
16
+ }[];
17
+ } | {
2
18
  title: string;
3
19
  description: string;
4
20
  shortDescription: string;
5
21
  type: string;
6
22
  durationPlanned: number;
7
23
  distancePlanned: number;
8
- }[];
24
+ zoneMetric2: number;
25
+ })[];
9
26
  export { getPlanificacionPrueba7dias5kSub30 };
10
27
  //# sourceMappingURL=getPlanificacionPrueba7dias5kSub30.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getPlanificacionPrueba7dias5kSub30.d.ts","sourceRoot":"","sources":["../../../../../../src/workout/planificacionPrueba7dias/5k/getPlanificacionPrueba7dias5kSub30.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,kCAAkC;;;;;;;GASvC,CAAC;AAoIF,OAAO,EAAE,kCAAkC,EAAE,CAAC"}
1
+ {"version":3,"file":"getPlanificacionPrueba7dias5kSub30.d.ts","sourceRoot":"","sources":["../../../../../../src/workout/planificacionPrueba7dias/5k/getPlanificacionPrueba7dias5kSub30.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;IASvC,CAAC;AA6IF,OAAO,EAAE,kCAAkC,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
- declare const paceByVAM: (c: any, vam: any) => number;
2
- declare const calculateDistance: (c: any, duration: any, vam: any) => number;
3
- declare const calculateDuration: (c: any, distance: any, vam: any) => number;
1
+ declare const paceByZone: (c: any, zone: any) => any;
2
+ declare const calculateDistance: (c: any, duration: any, zone: any) => number;
3
+ declare const calculateDuration: (c: any, distance: any, zone: any) => number;
4
4
  declare const prettyPace: (stringPace: any) => string;
5
- export { paceByVAM, calculateDistance, calculateDuration, prettyPace };
5
+ export { paceByZone, calculateDistance, calculateDuration, prettyPace };
6
6
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/workout/planificacionPrueba7dias/common.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,SAAS,8BAWd,CAAC;AAwBF,QAAA,MAAM,iBAAiB,6CAEtB,CAAC;AAEF,QAAA,MAAM,iBAAiB,6CAEtB,CAAC;AAEF,QAAA,MAAM,UAAU,6BAKf,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/workout/planificacionPrueba7dias/common.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,UAAU,4BAQf,CAAC;AAEF,QAAA,MAAM,iBAAiB,8CAEtB,CAAC;AAEF,QAAA,MAAM,iBAAiB,8CAEtB,CAAC;AAEF,QAAA,MAAM,UAAU,6BAKf,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPlanificacionPrueba7diasEmpezarCorrer1.d.ts","sourceRoot":"","sources":["../../../../../../src/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer1.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,yCAAyC;;;;;;;;;;;;;GAS9C,CAAC;AAyIF,OAAO,EAAE,yCAAyC,EAAE,CAAC"}
1
+ {"version":3,"file":"getPlanificacionPrueba7diasEmpezarCorrer1.d.ts","sourceRoot":"","sources":["../../../../../../src/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer1.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,yCAAyC;;;;;;;;;;;;;GAS9C,CAAC;AA4IF,OAAO,EAAE,yCAAyC,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPlanificacionPrueba7diasEmpezarCorrer2.d.ts","sourceRoot":"","sources":["../../../../../../src/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer2.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,yCAAyC;;;;;;;;;;;;;GAS9C,CAAC;AAyIF,OAAO,EAAE,yCAAyC,EAAE,CAAC"}
1
+ {"version":3,"file":"getPlanificacionPrueba7diasEmpezarCorrer2.d.ts","sourceRoot":"","sources":["../../../../../../src/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer2.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,yCAAyC;;;;;;;;;;;;;GAS9C,CAAC;AA4IF,OAAO,EAAE,yCAAyC,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPlanificacionPrueba7diasEmpezarCorrer3.d.ts","sourceRoot":"","sources":["../../../../../../src/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer3.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,yCAAyC;;;;;;;;;;;;;GAS9C,CAAC;AAyIF,OAAO,EAAE,yCAAyC,EAAE,CAAC"}
1
+ {"version":3,"file":"getPlanificacionPrueba7diasEmpezarCorrer3.d.ts","sourceRoot":"","sources":["../../../../../../src/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer3.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,yCAAyC;;;;;;;;;;;;;GAS9C,CAAC;AA4IF,OAAO,EAAE,yCAAyC,EAAE,CAAC"}
@@ -1,17 +1,6 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.saveDoneStructuraWorkout = exports.savePlantillaEstructuraNotDone = exports.saveWorkoutEstructuraNotDone = exports.getStructuraWorkout = void 0;
13
- const db_1 = require("../db");
14
- const common_1 = require("@runnerpro/common");
3
+ exports.getStructuraWorkout = void 0;
15
4
  const calculateZone = (values) => {
16
5
  const percentage = Number(values.pacePercentage);
17
6
  if (percentage <= 70)
@@ -25,24 +14,6 @@ const calculateZone = (values) => {
25
14
  else if (percentage <= 100)
26
15
  values.zone = 5;
27
16
  };
28
- const parseWorkoutEstructuraNotDone = ({ estructura }) => {
29
- let idSerie = 0;
30
- const rows = [];
31
- estructura.forEach((row) => {
32
- if (row.number) {
33
- for (let iNumber = 0; iNumber < Number(row.number); iNumber++) {
34
- row.steps.forEach((step) => {
35
- rows.push(Object.assign(Object.assign({}, step), { idSerie, indexSerie: iNumber }));
36
- });
37
- }
38
- idSerie++;
39
- }
40
- else {
41
- rows.push(row);
42
- }
43
- });
44
- return rows;
45
- };
46
17
  const getStructuraWorkout = (workout, estructura) => {
47
18
  if (workout.done)
48
19
  return estructura;
@@ -85,103 +56,3 @@ const getStructuraWorkout = (workout, estructura) => {
85
56
  }
86
57
  };
87
58
  exports.getStructuraWorkout = getStructuraWorkout;
88
- const insertWorkoutEstructura = (idWorkout, row, index) => __awaiter(void 0, void 0, void 0, function* () {
89
- yield (0, db_1.query)(`
90
- INSERT INTO [WORKOUT STRUCTURE] ([ID WORKOUT], [INDEX], [ID SERIE], [INDEX SERIE], [TYPE], [TYPE METRIC 1],
91
- [VALUE METRIC 1], [TYPE METRIC 2], [VALUE METRIC 2], [DESNIVEL PLANNED])
92
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
93
- `, [
94
- idWorkout,
95
- index,
96
- row.idSerie,
97
- row.indexSerie,
98
- row.type,
99
- row.typeMetric1,
100
- row.valueMetric1,
101
- row.typeMetric2,
102
- row.valueMetric2,
103
- row.desnivelPlanned || null,
104
- ]);
105
- });
106
- const insertPlantillaEstructura = (idPlantilla, row, index) => __awaiter(void 0, void 0, void 0, function* () {
107
- yield (0, db_1.query)(`
108
- INSERT INTO [PLANTILLAS WORKOUT STRUCTURE] ([ID WORKOUT], [INDEX], [ID SERIE], [INDEX SERIE], [TYPE], [TYPE METRIC 1],
109
- [VALUE METRIC 1], [PACE PERCENTAGE], [DESNIVEL PLANNED])
110
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
111
- `, [idPlantilla, index, row.idSerie, row.indexSerie, row.type, row.typeMetric1, row.valueMetric1, row.pacePercentage, row.desnivelPlanned || null]);
112
- });
113
- const saveWorkoutEstructuraNotDone = (idWorkout, data) => __awaiter(void 0, void 0, void 0, function* () {
114
- const rows = parseWorkoutEstructuraNotDone(data);
115
- yield (0, db_1.query)('DELETE FROM [WORKOUT STRUCTURE] WHERE [ID WORKOUT] = ?;', [idWorkout]);
116
- let index = 0;
117
- for (const row of rows) {
118
- if (row.number && row.steps) {
119
- for (let iNumber = 0; iNumber < row.number; iNumber++) {
120
- for (const step of row.steps) {
121
- yield insertWorkoutEstructura(idWorkout, step, index);
122
- index++;
123
- }
124
- }
125
- }
126
- else {
127
- yield insertWorkoutEstructura(idWorkout, row, index);
128
- index++;
129
- }
130
- }
131
- });
132
- exports.saveWorkoutEstructuraNotDone = saveWorkoutEstructuraNotDone;
133
- const savePlantillaEstructuraNotDone = (idPlantilla, data) => __awaiter(void 0, void 0, void 0, function* () {
134
- const rows = parseWorkoutEstructuraNotDone(data);
135
- yield (0, db_1.query)('DELETE FROM [PLANTILLAS WORKOUT STRUCTURE] WHERE [ID WORKOUT] = ?;', [idPlantilla]);
136
- let index = 0;
137
- for (const row of rows) {
138
- if (row.number && row.steps) {
139
- for (let iNumber = 0; iNumber < row.number; iNumber++) {
140
- for (const step of row.steps) {
141
- yield insertPlantillaEstructura(idPlantilla, step, index);
142
- index++;
143
- }
144
- }
145
- }
146
- else {
147
- yield insertPlantillaEstructura(idPlantilla, row, index);
148
- index++;
149
- }
150
- }
151
- });
152
- exports.savePlantillaEstructuraNotDone = savePlantillaEstructuraNotDone;
153
- const saveDoneStructuraWorkout = (idWorkout, estructura, workoutType) => __awaiter(void 0, void 0, void 0, function* () {
154
- const estructuraBBDD = yield (0, db_1.query)('SELECT * FROM [WORKOUT STRUCTURE] WHERE [ID WORKOUT] = ? ORDER BY [INDEX]', [idWorkout]);
155
- let i = 0;
156
- for (const row of estructuraBBDD) {
157
- let distance = 0;
158
- let duration = 0;
159
- let distancePlanned = 0;
160
- let durationPlanned = 0;
161
- const pace = estructura ? estructura[i].valueMetric2 : row.valueMetric2;
162
- const pacePlanned = row.valueMetric2;
163
- if (Number(row.typeMetric1) === 1) {
164
- distancePlanned = row.valueMetric1;
165
- distance = row.valueMetric1;
166
- durationPlanned = (0, common_1.getWorkoutParamsByType)(workoutType).calculateDuration({ distance: row.valueMetric1, pace: pacePlanned });
167
- duration = (0, common_1.getWorkoutParamsByType)(workoutType).calculateDuration({ distance: row.valueMetric1, pace });
168
- }
169
- else {
170
- durationPlanned = row.valueMetric1;
171
- duration = row.valueMetric1;
172
- if (Number(row.type) === 3) {
173
- // @ts-ignore
174
- distancePlanned = null;
175
- // @ts-ignore
176
- distance = null;
177
- }
178
- else {
179
- distancePlanned = (0, common_1.getWorkoutParamsByType)(workoutType).calculateDistance({ duration: row.valueMetric1, pace: pacePlanned, decimals: 2 });
180
- distance = (0, common_1.getWorkoutParamsByType)(workoutType).calculateDistance({ duration: row.valueMetric1, pace, decimals: 2 });
181
- }
182
- }
183
- i++;
184
- yield (0, db_1.query)('UPDATE [WORKOUT STRUCTURE] SET [DISTANCE PLANNED] = ?, [DISTANCE] = ?, [DURATION PLANNED] = ?, [DURATION] = ?, [DESNIVEL] = ? WHERE [INDEX] = ? AND [ID WORKOUT] = ?', [distancePlanned, distance, durationPlanned, duration, row.desnivelPlanned, row.index, idWorkout]);
185
- }
186
- });
187
- exports.saveDoneStructuraWorkout = saveDoneStructuraWorkout;
@@ -19,8 +19,8 @@ const getDay1 = (c) => {
19
19
  description: 'En este entrenamiento, te enfrentarás a 4 repeticiones de 1000 metros, un reto para tu resistencia. Con 2 minutos de recuperación entre series, es vital que manejes bien tus energías.',
20
20
  shortDescription: "Calentamiento 15' + 4x (1km ritmo rápido + 2' recuperación) + enfriamiento 15'",
21
21
  type: common_1.WORKOUT_TYPE.CORRER,
22
- distancePlanned: 4000 + (0, common_2.calculateDistance)(c, 900, 75) + (0, common_2.calculateDistance)(c, 900, 70),
23
- durationPlanned: 1800 + (0, common_2.calculateDuration)(c, 4000, 90) + 4 * 120,
22
+ distancePlanned: 4000 + (0, common_2.calculateDistance)(c, 900, 2) + (0, common_2.calculateDistance)(c, 900, 2),
23
+ durationPlanned: 1800 + (0, common_2.calculateDuration)(c, 4000, 4) + 4 * 120,
24
24
  structure: [
25
25
  // Calentamiento
26
26
  {
@@ -29,7 +29,8 @@ const getDay1 = (c) => {
29
29
  typeMetric1: 2,
30
30
  valueMetric1: 900,
31
31
  typeMetric2: 1,
32
- valueMetric2: (0, common_2.paceByVAM)(c, 75),
32
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
33
+ zoneMetric2: 2,
33
34
  },
34
35
  ],
35
36
  };
@@ -43,7 +44,8 @@ const getDay1 = (c) => {
43
44
  typeMetric1: 1,
44
45
  valueMetric1: 1000,
45
46
  typeMetric2: 1,
46
- valueMetric2: (0, common_2.paceByVAM)(c, 85),
47
+ valueMetric2: (0, common_2.paceByZone)(c, 4),
48
+ zoneMetric2: 4,
47
49
  });
48
50
  day.structure.push({
49
51
  index: 2 + i * 2,
@@ -61,7 +63,8 @@ const getDay1 = (c) => {
61
63
  typeMetric1: 2,
62
64
  valueMetric1: 900,
63
65
  typeMetric2: 1,
64
- valueMetric2: (0, common_2.paceByVAM)(c, 70),
66
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
67
+ zoneMetric2: 2,
65
68
  });
66
69
  return day;
67
70
  };
@@ -72,7 +75,8 @@ const getDay2 = (c) => {
72
75
  shortDescription: "55' ritmo suave",
73
76
  type: common_1.WORKOUT_TYPE.CORRER,
74
77
  durationPlanned: 3300,
75
- distancePlanned: (0, common_2.calculateDistance)(c, 3300, 75),
78
+ distancePlanned: (0, common_2.calculateDistance)(c, 3300, 2),
79
+ zoneMetric2: 2,
76
80
  };
77
81
  };
78
82
  const getDay3 = (c) => {
@@ -81,8 +85,8 @@ const getDay3 = (c) => {
81
85
  description: 'Carrera interválica piramidal destinada a mejorar la resistencia general y la resistencia a la fatiga. Consiste en calentar 15 minutos a un ritmo suave y después intercalar diferentes distancias con las intensidades marcadas.',
82
86
  shortDescription: "Calentamiento 15' + 1km + 2km + 3km + enfriamiento 15'",
83
87
  type: common_1.WORKOUT_TYPE.CORRER,
84
- distancePlanned: (0, common_2.calculateDistance)(c, 900, 75) + (0, common_2.calculateDistance)(c, 900, 70) + 1000 + 2000 + 3000,
85
- durationPlanned: 1800 + (0, common_2.calculateDuration)(c, 1000, 87) + (0, common_2.calculateDuration)(c, 2000, 83) + (0, common_2.calculateDuration)(c, 3000, 80),
88
+ distancePlanned: (0, common_2.calculateDistance)(c, 900, 2) + (0, common_2.calculateDistance)(c, 900, 2) + 1000 + 2000 + 3000,
89
+ durationPlanned: 1800 + (0, common_2.calculateDuration)(c, 1000, 4) + 75 + (0, common_2.calculateDuration)(c, 2000, 3) + 90 + (0, common_2.calculateDuration)(c, 3000, 2),
86
90
  structure: [
87
91
  {
88
92
  index: 0,
@@ -90,7 +94,8 @@ const getDay3 = (c) => {
90
94
  typeMetric1: 2,
91
95
  valueMetric1: 900,
92
96
  typeMetric2: 1,
93
- valueMetric2: (0, common_2.paceByVAM)(c, 75),
97
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
98
+ zoneMetric2: 2,
94
99
  },
95
100
  {
96
101
  index: 1,
@@ -100,7 +105,8 @@ const getDay3 = (c) => {
100
105
  typeMetric1: 1,
101
106
  valueMetric1: 1000,
102
107
  typeMetric2: 1,
103
- valueMetric2: (0, common_2.paceByVAM)(c, 87),
108
+ valueMetric2: (0, common_2.paceByZone)(c, 4),
109
+ zoneMetric2: 4,
104
110
  },
105
111
  {
106
112
  index: 2,
@@ -118,7 +124,8 @@ const getDay3 = (c) => {
118
124
  typeMetric1: 1,
119
125
  valueMetric1: 2000,
120
126
  typeMetric2: 1,
121
- valueMetric2: (0, common_2.paceByVAM)(c, 83),
127
+ valueMetric2: (0, common_2.paceByZone)(c, 3),
128
+ zoneMetric2: 3,
122
129
  },
123
130
  {
124
131
  index: 4,
@@ -136,7 +143,8 @@ const getDay3 = (c) => {
136
143
  typeMetric1: 1,
137
144
  valueMetric1: 3000,
138
145
  typeMetric2: 1,
139
- valueMetric2: (0, common_2.paceByVAM)(c, 80),
146
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
147
+ zoneMetric2: 2,
140
148
  },
141
149
  {
142
150
  index: 6,
@@ -144,7 +152,8 @@ const getDay3 = (c) => {
144
152
  typeMetric1: 2,
145
153
  valueMetric1: 900,
146
154
  typeMetric2: 1,
147
- valueMetric2: (0, common_2.paceByVAM)(c, 70),
155
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
156
+ zoneMetric2: 2,
148
157
  },
149
158
  ],
150
159
  };
@@ -4,11 +4,11 @@ exports.getPlanificacionPrueba7dias10kPrimer = void 0;
4
4
  const common_1 = require("@runnerpro/common");
5
5
  const common_2 = require("../common");
6
6
  const getPlanificacionPrueba7dias10kPrimer = (c) => {
7
- // Correr 40' al 70% VAM
7
+ // Correr 40' zona 2
8
8
  const day1 = getDay1(c);
9
9
  // Calentamiento 10' + 5' (zona 2) + 5' (zona 3) + pausa + 5 min (zona 3) + 4 min (zona 4) + enfriamiento 10'
10
10
  const day2 = getDay2(c);
11
- // Calentamiento 10' + 4km a ritmo 80% VAM + enfriamiento 10'
11
+ // Calentamiento 10' + 4km a zona 4 + enfriamiento 10'
12
12
  const day3 = getDay3(c);
13
13
  return [day1, day2, day3];
14
14
  };
@@ -20,21 +20,21 @@ const getDay1 = (c) => {
20
20
  shortDescription: "40' ritmo suave",
21
21
  type: common_1.WORKOUT_TYPE.CORRER,
22
22
  durationPlanned: 2400,
23
- distancePlanned: (0, common_2.calculateDistance)(c, 2400, 75),
23
+ distancePlanned: (0, common_2.calculateDistance)(c, 2400, 2),
24
+ zoneMetric2: 2,
24
25
  };
25
26
  };
26
27
  const getDay2 = (c) => {
27
28
  return {
28
29
  title: 'Entrenamiento progresivo',
29
30
  description: "Comenzar con 10 minutos a un ritmo suave. A partir de ahí, incrementarás el ritmo cada 5 minutos durante 20 minutos, con una pausa de 2' entre medio de los progresivos. Finaliza con 10 minutos de enfriamiento.",
30
- shortDescription: "Calentamiento 10' + carrera ritmo progresivo 4x5' + enfriamiento 10'",
31
+ shortDescription: "Calentamiento 10' + carrera ritmo progresivo 5' + 10' + 5' + enfriamiento 10'",
31
32
  type: common_1.WORKOUT_TYPE.CORRER,
32
- distancePlanned: (0, common_2.calculateDistance)(c, 2 * 10 * 60, 70) +
33
- (0, common_2.calculateDistance)(c, 300, 75) +
34
- (0, common_2.calculateDistance)(c, 300, 80) +
35
- (0, common_2.calculateDistance)(c, 300, 83) +
36
- (0, common_2.calculateDistance)(c, 300, 87),
37
- durationPlanned: 2520,
33
+ distancePlanned: (0, common_2.calculateDistance)(c, 2 * 10 * 60, 2) +
34
+ (0, common_2.calculateDistance)(c, 300, 3) +
35
+ (0, common_2.calculateDistance)(c, 600, 3) +
36
+ (0, common_2.calculateDistance)(c, 300, 4),
37
+ durationPlanned: 2640,
38
38
  structure: [
39
39
  {
40
40
  index: 0,
@@ -42,7 +42,8 @@ const getDay2 = (c) => {
42
42
  typeMetric1: 2,
43
43
  valueMetric1: 600,
44
44
  typeMetric2: 1,
45
- valueMetric2: (0, common_2.paceByVAM)(c, 70),
45
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
46
+ zoneMetric2: 2,
46
47
  },
47
48
  {
48
49
  index: 1,
@@ -52,7 +53,16 @@ const getDay2 = (c) => {
52
53
  typeMetric1: 2,
53
54
  valueMetric1: 300,
54
55
  typeMetric2: 1,
55
- valueMetric2: (0, common_2.paceByVAM)(c, 75),
56
+ valueMetric2: (0, common_2.paceByZone)(c, 3),
57
+ zoneMetric2: 3,
58
+ },
59
+ {
60
+ index: 3,
61
+ type: 3,
62
+ idSerie: 0,
63
+ indexSerie: 0,
64
+ typeMetric1: 2,
65
+ valueMetric1: 120,
56
66
  },
57
67
  {
58
68
  index: 2,
@@ -60,9 +70,10 @@ const getDay2 = (c) => {
60
70
  idSerie: 0,
61
71
  indexSerie: 0,
62
72
  typeMetric1: 2,
63
- valueMetric1: 300,
73
+ valueMetric1: 600,
64
74
  typeMetric2: 1,
65
- valueMetric2: (0, common_2.paceByVAM)(c, 80),
75
+ valueMetric2: (0, common_2.paceByZone)(c, 3),
76
+ zoneMetric2: 3,
66
77
  },
67
78
  {
68
79
  index: 3,
@@ -80,17 +91,8 @@ const getDay2 = (c) => {
80
91
  typeMetric1: 2,
81
92
  valueMetric1: 300,
82
93
  typeMetric2: 1,
83
- valueMetric2: (0, common_2.paceByVAM)(c, 83),
84
- },
85
- {
86
- index: 5,
87
- type: 2,
88
- idSerie: 0,
89
- indexSerie: 0,
90
- typeMetric1: 2,
91
- valueMetric1: 300,
92
- typeMetric2: 1,
93
- valueMetric2: (0, common_2.paceByVAM)(c, 87),
94
+ valueMetric2: (0, common_2.paceByZone)(c, 4),
95
+ zoneMetric2: 4,
94
96
  },
95
97
  {
96
98
  index: 6,
@@ -98,7 +100,8 @@ const getDay2 = (c) => {
98
100
  typeMetric1: 2,
99
101
  valueMetric1: 600,
100
102
  typeMetric2: 1,
101
- valueMetric2: (0, common_2.paceByVAM)(c, 70),
103
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
104
+ zoneMetric2: 2,
102
105
  },
103
106
  ],
104
107
  };
@@ -109,8 +112,8 @@ const getDay3 = (c) => {
109
112
  description: 'En este entrenamiento realizarás 10’ de calentamiento, seguidos de 4km de carrera a un ritmo más alto. Finaliza con 10’ de enfriamiento después de los 4km.',
110
113
  shortDescription: "Calentamiento 10' + 4km a ritmo tempo + enfriamiento 10'",
111
114
  type: common_1.WORKOUT_TYPE.CORRER,
112
- distancePlanned: 4000 + (0, common_2.calculateDistance)(c, 2 * 10 * 60, 70),
113
- durationPlanned: 1200 + (0, common_2.calculateDuration)(c, 4000, 80),
115
+ distancePlanned: 4000 + (0, common_2.calculateDistance)(c, 2 * 10 * 60, 2),
116
+ durationPlanned: 1200 + (0, common_2.calculateDuration)(c, 4000, 3),
114
117
  structure: [
115
118
  {
116
119
  index: 0,
@@ -118,7 +121,8 @@ const getDay3 = (c) => {
118
121
  typeMetric1: 2,
119
122
  valueMetric1: 600,
120
123
  typeMetric2: 1,
121
- valueMetric2: (0, common_2.paceByVAM)(c, 70),
124
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
125
+ zoneMetric2: 2,
122
126
  },
123
127
  {
124
128
  index: 1,
@@ -126,7 +130,8 @@ const getDay3 = (c) => {
126
130
  typeMetric1: 1,
127
131
  valueMetric1: 4000,
128
132
  typeMetric2: 1,
129
- valueMetric2: (0, common_2.paceByVAM)(c, 80),
133
+ valueMetric2: (0, common_2.paceByZone)(c, 3),
134
+ zoneMetric2: 3,
130
135
  },
131
136
  {
132
137
  index: 6,
@@ -134,7 +139,8 @@ const getDay3 = (c) => {
134
139
  typeMetric1: 2,
135
140
  valueMetric1: 600,
136
141
  typeMetric2: 1,
137
- valueMetric2: (0, common_2.paceByVAM)(c, 70),
142
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
143
+ zoneMetric2: 2,
138
144
  },
139
145
  ],
140
146
  };
@@ -4,11 +4,11 @@ exports.getPlanificacionPrueba7dias10kSub50 = void 0;
4
4
  const common_1 = require("@runnerpro/common");
5
5
  const common_2 = require("../common");
6
6
  const getPlanificacionPrueba7dias10kSub50 = (c) => {
7
- // Correr 1h al 70% VAM
7
+ // Correr 1h a zona 2
8
8
  const day1 = getDay1(c);
9
9
  // Calentamiento 15' + 4xprogresivo de 7'-5'-4'-3' + enfriamiento 15'
10
10
  const day2 = getDay2(c);
11
- // Correr 45' al 70% VAM
11
+ // Correr 45' a zona 2
12
12
  const day3 = getDay3(c);
13
13
  return [day1, day2, day3];
14
14
  };
@@ -19,8 +19,8 @@ const getDay1 = (c) => {
19
19
  description: 'En este entrenamiento, te enfrentarás a 4 repeticiones de 2000 metros, un reto para tu resistencia. Con 2 minutos de recuperación entre series, es vital que manejes bien tus energías.',
20
20
  shortDescription: "Calentamiento 10' + 4x (2km ritmo tempo + 2' recuperación) + enfriamiento 10'",
21
21
  type: common_1.WORKOUT_TYPE.CORRER,
22
- distancePlanned: 8000 + (0, common_2.calculateDistance)(c, 600, 75) + (0, common_2.calculateDistance)(c, 600, 70),
23
- durationPlanned: 1800 + (0, common_2.calculateDuration)(c, 8000, 83) + 4 * 120,
22
+ distancePlanned: 8000 + (0, common_2.calculateDistance)(c, 600, 2) + (0, common_2.calculateDistance)(c, 600, 2),
23
+ durationPlanned: 1800 + (0, common_2.calculateDuration)(c, 8000, 3) + 4 * 120,
24
24
  structure: [
25
25
  // Calentamiento
26
26
  {
@@ -29,7 +29,8 @@ const getDay1 = (c) => {
29
29
  typeMetric1: 2,
30
30
  valueMetric1: 600,
31
31
  typeMetric2: 1,
32
- valueMetric2: (0, common_2.paceByVAM)(c, 75),
32
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
33
+ zoneMetric2: 2,
33
34
  },
34
35
  ],
35
36
  };
@@ -43,7 +44,8 @@ const getDay1 = (c) => {
43
44
  typeMetric1: 1,
44
45
  valueMetric1: 2000,
45
46
  typeMetric2: 1,
46
- valueMetric2: (0, common_2.paceByVAM)(c, 83),
47
+ valueMetric2: (0, common_2.paceByZone)(c, 3),
48
+ zoneMetric2: 3,
47
49
  });
48
50
  day.structure.push({
49
51
  index: 2 + i * 2,
@@ -61,7 +63,8 @@ const getDay1 = (c) => {
61
63
  typeMetric1: 2,
62
64
  valueMetric1: 600,
63
65
  typeMetric2: 1,
64
- valueMetric2: (0, common_2.paceByVAM)(c, 70),
66
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
67
+ zoneMetric2: 2,
65
68
  });
66
69
  return day;
67
70
  };
@@ -72,7 +75,8 @@ const getDay2 = (c) => {
72
75
  shortDescription: '1h 10m ritmo suave',
73
76
  type: common_1.WORKOUT_TYPE.CORRER,
74
77
  durationPlanned: 4200,
75
- distancePlanned: (0, common_2.calculateDistance)(c, 4200, 75),
78
+ distancePlanned: (0, common_2.calculateDistance)(c, 4200, 2),
79
+ zoneMetric2: 2,
76
80
  };
77
81
  };
78
82
  const getDay3 = (c) => {
@@ -81,8 +85,8 @@ const getDay3 = (c) => {
81
85
  description: 'En este entrenamiento te enfrentarás a 8 series de 200 m a alta intensidad seguidos de 200 m de trote para recuperar.',
82
86
  shortDescription: "Calentamiento 15' + 8x (200m rápidos + 200m suaves) + enfriamiento 15'",
83
87
  type: common_1.WORKOUT_TYPE.CORRER,
84
- distancePlanned: 8 * 400 + (0, common_2.calculateDistance)(c, 900, 75) + (0, common_2.calculateDistance)(c, 900, 70),
85
- durationPlanned: 1800 + (0, common_2.calculateDuration)(c, 8 * 200, 87) + (0, common_2.calculateDuration)(c, 8 * 200, 70),
88
+ distancePlanned: 8 * 400 + (0, common_2.calculateDistance)(c, 900, 2) + (0, common_2.calculateDistance)(c, 900, 2),
89
+ durationPlanned: 1800 + (0, common_2.calculateDuration)(c, 8 * 200, 5) + (0, common_2.calculateDuration)(c, 8 * 200, 2),
86
90
  structure: [
87
91
  // Calentamiento
88
92
  {
@@ -91,7 +95,8 @@ const getDay3 = (c) => {
91
95
  typeMetric1: 2,
92
96
  valueMetric1: 900,
93
97
  typeMetric2: 1,
94
- valueMetric2: (0, common_2.paceByVAM)(c, 75),
98
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
99
+ zoneMetric2: 2,
95
100
  },
96
101
  ],
97
102
  };
@@ -105,7 +110,8 @@ const getDay3 = (c) => {
105
110
  typeMetric1: 1,
106
111
  valueMetric1: 200,
107
112
  typeMetric2: 1,
108
- valueMetric2: (0, common_2.paceByVAM)(c, 87),
113
+ valueMetric2: (0, common_2.paceByZone)(c, 5),
114
+ zoneMetric2: 5,
109
115
  });
110
116
  day.structure.push({
111
117
  index: 2 + i * 2,
@@ -116,7 +122,8 @@ const getDay3 = (c) => {
116
122
  typeMetric1: 1,
117
123
  valueMetric1: 200,
118
124
  typeMetric2: 1,
119
- valueMetric2: (0, common_2.paceByVAM)(c, 75),
125
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
126
+ zoneMetric2: 2,
120
127
  });
121
128
  }
122
129
  day.structure.push({
@@ -125,7 +132,8 @@ const getDay3 = (c) => {
125
132
  typeMetric1: 2,
126
133
  valueMetric1: 900,
127
134
  typeMetric2: 1,
128
- valueMetric2: (0, common_2.paceByVAM)(c, 70),
135
+ valueMetric2: (0, common_2.paceByZone)(c, 2),
136
+ zoneMetric2: 2,
129
137
  });
130
138
  return day;
131
139
  };