@demind-inc/core 1.7.58 → 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.
@@ -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";
@@ -11,11 +11,11 @@ export interface Preferences {
11
11
  task?: TaskPreference;
12
12
  location?: LocationPreference;
13
13
  }
14
+ export type AddressLabel = "home" | "work" | string;
14
15
  export interface LocationPreference {
15
- addresses?: AddressPreference[];
16
+ addresses?: Record<AddressLabel, AddressPreference>;
16
17
  }
17
18
  export interface AddressPreference {
18
- label: "home" | "work" | string;
19
19
  lat?: number;
20
20
  lng?: number;
21
21
  addressName: string;
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[];
@@ -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>;
@@ -13,12 +13,12 @@ export interface Preferences {
13
13
  task?: TaskPreference;
14
14
  location?: LocationPreference;
15
15
  }
16
+ export type AddressLabel = "home" | "work" | string;
16
17
 
17
18
  export interface LocationPreference {
18
- addresses?: AddressPreference[];
19
+ addresses?: Record<AddressLabel, AddressPreference>;
19
20
  }
20
21
  export interface AddressPreference {
21
- label: "home" | "work" | string;
22
22
  lat?: number;
23
23
  lng?: number;
24
24
  addressName: string;
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[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@demind-inc/core",
3
- "version": "1.7.58",
3
+ "version": "1.7.60",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {