@taphealth/kafka 1.4.31 → 1.4.33
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,9 +1,13 @@
|
|
|
1
1
|
import { Topics } from "../topics";
|
|
2
|
+
import { DailyTask } from "../types/daily-plan";
|
|
2
3
|
export interface DailyPlanCreatedEvent {
|
|
3
4
|
topic: Topics.DailyPlanCreated;
|
|
4
5
|
data: {
|
|
5
6
|
userId: string;
|
|
6
7
|
date: Date;
|
|
8
|
+
tasks: {
|
|
9
|
+
[module: string]: DailyTask[];
|
|
10
|
+
};
|
|
7
11
|
nudgePlan: {
|
|
8
12
|
dayNumber: number;
|
|
9
13
|
date: string;
|
|
@@ -23,5 +27,39 @@ export interface DailyPlanCreatedEvent {
|
|
|
23
27
|
}>;
|
|
24
28
|
warnings: string[];
|
|
25
29
|
};
|
|
30
|
+
plan: {
|
|
31
|
+
nutrition: {
|
|
32
|
+
targetCalories: number;
|
|
33
|
+
targetMacros: {
|
|
34
|
+
protein: number;
|
|
35
|
+
carbs: number;
|
|
36
|
+
fats: number;
|
|
37
|
+
fibre: number;
|
|
38
|
+
};
|
|
39
|
+
targetCalorieDistribution: {
|
|
40
|
+
carbs: number;
|
|
41
|
+
protein: number;
|
|
42
|
+
fat: number;
|
|
43
|
+
fibre: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
glucose: {
|
|
47
|
+
fasting: boolean;
|
|
48
|
+
postprandial: boolean;
|
|
49
|
+
night: boolean;
|
|
50
|
+
preWorkout: boolean;
|
|
51
|
+
};
|
|
52
|
+
activity: {
|
|
53
|
+
steps: number;
|
|
54
|
+
exercise?: {
|
|
55
|
+
duration: number;
|
|
56
|
+
type: string;
|
|
57
|
+
intensity: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
education?: {
|
|
61
|
+
topic?: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
26
64
|
};
|
|
27
65
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare enum DailyTaskType {
|
|
2
|
+
DIET_LOGGING = 0,
|
|
3
|
+
STEP_COUNT = 1,
|
|
4
|
+
EXERCISE_LOGGING = 2,
|
|
5
|
+
GLUCOSE_LOGGING = 3,
|
|
6
|
+
CUSTOM = 4
|
|
7
|
+
}
|
|
8
|
+
export declare enum HabitKey {
|
|
9
|
+
GLUCOSE_LOG_TIMELY = 0,
|
|
10
|
+
GLUCOSE_LOG_RANDOM = 1,
|
|
11
|
+
GLUCOSE_CHECK_NOW = 2,
|
|
12
|
+
GLUCOSE_INTERPRET_RANGE = 3,
|
|
13
|
+
DIET_LOG_BREAKFAST = 4,
|
|
14
|
+
DIET_LOG_LUNCH = 5,
|
|
15
|
+
DIET_LOG_DINNER = 6,
|
|
16
|
+
DIET_LOG_SNACK_MORNING = 7,
|
|
17
|
+
DIET_LOG_SNACK_EVENING = 8,
|
|
18
|
+
DIET_LOG_ANY = 9,
|
|
19
|
+
DIET_HEALTHY_CHOICE = 10,
|
|
20
|
+
DIET_PLAN_MEALS = 11,
|
|
21
|
+
STEPS_MEET_DAILY_TARGET = 12,
|
|
22
|
+
STEPS_INCREASE_ACTIVITY = 13,
|
|
23
|
+
STEPS_LOG_MANUAL = 14,
|
|
24
|
+
EXERCISE_LOG_SESSION = 15,
|
|
25
|
+
EXERCISE_COMPLETE_PLANNED = 16,
|
|
26
|
+
EXERCISE_START_NOW = 17,
|
|
27
|
+
EXERCISE_INCREASE_FREQUENCY = 18,
|
|
28
|
+
EXERCISE_SCHEDULE_SESSION = 19,
|
|
29
|
+
CUSTOM = 20
|
|
30
|
+
}
|
|
31
|
+
export interface DailyTask {
|
|
32
|
+
type: DailyTaskType;
|
|
33
|
+
description: string;
|
|
34
|
+
target: {
|
|
35
|
+
unit: string;
|
|
36
|
+
initial: number;
|
|
37
|
+
current: number;
|
|
38
|
+
};
|
|
39
|
+
habitKey: HabitKey;
|
|
40
|
+
isMicroChallenge: boolean;
|
|
41
|
+
currentProgress: number;
|
|
42
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HabitKey = exports.DailyTaskType = void 0;
|
|
4
|
+
var DailyTaskType;
|
|
5
|
+
(function (DailyTaskType) {
|
|
6
|
+
DailyTaskType[DailyTaskType["DIET_LOGGING"] = 0] = "DIET_LOGGING";
|
|
7
|
+
DailyTaskType[DailyTaskType["STEP_COUNT"] = 1] = "STEP_COUNT";
|
|
8
|
+
DailyTaskType[DailyTaskType["EXERCISE_LOGGING"] = 2] = "EXERCISE_LOGGING";
|
|
9
|
+
DailyTaskType[DailyTaskType["GLUCOSE_LOGGING"] = 3] = "GLUCOSE_LOGGING";
|
|
10
|
+
DailyTaskType[DailyTaskType["CUSTOM"] = 4] = "CUSTOM";
|
|
11
|
+
})(DailyTaskType || (exports.DailyTaskType = DailyTaskType = {}));
|
|
12
|
+
var HabitKey;
|
|
13
|
+
(function (HabitKey) {
|
|
14
|
+
HabitKey[HabitKey["GLUCOSE_LOG_TIMELY"] = 0] = "GLUCOSE_LOG_TIMELY";
|
|
15
|
+
HabitKey[HabitKey["GLUCOSE_LOG_RANDOM"] = 1] = "GLUCOSE_LOG_RANDOM";
|
|
16
|
+
HabitKey[HabitKey["GLUCOSE_CHECK_NOW"] = 2] = "GLUCOSE_CHECK_NOW";
|
|
17
|
+
HabitKey[HabitKey["GLUCOSE_INTERPRET_RANGE"] = 3] = "GLUCOSE_INTERPRET_RANGE";
|
|
18
|
+
HabitKey[HabitKey["DIET_LOG_BREAKFAST"] = 4] = "DIET_LOG_BREAKFAST";
|
|
19
|
+
HabitKey[HabitKey["DIET_LOG_LUNCH"] = 5] = "DIET_LOG_LUNCH";
|
|
20
|
+
HabitKey[HabitKey["DIET_LOG_DINNER"] = 6] = "DIET_LOG_DINNER";
|
|
21
|
+
HabitKey[HabitKey["DIET_LOG_SNACK_MORNING"] = 7] = "DIET_LOG_SNACK_MORNING";
|
|
22
|
+
HabitKey[HabitKey["DIET_LOG_SNACK_EVENING"] = 8] = "DIET_LOG_SNACK_EVENING";
|
|
23
|
+
HabitKey[HabitKey["DIET_LOG_ANY"] = 9] = "DIET_LOG_ANY";
|
|
24
|
+
HabitKey[HabitKey["DIET_HEALTHY_CHOICE"] = 10] = "DIET_HEALTHY_CHOICE";
|
|
25
|
+
HabitKey[HabitKey["DIET_PLAN_MEALS"] = 11] = "DIET_PLAN_MEALS";
|
|
26
|
+
HabitKey[HabitKey["STEPS_MEET_DAILY_TARGET"] = 12] = "STEPS_MEET_DAILY_TARGET";
|
|
27
|
+
HabitKey[HabitKey["STEPS_INCREASE_ACTIVITY"] = 13] = "STEPS_INCREASE_ACTIVITY";
|
|
28
|
+
HabitKey[HabitKey["STEPS_LOG_MANUAL"] = 14] = "STEPS_LOG_MANUAL";
|
|
29
|
+
HabitKey[HabitKey["EXERCISE_LOG_SESSION"] = 15] = "EXERCISE_LOG_SESSION";
|
|
30
|
+
HabitKey[HabitKey["EXERCISE_COMPLETE_PLANNED"] = 16] = "EXERCISE_COMPLETE_PLANNED";
|
|
31
|
+
HabitKey[HabitKey["EXERCISE_START_NOW"] = 17] = "EXERCISE_START_NOW";
|
|
32
|
+
HabitKey[HabitKey["EXERCISE_INCREASE_FREQUENCY"] = 18] = "EXERCISE_INCREASE_FREQUENCY";
|
|
33
|
+
HabitKey[HabitKey["EXERCISE_SCHEDULE_SESSION"] = 19] = "EXERCISE_SCHEDULE_SESSION";
|
|
34
|
+
HabitKey[HabitKey["CUSTOM"] = 20] = "CUSTOM";
|
|
35
|
+
})(HabitKey || (exports.HabitKey = HabitKey = {}));
|
package/dist/types/profile.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export interface DiabetesSettings {
|
|
|
48
48
|
sugarPostMealLevel: string;
|
|
49
49
|
sugarPostMealCheckedDate: string;
|
|
50
50
|
hba1cLevel: string;
|
|
51
|
-
|
|
51
|
+
hba1cCheckedDate: string;
|
|
52
52
|
history: string[];
|
|
53
53
|
diabetesInFamily: boolean;
|
|
54
54
|
medications: string[];
|