@demind-inc/core 1.3.6 → 1.3.7

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.
@@ -8,6 +8,7 @@ export declare const DB_COLLECTION: {
8
8
  METRICS: string;
9
9
  SLEEP: string;
10
10
  PHASE: string;
11
+ EXERCISE: string;
11
12
  RECOMMENDED_TASKS: string;
12
13
  EMAS: string;
13
14
  EMA_DATES: string;
package/dist/constants.js CHANGED
@@ -9,6 +9,7 @@ exports.DB_COLLECTION = {
9
9
  METRICS: "metrics",
10
10
  SLEEP: "sleep",
11
11
  PHASE: "phase",
12
+ EXERCISE: "exercise",
12
13
  RECOMMENDED_TASKS: "recommendedTasks",
13
14
  EMAS: "emas",
14
15
  EMA_DATES: "emaDates",
@@ -54,6 +54,7 @@ export interface CalendarEvent {
54
54
  recommendedTaskId?: string;
55
55
  isAllDay?: boolean;
56
56
  taskFrom?: CalendarTaskFrom;
57
+ activityFrom?: ActivityFrom;
57
58
  categories?: EventCategorySet[];
58
59
  }
59
60
  export type CalendarEventType = "default" | "outOfOffice" | "focusTime" | "workingLocation" | "other";
@@ -75,6 +76,9 @@ export interface CalendarTaskFrom {
75
76
  taskId: string;
76
77
  from: TodoAppFrom;
77
78
  }
79
+ export interface ActivityFrom {
80
+ activityId: string;
81
+ }
78
82
  export interface CalendarEventMetrics {
79
83
  energy?: EnergyFeedbackType;
80
84
  stress?: number;
@@ -21,6 +21,19 @@ export interface MetricPhase {
21
21
  date: string;
22
22
  data: PhaseStartEndSet;
23
23
  }
24
+ export interface MetricExercise {
25
+ metricExerciseId: string;
26
+ date: string;
27
+ activities: MetricActivity[];
28
+ }
29
+ export interface MetricActivity {
30
+ name: string;
31
+ startTime: string;
32
+ endTime: string;
33
+ rawJson?: string;
34
+ summaryId: string;
35
+ activityId: string;
36
+ }
24
37
  export interface SleepDetail {
25
38
  durationMin?: number;
26
39
  sleepTime?: string;
@@ -5,6 +5,7 @@ export interface Preferences {
5
5
  general?: GeneralPreference;
6
6
  calendar?: CalendarPreference;
7
7
  scheduler?: SchedulerPreference;
8
+ activity?: ActivityPreference;
8
9
  }
9
10
  export interface EnergyPreference {
10
11
  eventCategories?: EventCategoryEnergyPreference[];
@@ -49,3 +50,9 @@ export interface ExportedCalendar {
49
50
  createdAt: string;
50
51
  lastSyncedAt?: string;
51
52
  }
53
+ export interface ActivityPreference {
54
+ exercise?: ExerciseActivityPreference;
55
+ }
56
+ export interface ExerciseActivityPreference {
57
+ saveExerciseAsCalendarEvent?: boolean;
58
+ }
package/lib/constants.ts CHANGED
@@ -9,6 +9,7 @@ export const DB_COLLECTION = {
9
9
  METRICS: "metrics",
10
10
  SLEEP: "sleep",
11
11
  PHASE: "phase",
12
+ EXERCISE: "exercise",
12
13
  RECOMMENDED_TASKS: "recommendedTasks",
13
14
  EMAS: "emas",
14
15
  EMA_DATES: "emaDates",
@@ -59,6 +59,7 @@ export interface CalendarEvent {
59
59
  recommendedTaskId?: string;
60
60
  isAllDay?: boolean;
61
61
  taskFrom?: CalendarTaskFrom;
62
+ activityFrom?: ActivityFrom;
62
63
  categories?: EventCategorySet[];
63
64
  }
64
65
 
@@ -101,6 +102,10 @@ export interface CalendarTaskFrom {
101
102
  from: TodoAppFrom;
102
103
  }
103
104
 
105
+ export interface ActivityFrom {
106
+ activityId: string;
107
+ }
108
+
104
109
  export interface CalendarEventMetrics {
105
110
  energy?: EnergyFeedbackType;
106
111
  stress?: number;
@@ -25,6 +25,21 @@ export interface MetricPhase {
25
25
  data: PhaseStartEndSet;
26
26
  }
27
27
 
28
+ export interface MetricExercise {
29
+ metricExerciseId: string;
30
+ date: string;
31
+ activities: MetricActivity[];
32
+ }
33
+
34
+ export interface MetricActivity {
35
+ name: string;
36
+ startTime: string;
37
+ endTime: string;
38
+ rawJson?: string;
39
+ summaryId: string; // Terra API summary ID
40
+ activityId: string;
41
+ }
42
+
28
43
  export interface SleepDetail {
29
44
  durationMin?: number;
30
45
  sleepTime?: string;
@@ -6,6 +6,7 @@ export interface Preferences {
6
6
  general?: GeneralPreference;
7
7
  calendar?: CalendarPreference;
8
8
  scheduler?: SchedulerPreference;
9
+ activity?: ActivityPreference;
9
10
  }
10
11
 
11
12
  export interface EnergyPreference {
@@ -64,3 +65,11 @@ export interface ExportedCalendar {
64
65
  createdAt: string;
65
66
  lastSyncedAt?: string;
66
67
  }
68
+
69
+ export interface ActivityPreference {
70
+ exercise?: ExerciseActivityPreference;
71
+ }
72
+
73
+ export interface ExerciseActivityPreference {
74
+ saveExerciseAsCalendarEvent?: boolean;
75
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@demind-inc/core",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {