@hy-capital/api-habit-tracker-types 1.0.64 → 1.0.65

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 CHANGED
@@ -68,6 +68,21 @@ export interface DbHabit extends BaseHabit {
68
68
  created_at: string;
69
69
  updated_at: string;
70
70
  }
71
+ export interface HabitStats {
72
+ mostMasteredHabit: {
73
+ habit: DbHabit | null;
74
+ count: number;
75
+ };
76
+ longestStreak: {
77
+ habit: DbHabit | null;
78
+ streak: number;
79
+ };
80
+ totalHabitsCompleted: number;
81
+ }
82
+ export interface HabitsResponse {
83
+ habits: DbHabit[];
84
+ stats: HabitStats;
85
+ }
71
86
  export declare const habitTimeToClockTime: Record<HabitTime, {
72
87
  hour: number;
73
88
  minute: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hy-capital/api-habit-tracker-types",
3
- "version": "1.0.64",
3
+ "version": "1.0.65",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "types": "dist/index.d.ts",
package/src/habit.ts CHANGED
@@ -121,6 +121,23 @@ export interface DbHabit extends BaseHabit {
121
121
  updated_at: string
122
122
  }
123
123
 
124
+ export interface HabitStats {
125
+ mostMasteredHabit: {
126
+ habit: DbHabit | null,
127
+ count: number
128
+ };
129
+ longestStreak: {
130
+ habit: DbHabit | null,
131
+ streak: number
132
+ };
133
+ totalHabitsCompleted: number;
134
+ }
135
+
136
+ export interface HabitsResponse {
137
+ habits: DbHabit[];
138
+ stats: HabitStats;
139
+ }
140
+
124
141
  export const habitTimeToClockTime: Record<HabitTime, { hour: number, minute: number }> = {
125
142
  Morning: {
126
143
  hour: 9,