@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.
@@ -1,4 +1,6 @@
1
1
  import { DbUser } from './user';
2
+ import { DbUserXp } from './user-xp';
2
3
  export interface FrontendUser {
3
4
  user: DbUser;
5
+ userXps: DbUserXp[];
4
6
  }
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.',
@@ -1 +1,2 @@
1
1
  export type TopicType = 'Side Hustle' | 'Dating' | 'Fitness' | 'Sleep';
2
+ export declare const availableTopicTypes: TopicType[];
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.availableTopicTypes = void 0;
4
+ exports.availableTopicTypes = ['Side Hustle', 'Dating', 'Fitness', 'Sleep'];
@@ -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'>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hy-capital/api-habit-tracker-types",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "types": "dist/index.d.ts",
@@ -1,5 +1,7 @@
1
1
  import {DbUser} from './user';
2
+ import {DbUserXp} from './user-xp';
2
3
 
3
4
  export interface FrontendUser {
4
5
  user: DbUser;
6
+ userXps: DbUserXp[];
5
7
  }
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
@@ -1 +1,3 @@
1
- export type TopicType = 'Side Hustle' | 'Dating' | 'Fitness' | 'Sleep';
1
+ export type TopicType = 'Side Hustle' | 'Dating' | 'Fitness' | 'Sleep';
2
+
3
+ export const availableTopicTypes: TopicType[] = ['Side Hustle', 'Dating', 'Fitness', 'Sleep'];
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';