@hy-capital/api-habit-tracker-types 1.0.54 → 1.0.56
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 +5 -0
- package/dist/habit.js +0 -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 +7 -1
- 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,11 @@ 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';
|
41
46
|
export interface RemindMeAtTime {
|
42
47
|
hour: number;
|
43
48
|
minute: number;
|
package/dist/habit.js
CHANGED
@@ -73,7 +73,6 @@ exports.habitTypesByTopicType = {
|
|
73
73
|
frequency: 'Daily',
|
74
74
|
minDaysPerWeek: 5,
|
75
75
|
possibleNotificationDescriptions: [
|
76
|
-
'Still up? Sleep now, your future self will thank you.',
|
77
76
|
'Still haven’t talked to anyone new? Your dating life won’t improve itself.',
|
78
77
|
'Another day, no balls to chat. Enjoy being alone forever.',
|
79
78
|
'Your social skills suck. Talk to a person or stay a useless reject.',
|
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,13 @@ 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
|
+
|
86
93
|
export interface RemindMeAtTime {
|
87
94
|
hour: number;
|
88
95
|
minute: number;
|
@@ -161,7 +168,6 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
161
168
|
frequency: 'Daily',
|
162
169
|
minDaysPerWeek: 5,
|
163
170
|
possibleNotificationDescriptions: [
|
164
|
-
'Still up? Sleep now, your future self will thank you.',
|
165
171
|
'Still haven’t talked to anyone new? Your dating life won’t improve itself.',
|
166
172
|
'Another day, no balls to chat. Enjoy being alone forever.',
|
167
173
|
'Your social skills suck. Talk to a person or stay a useless reject.',
|
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';
|