@taphealth/kafka 1.2.57 → 1.2.58

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,10 +1,14 @@
1
1
  import { Topics } from "../topics";
2
- import { ActivityType } from "../types/reward";
2
+ import { ActivityType } from "../types/activity";
3
+ import { GlucoseRange } from "../types/glucose";
3
4
  export interface ActivityLoggedEvent {
4
5
  topic: Topics.ActivityLogged;
5
6
  data: {
6
7
  userId: string;
7
8
  activityType: ActivityType;
8
9
  loggedAt: Date;
10
+ mealType?: string;
11
+ hadHealthy?: boolean;
12
+ glucoseRange?: GlucoseRange;
9
13
  };
10
14
  }
@@ -4,5 +4,10 @@ export interface DietCreatedEvent {
4
4
  data: {
5
5
  userId: string;
6
6
  scheduledDate: string;
7
+ date: Date;
8
+ mealTime: string;
9
+ mealType: string;
10
+ hasLogged: boolean;
11
+ hadHealthyMeal?: boolean;
7
12
  };
8
13
  }
@@ -4,5 +4,9 @@ export interface EducationCreatedEvent {
4
4
  data: {
5
5
  userId: string;
6
6
  scheduledDate: string;
7
+ date: Date;
8
+ title: string;
9
+ description: string;
10
+ completionStatus: boolean;
7
11
  };
8
12
  }
@@ -1,8 +1,13 @@
1
1
  import { Topics } from "../topics";
2
+ import { ExerciseDifficulty, ExerciseStatus } from "../types/exercise";
2
3
  export interface ExerciseCreatedEvent {
3
4
  topic: Topics.ExerciseCreated;
4
5
  data: {
5
6
  userId: string;
6
7
  scheduledDate: string;
8
+ date: Date;
9
+ name: string;
10
+ status: ExerciseStatus;
11
+ difficulty: ExerciseDifficulty;
7
12
  };
8
13
  }
@@ -1,8 +1,13 @@
1
1
  import { Topics } from "../topics";
2
+ import { GlucoseType } from "../types/glucose";
2
3
  export interface GlucoseCreatedEvent {
3
4
  topic: Topics.GlucoseCreated;
4
5
  data: {
5
6
  userId: string;
6
7
  scheduledDate: string;
8
+ date: Date;
9
+ type: GlucoseType;
10
+ dueTime: string;
11
+ hasLogged: boolean;
7
12
  };
8
13
  }
@@ -0,0 +1,13 @@
1
+ import { Topics } from "../topics";
2
+ export interface StepsLoggingEvent {
3
+ topic: Topics.StepsLogging;
4
+ data: {
5
+ userId: string;
6
+ Date: Date;
7
+ cumulativeStepsCount: number;
8
+ targetStepsCount: number;
9
+ averageCumulativeStepsCount: number;
10
+ caloriesBurnt: number;
11
+ distanceWalked: number;
12
+ };
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export * from "./types/refund";
7
7
  export * from "./types/payment";
8
8
  export * from "./types/profile";
9
9
  export * from "./types/glucose";
10
- export * from "./types/reward";
10
+ export * from "./types/activity";
11
11
  export * from "./events/payment-captured";
12
12
  export * from "./events/payment-failed";
13
13
  export * from "./events/appointment-created";
@@ -30,3 +30,4 @@ export * from "./events/glucose-created";
30
30
  export * from "./events/glucose-generate";
31
31
  export * from "./events/glucose-logging";
32
32
  export * from "./events/activity-logged";
33
+ export * from "./events/steps-logging";
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ __exportStar(require("./types/refund"), exports);
23
23
  __exportStar(require("./types/payment"), exports);
24
24
  __exportStar(require("./types/profile"), exports);
25
25
  __exportStar(require("./types/glucose"), exports);
26
- __exportStar(require("./types/reward"), exports);
26
+ __exportStar(require("./types/activity"), exports);
27
27
  __exportStar(require("./events/payment-captured"), exports);
28
28
  __exportStar(require("./events/payment-failed"), exports);
29
29
  __exportStar(require("./events/appointment-created"), exports);
@@ -46,3 +46,4 @@ __exportStar(require("./events/glucose-created"), exports);
46
46
  __exportStar(require("./events/glucose-generate"), exports);
47
47
  __exportStar(require("./events/glucose-logging"), exports);
48
48
  __exportStar(require("./events/activity-logged"), exports);
49
+ __exportStar(require("./events/steps-logging"), exports);
package/dist/topics.d.ts CHANGED
@@ -22,5 +22,6 @@ export declare enum Topics {
22
22
  GlucoseCreated = "glucose-created",
23
23
  GlucoseGenerate = "glucose-generate",
24
24
  GlucoseLogging = "glucose-logging",
25
- ActivityLogged = "activity-logged"
25
+ ActivityLogged = "activity-logged",
26
+ StepsLogging = "steps-logging"
26
27
  }
package/dist/topics.js CHANGED
@@ -27,4 +27,5 @@ var Topics;
27
27
  Topics["GlucoseGenerate"] = "glucose-generate";
28
28
  Topics["GlucoseLogging"] = "glucose-logging";
29
29
  Topics["ActivityLogged"] = "activity-logged";
30
+ Topics["StepsLogging"] = "steps-logging";
30
31
  })(Topics || (exports.Topics = Topics = {}));
@@ -0,0 +1,6 @@
1
+ export declare enum ActivityType {
2
+ MEAL_LOGGING = 0,
3
+ EXERCISE_LOGGING = 1,
4
+ EDUCATIONAL_LOGGING = 2,
5
+ GLUCOSE_LOGGING = 3
6
+ }
@@ -4,7 +4,7 @@ exports.ActivityType = void 0;
4
4
  var ActivityType;
5
5
  (function (ActivityType) {
6
6
  ActivityType[ActivityType["MEAL_LOGGING"] = 0] = "MEAL_LOGGING";
7
- ActivityType[ActivityType["STEPS_LOGGING"] = 1] = "STEPS_LOGGING";
8
- ActivityType[ActivityType["EXERCISE_LOGGING"] = 2] = "EXERCISE_LOGGING";
9
- ActivityType[ActivityType["EDUCATIONAL_CONTENT"] = 3] = "EDUCATIONAL_CONTENT";
7
+ ActivityType[ActivityType["EXERCISE_LOGGING"] = 1] = "EXERCISE_LOGGING";
8
+ ActivityType[ActivityType["EDUCATIONAL_LOGGING"] = 2] = "EDUCATIONAL_LOGGING";
9
+ ActivityType[ActivityType["GLUCOSE_LOGGING"] = 3] = "GLUCOSE_LOGGING";
10
10
  })(ActivityType || (exports.ActivityType = ActivityType = {}));
@@ -0,0 +1,9 @@
1
+ export declare enum ExerciseStatus {
2
+ INCOMPLETE = 0,
3
+ COMPLETE = 1
4
+ }
5
+ export declare enum ExerciseDifficulty {
6
+ EASY = 0,
7
+ MODERATE = 1,
8
+ CHALLENGING = 2
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExerciseDifficulty = exports.ExerciseStatus = void 0;
4
+ var ExerciseStatus;
5
+ (function (ExerciseStatus) {
6
+ ExerciseStatus[ExerciseStatus["INCOMPLETE"] = 0] = "INCOMPLETE";
7
+ ExerciseStatus[ExerciseStatus["COMPLETE"] = 1] = "COMPLETE";
8
+ })(ExerciseStatus || (exports.ExerciseStatus = ExerciseStatus = {}));
9
+ var ExerciseDifficulty;
10
+ (function (ExerciseDifficulty) {
11
+ ExerciseDifficulty[ExerciseDifficulty["EASY"] = 0] = "EASY";
12
+ ExerciseDifficulty[ExerciseDifficulty["MODERATE"] = 1] = "MODERATE";
13
+ ExerciseDifficulty[ExerciseDifficulty["CHALLENGING"] = 2] = "CHALLENGING";
14
+ })(ExerciseDifficulty || (exports.ExerciseDifficulty = ExerciseDifficulty = {}));
@@ -4,3 +4,9 @@ export declare enum GlucoseType {
4
4
  Bedtime = 2,
5
5
  PostExercise = 3
6
6
  }
7
+ export declare enum GlucoseRange {
8
+ LOW = 0,
9
+ NORMAL = 1,
10
+ HIGH = 2,
11
+ VERY_HIGH = 3
12
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GlucoseType = void 0;
3
+ exports.GlucoseRange = exports.GlucoseType = void 0;
4
4
  var GlucoseType;
5
5
  (function (GlucoseType) {
6
6
  GlucoseType[GlucoseType["Fasting"] = 0] = "Fasting";
@@ -8,3 +8,10 @@ var GlucoseType;
8
8
  GlucoseType[GlucoseType["Bedtime"] = 2] = "Bedtime";
9
9
  GlucoseType[GlucoseType["PostExercise"] = 3] = "PostExercise";
10
10
  })(GlucoseType || (exports.GlucoseType = GlucoseType = {}));
11
+ var GlucoseRange;
12
+ (function (GlucoseRange) {
13
+ GlucoseRange[GlucoseRange["LOW"] = 0] = "LOW";
14
+ GlucoseRange[GlucoseRange["NORMAL"] = 1] = "NORMAL";
15
+ GlucoseRange[GlucoseRange["HIGH"] = 2] = "HIGH";
16
+ GlucoseRange[GlucoseRange["VERY_HIGH"] = 3] = "VERY_HIGH";
17
+ })(GlucoseRange || (exports.GlucoseRange = GlucoseRange = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taphealth/kafka",
3
- "version": "1.2.57",
3
+ "version": "1.2.58",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,6 +0,0 @@
1
- export declare enum ActivityType {
2
- MEAL_LOGGING = 0,
3
- STEPS_LOGGING = 1,
4
- EXERCISE_LOGGING = 2,
5
- EDUCATIONAL_CONTENT = 3
6
- }