@hy-capital/api-habit-tracker-types 1.0.67 → 1.0.69

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.
@@ -1,6 +1,8 @@
1
1
  import { DbUser } from './user';
2
2
  import { DbUserXp } from './user-xp';
3
+ import { DbUserMatchRate } from './user-match-rate';
3
4
  export interface FrontendUser {
4
5
  user: DbUser;
5
6
  userXps: DbUserXp[];
7
+ userMatchRates: DbUserMatchRate[];
6
8
  }
package/dist/habit.d.ts CHANGED
@@ -79,7 +79,7 @@ export interface HabitStats {
79
79
  };
80
80
  totalHabitsCompleted: number;
81
81
  currentOverallStreak: number;
82
- activeHabits: {
82
+ doneHabits: {
83
83
  count: number;
84
84
  percentage: number;
85
85
  };
package/dist/habit.js CHANGED
@@ -189,7 +189,7 @@ exports.habitTypesByTopicType = {
189
189
  },
190
190
  {
191
191
  id: 7,
192
- name: 'More than 7h of sleep',
192
+ name: 'More than 7 h of sleep',
193
193
  description: 'Go to bed and wake up at the same time. No excuses, even on weekends.',
194
194
  difficulty: 2,
195
195
  topicType: 'Sleep',
@@ -229,7 +229,7 @@ exports.habitTypesByTopicType = {
229
229
  },
230
230
  {
231
231
  id: 9,
232
- name: 'No caffeine after 2pm',
232
+ name: 'No caffeine after 2 pm',
233
233
  description: 'Cut all caffeine - coffee, pre-workout, energy drinks. Water only.',
234
234
  difficulty: 2,
235
235
  topicType: 'Sleep',
@@ -0,0 +1,11 @@
1
+ import { TopicType } from './user-topic';
2
+ export interface BaseUserMatchRate {
3
+ match_rate: number;
4
+ user_id: number;
5
+ topic_type: TopicType;
6
+ }
7
+ export interface DbUserMatchRate extends BaseUserMatchRate {
8
+ id: number;
9
+ created_at: string;
10
+ updated_at: string;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hy-capital/api-habit-tracker-types",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,9 @@
1
1
  import {DbUser} from './user';
2
2
  import {DbUserXp} from './user-xp';
3
+ import {DbUserMatchRate} from './user-match-rate';
3
4
 
4
5
  export interface FrontendUser {
5
6
  user: DbUser;
6
7
  userXps: DbUserXp[];
8
+ userMatchRates: DbUserMatchRate[];
7
9
  }
package/src/habit.ts CHANGED
@@ -132,7 +132,7 @@ export interface HabitStats {
132
132
  };
133
133
  totalHabitsCompleted: number;
134
134
  currentOverallStreak: number;
135
- activeHabits: {
135
+ doneHabits: {
136
136
  count: number;
137
137
  percentage: number
138
138
  };
@@ -292,7 +292,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
292
292
  },
293
293
  {
294
294
  id: 7,
295
- name: 'More than 7h of sleep',
295
+ name: 'More than 7 h of sleep',
296
296
  description: 'Go to bed and wake up at the same time. No excuses, even on weekends.',
297
297
  difficulty: 2,
298
298
  topicType: 'Sleep',
@@ -332,7 +332,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
332
332
  },
333
333
  {
334
334
  id: 9,
335
- name: 'No caffeine after 2pm',
335
+ name: 'No caffeine after 2 pm',
336
336
  description: 'Cut all caffeine - coffee, pre-workout, energy drinks. Water only.',
337
337
  difficulty: 2,
338
338
  topicType: 'Sleep',
@@ -0,0 +1,13 @@
1
+ import {TopicType} from './user-topic';
2
+
3
+ export interface BaseUserMatchRate {
4
+ match_rate: number;
5
+ user_id: number;
6
+ topic_type: TopicType;
7
+ }
8
+
9
+ export interface DbUserMatchRate extends BaseUserMatchRate {
10
+ id: number;
11
+ created_at: string
12
+ updated_at: string
13
+ }