@demind-inc/core 1.7.64 → 1.7.66
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/Routine.d.ts +18 -0
- package/dist/types.d.ts +0 -2
- package/lib/models/Routine.ts +22 -0
- package/lib/types.ts +0 -3
- package/package.json +1 -1
package/dist/models/Routine.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export interface RoutineActivity {
|
|
|
15
15
|
suggestReason?: string;
|
|
16
16
|
category?: EventCategorySet;
|
|
17
17
|
recurring: RoutineActivityRecurring;
|
|
18
|
+
customRecurrence?: RoutineCustomRecurrence;
|
|
18
19
|
default?: boolean;
|
|
19
20
|
hidden?: boolean;
|
|
20
21
|
selected?: boolean;
|
|
@@ -25,3 +26,20 @@ export type RoutineActivityRecurring = {
|
|
|
25
26
|
enabled: boolean;
|
|
26
27
|
};
|
|
27
28
|
};
|
|
29
|
+
export type RoutineCustomRecurrence = {
|
|
30
|
+
type: "weekly";
|
|
31
|
+
interval: number;
|
|
32
|
+
daysOfWeek: RoutineActivityRecurringDay[];
|
|
33
|
+
startDate: string;
|
|
34
|
+
} | {
|
|
35
|
+
type: "monthly-date";
|
|
36
|
+
interval: number;
|
|
37
|
+
dayOfMonth: number;
|
|
38
|
+
startDate: string;
|
|
39
|
+
} | {
|
|
40
|
+
type: "monthly-weekday";
|
|
41
|
+
interval: number;
|
|
42
|
+
weekOfMonth: 1 | 2 | 3 | 4 | -1;
|
|
43
|
+
dayOfWeek: RoutineActivityRecurringDay;
|
|
44
|
+
startDate: string;
|
|
45
|
+
};
|
package/dist/types.d.ts
CHANGED
|
@@ -53,8 +53,6 @@ export interface SleepDetailsByDate {
|
|
|
53
53
|
date: string;
|
|
54
54
|
details: SleepDetail;
|
|
55
55
|
predictedSleep?: Pick<SleepDetail, "awakeTime" | "sleepTime">;
|
|
56
|
-
}
|
|
57
|
-
export interface SleepDetailsWithNapByDate extends SleepDetailsByDate {
|
|
58
56
|
nap?: NapItem[];
|
|
59
57
|
}
|
|
60
58
|
export interface NapItem {
|
package/lib/models/Routine.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface RoutineActivity {
|
|
|
17
17
|
suggestReason?: string;
|
|
18
18
|
category?: EventCategorySet;
|
|
19
19
|
recurring: RoutineActivityRecurring;
|
|
20
|
+
customRecurrence?: RoutineCustomRecurrence;
|
|
20
21
|
default?: boolean;
|
|
21
22
|
hidden?: boolean;
|
|
22
23
|
selected?: boolean;
|
|
@@ -34,3 +35,24 @@ export type RoutineActivityRecurringDay =
|
|
|
34
35
|
export type RoutineActivityRecurring = {
|
|
35
36
|
[day in RoutineActivityRecurringDay]: { enabled: boolean };
|
|
36
37
|
};
|
|
38
|
+
|
|
39
|
+
export type RoutineCustomRecurrence =
|
|
40
|
+
| {
|
|
41
|
+
type: "weekly";
|
|
42
|
+
interval: number;
|
|
43
|
+
daysOfWeek: RoutineActivityRecurringDay[];
|
|
44
|
+
startDate: string;
|
|
45
|
+
}
|
|
46
|
+
| {
|
|
47
|
+
type: "monthly-date";
|
|
48
|
+
interval: number;
|
|
49
|
+
dayOfMonth: number;
|
|
50
|
+
startDate: string;
|
|
51
|
+
}
|
|
52
|
+
| {
|
|
53
|
+
type: "monthly-weekday";
|
|
54
|
+
interval: number;
|
|
55
|
+
weekOfMonth: 1 | 2 | 3 | 4 | -1;
|
|
56
|
+
dayOfWeek: RoutineActivityRecurringDay;
|
|
57
|
+
startDate: string;
|
|
58
|
+
};
|
package/lib/types.ts
CHANGED
|
@@ -114,9 +114,6 @@ export interface SleepDetailsByDate {
|
|
|
114
114
|
date: string;
|
|
115
115
|
details: SleepDetail;
|
|
116
116
|
predictedSleep?: Pick<SleepDetail, "awakeTime" | "sleepTime">;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export interface SleepDetailsWithNapByDate extends SleepDetailsByDate {
|
|
120
117
|
nap?: NapItem[];
|
|
121
118
|
}
|
|
122
119
|
|