@hy-capital/api-habit-tracker-types 1.0.53 → 1.0.54
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 -14
- package/package.json +1 -1
- package/src/habit.ts +32 -13
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
|
{
|
@@ -101,7 +119,7 @@ exports.habitTypesByTopicType = {
|
|
101
119
|
description: 'Take new high-quality photos for dating apps.',
|
102
120
|
difficulty: 2,
|
103
121
|
topicType: 'Dating',
|
104
|
-
habitTime: '
|
122
|
+
habitTime: 'Evening',
|
105
123
|
habitDays: exports.allHabitDays,
|
106
124
|
frequency: 'Daily',
|
107
125
|
minDaysPerWeek: 2,
|
@@ -118,7 +136,7 @@ exports.habitTypesByTopicType = {
|
|
118
136
|
description: 'Instead of asking boring questions, make more assumptions about the girl.',
|
119
137
|
difficulty: 2,
|
120
138
|
topicType: 'Dating',
|
121
|
-
habitTime: '
|
139
|
+
habitTime: 'Evening',
|
122
140
|
habitDays: exports.allHabitDays,
|
123
141
|
frequency: 'Daily',
|
124
142
|
minDaysPerWeek: 5,
|
@@ -137,7 +155,7 @@ exports.habitTypesByTopicType = {
|
|
137
155
|
description: 'Put the phone away 1 hour before sleep. Read a book or journal instead.',
|
138
156
|
difficulty: 3,
|
139
157
|
topicType: 'Sleep',
|
140
|
-
habitTime: '
|
158
|
+
habitTime: 'Evening',
|
141
159
|
habitDays: exports.allHabitDays,
|
142
160
|
frequency: 'Daily',
|
143
161
|
minDaysPerWeek: 7,
|
@@ -154,7 +172,7 @@ exports.habitTypesByTopicType = {
|
|
154
172
|
description: 'Go to bed and wake up at the same time. No excuses, even on weekends.',
|
155
173
|
difficulty: 2,
|
156
174
|
topicType: 'Sleep',
|
157
|
-
habitTime: '
|
175
|
+
habitTime: 'Evening',
|
158
176
|
habitDays: exports.allHabitDays,
|
159
177
|
frequency: 'Daily',
|
160
178
|
minDaysPerWeek: 7,
|
@@ -171,7 +189,7 @@ exports.habitTypesByTopicType = {
|
|
171
189
|
description: 'Stop eating at least 2 hours before bed. Let your body rest, not digest.',
|
172
190
|
difficulty: 2,
|
173
191
|
topicType: 'Sleep',
|
174
|
-
habitTime: '
|
192
|
+
habitTime: 'Evening',
|
175
193
|
habitDays: exports.allHabitDays,
|
176
194
|
frequency: 'Daily',
|
177
195
|
minDaysPerWeek: 7,
|
@@ -188,7 +206,7 @@ exports.habitTypesByTopicType = {
|
|
188
206
|
description: 'Cut all caffeine - coffee, pre-workout, energy drinks. Water only.',
|
189
207
|
difficulty: 2,
|
190
208
|
topicType: 'Sleep',
|
191
|
-
habitTime: '
|
209
|
+
habitTime: 'Afternoon',
|
192
210
|
habitDays: exports.allHabitDays,
|
193
211
|
frequency: 'Daily',
|
194
212
|
minDaysPerWeek: 7,
|
@@ -205,7 +223,7 @@ exports.habitTypesByTopicType = {
|
|
205
223
|
description: 'Cool room, blackout curtains, clean sheets, no electronics nearby.',
|
206
224
|
difficulty: 1,
|
207
225
|
topicType: 'Sleep',
|
208
|
-
habitTime: '
|
226
|
+
habitTime: 'Evening',
|
209
227
|
habitDays: exports.allHabitDays,
|
210
228
|
frequency: 'Daily',
|
211
229
|
minDaysPerWeek: 7,
|
@@ -275,7 +293,7 @@ exports.habitTypesByTopicType = {
|
|
275
293
|
description: 'Track weight your weight, so you know you\'re moving in the right direction.',
|
276
294
|
difficulty: 2,
|
277
295
|
topicType: 'Fitness',
|
278
|
-
habitTime: '
|
296
|
+
habitTime: 'Morning',
|
279
297
|
habitDays: exports.allHabitDays,
|
280
298
|
frequency: 'Daily',
|
281
299
|
minDaysPerWeek: 7,
|
@@ -292,7 +310,7 @@ exports.habitTypesByTopicType = {
|
|
292
310
|
description: 'Cook meals in bulk. No excuses for missing protein or eating junk.',
|
293
311
|
difficulty: 3,
|
294
312
|
topicType: 'Fitness',
|
295
|
-
habitTime: '
|
313
|
+
habitTime: 'Evening',
|
296
314
|
habitDays: exports.allHabitDays,
|
297
315
|
frequency: 'Daily',
|
298
316
|
minDaysPerWeek: 2,
|
@@ -311,7 +329,7 @@ exports.habitTypesByTopicType = {
|
|
311
329
|
description: '2 focused hours on your hustle. No distractions, no excuses.',
|
312
330
|
difficulty: 3,
|
313
331
|
topicType: 'Side Hustle',
|
314
|
-
habitTime: '
|
332
|
+
habitTime: 'Morning',
|
315
333
|
habitDays: exports.allHabitDays,
|
316
334
|
frequency: 'Daily',
|
317
335
|
minDaysPerWeek: 7,
|
@@ -328,7 +346,7 @@ exports.habitTypesByTopicType = {
|
|
328
346
|
description: 'Contact potential clients or partners.',
|
329
347
|
difficulty: 2,
|
330
348
|
topicType: 'Side Hustle',
|
331
|
-
habitTime: '
|
349
|
+
habitTime: 'Afternoon',
|
332
350
|
habitDays: exports.allHabitDays,
|
333
351
|
frequency: 'Daily',
|
334
352
|
minDaysPerWeek: 3,
|
@@ -345,7 +363,7 @@ exports.habitTypesByTopicType = {
|
|
345
363
|
description: 'Social media post, blog, tweet, vlog or message someone.',
|
346
364
|
difficulty: 2,
|
347
365
|
topicType: 'Side Hustle',
|
348
|
-
habitTime: '
|
366
|
+
habitTime: 'Evening',
|
349
367
|
habitDays: exports.allHabitDays,
|
350
368
|
frequency: 'Daily',
|
351
369
|
minDaysPerWeek: 7,
|
@@ -362,7 +380,7 @@ exports.habitTypesByTopicType = {
|
|
362
380
|
description: 'Ask a customer or friend what they’d change about your hustle.',
|
363
381
|
difficulty: 3,
|
364
382
|
topicType: 'Side Hustle',
|
365
|
-
habitTime: '
|
383
|
+
habitTime: 'Evening',
|
366
384
|
habitDays: exports.allHabitDays,
|
367
385
|
frequency: 'Daily',
|
368
386
|
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
|
{
|
@@ -188,7 +207,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
188
207
|
description: 'Take new high-quality photos for dating apps.',
|
189
208
|
difficulty: 2,
|
190
209
|
topicType: 'Dating',
|
191
|
-
habitTime: '
|
210
|
+
habitTime: 'Evening',
|
192
211
|
habitDays: allHabitDays,
|
193
212
|
frequency: 'Daily',
|
194
213
|
minDaysPerWeek: 2,
|
@@ -205,7 +224,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
205
224
|
description: 'Instead of asking boring questions, make more assumptions about the girl.',
|
206
225
|
difficulty: 2,
|
207
226
|
topicType: 'Dating',
|
208
|
-
habitTime: '
|
227
|
+
habitTime: 'Evening',
|
209
228
|
habitDays: allHabitDays,
|
210
229
|
frequency: 'Daily',
|
211
230
|
minDaysPerWeek: 5,
|
@@ -224,7 +243,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
224
243
|
description: 'Put the phone away 1 hour before sleep. Read a book or journal instead.',
|
225
244
|
difficulty: 3,
|
226
245
|
topicType: 'Sleep',
|
227
|
-
habitTime: '
|
246
|
+
habitTime: 'Evening',
|
228
247
|
habitDays: allHabitDays,
|
229
248
|
frequency: 'Daily',
|
230
249
|
minDaysPerWeek: 7,
|
@@ -241,7 +260,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
241
260
|
description: 'Go to bed and wake up at the same time. No excuses, even on weekends.',
|
242
261
|
difficulty: 2,
|
243
262
|
topicType: 'Sleep',
|
244
|
-
habitTime: '
|
263
|
+
habitTime: 'Evening',
|
245
264
|
habitDays: allHabitDays,
|
246
265
|
frequency: 'Daily',
|
247
266
|
minDaysPerWeek: 7,
|
@@ -258,7 +277,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
258
277
|
description: 'Stop eating at least 2 hours before bed. Let your body rest, not digest.',
|
259
278
|
difficulty: 2,
|
260
279
|
topicType: 'Sleep',
|
261
|
-
habitTime: '
|
280
|
+
habitTime: 'Evening',
|
262
281
|
habitDays: allHabitDays,
|
263
282
|
frequency: 'Daily',
|
264
283
|
minDaysPerWeek: 7,
|
@@ -275,7 +294,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
275
294
|
description: 'Cut all caffeine - coffee, pre-workout, energy drinks. Water only.',
|
276
295
|
difficulty: 2,
|
277
296
|
topicType: 'Sleep',
|
278
|
-
habitTime: '
|
297
|
+
habitTime: 'Afternoon',
|
279
298
|
habitDays: allHabitDays,
|
280
299
|
frequency: 'Daily',
|
281
300
|
minDaysPerWeek: 7,
|
@@ -292,7 +311,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
292
311
|
description: 'Cool room, blackout curtains, clean sheets, no electronics nearby.',
|
293
312
|
difficulty: 1,
|
294
313
|
topicType: 'Sleep',
|
295
|
-
habitTime: '
|
314
|
+
habitTime: 'Evening',
|
296
315
|
habitDays: allHabitDays,
|
297
316
|
frequency: 'Daily',
|
298
317
|
minDaysPerWeek: 7,
|
@@ -362,7 +381,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
362
381
|
description: 'Track weight your weight, so you know you\'re moving in the right direction.',
|
363
382
|
difficulty: 2,
|
364
383
|
topicType: 'Fitness',
|
365
|
-
habitTime: '
|
384
|
+
habitTime: 'Morning',
|
366
385
|
habitDays: allHabitDays,
|
367
386
|
frequency: 'Daily',
|
368
387
|
minDaysPerWeek: 7,
|
@@ -379,7 +398,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
379
398
|
description: 'Cook meals in bulk. No excuses for missing protein or eating junk.',
|
380
399
|
difficulty: 3,
|
381
400
|
topicType: 'Fitness',
|
382
|
-
habitTime: '
|
401
|
+
habitTime: 'Evening',
|
383
402
|
habitDays: allHabitDays,
|
384
403
|
frequency: 'Daily',
|
385
404
|
minDaysPerWeek: 2,
|
@@ -398,7 +417,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
398
417
|
description: '2 focused hours on your hustle. No distractions, no excuses.',
|
399
418
|
difficulty: 3,
|
400
419
|
topicType: 'Side Hustle',
|
401
|
-
habitTime: '
|
420
|
+
habitTime: 'Morning',
|
402
421
|
habitDays: allHabitDays,
|
403
422
|
frequency: 'Daily',
|
404
423
|
minDaysPerWeek: 7,
|
@@ -415,7 +434,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
415
434
|
description: 'Contact potential clients or partners.',
|
416
435
|
difficulty: 2,
|
417
436
|
topicType: 'Side Hustle',
|
418
|
-
habitTime: '
|
437
|
+
habitTime: 'Afternoon',
|
419
438
|
habitDays: allHabitDays,
|
420
439
|
frequency: 'Daily',
|
421
440
|
minDaysPerWeek: 3,
|
@@ -432,7 +451,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
432
451
|
description: 'Social media post, blog, tweet, vlog or message someone.',
|
433
452
|
difficulty: 2,
|
434
453
|
topicType: 'Side Hustle',
|
435
|
-
habitTime: '
|
454
|
+
habitTime: 'Evening',
|
436
455
|
habitDays: allHabitDays,
|
437
456
|
frequency: 'Daily',
|
438
457
|
minDaysPerWeek: 7,
|
@@ -449,7 +468,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
449
468
|
description: 'Ask a customer or friend what they’d change about your hustle.',
|
450
469
|
difficulty: 3,
|
451
470
|
topicType: 'Side Hustle',
|
452
|
-
habitTime: '
|
471
|
+
habitTime: 'Evening',
|
453
472
|
habitDays: allHabitDays,
|
454
473
|
frequency: 'Daily',
|
455
474
|
minDaysPerWeek: 2,
|