@hy-capital/api-habit-tracker-types 1.0.53 → 1.0.55
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/habit.d.ts +4 -0
- package/dist/habit.js +32 -15
- package/package.json +1 -1
- package/src/habit.ts +32 -14
package/dist/habit.d.ts
CHANGED
@@ -78,4 +78,8 @@ export interface HabitsResponse {
|
|
78
78
|
habits: DbHabit[];
|
79
79
|
stats: HabitStats;
|
80
80
|
}
|
81
|
+
export declare const habitTimeToClockTime: Record<HabitTime, {
|
82
|
+
hour: number;
|
83
|
+
minute: number;
|
84
|
+
}>;
|
81
85
|
export declare const habitTypesByTopicType: Record<TopicType, HabitType[]>;
|
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.ProgramObjectivesByTopic = exports.numberToHabitDayMappings = exports.habitDayToNumberMappings = exports.habitDateFormat = exports.allHabitDays = void 0;
|
3
|
+
exports.habitTypesByTopicType = exports.habitTimeToClockTime = 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,24 @@ exports.ProgramObjectivesByTopic = {
|
|
43
43
|
'Revenue'
|
44
44
|
]
|
45
45
|
};
|
46
|
+
exports.habitTimeToClockTime = {
|
47
|
+
Morning: {
|
48
|
+
hour: 9,
|
49
|
+
minute: 0
|
50
|
+
},
|
51
|
+
Afternoon: {
|
52
|
+
hour: 15,
|
53
|
+
minute: 0
|
54
|
+
},
|
55
|
+
Evening: {
|
56
|
+
hour: 20,
|
57
|
+
minute: 0
|
58
|
+
},
|
59
|
+
Anytime: {
|
60
|
+
hour: 21,
|
61
|
+
minute: 0
|
62
|
+
},
|
63
|
+
};
|
46
64
|
exports.habitTypesByTopicType = {
|
47
65
|
Dating: [
|
48
66
|
{
|
@@ -55,7 +73,6 @@ exports.habitTypesByTopicType = {
|
|
55
73
|
frequency: 'Daily',
|
56
74
|
minDaysPerWeek: 5,
|
57
75
|
possibleNotificationDescriptions: [
|
58
|
-
'Still up? Sleep now, your future self will thank you.',
|
59
76
|
'Still haven’t talked to anyone new? Your dating life won’t improve itself.',
|
60
77
|
'Another day, no balls to chat. Enjoy being alone forever.',
|
61
78
|
'Your social skills suck. Talk to a person or stay a useless reject.',
|
@@ -101,7 +118,7 @@ exports.habitTypesByTopicType = {
|
|
101
118
|
description: 'Take new high-quality photos for dating apps.',
|
102
119
|
difficulty: 2,
|
103
120
|
topicType: 'Dating',
|
104
|
-
habitTime: '
|
121
|
+
habitTime: 'Evening',
|
105
122
|
habitDays: exports.allHabitDays,
|
106
123
|
frequency: 'Daily',
|
107
124
|
minDaysPerWeek: 2,
|
@@ -118,7 +135,7 @@ exports.habitTypesByTopicType = {
|
|
118
135
|
description: 'Instead of asking boring questions, make more assumptions about the girl.',
|
119
136
|
difficulty: 2,
|
120
137
|
topicType: 'Dating',
|
121
|
-
habitTime: '
|
138
|
+
habitTime: 'Evening',
|
122
139
|
habitDays: exports.allHabitDays,
|
123
140
|
frequency: 'Daily',
|
124
141
|
minDaysPerWeek: 5,
|
@@ -137,7 +154,7 @@ exports.habitTypesByTopicType = {
|
|
137
154
|
description: 'Put the phone away 1 hour before sleep. Read a book or journal instead.',
|
138
155
|
difficulty: 3,
|
139
156
|
topicType: 'Sleep',
|
140
|
-
habitTime: '
|
157
|
+
habitTime: 'Evening',
|
141
158
|
habitDays: exports.allHabitDays,
|
142
159
|
frequency: 'Daily',
|
143
160
|
minDaysPerWeek: 7,
|
@@ -154,7 +171,7 @@ exports.habitTypesByTopicType = {
|
|
154
171
|
description: 'Go to bed and wake up at the same time. No excuses, even on weekends.',
|
155
172
|
difficulty: 2,
|
156
173
|
topicType: 'Sleep',
|
157
|
-
habitTime: '
|
174
|
+
habitTime: 'Evening',
|
158
175
|
habitDays: exports.allHabitDays,
|
159
176
|
frequency: 'Daily',
|
160
177
|
minDaysPerWeek: 7,
|
@@ -171,7 +188,7 @@ exports.habitTypesByTopicType = {
|
|
171
188
|
description: 'Stop eating at least 2 hours before bed. Let your body rest, not digest.',
|
172
189
|
difficulty: 2,
|
173
190
|
topicType: 'Sleep',
|
174
|
-
habitTime: '
|
191
|
+
habitTime: 'Evening',
|
175
192
|
habitDays: exports.allHabitDays,
|
176
193
|
frequency: 'Daily',
|
177
194
|
minDaysPerWeek: 7,
|
@@ -188,7 +205,7 @@ exports.habitTypesByTopicType = {
|
|
188
205
|
description: 'Cut all caffeine - coffee, pre-workout, energy drinks. Water only.',
|
189
206
|
difficulty: 2,
|
190
207
|
topicType: 'Sleep',
|
191
|
-
habitTime: '
|
208
|
+
habitTime: 'Afternoon',
|
192
209
|
habitDays: exports.allHabitDays,
|
193
210
|
frequency: 'Daily',
|
194
211
|
minDaysPerWeek: 7,
|
@@ -205,7 +222,7 @@ exports.habitTypesByTopicType = {
|
|
205
222
|
description: 'Cool room, blackout curtains, clean sheets, no electronics nearby.',
|
206
223
|
difficulty: 1,
|
207
224
|
topicType: 'Sleep',
|
208
|
-
habitTime: '
|
225
|
+
habitTime: 'Evening',
|
209
226
|
habitDays: exports.allHabitDays,
|
210
227
|
frequency: 'Daily',
|
211
228
|
minDaysPerWeek: 7,
|
@@ -275,7 +292,7 @@ exports.habitTypesByTopicType = {
|
|
275
292
|
description: 'Track weight your weight, so you know you\'re moving in the right direction.',
|
276
293
|
difficulty: 2,
|
277
294
|
topicType: 'Fitness',
|
278
|
-
habitTime: '
|
295
|
+
habitTime: 'Morning',
|
279
296
|
habitDays: exports.allHabitDays,
|
280
297
|
frequency: 'Daily',
|
281
298
|
minDaysPerWeek: 7,
|
@@ -292,7 +309,7 @@ exports.habitTypesByTopicType = {
|
|
292
309
|
description: 'Cook meals in bulk. No excuses for missing protein or eating junk.',
|
293
310
|
difficulty: 3,
|
294
311
|
topicType: 'Fitness',
|
295
|
-
habitTime: '
|
312
|
+
habitTime: 'Evening',
|
296
313
|
habitDays: exports.allHabitDays,
|
297
314
|
frequency: 'Daily',
|
298
315
|
minDaysPerWeek: 2,
|
@@ -311,7 +328,7 @@ exports.habitTypesByTopicType = {
|
|
311
328
|
description: '2 focused hours on your hustle. No distractions, no excuses.',
|
312
329
|
difficulty: 3,
|
313
330
|
topicType: 'Side Hustle',
|
314
|
-
habitTime: '
|
331
|
+
habitTime: 'Morning',
|
315
332
|
habitDays: exports.allHabitDays,
|
316
333
|
frequency: 'Daily',
|
317
334
|
minDaysPerWeek: 7,
|
@@ -328,7 +345,7 @@ exports.habitTypesByTopicType = {
|
|
328
345
|
description: 'Contact potential clients or partners.',
|
329
346
|
difficulty: 2,
|
330
347
|
topicType: 'Side Hustle',
|
331
|
-
habitTime: '
|
348
|
+
habitTime: 'Afternoon',
|
332
349
|
habitDays: exports.allHabitDays,
|
333
350
|
frequency: 'Daily',
|
334
351
|
minDaysPerWeek: 3,
|
@@ -345,7 +362,7 @@ exports.habitTypesByTopicType = {
|
|
345
362
|
description: 'Social media post, blog, tweet, vlog or message someone.',
|
346
363
|
difficulty: 2,
|
347
364
|
topicType: 'Side Hustle',
|
348
|
-
habitTime: '
|
365
|
+
habitTime: 'Evening',
|
349
366
|
habitDays: exports.allHabitDays,
|
350
367
|
frequency: 'Daily',
|
351
368
|
minDaysPerWeek: 7,
|
@@ -362,7 +379,7 @@ exports.habitTypesByTopicType = {
|
|
362
379
|
description: 'Ask a customer or friend what they’d change about your hustle.',
|
363
380
|
difficulty: 3,
|
364
381
|
topicType: 'Side Hustle',
|
365
|
-
habitTime: '
|
382
|
+
habitTime: 'Evening',
|
366
383
|
habitDays: exports.allHabitDays,
|
367
384
|
frequency: 'Daily',
|
368
385
|
minDaysPerWeek: 2,
|
package/package.json
CHANGED
package/src/habit.ts
CHANGED
@@ -130,6 +130,25 @@ export interface HabitsResponse {
|
|
130
130
|
stats: HabitStats;
|
131
131
|
}
|
132
132
|
|
133
|
+
export const habitTimeToClockTime: Record<HabitTime, { hour: number, minute: number }> = {
|
134
|
+
Morning: {
|
135
|
+
hour: 9,
|
136
|
+
minute: 0
|
137
|
+
},
|
138
|
+
Afternoon: {
|
139
|
+
hour: 15,
|
140
|
+
minute: 0
|
141
|
+
},
|
142
|
+
Evening: {
|
143
|
+
hour: 20,
|
144
|
+
minute: 0
|
145
|
+
},
|
146
|
+
Anytime: {
|
147
|
+
hour: 21,
|
148
|
+
minute: 0
|
149
|
+
},
|
150
|
+
};
|
151
|
+
|
133
152
|
export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
134
153
|
Dating: [
|
135
154
|
{
|
@@ -142,7 +161,6 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
142
161
|
frequency: 'Daily',
|
143
162
|
minDaysPerWeek: 5,
|
144
163
|
possibleNotificationDescriptions: [
|
145
|
-
'Still up? Sleep now, your future self will thank you.',
|
146
164
|
'Still haven’t talked to anyone new? Your dating life won’t improve itself.',
|
147
165
|
'Another day, no balls to chat. Enjoy being alone forever.',
|
148
166
|
'Your social skills suck. Talk to a person or stay a useless reject.',
|
@@ -188,7 +206,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
188
206
|
description: 'Take new high-quality photos for dating apps.',
|
189
207
|
difficulty: 2,
|
190
208
|
topicType: 'Dating',
|
191
|
-
habitTime: '
|
209
|
+
habitTime: 'Evening',
|
192
210
|
habitDays: allHabitDays,
|
193
211
|
frequency: 'Daily',
|
194
212
|
minDaysPerWeek: 2,
|
@@ -205,7 +223,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
205
223
|
description: 'Instead of asking boring questions, make more assumptions about the girl.',
|
206
224
|
difficulty: 2,
|
207
225
|
topicType: 'Dating',
|
208
|
-
habitTime: '
|
226
|
+
habitTime: 'Evening',
|
209
227
|
habitDays: allHabitDays,
|
210
228
|
frequency: 'Daily',
|
211
229
|
minDaysPerWeek: 5,
|
@@ -224,7 +242,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
224
242
|
description: 'Put the phone away 1 hour before sleep. Read a book or journal instead.',
|
225
243
|
difficulty: 3,
|
226
244
|
topicType: 'Sleep',
|
227
|
-
habitTime: '
|
245
|
+
habitTime: 'Evening',
|
228
246
|
habitDays: allHabitDays,
|
229
247
|
frequency: 'Daily',
|
230
248
|
minDaysPerWeek: 7,
|
@@ -241,7 +259,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
241
259
|
description: 'Go to bed and wake up at the same time. No excuses, even on weekends.',
|
242
260
|
difficulty: 2,
|
243
261
|
topicType: 'Sleep',
|
244
|
-
habitTime: '
|
262
|
+
habitTime: 'Evening',
|
245
263
|
habitDays: allHabitDays,
|
246
264
|
frequency: 'Daily',
|
247
265
|
minDaysPerWeek: 7,
|
@@ -258,7 +276,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
258
276
|
description: 'Stop eating at least 2 hours before bed. Let your body rest, not digest.',
|
259
277
|
difficulty: 2,
|
260
278
|
topicType: 'Sleep',
|
261
|
-
habitTime: '
|
279
|
+
habitTime: 'Evening',
|
262
280
|
habitDays: allHabitDays,
|
263
281
|
frequency: 'Daily',
|
264
282
|
minDaysPerWeek: 7,
|
@@ -275,7 +293,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
275
293
|
description: 'Cut all caffeine - coffee, pre-workout, energy drinks. Water only.',
|
276
294
|
difficulty: 2,
|
277
295
|
topicType: 'Sleep',
|
278
|
-
habitTime: '
|
296
|
+
habitTime: 'Afternoon',
|
279
297
|
habitDays: allHabitDays,
|
280
298
|
frequency: 'Daily',
|
281
299
|
minDaysPerWeek: 7,
|
@@ -292,7 +310,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
292
310
|
description: 'Cool room, blackout curtains, clean sheets, no electronics nearby.',
|
293
311
|
difficulty: 1,
|
294
312
|
topicType: 'Sleep',
|
295
|
-
habitTime: '
|
313
|
+
habitTime: 'Evening',
|
296
314
|
habitDays: allHabitDays,
|
297
315
|
frequency: 'Daily',
|
298
316
|
minDaysPerWeek: 7,
|
@@ -362,7 +380,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
362
380
|
description: 'Track weight your weight, so you know you\'re moving in the right direction.',
|
363
381
|
difficulty: 2,
|
364
382
|
topicType: 'Fitness',
|
365
|
-
habitTime: '
|
383
|
+
habitTime: 'Morning',
|
366
384
|
habitDays: allHabitDays,
|
367
385
|
frequency: 'Daily',
|
368
386
|
minDaysPerWeek: 7,
|
@@ -379,7 +397,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
379
397
|
description: 'Cook meals in bulk. No excuses for missing protein or eating junk.',
|
380
398
|
difficulty: 3,
|
381
399
|
topicType: 'Fitness',
|
382
|
-
habitTime: '
|
400
|
+
habitTime: 'Evening',
|
383
401
|
habitDays: allHabitDays,
|
384
402
|
frequency: 'Daily',
|
385
403
|
minDaysPerWeek: 2,
|
@@ -398,7 +416,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
398
416
|
description: '2 focused hours on your hustle. No distractions, no excuses.',
|
399
417
|
difficulty: 3,
|
400
418
|
topicType: 'Side Hustle',
|
401
|
-
habitTime: '
|
419
|
+
habitTime: 'Morning',
|
402
420
|
habitDays: allHabitDays,
|
403
421
|
frequency: 'Daily',
|
404
422
|
minDaysPerWeek: 7,
|
@@ -415,7 +433,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
415
433
|
description: 'Contact potential clients or partners.',
|
416
434
|
difficulty: 2,
|
417
435
|
topicType: 'Side Hustle',
|
418
|
-
habitTime: '
|
436
|
+
habitTime: 'Afternoon',
|
419
437
|
habitDays: allHabitDays,
|
420
438
|
frequency: 'Daily',
|
421
439
|
minDaysPerWeek: 3,
|
@@ -432,7 +450,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
432
450
|
description: 'Social media post, blog, tweet, vlog or message someone.',
|
433
451
|
difficulty: 2,
|
434
452
|
topicType: 'Side Hustle',
|
435
|
-
habitTime: '
|
453
|
+
habitTime: 'Evening',
|
436
454
|
habitDays: allHabitDays,
|
437
455
|
frequency: 'Daily',
|
438
456
|
minDaysPerWeek: 7,
|
@@ -449,7 +467,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
449
467
|
description: 'Ask a customer or friend what they’d change about your hustle.',
|
450
468
|
difficulty: 3,
|
451
469
|
topicType: 'Side Hustle',
|
452
|
-
habitTime: '
|
470
|
+
habitTime: 'Evening',
|
453
471
|
habitDays: allHabitDays,
|
454
472
|
frequency: 'Daily',
|
455
473
|
minDaysPerWeek: 2,
|