@hy-capital/api-habit-tracker-types 1.0.20 → 1.0.22

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,6 @@
1
1
  import { DbUser } from './user';
2
- import { DbUserStat } from './user-stat';
2
+ import { DbUserTopic } from './user-topic';
3
3
  export interface FrontendUser {
4
4
  user: DbUser;
5
- user_stats: DbUserStat[];
5
+ user_topics: DbUserTopic[];
6
6
  }
package/dist/habit.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- import { StatType } from './user-stat';
1
+ import { TopicType } from './user-topic';
2
2
  export type HabitTime = 'Morning' | 'Afternoon' | 'Evening' | 'Anytime';
3
3
  export type HabitDifficulty = 1 | 2 | 3;
4
4
  export interface HabitType {
5
5
  name: string;
6
6
  habitTime: HabitTime;
7
- statType: StatType;
7
+ topicType: TopicType;
8
8
  difficulty: HabitDifficulty;
9
9
  description: string;
10
10
  }
11
11
  export interface BaseHabit {
12
12
  user_id: number;
13
13
  name: string;
14
- stat_type: StatType;
14
+ topic_type: TopicType;
15
15
  done_days: string[];
16
16
  start_time: string;
17
17
  habit_time: HabitTime;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './user';
2
- export * from './user-stat';
2
+ export * from './user-topic';
3
3
  export * from './frontend-user';
4
4
  export * from './habit';
package/dist/index.js CHANGED
@@ -15,6 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./user"), exports);
18
- __exportStar(require("./user-stat"), exports);
18
+ __exportStar(require("./user-topic"), exports);
19
19
  __exportStar(require("./frontend-user"), exports);
20
20
  __exportStar(require("./habit"), exports);
@@ -0,0 +1,13 @@
1
+ export type TopicType = 'Calmness' | 'Diet' | 'Exercise' | 'Productivity' | 'Public speaking' | 'Sleep' | 'Custom';
2
+ export interface BaseUserTopic {
3
+ user_id: number;
4
+ type: TopicType;
5
+ initial_score: number;
6
+ current_score: number;
7
+ potential_score: number;
8
+ }
9
+ export interface DbUserTopic extends BaseUserTopic {
10
+ id: number;
11
+ created_at: string;
12
+ updated_at: string;
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hy-capital/api-habit-tracker-types",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  import {DbUser} from './user';
2
- import {DbUserStat} from './user-stat';
2
+ import {DbUserTopic} from './user-topic';
3
3
 
4
4
  export interface FrontendUser {
5
5
  user: DbUser;
6
- user_stats: DbUserStat[];
6
+ user_topics: DbUserTopic[];
7
7
  }
package/src/habit.ts CHANGED
@@ -1,4 +1,4 @@
1
- import {StatType} from './user-stat';
1
+ import {TopicType} from './user-topic';
2
2
 
3
3
  export type HabitTime = 'Morning' | 'Afternoon' | 'Evening' | 'Anytime';
4
4
  export type HabitDifficulty = 1 | 2 | 3;
@@ -6,7 +6,7 @@ export type HabitDifficulty = 1 | 2 | 3;
6
6
  export interface HabitType {
7
7
  name: string;
8
8
  habitTime: HabitTime;
9
- statType: StatType;
9
+ topicType: TopicType;
10
10
  difficulty: HabitDifficulty;
11
11
  description: string;
12
12
  }
@@ -14,7 +14,7 @@ export interface HabitType {
14
14
  export interface BaseHabit {
15
15
  user_id: number;
16
16
  name: string;
17
- stat_type: StatType;
17
+ topic_type: TopicType;
18
18
  done_days: string[];
19
19
  start_time: string;
20
20
  habit_time: HabitTime;
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './user';
2
- export * from './user-stat';
2
+ export * from './user-topic';
3
3
  export * from './frontend-user';
4
4
  export * from './habit';
@@ -1,15 +1,15 @@
1
- export type StatType =
2
- 'Calmness' | 'Diet' | 'Exercise' | 'Productivity' | 'Public speaking' | 'Sleep';
1
+ export type TopicType =
2
+ 'Calmness' | 'Diet' | 'Exercise' | 'Productivity' | 'Public speaking' | 'Sleep' | 'Custom';
3
3
 
4
- export interface BaseUserStat {
4
+ export interface BaseUserTopic {
5
5
  user_id: number;
6
- type: StatType;
6
+ type: TopicType;
7
7
  initial_score: number;
8
8
  current_score: number;
9
9
  potential_score: number;
10
10
  }
11
11
 
12
- export interface DbUserStat extends BaseUserStat {
12
+ export interface DbUserTopic extends BaseUserTopic {
13
13
  id: number;
14
14
  created_at: string;
15
15
  updated_at: string;
@@ -1,13 +0,0 @@
1
- export type StatType = 'Calmness' | 'Diet' | 'Exercise' | 'Productivity' | 'Public speaking' | 'Sleep';
2
- export interface BaseUserStat {
3
- user_id: number;
4
- type: StatType;
5
- initial_score: number;
6
- current_score: number;
7
- potential_score: number;
8
- }
9
- export interface DbUserStat extends BaseUserStat {
10
- id: number;
11
- created_at: string;
12
- updated_at: string;
13
- }
File without changes