@swimedge/metrics 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -54,7 +54,6 @@ export interface SwimSession extends SwimSessionLaps {
54
54
  equipment?: string[];
55
55
  avgDistancePerStroke?: number;
56
56
  routeCoordinates?: number[][];
57
- routeMapImage?: string;
58
57
  deviceType?: string;
59
58
  osVersion?: string;
60
59
  healthKitWorkoutId?: string;
package/dist/index.js CHANGED
@@ -193,6 +193,7 @@ exports.METRICS_REGISTRY = {
193
193
  isHealthKit: true,
194
194
  availableFrom: { watch: true, manual: false },
195
195
  swimTypes: [SwimType.INDOOR, SwimType.OPEN_WATER],
196
+ hasChart: true,
196
197
  formatter: (s) => `${(0, exports.formatNumber)(s.waterTemp, 1)}°C`,
197
198
  condition: (s) => !!s.waterTemp,
198
199
  },
@@ -209,6 +210,7 @@ exports.METRICS_REGISTRY = {
209
210
  isHealthKit: true,
210
211
  availableFrom: { watch: true, manual: false },
211
212
  swimTypes: [SwimType.INDOOR, SwimType.OPEN_WATER],
213
+ hasChart: true,
212
214
  formatter: (s) => (0, exports.formatHeartRate)(s.avgHeartRate),
213
215
  condition: (s) => !!s.avgHeartRate,
214
216
  },
@@ -225,6 +227,7 @@ exports.METRICS_REGISTRY = {
225
227
  isHealthKit: true,
226
228
  availableFrom: { watch: true, manual: false },
227
229
  swimTypes: [SwimType.INDOOR, SwimType.OPEN_WATER],
230
+ hasChart: true,
228
231
  formatter: (s) => (0, exports.formatHeartRate)(s.maxHeartRate),
229
232
  condition: (s) => !!s.maxHeartRate,
230
233
  },
@@ -241,6 +244,7 @@ exports.METRICS_REGISTRY = {
241
244
  isHealthKit: true,
242
245
  availableFrom: { watch: true, manual: false },
243
246
  swimTypes: [SwimType.INDOOR, SwimType.OPEN_WATER],
247
+ hasChart: true,
244
248
  formatter: (s) => (0, exports.formatHeartRate)(s.minHeartRate),
245
249
  condition: (s) => !!s.minHeartRate,
246
250
  },
@@ -608,16 +612,6 @@ exports.METRICS_REGISTRY = {
608
612
  availableFrom: { watch: true, manual: false },
609
613
  swimTypes: [SwimType.INDOOR, SwimType.OPEN_WATER],
610
614
  },
611
- routeMapImage: {
612
- key: 'routeMapImage',
613
- label: 'Route Map',
614
- category: MetricCategory.PERFORMANCE,
615
- description: 'Base64 encoded route map image for open water sessions',
616
- isPerSession: true,
617
- availableFrom: { watch: false, manual: false },
618
- swimTypes: [SwimType.OPEN_WATER],
619
- condition: (s) => !!s.routeMapImage,
620
- },
621
615
  };
622
616
  exports.MetricsHelper = {
623
617
  getMetric: (key) => exports.METRICS_REGISTRY[key],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swimedge/metrics",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Shared metrics registry for SwimEdge (frontend, backend, watch)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",