@demind-inc/core 1.10.21 → 1.10.23

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.
@@ -12,12 +12,16 @@ export interface Preferences {
12
12
  workout?: WorkoutPreference;
13
13
  task?: TaskPreference;
14
14
  location?: LocationPreference;
15
+ email?: EmailPreference;
15
16
  }
16
17
  export type AddressLabel = 'home' | 'work' | string;
17
18
  export interface LocationPreference {
18
19
  enabled?: boolean;
19
20
  addresses?: Record<AddressLabel, AddressPreference>;
20
21
  }
22
+ export interface EmailPreference {
23
+ weeklySummary?: boolean;
24
+ }
21
25
  export interface WorkoutPreference {
22
26
  note?: string;
23
27
  }
package/dist/types.d.ts CHANGED
@@ -1,9 +1,9 @@
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";
2
- export type SupportedTerraProvidersType = "FITBIT" | "OURA" | "GARMIN" | "WHOOP" | "ULTRAHUMAN" | "STRAVA" | "MYFITNESSPAL";
3
- export type SupportedTerraSDKType = "APPLE" | "GOOGLE_FIT" | "SAMSUNG_HEALTH" | "FREESTYLE_LIBRE" | "HEALTH_CONNECT";
4
- export type CircadianPhase = "default" | "wakeup_low" | "wakeup_normal" | "morning_high" | "morning_normal" | "morning_low" | "evening_high" | "evening_low" | "evening_normal";
5
- export type PeaksDipsPhase = "morning_high" | "morning_low" | "evening_high" | "evening_low";
6
- export type TimePhase = "morning" | "midday" | "evening";
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';
2
+ export type SupportedTerraProvidersType = 'FITBIT' | 'OURA' | 'GARMIN' | 'WHOOP' | 'ULTRAHUMAN' | 'STRAVA' | 'MYFITNESSPAL';
3
+ export type SupportedTerraSDKType = 'APPLE' | 'GOOGLE_FIT' | 'SAMSUNG_HEALTH' | 'FREESTYLE_LIBRE' | 'HEALTH_CONNECT';
4
+ export type CircadianPhase = 'default' | 'wakeup_low' | 'wakeup_normal' | 'morning_high' | 'morning_normal' | 'morning_low' | 'evening_high' | 'evening_low' | 'evening_normal';
5
+ export type PeaksDipsPhase = 'morning_high' | 'morning_low' | 'evening_high' | 'evening_low';
6
+ export type TimePhase = 'morning' | 'midday' | 'evening';
7
7
  export interface CircadianMetric {
8
8
  timestamp: string;
9
9
  value: number;
@@ -16,8 +16,8 @@ export interface EventEnergySet {
16
16
  endTimestamp: string;
17
17
  energy: EnergyFeedbackType;
18
18
  }
19
- export type Chronotype = "morning" | "night" | "hybrid";
20
- export type ScheduledActionType = "add" | "remove" | "update";
19
+ export type Chronotype = 'morning' | 'night' | 'hybrid';
20
+ export type ScheduledActionType = 'add' | 'remove' | 'update';
21
21
  export interface HeatmapDataType {
22
22
  x: string;
23
23
  y: string;
@@ -25,7 +25,7 @@ export interface HeatmapDataType {
25
25
  phase?: CircadianPhase;
26
26
  diff?: number;
27
27
  }
28
- export type ScheduledActionEventFrom = "existing_calendar" | "todo" | "activity" | "meal" | "sleep" | "routine" | "workout";
28
+ export type ScheduledActionEventFrom = 'existing_calendar' | 'todo' | 'activity' | 'meal' | 'sleep' | 'routine' | 'workout';
29
29
  export interface ScheduledAction {
30
30
  name: string;
31
31
  id?: string;
@@ -53,7 +53,7 @@ export interface ScheduledActionOptions {
53
53
  export interface SleepDetailsByDate {
54
54
  date: string;
55
55
  details: SleepDetail;
56
- predictedSleep?: Pick<SleepDetail, "awakeTime" | "sleepTime">;
56
+ predictedSleep?: Pick<SleepDetail, 'awakeTime' | 'sleepTime'>;
57
57
  nap?: NapItem[];
58
58
  }
59
59
  export interface NapItem {
@@ -100,8 +100,8 @@ export interface PhaseEvents {
100
100
  timezone?: string;
101
101
  events: CalendarEvent[];
102
102
  }
103
- export type FluctuateEnergyType = "peakEnergy" | "spotEnergy";
104
- export type FluctuateReasonType = "sleep" | "phaseEma" | "event";
103
+ export type FluctuateEnergyType = 'peakEnergy' | 'spotEnergy';
104
+ export type FluctuateReasonType = 'sleep' | 'phaseEma' | 'event';
105
105
  export interface EnergyFluctuationItem {
106
106
  reason: FluctuateReasonType;
107
107
  eventId?: string;
@@ -120,15 +120,15 @@ export interface EnergyFluctuationItem {
120
120
  eventCategory?: EventCategorySet;
121
121
  energyFeedback?: EnergyFeedbackType;
122
122
  }
123
- export * from "./featureFlags.types";
124
- export type TimeboxSessionType = "deepWork" | "lightWork";
125
- export type TaskItemForSchedule = Pick<TaskItem, "taskId" | "name" | "duration" | "sortIndex" | "labels" | "addedToCalendar" | "boardId" | "appFrom" | "dueDateTime" | "priority"> & {
123
+ export * from './featureFlags.types';
124
+ export type TimeboxSessionType = 'deepWork' | 'lightWork';
125
+ export type TaskItemForSchedule = Pick<TaskItem, 'taskId' | 'name' | 'duration' | 'sortIndex' | 'labels' | 'addedToCalendar' | 'boardId' | 'appFrom' | 'dueDateTime' | 'priority' | 'aiNote'> & {
126
126
  selected?: boolean;
127
127
  };
128
- export type ScheduleLogicElement = "timebox" | "routine" | "task";
129
- export type WearableSourceType = "ALL" | "SLEEP" | "ACTIVITY" | "MEAL" | "STRESS";
130
- export type RecommendationActionType = "core_action" | "energy_boost" | "task" | "routine";
131
- export type CoreActionType = "aiScheduler" | "syncSleep" | "dailyPreview" | "dailyReflection";
128
+ export type ScheduleLogicElement = 'timebox' | 'routine' | 'task';
129
+ export type WearableSourceType = 'ALL' | 'SLEEP' | 'ACTIVITY' | 'MEAL' | 'STRESS';
130
+ export type RecommendationActionType = 'core_action' | 'energy_boost' | 'task' | 'routine';
131
+ export type CoreActionType = 'aiScheduler' | 'syncSleep' | 'dailyPreview' | 'dailyReflection';
132
132
  export interface RecommendationAction {
133
133
  id: string;
134
134
  name: string;
@@ -153,7 +153,7 @@ export interface ChatAdjustmentChangeWrapper<T> {
153
153
  before?: Partial<T>;
154
154
  after?: Partial<T>;
155
155
  }
156
- export type ChatAdjustmentMealContent = Omit<PredictedMealDetail, "startTime" | "endTime" | "description">;
156
+ export type ChatAdjustmentMealContent = Omit<PredictedMealDetail, 'startTime' | 'endTime' | 'description'>;
157
157
  export interface ChatAdjustmentMeal {
158
158
  mealType: MealType;
159
159
  startTime: string;
@@ -14,6 +14,7 @@ export interface Preferences {
14
14
  workout?: WorkoutPreference;
15
15
  task?: TaskPreference;
16
16
  location?: LocationPreference;
17
+ email?: EmailPreference;
17
18
  }
18
19
  export type AddressLabel = 'home' | 'work' | string;
19
20
 
@@ -22,6 +23,10 @@ export interface LocationPreference {
22
23
  addresses?: Record<AddressLabel, AddressPreference>;
23
24
  }
24
25
 
26
+ export interface EmailPreference {
27
+ weeklySummary?: boolean;
28
+ }
29
+
25
30
  export interface WorkoutPreference {
26
31
  note?: string;
27
32
  }
package/lib/types.ts CHANGED
@@ -21,41 +21,38 @@ import {
21
21
  TaskPriority,
22
22
  TodoAppFrom,
23
23
  PredictedMealDetail,
24
- } from "./models";
24
+ } from './models';
25
25
 
26
26
  export type SupportedTerraProvidersType =
27
- | "FITBIT"
28
- | "OURA"
29
- | "GARMIN"
30
- | "WHOOP"
31
- | "ULTRAHUMAN"
32
- | "STRAVA"
33
- | "MYFITNESSPAL";
27
+ | 'FITBIT'
28
+ | 'OURA'
29
+ | 'GARMIN'
30
+ | 'WHOOP'
31
+ | 'ULTRAHUMAN'
32
+ | 'STRAVA'
33
+ | 'MYFITNESSPAL';
34
34
 
35
35
  export type SupportedTerraSDKType =
36
- | "APPLE"
37
- | "GOOGLE_FIT"
38
- | "SAMSUNG_HEALTH"
39
- | "FREESTYLE_LIBRE" | "HEALTH_CONNECT";
36
+ | 'APPLE'
37
+ | 'GOOGLE_FIT'
38
+ | 'SAMSUNG_HEALTH'
39
+ | 'FREESTYLE_LIBRE'
40
+ | 'HEALTH_CONNECT';
40
41
 
41
42
  export type CircadianPhase =
42
- | "default"
43
- | "wakeup_low"
44
- | "wakeup_normal"
45
- | "morning_high"
46
- | "morning_normal"
47
- | "morning_low"
48
- | "evening_high"
49
- | "evening_low"
50
- | "evening_normal";
51
-
52
- export type PeaksDipsPhase =
53
- | "morning_high"
54
- | "morning_low"
55
- | "evening_high"
56
- | "evening_low";
57
-
58
- export type TimePhase = "morning" | "midday" | "evening";
43
+ | 'default'
44
+ | 'wakeup_low'
45
+ | 'wakeup_normal'
46
+ | 'morning_high'
47
+ | 'morning_normal'
48
+ | 'morning_low'
49
+ | 'evening_high'
50
+ | 'evening_low'
51
+ | 'evening_normal';
52
+
53
+ export type PeaksDipsPhase = 'morning_high' | 'morning_low' | 'evening_high' | 'evening_low';
54
+
55
+ export type TimePhase = 'morning' | 'midday' | 'evening';
59
56
 
60
57
  export interface CircadianMetric {
61
58
  timestamp: string;
@@ -71,9 +68,9 @@ export interface EventEnergySet {
71
68
  energy: EnergyFeedbackType;
72
69
  }
73
70
 
74
- export type Chronotype = "morning" | "night" | "hybrid";
71
+ export type Chronotype = 'morning' | 'night' | 'hybrid';
75
72
 
76
- export type ScheduledActionType = "add" | "remove" | "update";
73
+ export type ScheduledActionType = 'add' | 'remove' | 'update';
77
74
 
78
75
  export interface HeatmapDataType {
79
76
  x: string;
@@ -83,13 +80,13 @@ export interface HeatmapDataType {
83
80
  diff?: number;
84
81
  }
85
82
  export type ScheduledActionEventFrom =
86
- | "existing_calendar"
87
- | "todo"
88
- | "activity"
89
- | "meal"
90
- | "sleep"
91
- | "routine"
92
- | "workout";
83
+ | 'existing_calendar'
84
+ | 'todo'
85
+ | 'activity'
86
+ | 'meal'
87
+ | 'sleep'
88
+ | 'routine'
89
+ | 'workout';
93
90
 
94
91
  export interface ScheduledAction {
95
92
  name: string;
@@ -120,7 +117,7 @@ export interface ScheduledActionOptions {
120
117
  export interface SleepDetailsByDate {
121
118
  date: string;
122
119
  details: SleepDetail;
123
- predictedSleep?: Pick<SleepDetail, "awakeTime" | "sleepTime">;
120
+ predictedSleep?: Pick<SleepDetail, 'awakeTime' | 'sleepTime'>;
124
121
  nap?: NapItem[];
125
122
  }
126
123
 
@@ -178,8 +175,8 @@ export interface PhaseEvents {
178
175
  events: CalendarEvent[];
179
176
  }
180
177
 
181
- export type FluctuateEnergyType = "peakEnergy" | "spotEnergy";
182
- export type FluctuateReasonType = "sleep" | "phaseEma" | "event";
178
+ export type FluctuateEnergyType = 'peakEnergy' | 'spotEnergy';
179
+ export type FluctuateReasonType = 'sleep' | 'phaseEma' | 'event';
183
180
 
184
181
  export interface EnergyFluctuationItem {
185
182
  reason: FluctuateReasonType;
@@ -200,46 +197,34 @@ export interface EnergyFluctuationItem {
200
197
  energyFeedback?: EnergyFeedbackType;
201
198
  }
202
199
 
203
- export * from "./featureFlags.types";
200
+ export * from './featureFlags.types';
204
201
 
205
- export type TimeboxSessionType = "deepWork" | "lightWork";
202
+ export type TimeboxSessionType = 'deepWork' | 'lightWork';
206
203
 
207
204
  export type TaskItemForSchedule = Pick<
208
205
  TaskItem,
209
- | "taskId"
210
- | "name"
211
- | "duration"
212
- | "sortIndex"
213
- | "labels"
214
- | "addedToCalendar"
215
- | "boardId"
216
- | "appFrom"
217
- | "dueDateTime"
218
- | "priority"
206
+ | 'taskId'
207
+ | 'name'
208
+ | 'duration'
209
+ | 'sortIndex'
210
+ | 'labels'
211
+ | 'addedToCalendar'
212
+ | 'boardId'
213
+ | 'appFrom'
214
+ | 'dueDateTime'
215
+ | 'priority'
216
+ | 'aiNote'
219
217
  > & {
220
218
  selected?: boolean;
221
219
  };
222
220
 
223
- export type ScheduleLogicElement = "timebox" | "routine" | "task";
221
+ export type ScheduleLogicElement = 'timebox' | 'routine' | 'task';
224
222
 
225
- export type WearableSourceType =
226
- | "ALL"
227
- | "SLEEP"
228
- | "ACTIVITY"
229
- | "MEAL"
230
- | "STRESS";
223
+ export type WearableSourceType = 'ALL' | 'SLEEP' | 'ACTIVITY' | 'MEAL' | 'STRESS';
231
224
 
232
- export type RecommendationActionType =
233
- | "core_action"
234
- | "energy_boost"
235
- | "task"
236
- | "routine";
225
+ export type RecommendationActionType = 'core_action' | 'energy_boost' | 'task' | 'routine';
237
226
 
238
- export type CoreActionType =
239
- | "aiScheduler"
240
- | "syncSleep"
241
- | "dailyPreview"
242
- | "dailyReflection";
227
+ export type CoreActionType = 'aiScheduler' | 'syncSleep' | 'dailyPreview' | 'dailyReflection';
243
228
 
244
229
  export interface RecommendationAction {
245
230
  id: string;
@@ -270,7 +255,7 @@ export interface ChatAdjustmentChangeWrapper<T> {
270
255
 
271
256
  export type ChatAdjustmentMealContent = Omit<
272
257
  PredictedMealDetail,
273
- "startTime" | "endTime" | "description"
258
+ 'startTime' | 'endTime' | 'description'
274
259
  >;
275
260
 
276
261
  export interface ChatAdjustmentMeal {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@demind-inc/core",
3
- "version": "1.10.21",
3
+ "version": "1.10.23",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {