@demind-inc/core 1.7.59 → 1.7.60
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 +7 -0
- package/dist/types.d.ts +5 -1
- package/lib/models/Metrics.ts +9 -0
- package/lib/types.ts +6 -0
- package/package.json +1 -1
package/dist/models/Metrics.d.ts
CHANGED
|
@@ -20,9 +20,15 @@ export interface MetricSleep {
|
|
|
20
20
|
metricSleepId: string;
|
|
21
21
|
date: string;
|
|
22
22
|
scores?: SleepDetail[];
|
|
23
|
+
nap?: MetricNap[];
|
|
23
24
|
eventRef?: DocumentReference | null;
|
|
24
25
|
predictedSleep?: PredictedSleep;
|
|
25
26
|
}
|
|
27
|
+
export interface MetricNap {
|
|
28
|
+
metricNapId: string;
|
|
29
|
+
date: string;
|
|
30
|
+
scores?: NapDetail[];
|
|
31
|
+
}
|
|
26
32
|
export interface MetricLocation {
|
|
27
33
|
metricLocationId: string;
|
|
28
34
|
date: string;
|
|
@@ -196,6 +202,7 @@ export interface SleepDetail {
|
|
|
196
202
|
heartRateSummary?: MetricHRSummary;
|
|
197
203
|
temperatureDelta?: number;
|
|
198
204
|
}
|
|
205
|
+
export type NapDetail = SleepDetail;
|
|
199
206
|
export type SleepStageType = "deep" | "light" | "rem" | "awake";
|
|
200
207
|
export type SleepStage = Record<SleepStageType, number>;
|
|
201
208
|
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, SleepDetail, TaskItem, TaskPriority, TodoAppFrom } from "./models";
|
|
1
|
+
import { CalendarEvent, CalendarRoutineFrom, CalendarTaskFrom, EMASatisfaction, EnergyFeedbackType, EventCategorySet, MealType, MetricActivity, MetricHRValueSet, MetricMealDetail, MetricMealSummary, MetricStressValueSet, PhaseStartEndSet, RichContext, RoutineActivity, NapDetail, SleepDetail, TaskItem, TaskPriority, TodoAppFrom } 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";
|
|
4
4
|
export type CircadianPhase = "default" | "wakeup_low" | "wakeup_normal" | "morning_high" | "morning_normal" | "morning_low" | "evening_high" | "evening_low" | "evening_normal";
|
|
@@ -54,6 +54,10 @@ export interface SleepDetailsByDate {
|
|
|
54
54
|
details: SleepDetail;
|
|
55
55
|
predictedSleep?: Pick<SleepDetail, "awakeTime" | "sleepTime">;
|
|
56
56
|
}
|
|
57
|
+
export interface NapDetailsByDate {
|
|
58
|
+
date: string;
|
|
59
|
+
details: NapDetail[];
|
|
60
|
+
}
|
|
57
61
|
export interface HRDetailsByDate {
|
|
58
62
|
date: string;
|
|
59
63
|
hrDetails: MetricHRValueSet[];
|
package/lib/models/Metrics.ts
CHANGED
|
@@ -22,10 +22,17 @@ export interface MetricSleep {
|
|
|
22
22
|
metricSleepId: string;
|
|
23
23
|
date: string;
|
|
24
24
|
scores?: SleepDetail[];
|
|
25
|
+
nap?: MetricNap[];
|
|
25
26
|
eventRef?: DocumentReference | null;
|
|
26
27
|
predictedSleep?: PredictedSleep;
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
export interface MetricNap {
|
|
31
|
+
metricNapId: string;
|
|
32
|
+
date: string;
|
|
33
|
+
scores?: NapDetail[];
|
|
34
|
+
}
|
|
35
|
+
|
|
29
36
|
export interface MetricLocation {
|
|
30
37
|
metricLocationId: string;
|
|
31
38
|
date: string;
|
|
@@ -222,6 +229,8 @@ export interface SleepDetail {
|
|
|
222
229
|
temperatureDelta?: number;
|
|
223
230
|
}
|
|
224
231
|
|
|
232
|
+
export type NapDetail = SleepDetail;
|
|
233
|
+
|
|
225
234
|
export type SleepStageType = "deep" | "light" | "rem" | "awake";
|
|
226
235
|
|
|
227
236
|
export type SleepStage = Record<SleepStageType, number>;
|
package/lib/types.ts
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
PhaseStartEndSet,
|
|
15
15
|
RichContext,
|
|
16
16
|
RoutineActivity,
|
|
17
|
+
NapDetail,
|
|
17
18
|
SleepDetail,
|
|
18
19
|
TaskItem,
|
|
19
20
|
TaskPriority,
|
|
@@ -115,6 +116,11 @@ export interface SleepDetailsByDate {
|
|
|
115
116
|
predictedSleep?: Pick<SleepDetail, "awakeTime" | "sleepTime">;
|
|
116
117
|
}
|
|
117
118
|
|
|
119
|
+
export interface NapDetailsByDate {
|
|
120
|
+
date: string;
|
|
121
|
+
details: NapDetail[];
|
|
122
|
+
}
|
|
123
|
+
|
|
118
124
|
export interface HRDetailsByDate {
|
|
119
125
|
date: string;
|
|
120
126
|
hrDetails: MetricHRValueSet[];
|