@hy-capital/api-habit-tracker-types 1.0.37 → 1.0.39
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/frontend-user.d.ts +2 -2
- package/dist/user-rating.d.ts +14 -0
- package/dist/user-rating.js +2 -0
- package/dist/user-topic.d.ts +0 -12
- package/package.json +1 -1
- package/src/frontend-user.ts +2 -2
- package/src/user-rating.ts +17 -0
- package/src/user-topic.ts +0 -14
package/dist/frontend-user.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { DbUser } from './user';
|
2
|
-
import { DbUserTopic } from './user-topic';
|
3
2
|
import { DbHabit } from './habit';
|
3
|
+
import { DbUserRating } from './user-rating';
|
4
4
|
export interface FrontendUser {
|
5
5
|
user: DbUser;
|
6
|
-
|
6
|
+
user_rating: DbUserRating | null;
|
7
7
|
}
|
8
8
|
export interface UserStats {
|
9
9
|
hasBeenMemberForDays: number;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export interface BaseUserRating {
|
2
|
+
user_id: number;
|
3
|
+
initial_rating: number;
|
4
|
+
current_rating: number;
|
5
|
+
potential_rating: number;
|
6
|
+
}
|
7
|
+
export type InputUserRating = Omit<DbUserRating, 'id' | 'created_at' | 'updated_at'>;
|
8
|
+
export type CreateUserRatingRequest = BaseUserRating;
|
9
|
+
export type UpdateUserRatingRequest = Partial<BaseUserRating>;
|
10
|
+
export interface DbUserRating extends BaseUserRating {
|
11
|
+
id: number;
|
12
|
+
created_at: string;
|
13
|
+
updated_at: string;
|
14
|
+
}
|
package/dist/user-topic.d.ts
CHANGED
@@ -1,13 +1 @@
|
|
1
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
package/src/frontend-user.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
import {DbUser} from './user';
|
2
|
-
import {DbUserTopic} from './user-topic';
|
3
2
|
import {DbHabit} from './habit';
|
3
|
+
import {DbUserRating} from './user-rating';
|
4
4
|
|
5
5
|
export interface FrontendUser {
|
6
6
|
user: DbUser;
|
7
|
-
|
7
|
+
user_rating: DbUserRating | null;
|
8
8
|
// user_stats: UserStats;
|
9
9
|
}
|
10
10
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export interface BaseUserRating {
|
2
|
+
user_id: number;
|
3
|
+
initial_rating: number;
|
4
|
+
current_rating: number
|
5
|
+
potential_rating: number;
|
6
|
+
}
|
7
|
+
|
8
|
+
export type InputUserRating = Omit<DbUserRating, 'id' | 'created_at' | 'updated_at'>;
|
9
|
+
|
10
|
+
export type CreateUserRatingRequest = BaseUserRating;
|
11
|
+
export type UpdateUserRatingRequest = Partial<BaseUserRating>;
|
12
|
+
|
13
|
+
export interface DbUserRating extends BaseUserRating {
|
14
|
+
id: number;
|
15
|
+
created_at: string;
|
16
|
+
updated_at: string;
|
17
|
+
}
|
package/src/user-topic.ts
CHANGED
@@ -1,16 +1,2 @@
|
|
1
1
|
export type TopicType =
|
2
2
|
'Calmness' | 'Diet' | 'Exercise' | 'Productivity' | 'Public speaking' | 'Sleep' | 'Custom';
|
3
|
-
|
4
|
-
export interface BaseUserTopic {
|
5
|
-
user_id: number;
|
6
|
-
type: TopicType;
|
7
|
-
initial_score: number;
|
8
|
-
current_score: number;
|
9
|
-
potential_score: number;
|
10
|
-
}
|
11
|
-
|
12
|
-
export interface DbUserTopic extends BaseUserTopic {
|
13
|
-
id: number;
|
14
|
-
created_at: string;
|
15
|
-
updated_at: string;
|
16
|
-
}
|