@hy-capital/api-habit-tracker-types 1.0.58 → 1.0.59
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 +2 -0
- package/dist/habit.js +20 -0
- package/package.json +1 -1
- package/src/habit.ts +22 -0
package/dist/habit.d.ts
CHANGED
@@ -9,6 +9,7 @@ export declare const habitDayToNumberMappings: Record<HabitDay, number>;
|
|
9
9
|
export declare const numberToHabitDayMappings: Record<number, HabitDay>;
|
10
10
|
export declare const ProgramObjectivesByTopic: Record<TopicType, string[]>;
|
11
11
|
export interface HabitType {
|
12
|
+
id: number;
|
12
13
|
name: string;
|
13
14
|
habitTime: HabitTime;
|
14
15
|
topicType: TopicType;
|
@@ -37,6 +38,7 @@ export interface BaseHabit {
|
|
37
38
|
habit_dates: number[];
|
38
39
|
possible_notification_descriptions: string[];
|
39
40
|
min_days_per_week: number;
|
41
|
+
habit_type_id: number;
|
40
42
|
}
|
41
43
|
export interface PatchHabitRequest {
|
42
44
|
partialHabit: Partial<BaseHabit>;
|
package/dist/habit.js
CHANGED
@@ -66,6 +66,7 @@ exports.habitTimeToClockTime = {
|
|
66
66
|
exports.habitTypesByTopicType = {
|
67
67
|
Dating: [
|
68
68
|
{
|
69
|
+
id: 1,
|
69
70
|
name: 'Talk to new person',
|
70
71
|
description: 'No pressure, just talk about whatever, no matter how long or short.',
|
71
72
|
difficulty: 3,
|
@@ -82,6 +83,7 @@ exports.habitTypesByTopicType = {
|
|
82
83
|
]
|
83
84
|
},
|
84
85
|
{
|
86
|
+
id: 2,
|
85
87
|
name: 'Ask for date/social media',
|
86
88
|
description: 'Turn a conversation into an actual opportunity. Get her contact or set up a date.',
|
87
89
|
difficulty: 3,
|
@@ -99,6 +101,7 @@ exports.habitTypesByTopicType = {
|
|
99
101
|
]
|
100
102
|
},
|
101
103
|
{
|
104
|
+
id: 3,
|
102
105
|
name: 'Grooming',
|
103
106
|
description: 'Wear your best clothes, keep hair in check. Always.',
|
104
107
|
difficulty: 1,
|
@@ -116,6 +119,7 @@ exports.habitTypesByTopicType = {
|
|
116
119
|
]
|
117
120
|
},
|
118
121
|
{
|
122
|
+
id: 4,
|
119
123
|
name: 'Get new photos',
|
120
124
|
description: 'Take new high-quality photos for dating apps.',
|
121
125
|
difficulty: 2,
|
@@ -133,6 +137,7 @@ exports.habitTypesByTopicType = {
|
|
133
137
|
]
|
134
138
|
},
|
135
139
|
{
|
140
|
+
id: 5,
|
136
141
|
name: 'Send messages',
|
137
142
|
description: 'Instead of asking boring questions, make more assumptions about the girl.',
|
138
143
|
difficulty: 2,
|
@@ -152,6 +157,7 @@ exports.habitTypesByTopicType = {
|
|
152
157
|
],
|
153
158
|
Sleep: [
|
154
159
|
{
|
160
|
+
id: 6,
|
155
161
|
name: 'No screens before bed',
|
156
162
|
description: 'Put the phone away 1 hour before sleep. Read a book or journal instead.',
|
157
163
|
difficulty: 3,
|
@@ -169,6 +175,7 @@ exports.habitTypesByTopicType = {
|
|
169
175
|
]
|
170
176
|
},
|
171
177
|
{
|
178
|
+
id: 7,
|
172
179
|
name: '> 7hr sleep',
|
173
180
|
description: 'Go to bed and wake up at the same time. No excuses, even on weekends.',
|
174
181
|
difficulty: 2,
|
@@ -186,6 +193,7 @@ exports.habitTypesByTopicType = {
|
|
186
193
|
]
|
187
194
|
},
|
188
195
|
{
|
196
|
+
id: 8,
|
189
197
|
name: 'No late-night snacking',
|
190
198
|
description: 'Stop eating at least 2 hours before bed. Let your body rest, not digest.',
|
191
199
|
difficulty: 2,
|
@@ -203,6 +211,7 @@ exports.habitTypesByTopicType = {
|
|
203
211
|
]
|
204
212
|
},
|
205
213
|
{
|
214
|
+
id: 9,
|
206
215
|
name: 'No caffeine after 2pm',
|
207
216
|
description: 'Cut all caffeine - coffee, pre-workout, energy drinks. Water only.',
|
208
217
|
difficulty: 2,
|
@@ -220,6 +229,7 @@ exports.habitTypesByTopicType = {
|
|
220
229
|
]
|
221
230
|
},
|
222
231
|
{
|
232
|
+
id: 10,
|
223
233
|
name: 'Optimize your sleep environment',
|
224
234
|
description: 'Cool room, blackout curtains, clean sheets, no electronics nearby.',
|
225
235
|
difficulty: 1,
|
@@ -239,6 +249,7 @@ exports.habitTypesByTopicType = {
|
|
239
249
|
],
|
240
250
|
Fitness: [
|
241
251
|
{
|
252
|
+
id: 11,
|
242
253
|
name: 'Stay active',
|
243
254
|
description: 'Go to the gym, do cardio or just move. No lazy days.',
|
244
255
|
difficulty: 2,
|
@@ -256,6 +267,7 @@ exports.habitTypesByTopicType = {
|
|
256
267
|
]
|
257
268
|
},
|
258
269
|
{
|
270
|
+
id: 12,
|
259
271
|
name: 'No processed sugars',
|
260
272
|
description: 'Skip added sugars. Stick to natural sources like fruit.',
|
261
273
|
difficulty: 3,
|
@@ -273,6 +285,7 @@ exports.habitTypesByTopicType = {
|
|
273
285
|
]
|
274
286
|
},
|
275
287
|
{
|
288
|
+
id: 13,
|
276
289
|
name: 'No alcohol',
|
277
290
|
description: 'Stay 100% alcohol-free. No exceptions, no slip-ups.',
|
278
291
|
difficulty: 2,
|
@@ -290,6 +303,7 @@ exports.habitTypesByTopicType = {
|
|
290
303
|
]
|
291
304
|
},
|
292
305
|
{
|
306
|
+
id: 14,
|
293
307
|
name: 'Weigh yourself',
|
294
308
|
description: 'Track weight your weight, so you know you\'re moving in the right direction.',
|
295
309
|
difficulty: 2,
|
@@ -307,6 +321,7 @@ exports.habitTypesByTopicType = {
|
|
307
321
|
]
|
308
322
|
},
|
309
323
|
{
|
324
|
+
id: 15,
|
310
325
|
name: 'Meal prep',
|
311
326
|
description: 'Cook meals in bulk. No excuses for missing protein or eating junk.',
|
312
327
|
difficulty: 3,
|
@@ -326,6 +341,7 @@ exports.habitTypesByTopicType = {
|
|
326
341
|
],
|
327
342
|
'Side Hustle': [
|
328
343
|
{
|
344
|
+
id: 16,
|
329
345
|
name: 'Dedicate 2 hours to hustle',
|
330
346
|
description: '2 focused hours on your hustle. No distractions, no excuses.',
|
331
347
|
difficulty: 3,
|
@@ -343,6 +359,7 @@ exports.habitTypesByTopicType = {
|
|
343
359
|
]
|
344
360
|
},
|
345
361
|
{
|
362
|
+
id: 17,
|
346
363
|
name: 'Client outreach',
|
347
364
|
description: 'Contact potential clients or partners.',
|
348
365
|
difficulty: 2,
|
@@ -360,6 +377,7 @@ exports.habitTypesByTopicType = {
|
|
360
377
|
]
|
361
378
|
},
|
362
379
|
{
|
380
|
+
id: 18,
|
363
381
|
name: 'Share your journey',
|
364
382
|
description: 'Social media post, blog, tweet, vlog or message someone.',
|
365
383
|
difficulty: 2,
|
@@ -377,6 +395,7 @@ exports.habitTypesByTopicType = {
|
|
377
395
|
]
|
378
396
|
},
|
379
397
|
{
|
398
|
+
id: 19,
|
380
399
|
name: 'Get real feedback',
|
381
400
|
description: 'Ask a customer or friend what they’d change about your hustle.',
|
382
401
|
difficulty: 3,
|
@@ -394,6 +413,7 @@ exports.habitTypesByTopicType = {
|
|
394
413
|
]
|
395
414
|
},
|
396
415
|
{
|
416
|
+
id: 20,
|
397
417
|
name: 'Study competitors',
|
398
418
|
description: 'Analyze what your rivals are doing, see what works, what not.',
|
399
419
|
difficulty: 3,
|
package/package.json
CHANGED
package/src/habit.ts
CHANGED
@@ -52,6 +52,7 @@ export const ProgramObjectivesByTopic: Record<TopicType, string[]> = {
|
|
52
52
|
};
|
53
53
|
|
54
54
|
export interface HabitType {
|
55
|
+
id: number;
|
55
56
|
name: string;
|
56
57
|
habitTime: HabitTime;
|
57
58
|
topicType: TopicType;
|
@@ -81,6 +82,7 @@ export interface BaseHabit {
|
|
81
82
|
habit_dates: number[]; //TODO: remove
|
82
83
|
possible_notification_descriptions: string[];
|
83
84
|
min_days_per_week: number;
|
85
|
+
habit_type_id: number;
|
84
86
|
}
|
85
87
|
|
86
88
|
export interface PatchHabitRequest {
|
@@ -162,6 +164,7 @@ export const habitTimeToClockTime: Record<HabitTime, { hour: number, minute: num
|
|
162
164
|
export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
163
165
|
Dating: [
|
164
166
|
{
|
167
|
+
id: 1,
|
165
168
|
name: 'Talk to new person',
|
166
169
|
description: 'No pressure, just talk about whatever, no matter how long or short.',
|
167
170
|
difficulty: 3,
|
@@ -178,6 +181,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
178
181
|
]
|
179
182
|
},
|
180
183
|
{
|
184
|
+
id: 2,
|
181
185
|
name: 'Ask for date/social media',
|
182
186
|
description: 'Turn a conversation into an actual opportunity. Get her contact or set up a date.',
|
183
187
|
difficulty: 3,
|
@@ -195,6 +199,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
195
199
|
]
|
196
200
|
},
|
197
201
|
{
|
202
|
+
id: 3,
|
198
203
|
name: 'Grooming',
|
199
204
|
description: 'Wear your best clothes, keep hair in check. Always.',
|
200
205
|
difficulty: 1,
|
@@ -212,6 +217,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
212
217
|
]
|
213
218
|
},
|
214
219
|
{
|
220
|
+
id: 4,
|
215
221
|
name: 'Get new photos',
|
216
222
|
description: 'Take new high-quality photos for dating apps.',
|
217
223
|
difficulty: 2,
|
@@ -229,6 +235,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
229
235
|
]
|
230
236
|
},
|
231
237
|
{
|
238
|
+
id: 5,
|
232
239
|
name: 'Send messages',
|
233
240
|
description: 'Instead of asking boring questions, make more assumptions about the girl.',
|
234
241
|
difficulty: 2,
|
@@ -248,6 +255,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
248
255
|
],
|
249
256
|
Sleep: [
|
250
257
|
{
|
258
|
+
id: 6,
|
251
259
|
name: 'No screens before bed',
|
252
260
|
description: 'Put the phone away 1 hour before sleep. Read a book or journal instead.',
|
253
261
|
difficulty: 3,
|
@@ -265,6 +273,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
265
273
|
]
|
266
274
|
},
|
267
275
|
{
|
276
|
+
id: 7,
|
268
277
|
name: '> 7hr sleep',
|
269
278
|
description: 'Go to bed and wake up at the same time. No excuses, even on weekends.',
|
270
279
|
difficulty: 2,
|
@@ -282,6 +291,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
282
291
|
]
|
283
292
|
},
|
284
293
|
{
|
294
|
+
id: 8,
|
285
295
|
name: 'No late-night snacking',
|
286
296
|
description: 'Stop eating at least 2 hours before bed. Let your body rest, not digest.',
|
287
297
|
difficulty: 2,
|
@@ -299,6 +309,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
299
309
|
]
|
300
310
|
},
|
301
311
|
{
|
312
|
+
id: 9,
|
302
313
|
name: 'No caffeine after 2pm',
|
303
314
|
description: 'Cut all caffeine - coffee, pre-workout, energy drinks. Water only.',
|
304
315
|
difficulty: 2,
|
@@ -316,6 +327,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
316
327
|
]
|
317
328
|
},
|
318
329
|
{
|
330
|
+
id: 10,
|
319
331
|
name: 'Optimize your sleep environment',
|
320
332
|
description: 'Cool room, blackout curtains, clean sheets, no electronics nearby.',
|
321
333
|
difficulty: 1,
|
@@ -335,6 +347,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
335
347
|
],
|
336
348
|
Fitness: [
|
337
349
|
{
|
350
|
+
id: 11,
|
338
351
|
name: 'Stay active',
|
339
352
|
description: 'Go to the gym, do cardio or just move. No lazy days.',
|
340
353
|
difficulty: 2,
|
@@ -352,6 +365,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
352
365
|
]
|
353
366
|
},
|
354
367
|
{
|
368
|
+
id: 12,
|
355
369
|
name: 'No processed sugars',
|
356
370
|
description: 'Skip added sugars. Stick to natural sources like fruit.',
|
357
371
|
difficulty: 3,
|
@@ -369,6 +383,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
369
383
|
]
|
370
384
|
},
|
371
385
|
{
|
386
|
+
id: 13,
|
372
387
|
name: 'No alcohol',
|
373
388
|
description: 'Stay 100% alcohol-free. No exceptions, no slip-ups.',
|
374
389
|
difficulty: 2,
|
@@ -386,6 +401,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
386
401
|
]
|
387
402
|
},
|
388
403
|
{
|
404
|
+
id: 14,
|
389
405
|
name: 'Weigh yourself',
|
390
406
|
description: 'Track weight your weight, so you know you\'re moving in the right direction.',
|
391
407
|
difficulty: 2,
|
@@ -403,6 +419,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
403
419
|
]
|
404
420
|
},
|
405
421
|
{
|
422
|
+
id: 15,
|
406
423
|
name: 'Meal prep',
|
407
424
|
description: 'Cook meals in bulk. No excuses for missing protein or eating junk.',
|
408
425
|
difficulty: 3,
|
@@ -422,6 +439,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
422
439
|
],
|
423
440
|
'Side Hustle': [
|
424
441
|
{
|
442
|
+
id: 16,
|
425
443
|
name: 'Dedicate 2 hours to hustle',
|
426
444
|
description: '2 focused hours on your hustle. No distractions, no excuses.',
|
427
445
|
difficulty: 3,
|
@@ -439,6 +457,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
439
457
|
]
|
440
458
|
},
|
441
459
|
{
|
460
|
+
id: 17,
|
442
461
|
name: 'Client outreach',
|
443
462
|
description: 'Contact potential clients or partners.',
|
444
463
|
difficulty: 2,
|
@@ -456,6 +475,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
456
475
|
]
|
457
476
|
},
|
458
477
|
{
|
478
|
+
id: 18,
|
459
479
|
name: 'Share your journey',
|
460
480
|
description: 'Social media post, blog, tweet, vlog or message someone.',
|
461
481
|
difficulty: 2,
|
@@ -473,6 +493,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
473
493
|
]
|
474
494
|
},
|
475
495
|
{
|
496
|
+
id: 19,
|
476
497
|
name: 'Get real feedback',
|
477
498
|
description: 'Ask a customer or friend what they’d change about your hustle.',
|
478
499
|
difficulty: 3,
|
@@ -490,6 +511,7 @@ export const habitTypesByTopicType: Record<TopicType, HabitType[]> = {
|
|
490
511
|
]
|
491
512
|
},
|
492
513
|
{
|
514
|
+
id: 20,
|
493
515
|
name: 'Study competitors',
|
494
516
|
description: 'Analyze what your rivals are doing, see what works, what not.',
|
495
517
|
difficulty: 3,
|