@hy-capital/api-habit-tracker-types 1.0.44 → 1.0.46
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 +0 -2
- package/dist/habit.d.ts +1 -0
- package/dist/habit.js +23 -1
- package/dist/user-topic.d.ts +1 -1
- package/package.json +1 -1
- package/src/frontend-user.ts +0 -2
- package/src/habit.ts +25 -2
- package/src/user-topic.ts +1 -2
- package/dist/user-rating.d.ts +0 -14
- package/dist/user-rating.js +0 -2
- package/src/user-rating.ts +0 -17
package/dist/frontend-user.d.ts
CHANGED
package/dist/habit.d.ts
CHANGED
@@ -7,6 +7,7 @@ export declare const allHabitDays: HabitDay[];
|
|
7
7
|
export declare const habitDateFormat = "DD-MM-YYYY";
|
8
8
|
export declare const habitDayToNumberMappings: Record<HabitDay, number>;
|
9
9
|
export declare const numberToHabitDayMappings: Record<number, HabitDay>;
|
10
|
+
export declare const ProgramObjectivesByTopic: Record<TopicType, string[]>;
|
10
11
|
export interface HabitType {
|
11
12
|
name: string;
|
12
13
|
habitTime: HabitTime;
|
package/dist/habit.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.numberToHabitDayMappings = exports.habitDayToNumberMappings = exports.habitDateFormat = exports.allHabitDays = void 0;
|
3
|
+
exports.ProgramObjectivesByTopic = exports.numberToHabitDayMappings = exports.habitDayToNumberMappings = exports.habitDateFormat = exports.allHabitDays = void 0;
|
4
4
|
exports.allHabitDays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
|
5
5
|
exports.habitDateFormat = 'DD-MM-YYYY';
|
6
6
|
exports.habitDayToNumberMappings = {
|
@@ -21,3 +21,25 @@ exports.numberToHabitDayMappings = {
|
|
21
21
|
6: 'Saturday',
|
22
22
|
0: 'Sunday'
|
23
23
|
};
|
24
|
+
exports.ProgramObjectivesByTopic = {
|
25
|
+
Dating: [
|
26
|
+
'Attraction',
|
27
|
+
'Confidence',
|
28
|
+
'Charisma'
|
29
|
+
],
|
30
|
+
Sleep: [
|
31
|
+
'Discipline',
|
32
|
+
'Peace',
|
33
|
+
'Energy'
|
34
|
+
],
|
35
|
+
Fitness: [
|
36
|
+
'Strength',
|
37
|
+
'Discipline',
|
38
|
+
'Aesthetics'
|
39
|
+
],
|
40
|
+
'Side Hustle': [
|
41
|
+
'Focus',
|
42
|
+
'Marketing',
|
43
|
+
'Revenue'
|
44
|
+
]
|
45
|
+
};
|
package/dist/user-topic.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export type TopicType = '
|
1
|
+
export type TopicType = 'Side Hustle' | 'Dating' | 'Fitness' | 'Sleep';
|
package/package.json
CHANGED
package/src/frontend-user.ts
CHANGED
package/src/habit.ts
CHANGED
@@ -28,6 +28,29 @@ export const numberToHabitDayMappings: Record<number, HabitDay> = {
|
|
28
28
|
0: 'Sunday'
|
29
29
|
};
|
30
30
|
|
31
|
+
export const ProgramObjectivesByTopic: Record<TopicType, string[]> = {
|
32
|
+
Dating: [
|
33
|
+
'Attraction',
|
34
|
+
'Confidence',
|
35
|
+
'Charisma'
|
36
|
+
],
|
37
|
+
Sleep: [
|
38
|
+
'Discipline',
|
39
|
+
'Peace',
|
40
|
+
'Energy'
|
41
|
+
],
|
42
|
+
Fitness: [
|
43
|
+
'Strength',
|
44
|
+
'Discipline',
|
45
|
+
'Aesthetics'
|
46
|
+
],
|
47
|
+
'Side Hustle': [
|
48
|
+
'Focus',
|
49
|
+
'Marketing',
|
50
|
+
'Revenue'
|
51
|
+
]
|
52
|
+
};
|
53
|
+
|
31
54
|
export interface HabitType {
|
32
55
|
name: string;
|
33
56
|
habitTime: HabitTime;
|
@@ -51,9 +74,9 @@ export interface BaseHabit {
|
|
51
74
|
remind_me: boolean;
|
52
75
|
remind_me_at_times: RemindMeAtTime[]; // these are shown in FO
|
53
76
|
notifications: Notification[]; // these are Local notification times
|
54
|
-
frequency: HabitFrequency;
|
77
|
+
frequency: HabitFrequency; //TODO: keep only daily
|
55
78
|
habit_days: HabitDay[];
|
56
|
-
habit_dates: number[];
|
79
|
+
habit_dates: number[]; //TODO: remove
|
57
80
|
}
|
58
81
|
|
59
82
|
export interface RemindMeAtTime {
|
package/src/user-topic.ts
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
export type TopicType =
|
2
|
-
'Calmness' | 'Diet' | 'Exercise' | 'Productivity' | 'Public speaking' | 'Sleep' | 'Custom';
|
1
|
+
export type TopicType = 'Side Hustle' | 'Dating' | 'Fitness' | 'Sleep';
|
package/dist/user-rating.d.ts
DELETED
@@ -1,14 +0,0 @@
|
|
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-rating.js
DELETED
package/src/user-rating.ts
DELETED
@@ -1,17 +0,0 @@
|
|
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
|
-
}
|