@hy-capital/api-habit-tracker-types 1.0.13 → 1.0.16

Sign up to get free protection for your applications and to get access to all the features.
package/dist/habit.d.ts CHANGED
@@ -14,6 +14,9 @@ export interface BaseHabit {
14
14
  stat_type: StatType;
15
15
  done_days: string[];
16
16
  start_time: string;
17
+ habit_time: HabitTime;
18
+ difficulty: HabitDifficulty;
19
+ description: string;
17
20
  }
18
21
  export interface DbHabit extends BaseHabit {
19
22
  id: number;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './user';
2
2
  export * from './user-stat';
3
3
  export * from './frontend-user';
4
- export * from './constant';
5
4
  export * from './habit';
package/dist/index.js CHANGED
@@ -17,5 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./user"), exports);
18
18
  __exportStar(require("./user-stat"), exports);
19
19
  __exportStar(require("./frontend-user"), exports);
20
- __exportStar(require("./constant"), exports);
21
20
  __exportStar(require("./habit"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hy-capital/api-habit-tracker-types",
3
- "version": "1.0.13",
3
+ "version": "1.0.16",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "types": "dist/index.d.ts",
package/src/habit.ts CHANGED
@@ -16,7 +16,10 @@ export interface BaseHabit {
16
16
  name: string;
17
17
  stat_type: StatType;
18
18
  done_days: string[];
19
- start_time: string
19
+ start_time: string;
20
+ habit_time: HabitTime;
21
+ difficulty: HabitDifficulty;
22
+ description: string;
20
23
  // inspo:
21
24
  // after_i_do_something
22
25
  // remind_me_at_time
package/src/index.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './user';
2
2
  export * from './user-stat';
3
3
  export * from './frontend-user';
4
- export * from './constant';
5
4
  export * from './habit';
@@ -1,3 +0,0 @@
1
- import { StatType } from './user-stat';
2
- import { HabitType } from './habit';
3
- export declare const habitTypesByStatType: Record<StatType, HabitType[]>;
package/dist/constant.js DELETED
@@ -1,262 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.habitTypesByStatType = void 0;
4
- exports.habitTypesByStatType = {
5
- 'Calmness': [
6
- {
7
- name: 'Daily meditation',
8
- description: 'Practice mindfulness meditation for 10-15 minutes daily',
9
- difficulty: 2,
10
- statType: 'Calmness',
11
- habitTime: 'Morning'
12
- },
13
- {
14
- name: 'Deep breathing exercises',
15
- description: 'Engage in deep breathing exercises to reduce stress and promote relaxation',
16
- difficulty: 1,
17
- statType: 'Calmness',
18
- habitTime: 'Anytime'
19
- },
20
- {
21
- name: 'Digital detox',
22
- description: 'Take a break from digital devices for 1 hour daily',
23
- difficulty: 2,
24
- statType: 'Calmness',
25
- habitTime: 'Evening'
26
- },
27
- {
28
- name: 'Journaling',
29
- description: 'Write down thoughts and feelings to gain clarity and reduce anxiety',
30
- difficulty: 1,
31
- statType: 'Calmness',
32
- habitTime: 'Evening'
33
- }
34
- ],
35
- 'Diet': [
36
- {
37
- name: 'Eat a healthy breakfast',
38
- description: 'Include fruits, whole grains, and protein in your morning meal',
39
- difficulty: 1,
40
- statType: 'Diet',
41
- habitTime: 'Morning'
42
- },
43
- {
44
- name: 'Meal prep',
45
- description: 'Plan and prepare meals for the week to ensure balanced nutrition',
46
- difficulty: 2,
47
- statType: 'Diet',
48
- habitTime: 'Anytime'
49
- },
50
- {
51
- name: 'Hydration habit',
52
- description: 'Drink a glass of water first thing in the morning',
53
- difficulty: 1,
54
- statType: 'Diet',
55
- habitTime: 'Morning'
56
- },
57
- {
58
- name: 'Reduce sugar intake',
59
- description: 'Limit sugary snacks and beverages',
60
- difficulty: 2,
61
- statType: 'Diet',
62
- habitTime: 'Anytime'
63
- }
64
- ],
65
- 'Exercise': [
66
- {
67
- name: 'Daily walk',
68
- description: 'Go for a 30-minute brisk walk every day',
69
- difficulty: 2,
70
- statType: 'Exercise',
71
- habitTime: 'Morning'
72
- },
73
- {
74
- name: 'Stretching routine',
75
- description: 'Perform a 10-minute stretching routine to improve flexibility',
76
- difficulty: 1,
77
- statType: 'Exercise',
78
- habitTime: 'Evening'
79
- },
80
- {
81
- name: 'Strength training',
82
- description: 'Do strength training exercises 2-3 times per week',
83
- difficulty: 3,
84
- statType: 'Exercise',
85
- habitTime: 'Morning'
86
- },
87
- {
88
- name: 'Active breaks',
89
- description: 'Take 5-minute active breaks every hour during work',
90
- difficulty: 1,
91
- statType: 'Exercise',
92
- habitTime: 'Anytime'
93
- }
94
- ],
95
- 'Productivity': [
96
- {
97
- name: 'Prioritize tasks',
98
- description: 'Write a to-do list and rank tasks by priority',
99
- difficulty: 1,
100
- statType: 'Productivity',
101
- habitTime: 'Morning'
102
- },
103
- {
104
- name: 'Pomodoro technique',
105
- description: 'Work in focused 25-minute intervals followed by short breaks',
106
- difficulty: 2,
107
- statType: 'Productivity',
108
- habitTime: 'Anytime'
109
- },
110
- {
111
- name: 'Declutter workspace',
112
- description: 'Spend 5 minutes tidying up your workspace daily',
113
- difficulty: 1,
114
- statType: 'Productivity',
115
- habitTime: 'Evening'
116
- },
117
- {
118
- name: 'Limit multitasking',
119
- description: 'Focus on one task at a time for better efficiency',
120
- difficulty: 2,
121
- statType: 'Productivity',
122
- habitTime: 'Anytime'
123
- }
124
- ],
125
- 'Public speaking': [
126
- {
127
- name: 'Practice speeches',
128
- description: 'Spend 10 minutes daily practicing a prepared speech',
129
- difficulty: 2,
130
- statType: 'Public speaking',
131
- habitTime: 'Morning'
132
- },
133
- {
134
- name: 'Mirror practice',
135
- description: 'Practice speaking in front of a mirror to improve confidence',
136
- difficulty: 1,
137
- statType: 'Public speaking',
138
- habitTime: 'Evening'
139
- },
140
- {
141
- name: 'Record and review',
142
- description: 'Record yourself speaking and review for areas of improvement',
143
- difficulty: 2,
144
- statType: 'Public speaking',
145
- habitTime: 'Anytime'
146
- },
147
- {
148
- name: 'Learn storytelling',
149
- description: 'Read about storytelling techniques to make presentations engaging',
150
- difficulty: 1,
151
- statType: 'Public speaking',
152
- habitTime: 'Anytime'
153
- }
154
- ],
155
- 'Sleep': [
156
- {
157
- name: 'No screens before bed',
158
- description: 'Avoid phones, tablets, and computers 1-2 hours before bedtime to reduce blue light exposure',
159
- difficulty: 3,
160
- statType: 'Sleep',
161
- habitTime: 'Evening'
162
- },
163
- {
164
- name: 'Consistent sleep schedule',
165
- description: 'Go to bed and wake up at the same time every day, even on weekends',
166
- difficulty: 2,
167
- statType: 'Sleep',
168
- habitTime: 'Evening'
169
- },
170
- {
171
- name: 'Dark bedroom environment',
172
- description: 'Use blackout curtains or an eye mask to create complete darkness',
173
- difficulty: 1,
174
- statType: 'Sleep',
175
- habitTime: 'Evening'
176
- },
177
- {
178
- name: 'Cool room temperature',
179
- description: 'Maintain bedroom temperature between 60-67°F (15-19°C)',
180
- difficulty: 1,
181
- statType: 'Sleep',
182
- habitTime: 'Evening'
183
- },
184
- {
185
- name: 'No caffeine after 2pm',
186
- description: 'Avoid coffee, tea, and other caffeinated beverages in the afternoon',
187
- difficulty: 2,
188
- statType: 'Sleep',
189
- habitTime: 'Evening'
190
- },
191
- {
192
- name: 'No large meals before bed',
193
- description: 'Avoid heavy meals within 3 hours of bedtime',
194
- difficulty: 2,
195
- statType: 'Sleep',
196
- habitTime: 'Evening'
197
- },
198
- {
199
- name: 'Regular exercise',
200
- description: 'Exercise regularly but not within 2 hours of bedtime',
201
- difficulty: 2,
202
- statType: 'Sleep',
203
- habitTime: 'Evening'
204
- },
205
- {
206
- name: 'Relaxation routine',
207
- description: 'Practice relaxation techniques like deep breathing, meditation, or gentle stretching',
208
- difficulty: 1,
209
- statType: 'Sleep',
210
- habitTime: 'Evening'
211
- },
212
- {
213
- name: 'Comfortable bedding',
214
- description: 'Use comfortable, breathable bedding and a supportive mattress/pillow',
215
- difficulty: 1,
216
- statType: 'Sleep',
217
- habitTime: 'Evening'
218
- },
219
- {
220
- name: 'White noise',
221
- description: 'Use a white noise machine or fan to mask disruptive sounds',
222
- difficulty: 1,
223
- statType: 'Sleep',
224
- habitTime: 'Evening'
225
- },
226
- {
227
- name: 'No alcohol before bed',
228
- description: 'Avoid alcohol within 4 hours of bedtime',
229
- difficulty: 2,
230
- statType: 'Sleep',
231
- habitTime: 'Evening'
232
- },
233
- {
234
- name: 'Sunlight exposure',
235
- description: 'Get natural sunlight during the day to regulate circadian rhythm',
236
- difficulty: 1,
237
- statType: 'Sleep',
238
- habitTime: 'Evening'
239
- },
240
- {
241
- name: 'Bedroom for sleep only',
242
- description: 'Use bedroom only for sleep and intimacy, not for work or entertainment',
243
- difficulty: 2,
244
- statType: 'Sleep',
245
- habitTime: 'Evening'
246
- },
247
- {
248
- name: 'No clock watching',
249
- description: 'Turn clock face away and avoid checking time during the night',
250
- difficulty: 2,
251
- statType: 'Sleep',
252
- habitTime: 'Evening'
253
- },
254
- {
255
- name: 'Relaxing bedtime reading',
256
- description: 'Read a physical book (not e-reader) with calm content before bed',
257
- difficulty: 1,
258
- statType: 'Sleep',
259
- habitTime: 'Evening'
260
- }
261
- ]
262
- };
package/src/constant.ts DELETED
@@ -1,262 +0,0 @@
1
- import {StatType} from './user-stat';
2
- import {HabitType} from './habit';
3
-
4
- export const habitTypesByStatType: Record<StatType, HabitType[]> = {
5
- 'Calmness': [
6
- {
7
- name: 'Daily meditation',
8
- description: 'Practice mindfulness meditation for 10-15 minutes daily',
9
- difficulty: 2,
10
- statType: 'Calmness',
11
- habitTime: 'Morning'
12
- },
13
- {
14
- name: 'Deep breathing exercises',
15
- description: 'Engage in deep breathing exercises to reduce stress and promote relaxation',
16
- difficulty: 1,
17
- statType: 'Calmness',
18
- habitTime: 'Anytime'
19
- },
20
- {
21
- name: 'Digital detox',
22
- description: 'Take a break from digital devices for 1 hour daily',
23
- difficulty: 2,
24
- statType: 'Calmness',
25
- habitTime: 'Evening'
26
- },
27
- {
28
- name: 'Journaling',
29
- description: 'Write down thoughts and feelings to gain clarity and reduce anxiety',
30
- difficulty: 1,
31
- statType: 'Calmness',
32
- habitTime: 'Evening'
33
- }
34
- ],
35
- 'Diet': [
36
- {
37
- name: 'Eat a healthy breakfast',
38
- description: 'Include fruits, whole grains, and protein in your morning meal',
39
- difficulty: 1,
40
- statType: 'Diet',
41
- habitTime: 'Morning'
42
- },
43
- {
44
- name: 'Meal prep',
45
- description: 'Plan and prepare meals for the week to ensure balanced nutrition',
46
- difficulty: 2,
47
- statType: 'Diet',
48
- habitTime: 'Anytime'
49
- },
50
- {
51
- name: 'Hydration habit',
52
- description: 'Drink a glass of water first thing in the morning',
53
- difficulty: 1,
54
- statType: 'Diet',
55
- habitTime: 'Morning'
56
- },
57
- {
58
- name: 'Reduce sugar intake',
59
- description: 'Limit sugary snacks and beverages',
60
- difficulty: 2,
61
- statType: 'Diet',
62
- habitTime: 'Anytime'
63
- }
64
- ],
65
- 'Exercise': [
66
- {
67
- name: 'Daily walk',
68
- description: 'Go for a 30-minute brisk walk every day',
69
- difficulty: 2,
70
- statType: 'Exercise',
71
- habitTime: 'Morning'
72
- },
73
- {
74
- name: 'Stretching routine',
75
- description: 'Perform a 10-minute stretching routine to improve flexibility',
76
- difficulty: 1,
77
- statType: 'Exercise',
78
- habitTime: 'Evening'
79
- },
80
- {
81
- name: 'Strength training',
82
- description: 'Do strength training exercises 2-3 times per week',
83
- difficulty: 3,
84
- statType: 'Exercise',
85
- habitTime: 'Morning'
86
- },
87
- {
88
- name: 'Active breaks',
89
- description: 'Take 5-minute active breaks every hour during work',
90
- difficulty: 1,
91
- statType: 'Exercise',
92
- habitTime: 'Anytime'
93
- }
94
- ],
95
- 'Productivity': [
96
- {
97
- name: 'Prioritize tasks',
98
- description: 'Write a to-do list and rank tasks by priority',
99
- difficulty: 1,
100
- statType: 'Productivity',
101
- habitTime: 'Morning'
102
- },
103
- {
104
- name: 'Pomodoro technique',
105
- description: 'Work in focused 25-minute intervals followed by short breaks',
106
- difficulty: 2,
107
- statType: 'Productivity',
108
- habitTime: 'Anytime'
109
- },
110
- {
111
- name: 'Declutter workspace',
112
- description: 'Spend 5 minutes tidying up your workspace daily',
113
- difficulty: 1,
114
- statType: 'Productivity',
115
- habitTime: 'Evening'
116
- },
117
- {
118
- name: 'Limit multitasking',
119
- description: 'Focus on one task at a time for better efficiency',
120
- difficulty: 2,
121
- statType: 'Productivity',
122
- habitTime: 'Anytime'
123
- }
124
- ],
125
- 'Public speaking': [
126
- {
127
- name: 'Practice speeches',
128
- description: 'Spend 10 minutes daily practicing a prepared speech',
129
- difficulty: 2,
130
- statType: 'Public speaking',
131
- habitTime: 'Morning'
132
- },
133
- {
134
- name: 'Mirror practice',
135
- description: 'Practice speaking in front of a mirror to improve confidence',
136
- difficulty: 1,
137
- statType: 'Public speaking',
138
- habitTime: 'Evening'
139
- },
140
- {
141
- name: 'Record and review',
142
- description: 'Record yourself speaking and review for areas of improvement',
143
- difficulty: 2,
144
- statType: 'Public speaking',
145
- habitTime: 'Anytime'
146
- },
147
- {
148
- name: 'Learn storytelling',
149
- description: 'Read about storytelling techniques to make presentations engaging',
150
- difficulty: 1,
151
- statType: 'Public speaking',
152
- habitTime: 'Anytime'
153
- }
154
- ],
155
- 'Sleep': [
156
- {
157
- name: 'No screens before bed',
158
- description: 'Avoid phones, tablets, and computers 1-2 hours before bedtime to reduce blue light exposure',
159
- difficulty: 3,
160
- statType: 'Sleep',
161
- habitTime: 'Evening'
162
- },
163
- {
164
- name: 'Consistent sleep schedule',
165
- description: 'Go to bed and wake up at the same time every day, even on weekends',
166
- difficulty: 2,
167
- statType: 'Sleep',
168
- habitTime: 'Evening'
169
- },
170
- {
171
- name: 'Dark bedroom environment',
172
- description: 'Use blackout curtains or an eye mask to create complete darkness',
173
- difficulty: 1,
174
- statType: 'Sleep',
175
- habitTime: 'Evening'
176
- },
177
- {
178
- name: 'Cool room temperature',
179
- description: 'Maintain bedroom temperature between 60-67°F (15-19°C)',
180
- difficulty: 1,
181
- statType: 'Sleep',
182
- habitTime: 'Evening'
183
- },
184
- {
185
- name: 'No caffeine after 2pm',
186
- description: 'Avoid coffee, tea, and other caffeinated beverages in the afternoon',
187
- difficulty: 2,
188
- statType: 'Sleep',
189
- habitTime: 'Evening'
190
- },
191
- {
192
- name: 'No large meals before bed',
193
- description: 'Avoid heavy meals within 3 hours of bedtime',
194
- difficulty: 2,
195
- statType: 'Sleep',
196
- habitTime: 'Evening'
197
- },
198
- {
199
- name: 'Regular exercise',
200
- description: 'Exercise regularly but not within 2 hours of bedtime',
201
- difficulty: 2,
202
- statType: 'Sleep',
203
- habitTime: 'Evening'
204
- },
205
- {
206
- name: 'Relaxation routine',
207
- description: 'Practice relaxation techniques like deep breathing, meditation, or gentle stretching',
208
- difficulty: 1,
209
- statType: 'Sleep',
210
- habitTime: 'Evening'
211
- },
212
- {
213
- name: 'Comfortable bedding',
214
- description: 'Use comfortable, breathable bedding and a supportive mattress/pillow',
215
- difficulty: 1,
216
- statType: 'Sleep',
217
- habitTime: 'Evening'
218
- },
219
- {
220
- name: 'White noise',
221
- description: 'Use a white noise machine or fan to mask disruptive sounds',
222
- difficulty: 1,
223
- statType: 'Sleep',
224
- habitTime: 'Evening'
225
- },
226
- {
227
- name: 'No alcohol before bed',
228
- description: 'Avoid alcohol within 4 hours of bedtime',
229
- difficulty: 2,
230
- statType: 'Sleep',
231
- habitTime: 'Evening'
232
- },
233
- {
234
- name: 'Sunlight exposure',
235
- description: 'Get natural sunlight during the day to regulate circadian rhythm',
236
- difficulty: 1,
237
- statType: 'Sleep',
238
- habitTime: 'Evening'
239
- },
240
- {
241
- name: 'Bedroom for sleep only',
242
- description: 'Use bedroom only for sleep and intimacy, not for work or entertainment',
243
- difficulty: 2,
244
- statType: 'Sleep',
245
- habitTime: 'Evening'
246
- },
247
- {
248
- name: 'No clock watching',
249
- description: 'Turn clock face away and avoid checking time during the night',
250
- difficulty: 2,
251
- statType: 'Sleep',
252
- habitTime: 'Evening'
253
- },
254
- {
255
- name: 'Relaxing bedtime reading',
256
- description: 'Read a physical book (not e-reader) with calm content before bed',
257
- difficulty: 1,
258
- statType: 'Sleep',
259
- habitTime: 'Evening'
260
- }
261
- ]
262
- };