@demind-inc/core 1.7.50 → 1.7.51
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/constants.d.ts +2 -0
- package/dist/constants.js +2 -0
- package/dist/models/Metrics.d.ts +35 -0
- package/lib/constants.ts +2 -0
- package/lib/models/Metrics.ts +39 -0
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -45,6 +45,8 @@ export declare const DB_COLLECTION: {
|
|
|
45
45
|
CHAT_GENERAL_SESSION: string;
|
|
46
46
|
SHARED_ACCESS: string;
|
|
47
47
|
EVENT_SERIES: string;
|
|
48
|
+
LOCATION: string;
|
|
49
|
+
WEATHER: string;
|
|
48
50
|
};
|
|
49
51
|
export declare const SLEEP_SUPPORTED_TERRA_PROVIDERS: SupportedTerraProvidersType[];
|
|
50
52
|
export declare const STRESS_SUPPORTED_TERRA_PROVIDERS: SupportedTerraProvidersType[];
|
package/dist/constants.js
CHANGED
package/dist/models/Metrics.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export interface Metrics {
|
|
|
9
9
|
heartRate?: MetricHeartRate[];
|
|
10
10
|
stress?: MetricStress[];
|
|
11
11
|
movement?: MetricMovement[];
|
|
12
|
+
location?: MetricLocation[];
|
|
13
|
+
weather?: MetricWeather[];
|
|
12
14
|
basicTimezone?: string;
|
|
13
15
|
targetUserId?: string;
|
|
14
16
|
baseCalendarId?: string;
|
|
@@ -21,6 +23,39 @@ export interface MetricSleep {
|
|
|
21
23
|
eventRef?: DocumentReference | null;
|
|
22
24
|
predictedSleep?: PredictedSleep;
|
|
23
25
|
}
|
|
26
|
+
export interface MetricLocation {
|
|
27
|
+
metricLocationId: string;
|
|
28
|
+
date: string;
|
|
29
|
+
location: LocationData[];
|
|
30
|
+
}
|
|
31
|
+
export interface MetricWeather {
|
|
32
|
+
metricWeatherId: string;
|
|
33
|
+
date: string;
|
|
34
|
+
weather: WeatherData[];
|
|
35
|
+
}
|
|
36
|
+
export interface LocationData {
|
|
37
|
+
name?: string;
|
|
38
|
+
lat: number;
|
|
39
|
+
lng: number;
|
|
40
|
+
capturedAt: string;
|
|
41
|
+
rawJson?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface WeatherData {
|
|
44
|
+
location: string;
|
|
45
|
+
current_conditions: {
|
|
46
|
+
summary?: string;
|
|
47
|
+
temperature_f?: number;
|
|
48
|
+
temperature_c?: number;
|
|
49
|
+
};
|
|
50
|
+
daily_forecast: {
|
|
51
|
+
summary?: string;
|
|
52
|
+
high_f?: number;
|
|
53
|
+
high_c?: number;
|
|
54
|
+
low_f?: number;
|
|
55
|
+
low_c?: number;
|
|
56
|
+
};
|
|
57
|
+
rawJson?: string;
|
|
58
|
+
}
|
|
24
59
|
export interface PredictedSleep {
|
|
25
60
|
sleepTime: string;
|
|
26
61
|
wakeTime: string;
|
package/lib/constants.ts
CHANGED
|
@@ -46,6 +46,8 @@ export const DB_COLLECTION = {
|
|
|
46
46
|
CHAT_GENERAL_SESSION: "generalSession",
|
|
47
47
|
SHARED_ACCESS: "sharedAccess",
|
|
48
48
|
EVENT_SERIES: "eventSeries",
|
|
49
|
+
LOCATION: "location",
|
|
50
|
+
WEATHER: "weather",
|
|
49
51
|
};
|
|
50
52
|
|
|
51
53
|
export const SLEEP_SUPPORTED_TERRA_PROVIDERS: SupportedTerraProvidersType[] = [
|
package/lib/models/Metrics.ts
CHANGED
|
@@ -10,6 +10,8 @@ export interface Metrics {
|
|
|
10
10
|
heartRate?: MetricHeartRate[];
|
|
11
11
|
stress?: MetricStress[];
|
|
12
12
|
movement?: MetricMovement[];
|
|
13
|
+
location?: MetricLocation[];
|
|
14
|
+
weather?: MetricWeather[];
|
|
13
15
|
basicTimezone?: string;
|
|
14
16
|
targetUserId?: string;
|
|
15
17
|
baseCalendarId?: string;
|
|
@@ -24,6 +26,43 @@ export interface MetricSleep {
|
|
|
24
26
|
predictedSleep?: PredictedSleep;
|
|
25
27
|
}
|
|
26
28
|
|
|
29
|
+
export interface MetricLocation {
|
|
30
|
+
metricLocationId: string;
|
|
31
|
+
date: string;
|
|
32
|
+
location: LocationData[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface MetricWeather {
|
|
36
|
+
metricWeatherId: string;
|
|
37
|
+
date: string;
|
|
38
|
+
weather: WeatherData[];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface LocationData {
|
|
42
|
+
name?: string;
|
|
43
|
+
lat: number;
|
|
44
|
+
lng: number;
|
|
45
|
+
capturedAt: string;
|
|
46
|
+
rawJson?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface WeatherData {
|
|
50
|
+
location: string;
|
|
51
|
+
current_conditions: {
|
|
52
|
+
summary?: string;
|
|
53
|
+
temperature_f?: number;
|
|
54
|
+
temperature_c?: number;
|
|
55
|
+
};
|
|
56
|
+
daily_forecast: {
|
|
57
|
+
summary?: string;
|
|
58
|
+
high_f?: number;
|
|
59
|
+
high_c?: number;
|
|
60
|
+
low_f?: number;
|
|
61
|
+
low_c?: number;
|
|
62
|
+
};
|
|
63
|
+
rawJson?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
27
66
|
export interface PredictedSleep {
|
|
28
67
|
sleepTime: string; // HH:mm
|
|
29
68
|
wakeTime: string; // HH:mm
|