@demind-inc/core 1.10.30 → 1.10.32
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/models/Metrics.d.ts +12 -6
- package/dist/types.d.ts +2 -1
- package/lib/models/Metrics.ts +13 -6
- package/lib/types.ts +2 -0
- package/package.json +1 -1
package/dist/models/Metrics.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentReference } from
|
|
2
|
-
import { CircadianPhase } from
|
|
1
|
+
import { DocumentReference } from '@google-cloud/firestore';
|
|
2
|
+
import { CircadianPhase } from '../types';
|
|
3
3
|
export interface Metrics {
|
|
4
4
|
metricId: string;
|
|
5
5
|
sleep?: MetricSleep[];
|
|
@@ -76,16 +76,22 @@ export type PhaseStartEndSet = Omit<Record<CircadianPhase, {
|
|
|
76
76
|
start: string;
|
|
77
77
|
end: string;
|
|
78
78
|
timezone?: string;
|
|
79
|
-
}>,
|
|
79
|
+
}>, 'default'>;
|
|
80
80
|
export interface MetricPhase {
|
|
81
81
|
metricPhaseId: string;
|
|
82
82
|
date: string;
|
|
83
83
|
data: PhaseStartEndSet;
|
|
84
84
|
}
|
|
85
|
+
export interface MetricExerciseDayMetadata {
|
|
86
|
+
steps?: number;
|
|
87
|
+
distanceMeters?: number;
|
|
88
|
+
floorsClimbed?: number;
|
|
89
|
+
}
|
|
85
90
|
export interface MetricExercise {
|
|
86
91
|
metricExerciseId: string;
|
|
87
92
|
date: string;
|
|
88
93
|
activities: MetricActivity[];
|
|
94
|
+
metadata?: MetricExerciseDayMetadata;
|
|
89
95
|
}
|
|
90
96
|
export interface MetricMealSummary {
|
|
91
97
|
macros?: {
|
|
@@ -128,7 +134,7 @@ export interface MetricActivity {
|
|
|
128
134
|
calories?: number;
|
|
129
135
|
distanceMeters?: number;
|
|
130
136
|
}
|
|
131
|
-
export type MealType =
|
|
137
|
+
export type MealType = 'breakfast' | 'lunch' | 'dinner';
|
|
132
138
|
export interface MealFoodAmount {
|
|
133
139
|
name: string;
|
|
134
140
|
amount: number;
|
|
@@ -267,6 +273,6 @@ export interface SleepDetail {
|
|
|
267
273
|
temperatureDelta?: number;
|
|
268
274
|
}
|
|
269
275
|
export type NapDetail = SleepDetail;
|
|
270
|
-
export type SleepStageType =
|
|
276
|
+
export type SleepStageType = 'deep' | 'light' | 'rem' | 'awake';
|
|
271
277
|
export type SleepStage = Record<SleepStageType, number>;
|
|
272
|
-
export type MetricType =
|
|
278
|
+
export type MetricType = 'stress' | 'heartRate';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CalendarEvent, CalendarRoutineFrom, CalendarTaskFrom, EMASatisfaction, EnergyFeedbackType, EventCategorySet, MealType, MetricActivity, MetricHRValueSet, MetricMealDetail, MetricMealSummary, MetricStressValueSet, PhaseStartEndSet, RichContext, RoutineActivity, NapDetail, SleepDetail, TaskItem, TaskPriority, TodoAppFrom, PredictedMealDetail } from './models';
|
|
1
|
+
import { CalendarEvent, CalendarRoutineFrom, CalendarTaskFrom, EMASatisfaction, EnergyFeedbackType, EventCategorySet, MealType, MetricActivity, MetricHRValueSet, MetricMealDetail, MetricMealSummary, MetricStressValueSet, PhaseStartEndSet, RichContext, RoutineActivity, NapDetail, SleepDetail, TaskItem, TaskPriority, TodoAppFrom, PredictedMealDetail, MetricExerciseDayMetadata } from './models';
|
|
2
2
|
export type SupportedTerraProvidersType = 'FITBIT' | 'OURA' | 'GARMIN' | 'WHOOP' | 'ULTRAHUMAN' | 'STRAVA' | 'MYFITNESSPAL';
|
|
3
3
|
export type SupportedTerraSDKType = 'APPLE' | 'GOOGLE_FIT' | 'SAMSUNG_HEALTH' | 'FREESTYLE_LIBRE' | 'HEALTH_CONNECT';
|
|
4
4
|
export type CircadianPhase = 'default' | 'wakeup_low' | 'wakeup_normal' | 'morning_high' | 'morning_normal' | 'morning_low' | 'evening_high' | 'evening_low' | 'evening_normal';
|
|
@@ -75,6 +75,7 @@ export interface StressDetailsByDate {
|
|
|
75
75
|
export interface ExerciseDetailsByDate {
|
|
76
76
|
date: string;
|
|
77
77
|
details: MetricActivity[];
|
|
78
|
+
summary?: MetricExerciseDayMetadata;
|
|
78
79
|
}
|
|
79
80
|
export interface MealDetailsByDate {
|
|
80
81
|
date: string;
|
package/lib/models/Metrics.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentReference } from
|
|
2
|
-
import { CircadianPhase } from
|
|
1
|
+
import { DocumentReference } from '@google-cloud/firestore';
|
|
2
|
+
import { CircadianPhase } from '../types';
|
|
3
3
|
|
|
4
4
|
export interface Metrics {
|
|
5
5
|
metricId: string;
|
|
@@ -83,7 +83,7 @@ export interface PredictedSleep {
|
|
|
83
83
|
|
|
84
84
|
export type PhaseStartEndSet = Omit<
|
|
85
85
|
Record<CircadianPhase, { start: string; end: string; timezone?: string }>,
|
|
86
|
-
|
|
86
|
+
'default'
|
|
87
87
|
>;
|
|
88
88
|
|
|
89
89
|
export interface MetricPhase {
|
|
@@ -92,10 +92,17 @@ export interface MetricPhase {
|
|
|
92
92
|
data: PhaseStartEndSet;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
export interface MetricExerciseDayMetadata {
|
|
96
|
+
steps?: number;
|
|
97
|
+
distanceMeters?: number;
|
|
98
|
+
floorsClimbed?: number;
|
|
99
|
+
}
|
|
100
|
+
|
|
95
101
|
export interface MetricExercise {
|
|
96
102
|
metricExerciseId: string;
|
|
97
103
|
date: string;
|
|
98
104
|
activities: MetricActivity[];
|
|
105
|
+
metadata?: MetricExerciseDayMetadata;
|
|
99
106
|
}
|
|
100
107
|
|
|
101
108
|
export interface MetricMealSummary {
|
|
@@ -144,7 +151,7 @@ export interface MetricActivity {
|
|
|
144
151
|
distanceMeters?: number;
|
|
145
152
|
}
|
|
146
153
|
|
|
147
|
-
export type MealType =
|
|
154
|
+
export type MealType = 'breakfast' | 'lunch' | 'dinner';
|
|
148
155
|
export interface MealFoodAmount {
|
|
149
156
|
name: string;
|
|
150
157
|
amount: number;
|
|
@@ -299,8 +306,8 @@ export interface SleepDetail {
|
|
|
299
306
|
|
|
300
307
|
export type NapDetail = SleepDetail;
|
|
301
308
|
|
|
302
|
-
export type SleepStageType =
|
|
309
|
+
export type SleepStageType = 'deep' | 'light' | 'rem' | 'awake';
|
|
303
310
|
|
|
304
311
|
export type SleepStage = Record<SleepStageType, number>;
|
|
305
312
|
|
|
306
|
-
export type MetricType =
|
|
313
|
+
export type MetricType = 'stress' | 'heartRate';
|
package/lib/types.ts
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
TaskPriority,
|
|
22
22
|
TodoAppFrom,
|
|
23
23
|
PredictedMealDetail,
|
|
24
|
+
MetricExerciseDayMetadata,
|
|
24
25
|
} from './models';
|
|
25
26
|
|
|
26
27
|
export type SupportedTerraProvidersType =
|
|
@@ -144,6 +145,7 @@ export interface StressDetailsByDate {
|
|
|
144
145
|
export interface ExerciseDetailsByDate {
|
|
145
146
|
date: string;
|
|
146
147
|
details: MetricActivity[];
|
|
148
|
+
summary?: MetricExerciseDayMetadata;
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
export interface MealDetailsByDate {
|