@hy-capital/api-habit-tracker-types 1.0.55 → 1.0.57
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 -0
- package/dist/habit.d.ts +7 -0
- package/dist/habit.js +3 -1
- package/dist/user-topic.d.ts +1 -0
- package/dist/user-topic.js +2 -0
- package/dist/user-xp.d.ts +12 -0
- package/dist/user-xp.js +2 -0
- package/dist/user.d.ts +3 -0
- package/package.json +1 -1
- package/src/frontend-user.ts +2 -0
- package/src/habit.ts +10 -0
- package/src/user-topic.ts +3 -1
- package/src/user-xp.ts +15 -0
- package/src/user.ts +5 -1
package/dist/frontend-user.d.ts
CHANGED
package/dist/habit.d.ts
CHANGED
@@ -38,6 +38,13 @@ export interface BaseHabit {
|
|
38
38
|
possible_notification_descriptions: string[];
|
39
39
|
min_days_per_week: number;
|
40
40
|
}
|
41
|
+
export interface PatchHabitRequest {
|
42
|
+
partialHabit: Partial<BaseHabit>;
|
43
|
+
habitAction?: HabitAction;
|
44
|
+
}
|
45
|
+
export type HabitAction = 'To Done' | 'To Todo';
|
46
|
+
export declare const XP_INCREMENT_AMOUNT = 10;
|
47
|
+
export declare const XP_DECREMENT_AMOUNT = -7;
|
41
48
|
export interface RemindMeAtTime {
|
42
49
|
hour: number;
|
43
50
|
minute: number;
|
package/dist/habit.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.habitTypesByTopicType = exports.habitTimeToClockTime = exports.ProgramObjectivesByTopic = exports.numberToHabitDayMappings = exports.habitDayToNumberMappings = exports.habitDateFormat = exports.allHabitDays = void 0;
|
3
|
+
exports.habitTypesByTopicType = exports.habitTimeToClockTime = exports.XP_DECREMENT_AMOUNT = exports.XP_INCREMENT_AMOUNT = 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 = {
|
@@ -43,6 +43,8 @@ exports.ProgramObjectivesByTopic = {
|
|
43
43
|
'Revenue'
|
44
44
|
]
|
45
45
|
};
|
46
|
+
exports.XP_INCREMENT_AMOUNT = 10;
|
47
|
+
exports.XP_DECREMENT_AMOUNT = -7;
|
46
48
|
exports.habitTimeToClockTime = {
|
47
49
|
Morning: {
|
48
50
|
hour: 9,
|
package/dist/user-topic.d.ts
CHANGED
package/dist/user-topic.js
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
import { TopicType } from './user-topic';
|
2
|
+
export interface BaseUserXp {
|
3
|
+
user_id: number;
|
4
|
+
topic_type: TopicType;
|
5
|
+
score: number;
|
6
|
+
}
|
7
|
+
export interface DbUserXp extends BaseUserXp {
|
8
|
+
id: number;
|
9
|
+
created_at: string;
|
10
|
+
updated_at: string;
|
11
|
+
}
|
12
|
+
export type InputUserXp = Pick<DbUserXp, 'user_id' | 'topic_type' | 'score'>;
|
package/dist/user-xp.js
ADDED
package/dist/user.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import { TopicType } from './user-topic';
|
1
2
|
export interface DbUser {
|
2
3
|
id: number;
|
3
4
|
name: string | null;
|
@@ -7,6 +8,7 @@ export interface DbUser {
|
|
7
8
|
timezone: string;
|
8
9
|
expo_push_token: string;
|
9
10
|
daily_progress_notification: string | null;
|
11
|
+
selected_topic_type: TopicType | null;
|
10
12
|
created_at: string;
|
11
13
|
updated_at: string;
|
12
14
|
}
|
@@ -20,5 +22,6 @@ export interface UpdateUserRequest {
|
|
20
22
|
is_onboarding_done?: boolean;
|
21
23
|
expo_push_token?: string;
|
22
24
|
daily_progress_notification?: string;
|
25
|
+
selected_topic_type?: string;
|
23
26
|
}
|
24
27
|
export declare const defaultDailyProgressNotificationTime = "20:10";
|
package/package.json
CHANGED
package/src/frontend-user.ts
CHANGED
package/src/habit.ts
CHANGED
@@ -83,6 +83,16 @@ export interface BaseHabit {
|
|
83
83
|
min_days_per_week: number;
|
84
84
|
}
|
85
85
|
|
86
|
+
export interface PatchHabitRequest {
|
87
|
+
partialHabit: Partial<BaseHabit>;
|
88
|
+
habitAction?: HabitAction;
|
89
|
+
}
|
90
|
+
|
91
|
+
export type HabitAction = 'To Done' | 'To Todo';
|
92
|
+
|
93
|
+
export const XP_INCREMENT_AMOUNT = 10;
|
94
|
+
export const XP_DECREMENT_AMOUNT = -7;
|
95
|
+
|
86
96
|
export interface RemindMeAtTime {
|
87
97
|
hour: number;
|
88
98
|
minute: number;
|
package/src/user-topic.ts
CHANGED
package/src/user-xp.ts
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
import {TopicType} from './user-topic';
|
2
|
+
|
3
|
+
export interface BaseUserXp {
|
4
|
+
user_id: number;
|
5
|
+
topic_type: TopicType;
|
6
|
+
score: number;
|
7
|
+
}
|
8
|
+
|
9
|
+
export interface DbUserXp extends BaseUserXp {
|
10
|
+
id: number;
|
11
|
+
created_at: string
|
12
|
+
updated_at: string
|
13
|
+
}
|
14
|
+
|
15
|
+
export type InputUserXp = Pick<DbUserXp, 'user_id' | 'topic_type' | 'score'>;
|
package/src/user.ts
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
import {TopicType} from './user-topic';
|
2
|
+
|
1
3
|
export interface DbUser {
|
2
4
|
id: number;
|
3
5
|
name: string | null;
|
@@ -6,7 +8,8 @@ export interface DbUser {
|
|
6
8
|
is_onboarding_done: boolean;
|
7
9
|
timezone: string;
|
8
10
|
expo_push_token: string;
|
9
|
-
daily_progress_notification: string | null
|
11
|
+
daily_progress_notification: string | null;
|
12
|
+
selected_topic_type: TopicType | null;
|
10
13
|
created_at: string;
|
11
14
|
updated_at: string;
|
12
15
|
}
|
@@ -23,6 +26,7 @@ export interface UpdateUserRequest {
|
|
23
26
|
is_onboarding_done?: boolean;
|
24
27
|
expo_push_token?: string;
|
25
28
|
daily_progress_notification?: string;
|
29
|
+
selected_topic_type?: string;
|
26
30
|
}
|
27
31
|
|
28
32
|
export const defaultDailyProgressNotificationTime = '20:10';
|