@demind-inc/core 1.2.42 → 1.2.45
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/DeviceGroup.js +2 -0
- package/dist/models/Metrics.d.ts +0 -2
- package/dist/models/User.d.ts +2 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/types.d.ts +1 -0
- package/lib/models/DeviceGroup.ts +21 -0
- package/lib/models/Metrics.ts +0 -2
- package/lib/models/User.ts +3 -3
- package/lib/models/index.ts +1 -0
- package/lib/types.ts +1 -0
- package/package.json +1 -1
package/dist/models/Metrics.d.ts
CHANGED
package/dist/models/User.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { DocumentReference } from "@google-cloud/firestore";
|
|
2
2
|
import { Chronotype } from "../types";
|
|
3
|
+
import { DeviceConnectedFrom } from "./DeviceGroup";
|
|
3
4
|
export interface User {
|
|
4
5
|
userId: string;
|
|
5
6
|
email?: string;
|
|
6
7
|
photoUrl?: string;
|
|
7
8
|
connectedDevices?: UserConnectedDevice[];
|
|
9
|
+
devicesGroupId?: string;
|
|
8
10
|
calendarIds?: string[];
|
|
9
11
|
metricId?: string;
|
|
10
12
|
createdAt?: string;
|
|
@@ -102,4 +104,3 @@ export interface UserConnectedDevice {
|
|
|
102
104
|
priority?: number;
|
|
103
105
|
from?: DeviceConnectedFrom;
|
|
104
106
|
}
|
|
105
|
-
export type DeviceConnectedFrom = "APPLE_HEALTH" | "TERRA";
|
package/dist/models/index.d.ts
CHANGED
package/dist/models/index.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
export interface DeviceGroup {
|
|
3
|
+
deviceGroupId: string;
|
|
4
|
+
userId: string;
|
|
5
|
+
metricId: string;
|
|
6
|
+
sleepPriorities: DevicePriorities;
|
|
7
|
+
stressPriorities: DevicePriorities;
|
|
8
|
+
devices:
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type DevicePriorities = Record<string, number>;
|
|
12
|
+
|
|
13
|
+
export interface Device {
|
|
14
|
+
deviceId: string;
|
|
15
|
+
terraManufacturer: string;
|
|
16
|
+
terraUserId: string;
|
|
17
|
+
from: DeviceConnectedFrom;
|
|
18
|
+
detailedSources?: string[]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type DeviceConnectedFrom = "APPLE_HEALTH" | "TERRA";
|
package/lib/models/Metrics.ts
CHANGED
|
@@ -6,8 +6,6 @@ export interface Metrics {
|
|
|
6
6
|
phase?: MetricPhase[];
|
|
7
7
|
basicTimezone?: string;
|
|
8
8
|
targetUserId?: string;
|
|
9
|
-
devices?: string[]; // e.g., Ultrahuman
|
|
10
|
-
terraManufacturers?: string[]; // e.g., Apple Health -- same as ConnectedDevice.deviceName
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
export interface MetricSleep {
|
package/lib/models/User.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { DocumentReference } from "@google-cloud/firestore";
|
|
2
2
|
import { Chronotype, ReferralCampaign } from "../types";
|
|
3
|
+
import { DeviceConnectedFrom } from "./DeviceGroup";
|
|
3
4
|
|
|
4
5
|
export interface User {
|
|
5
6
|
userId: string;
|
|
6
7
|
email?: string;
|
|
7
8
|
photoUrl?: string;
|
|
8
|
-
connectedDevices?: UserConnectedDevice[];
|
|
9
|
+
connectedDevices?: UserConnectedDevice[]; // Deprecated
|
|
10
|
+
devicesGroupId?: string;
|
|
9
11
|
calendarIds?: string[];
|
|
10
12
|
metricId?: string;
|
|
11
13
|
createdAt?: string;
|
|
@@ -152,5 +154,3 @@ export interface UserConnectedDevice {
|
|
|
152
154
|
priority?: number;
|
|
153
155
|
from?: DeviceConnectedFrom;
|
|
154
156
|
}
|
|
155
|
-
|
|
156
|
-
export type DeviceConnectedFrom = "APPLE_HEALTH" | "TERRA";
|
package/lib/models/index.ts
CHANGED
package/lib/types.ts
CHANGED