@demind-inc/core 1.1.52 → 1.1.54
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 +6 -14
- package/dist/models/User.d.ts +1 -0
- package/lib/models/Metrics.ts +6 -16
- package/lib/models/User.ts +1 -0
- package/package.json +1 -1
package/dist/models/Metrics.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { CircadianPhase } from "../types";
|
|
2
2
|
export interface Metrics {
|
|
3
3
|
metricId: string;
|
|
4
|
-
sleep?: MetricsSleep;
|
|
5
|
-
phase?: MetricPhase;
|
|
4
|
+
sleep?: MetricsSleep[];
|
|
5
|
+
phase?: MetricPhase[];
|
|
6
6
|
}
|
|
7
7
|
export interface MetricsSleep {
|
|
8
|
-
|
|
8
|
+
date: string;
|
|
9
9
|
didInitialSync?: boolean;
|
|
10
10
|
avgDurationMin?: number;
|
|
11
|
+
scores?: SleepDetail[];
|
|
11
12
|
}
|
|
12
13
|
export type PhaseStartEndSet = Omit<Record<CircadianPhase, {
|
|
13
14
|
start: string;
|
|
@@ -15,8 +16,9 @@ export type PhaseStartEndSet = Omit<Record<CircadianPhase, {
|
|
|
15
16
|
timezone?: string;
|
|
16
17
|
}>, "default">;
|
|
17
18
|
export interface MetricPhase {
|
|
18
|
-
|
|
19
|
+
date: string;
|
|
19
20
|
basicTimezone?: string;
|
|
21
|
+
data: PhaseStartEndSet;
|
|
20
22
|
}
|
|
21
23
|
export interface SleepDetail {
|
|
22
24
|
durationMin?: number;
|
|
@@ -28,14 +30,4 @@ export interface SleepDetail {
|
|
|
28
30
|
}
|
|
29
31
|
export type SleepStageType = "deep" | "light" | "rem" | "awake";
|
|
30
32
|
export type SleepStage = Record<SleepStageType, number>;
|
|
31
|
-
export interface DateFrame<T> {
|
|
32
|
-
[month: string]: {
|
|
33
|
-
[day: string]: T;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export interface DailyMetricScore {
|
|
37
|
-
score: number;
|
|
38
|
-
date: string;
|
|
39
|
-
updatedAt: string;
|
|
40
|
-
}
|
|
41
33
|
export type MetricType = "stress" | "heartRate";
|
package/dist/models/User.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface User {
|
|
|
18
18
|
emaIds?: Array<DocumentReference>;
|
|
19
19
|
access?: UserAccessType;
|
|
20
20
|
subscriptions?: Subscription[];
|
|
21
|
+
terraUserIds?: string[];
|
|
21
22
|
tokenId?: DocumentReference;
|
|
22
23
|
todoIntegrationIds?: Array<DocumentReference>;
|
|
23
24
|
todoTasksBoardIds?: string[];
|
package/lib/models/Metrics.ts
CHANGED
|
@@ -2,14 +2,15 @@ import { CircadianPhase } from "../types";
|
|
|
2
2
|
|
|
3
3
|
export interface Metrics {
|
|
4
4
|
metricId: string;
|
|
5
|
-
sleep?: MetricsSleep;
|
|
6
|
-
phase?: MetricPhase;
|
|
5
|
+
sleep?: MetricsSleep[];
|
|
6
|
+
phase?: MetricPhase[];
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export interface MetricsSleep {
|
|
10
|
-
|
|
10
|
+
date: string;
|
|
11
11
|
didInitialSync?: boolean;
|
|
12
12
|
avgDurationMin?: number;
|
|
13
|
+
scores?: SleepDetail[];
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export type PhaseStartEndSet = Omit<
|
|
@@ -18,8 +19,9 @@ export type PhaseStartEndSet = Omit<
|
|
|
18
19
|
>;
|
|
19
20
|
|
|
20
21
|
export interface MetricPhase {
|
|
21
|
-
|
|
22
|
+
date: string;
|
|
22
23
|
basicTimezone?: string;
|
|
24
|
+
data: PhaseStartEndSet;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
export interface SleepDetail {
|
|
@@ -35,16 +37,4 @@ export type SleepStageType = "deep" | "light" | "rem" | "awake";
|
|
|
35
37
|
|
|
36
38
|
export type SleepStage = Record<SleepStageType, number>;
|
|
37
39
|
|
|
38
|
-
export interface DateFrame<T> {
|
|
39
|
-
[month: string]: {
|
|
40
|
-
[day: string]: T;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface DailyMetricScore {
|
|
45
|
-
score: number;
|
|
46
|
-
date: string;
|
|
47
|
-
updatedAt: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
40
|
export type MetricType = "stress" | "heartRate";
|
package/lib/models/User.ts
CHANGED
|
@@ -19,6 +19,7 @@ export interface User {
|
|
|
19
19
|
emaIds?: Array<DocumentReference>;
|
|
20
20
|
access?: UserAccessType;
|
|
21
21
|
subscriptions?: Subscription[];
|
|
22
|
+
terraUserIds?: string[];
|
|
22
23
|
tokenId?: DocumentReference;
|
|
23
24
|
todoIntegrationIds?: Array<DocumentReference>;
|
|
24
25
|
todoTasksBoardIds?: string[];
|