@hy-capital/api-habit-tracker-types 1.0.22 → 1.0.23
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 +7 -0
- package/dist/habit.js +3 -0
- package/package.json +1 -1
- package/src/habit.ts +8 -5
package/dist/habit.d.ts
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
import { TopicType } from './user-topic';
|
2
2
|
export type HabitTime = 'Morning' | 'Afternoon' | 'Evening' | 'Anytime';
|
3
3
|
export type HabitDifficulty = 1 | 2 | 3;
|
4
|
+
export type HabitFrequency = 'Daily' | 'Monthly';
|
5
|
+
export type HabitDays = 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday';
|
6
|
+
export declare const allHabitDays: HabitDays[];
|
4
7
|
export interface HabitType {
|
5
8
|
name: string;
|
6
9
|
habitTime: HabitTime;
|
@@ -17,6 +20,10 @@ export interface BaseHabit {
|
|
17
20
|
habit_time: HabitTime;
|
18
21
|
difficulty: HabitDifficulty;
|
19
22
|
description: string;
|
23
|
+
remind_me_at_time: string | null;
|
24
|
+
frequency: HabitFrequency;
|
25
|
+
habit_days: HabitDays[];
|
26
|
+
habit_dates: number[];
|
20
27
|
}
|
21
28
|
export interface DbHabit extends BaseHabit {
|
22
29
|
id: number;
|
package/dist/habit.js
CHANGED
package/package.json
CHANGED
package/src/habit.ts
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
import {TopicType} from './user-topic';
|
2
|
+
import { literals } from 'typia';
|
2
3
|
|
3
4
|
export type HabitTime = 'Morning' | 'Afternoon' | 'Evening' | 'Anytime';
|
4
5
|
export type HabitDifficulty = 1 | 2 | 3;
|
6
|
+
export type HabitFrequency = 'Daily' | 'Monthly';
|
7
|
+
export type HabitDays = 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday';
|
8
|
+
export const allHabitDays = literals<HabitDays>();
|
5
9
|
|
6
10
|
export interface HabitType {
|
7
11
|
name: string;
|
@@ -20,11 +24,10 @@ export interface BaseHabit {
|
|
20
24
|
habit_time: HabitTime;
|
21
25
|
difficulty: HabitDifficulty;
|
22
26
|
description: string;
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
// missed_days (not needed, you can derive it based on done days)
|
27
|
+
remind_me_at_time: string | null;
|
28
|
+
frequency: HabitFrequency;
|
29
|
+
habit_days: HabitDays[];
|
30
|
+
habit_dates: number[];
|
28
31
|
}
|
29
32
|
|
30
33
|
export interface DbHabit extends BaseHabit {
|