@hy-capital/api-habit-tracker-types 1.0.29 → 1.0.31
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/habit.d.ts +10 -7
- package/package.json +1 -1
- package/src/habit.ts +12 -8
package/dist/habit.d.ts
CHANGED
@@ -24,25 +24,28 @@ export interface BaseHabit {
|
|
24
24
|
description: string;
|
25
25
|
remind_me: boolean;
|
26
26
|
remind_me_at_times: RemindMeAtTime[];
|
27
|
+
notifications: Notification[];
|
27
28
|
frequency: HabitFrequency;
|
28
29
|
habit_days: HabitDay[];
|
29
30
|
habit_dates: number[];
|
30
31
|
}
|
31
|
-
export
|
32
|
-
|
32
|
+
export interface RemindMeAtTime {
|
33
|
+
hour: number;
|
34
|
+
minute: number;
|
35
|
+
}
|
36
|
+
export type Notification = DailyNotification | MonthlyNotification;
|
37
|
+
export interface DailyNotification {
|
33
38
|
type: 'Daily';
|
34
|
-
|
39
|
+
habitDay: HabitDay;
|
35
40
|
hour: number;
|
36
41
|
minute: number;
|
37
|
-
isEnabled: boolean;
|
38
42
|
notificationId: string;
|
39
43
|
}
|
40
|
-
export interface
|
44
|
+
export interface MonthlyNotification {
|
41
45
|
type: 'Monthly';
|
42
|
-
|
46
|
+
habitDate: number;
|
43
47
|
hour: number;
|
44
48
|
minute: number;
|
45
|
-
isEnabled: boolean;
|
46
49
|
notificationId: string;
|
47
50
|
}
|
48
51
|
export interface DbHabit extends BaseHabit {
|
package/package.json
CHANGED
package/src/habit.ts
CHANGED
@@ -26,29 +26,33 @@ export interface BaseHabit {
|
|
26
26
|
difficulty: HabitDifficulty;
|
27
27
|
description: string;
|
28
28
|
remind_me: boolean;
|
29
|
-
remind_me_at_times: RemindMeAtTime[];
|
29
|
+
remind_me_at_times: RemindMeAtTime[]; // these are shown in FO
|
30
|
+
notifications: Notification[]; // these are Local notification times
|
30
31
|
frequency: HabitFrequency;
|
31
32
|
habit_days: HabitDay[];
|
32
33
|
habit_dates: number[];
|
33
34
|
}
|
34
35
|
|
35
|
-
export
|
36
|
+
export interface RemindMeAtTime {
|
37
|
+
hour: number;
|
38
|
+
minute: number;
|
39
|
+
}
|
36
40
|
|
37
|
-
export
|
41
|
+
export type Notification = DailyNotification | MonthlyNotification;
|
42
|
+
|
43
|
+
export interface DailyNotification {
|
38
44
|
type: 'Daily';
|
39
|
-
|
45
|
+
habitDay: HabitDay;
|
40
46
|
hour: number;
|
41
47
|
minute: number;
|
42
|
-
isEnabled: boolean;
|
43
48
|
notificationId: string;
|
44
49
|
}
|
45
50
|
|
46
|
-
export interface
|
51
|
+
export interface MonthlyNotification {
|
47
52
|
type: 'Monthly';
|
48
|
-
|
53
|
+
habitDate: number;
|
49
54
|
hour: number;
|
50
55
|
minute: number;
|
51
|
-
isEnabled: boolean;
|
52
56
|
notificationId: string;
|
53
57
|
}
|
54
58
|
|