@swimedge/metrics 1.0.3 → 1.0.4
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 +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -126,6 +126,7 @@ export declare const METRICS_REGISTRY: Record<keyof SwimSession, MetricDefinitio
|
|
|
126
126
|
export declare const MetricsHelper: {
|
|
127
127
|
getMetric: (key: keyof SwimSession) => MetricDefinition;
|
|
128
128
|
getSessionMetrics: () => MetricDefinition[];
|
|
129
|
+
getChartMetrics: () => MetricDefinition[];
|
|
129
130
|
getLapMetrics: () => MetricDefinition[];
|
|
130
131
|
getMetricsByCategory: (category: MetricCategory) => MetricDefinition[];
|
|
131
132
|
getMetricsBySwimType: (swimType: SwimType) => MetricDefinition[];
|
package/dist/index.js
CHANGED
|
@@ -622,6 +622,7 @@ exports.METRICS_REGISTRY = {
|
|
|
622
622
|
exports.MetricsHelper = {
|
|
623
623
|
getMetric: (key) => exports.METRICS_REGISTRY[key],
|
|
624
624
|
getSessionMetrics: () => Object.values(exports.METRICS_REGISTRY).filter((m) => m.isPerSession),
|
|
625
|
+
getChartMetrics: () => Object.values(exports.METRICS_REGISTRY).filter((m) => m.isPerSession && m.hasChart),
|
|
625
626
|
getLapMetrics: () => Object.values(exports.METRICS_REGISTRY).filter((m) => m.isPerLap),
|
|
626
627
|
getMetricsByCategory: (category) => Object.values(exports.METRICS_REGISTRY).filter((m) => m.category === category),
|
|
627
628
|
getMetricsBySwimType: (swimType) => Object.values(exports.METRICS_REGISTRY).filter((m) => m.swimTypes?.includes(swimType)),
|