@hedia/types 2.1.60-alpha.7 → 2.1.60

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.
Files changed (37) hide show
  1. package/dist/index.d.ts +2 -2
  2. package/dist/index.js +14 -14
  3. package/dist/types/activity/activity.d.ts +64 -64
  4. package/dist/types/activity/activity.js +32 -32
  5. package/dist/types/boluscalculator/boluscalculator.d.ts +80 -80
  6. package/dist/types/boluscalculator/boluscalculator.js +27 -27
  7. package/dist/types/cgm/cgm.d.ts +24 -25
  8. package/dist/types/cgm/cgm.js +17 -17
  9. package/dist/types/cgm/cgm.js.map +1 -1
  10. package/dist/types/enums.d.ts +424 -424
  11. package/dist/types/enums.js +441 -441
  12. package/dist/types/index.d.ts +11 -12
  13. package/dist/types/index.js +23 -24
  14. package/dist/types/index.js.map +1 -1
  15. package/dist/types/logbook/logbook.d.ts +121 -121
  16. package/dist/types/logbook/logbook.js +18 -18
  17. package/dist/types/services/events/logbook.d.ts +11 -11
  18. package/dist/types/services/events/logbook.js +2 -2
  19. package/dist/types/services/outbound/email.d.ts +19 -19
  20. package/dist/types/services/outbound/email.js +15 -15
  21. package/dist/types/services/outbound/notification.d.ts +12 -12
  22. package/dist/types/services/outbound/notification.js +2 -2
  23. package/dist/types/services/rpc/auth.d.ts +17 -17
  24. package/dist/types/services/rpc/auth.js +2 -2
  25. package/dist/types/services/rpc/logbook.d.ts +28 -28
  26. package/dist/types/services/rpc/logbook.js +2 -2
  27. package/dist/types/userdetails/userdetails.d.ts +13 -13
  28. package/dist/types/userdetails/userdetails.js +2 -2
  29. package/dist/types/usersettings/usersettings.d.ts +107 -107
  30. package/dist/types/usersettings/usersettings.js +53 -53
  31. package/package.json +1 -1
  32. package/types/cgm/cgm.ts +1 -2
  33. package/types/index.ts +0 -1
  34. package/dist/types/services/events/projectLucas.d.ts +0 -22
  35. package/dist/types/services/events/projectLucas.js +0 -3
  36. package/dist/types/services/events/projectLucas.js.map +0 -1
  37. package/types/services/events/projectLucas.ts +0 -23
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=userdetails.js.map
@@ -1,107 +1,107 @@
1
- import { Activity } from "../activity/activity";
2
- import { BloodGlucoseUnit, BloodKetonesUnit } from "../enums";
3
- export declare namespace UserSettings {
4
- namespace Types {
5
- interface IUserSettings {
6
- diabetesType?: Enums.DiabetesType;
7
- insulinDependent?: boolean;
8
- gender?: Enums.Gender;
9
- height?: number;
10
- email?: string;
11
- weight?: number;
12
- birthday?: string;
13
- treatmentType?: Enums.InjectionMethod;
14
- bloodGlucoseUnits?: BloodGlucoseUnit;
15
- bloodKetonesUnit?: BloodKetonesUnit;
16
- parameters?: IParameters;
17
- glucoseLevelTargets?: IBGLTargets;
18
- fastActingInsulin?: Enums.FastActingInsulin;
19
- longActingInsulin?: Enums.LongActingInsulin;
20
- uuidOld?: string;
21
- uuid?: string;
22
- created?: string;
23
- activity?: Activity.Types.ActivitySettings;
24
- notifications?: IUSerSettingsNotifications;
25
- }
26
- interface IUSerSettingsNotifications {
27
- medicineNotification: IMedicineNotification;
28
- remeasurementNotification: IRemeasurementNotification;
29
- deviceIdentifiers?: Array<INotificationDeviceIdentifier>;
30
- }
31
- interface INotifications {
32
- toggle: boolean;
33
- }
34
- interface IMedicineNotification extends INotifications {
35
- dailyReminderTime: string;
36
- }
37
- interface IRemeasurementNotification extends INotifications {
38
- remeasurement: number;
39
- }
40
- interface IInterval {
41
- startTime: string;
42
- }
43
- interface IParameters {
44
- parameterIntervals: Array<IParameterInterval>;
45
- overallParameters: IParameterInterval;
46
- use?: Enums.Usage;
47
- }
48
- interface IParameterInterval extends IInterval {
49
- insulinSensitivity: number;
50
- carbohydrateRatio: number;
51
- }
52
- interface IBGLTargets {
53
- targetBGLIntervals?: Array<IBGLInterval>;
54
- overallTargetBGL?: IBGLInterval;
55
- use?: Enums.Usage;
56
- }
57
- interface IBGLInterval extends IInterval {
58
- low: number;
59
- target: number;
60
- high: number;
61
- }
62
- interface INotificationDeviceIdentifier {
63
- token: string;
64
- timestamp: number;
65
- }
66
- }
67
- namespace Enums {
68
- enum Usage {
69
- Overall = "overall",
70
- Intervals = "intervals"
71
- }
72
- enum FastActingInsulin {
73
- Novorapid = "Novorapid",
74
- Fiasp = "Fiasp",
75
- Humalog = "Humalog",
76
- Apidra = "Apidra",
77
- Other = "Other",
78
- None = "None"
79
- }
80
- enum LongActingInsulin {
81
- Lantus = "Lantus",
82
- Basaglar = "Basaglar",
83
- Tuojeo = "Tuojeo",
84
- Levemir = "Levemir",
85
- Tresiba = "Tresiba",
86
- Other = "Other",
87
- None = "None"
88
- }
89
- enum DiabetesType {
90
- Type1 = 1,
91
- Type2 = 2
92
- }
93
- enum Gender {
94
- Male = "Male",
95
- Female = "Female"
96
- }
97
- /**
98
- * String enum for differentiating between different methods by which someone can inject insulin into the body.
99
- * Mainly used to determine how insulin amounts should be rounded.
100
- */
101
- enum InjectionMethod {
102
- PenHalf = "Pen-half",
103
- PenWhole = "Pen-whole",
104
- Pump = "Pump"
105
- }
106
- }
107
- }
1
+ import { Activity } from "../activity/activity";
2
+ import { BloodGlucoseUnit, BloodKetonesUnit } from "../enums";
3
+ export declare namespace UserSettings {
4
+ namespace Types {
5
+ interface IUserSettings {
6
+ diabetesType?: Enums.DiabetesType;
7
+ insulinDependent?: boolean;
8
+ gender?: Enums.Gender;
9
+ height?: number;
10
+ email?: string;
11
+ weight?: number;
12
+ birthday?: string;
13
+ treatmentType?: Enums.InjectionMethod;
14
+ bloodGlucoseUnits?: BloodGlucoseUnit;
15
+ bloodKetonesUnit?: BloodKetonesUnit;
16
+ parameters?: IParameters;
17
+ glucoseLevelTargets?: IBGLTargets;
18
+ fastActingInsulin?: Enums.FastActingInsulin;
19
+ longActingInsulin?: Enums.LongActingInsulin;
20
+ uuidOld?: string;
21
+ uuid?: string;
22
+ created?: string;
23
+ activity?: Activity.Types.ActivitySettings;
24
+ notifications?: IUSerSettingsNotifications;
25
+ }
26
+ interface IUSerSettingsNotifications {
27
+ medicineNotification: IMedicineNotification;
28
+ remeasurementNotification: IRemeasurementNotification;
29
+ deviceIdentifiers?: Array<INotificationDeviceIdentifier>;
30
+ }
31
+ interface INotifications {
32
+ toggle: boolean;
33
+ }
34
+ interface IMedicineNotification extends INotifications {
35
+ dailyReminderTime: string;
36
+ }
37
+ interface IRemeasurementNotification extends INotifications {
38
+ remeasurement: number;
39
+ }
40
+ interface IInterval {
41
+ startTime: string;
42
+ }
43
+ interface IParameters {
44
+ parameterIntervals: Array<IParameterInterval>;
45
+ overallParameters: IParameterInterval;
46
+ use?: Enums.Usage;
47
+ }
48
+ interface IParameterInterval extends IInterval {
49
+ insulinSensitivity: number;
50
+ carbohydrateRatio: number;
51
+ }
52
+ interface IBGLTargets {
53
+ targetBGLIntervals?: Array<IBGLInterval>;
54
+ overallTargetBGL?: IBGLInterval;
55
+ use?: Enums.Usage;
56
+ }
57
+ interface IBGLInterval extends IInterval {
58
+ low: number;
59
+ target: number;
60
+ high: number;
61
+ }
62
+ interface INotificationDeviceIdentifier {
63
+ token: string;
64
+ timestamp: number;
65
+ }
66
+ }
67
+ namespace Enums {
68
+ enum Usage {
69
+ Overall = "overall",
70
+ Intervals = "intervals"
71
+ }
72
+ enum FastActingInsulin {
73
+ Novorapid = "Novorapid",
74
+ Fiasp = "Fiasp",
75
+ Humalog = "Humalog",
76
+ Apidra = "Apidra",
77
+ Other = "Other",
78
+ None = "None"
79
+ }
80
+ enum LongActingInsulin {
81
+ Lantus = "Lantus",
82
+ Basaglar = "Basaglar",
83
+ Tuojeo = "Tuojeo",
84
+ Levemir = "Levemir",
85
+ Tresiba = "Tresiba",
86
+ Other = "Other",
87
+ None = "None"
88
+ }
89
+ enum DiabetesType {
90
+ Type1 = 1,
91
+ Type2 = 2
92
+ }
93
+ enum Gender {
94
+ Male = "Male",
95
+ Female = "Female"
96
+ }
97
+ /**
98
+ * String enum for differentiating between different methods by which someone can inject insulin into the body.
99
+ * Mainly used to determine how insulin amounts should be rounded.
100
+ */
101
+ enum InjectionMethod {
102
+ PenHalf = "Pen-half",
103
+ PenWhole = "Pen-whole",
104
+ Pump = "Pump"
105
+ }
106
+ }
107
+ }
@@ -1,54 +1,54 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserSettings = void 0;
4
- var UserSettings;
5
- (function (UserSettings) {
6
- let Enums;
7
- (function (Enums) {
8
- let Usage;
9
- (function (Usage) {
10
- Usage["Overall"] = "overall";
11
- Usage["Intervals"] = "intervals";
12
- })(Usage = Enums.Usage || (Enums.Usage = {}));
13
- let FastActingInsulin;
14
- (function (FastActingInsulin) {
15
- FastActingInsulin["Novorapid"] = "Novorapid";
16
- FastActingInsulin["Fiasp"] = "Fiasp";
17
- FastActingInsulin["Humalog"] = "Humalog";
18
- FastActingInsulin["Apidra"] = "Apidra";
19
- FastActingInsulin["Other"] = "Other";
20
- FastActingInsulin["None"] = "None";
21
- })(FastActingInsulin = Enums.FastActingInsulin || (Enums.FastActingInsulin = {}));
22
- let LongActingInsulin;
23
- (function (LongActingInsulin) {
24
- LongActingInsulin["Lantus"] = "Lantus";
25
- LongActingInsulin["Basaglar"] = "Basaglar";
26
- LongActingInsulin["Tuojeo"] = "Tuojeo";
27
- LongActingInsulin["Levemir"] = "Levemir";
28
- LongActingInsulin["Tresiba"] = "Tresiba";
29
- LongActingInsulin["Other"] = "Other";
30
- LongActingInsulin["None"] = "None";
31
- })(LongActingInsulin = Enums.LongActingInsulin || (Enums.LongActingInsulin = {}));
32
- let DiabetesType;
33
- (function (DiabetesType) {
34
- DiabetesType[DiabetesType["Type1"] = 1] = "Type1";
35
- DiabetesType[DiabetesType["Type2"] = 2] = "Type2";
36
- })(DiabetesType = Enums.DiabetesType || (Enums.DiabetesType = {}));
37
- let Gender;
38
- (function (Gender) {
39
- Gender["Male"] = "Male";
40
- Gender["Female"] = "Female";
41
- })(Gender = Enums.Gender || (Enums.Gender = {}));
42
- /**
43
- * String enum for differentiating between different methods by which someone can inject insulin into the body.
44
- * Mainly used to determine how insulin amounts should be rounded.
45
- */
46
- let InjectionMethod;
47
- (function (InjectionMethod) {
48
- InjectionMethod["PenHalf"] = "Pen-half";
49
- InjectionMethod["PenWhole"] = "Pen-whole";
50
- InjectionMethod["Pump"] = "Pump";
51
- })(InjectionMethod = Enums.InjectionMethod || (Enums.InjectionMethod = {}));
52
- })(Enums = UserSettings.Enums || (UserSettings.Enums = {}));
53
- })(UserSettings = exports.UserSettings || (exports.UserSettings = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserSettings = void 0;
4
+ var UserSettings;
5
+ (function (UserSettings) {
6
+ let Enums;
7
+ (function (Enums) {
8
+ let Usage;
9
+ (function (Usage) {
10
+ Usage["Overall"] = "overall";
11
+ Usage["Intervals"] = "intervals";
12
+ })(Usage = Enums.Usage || (Enums.Usage = {}));
13
+ let FastActingInsulin;
14
+ (function (FastActingInsulin) {
15
+ FastActingInsulin["Novorapid"] = "Novorapid";
16
+ FastActingInsulin["Fiasp"] = "Fiasp";
17
+ FastActingInsulin["Humalog"] = "Humalog";
18
+ FastActingInsulin["Apidra"] = "Apidra";
19
+ FastActingInsulin["Other"] = "Other";
20
+ FastActingInsulin["None"] = "None";
21
+ })(FastActingInsulin = Enums.FastActingInsulin || (Enums.FastActingInsulin = {}));
22
+ let LongActingInsulin;
23
+ (function (LongActingInsulin) {
24
+ LongActingInsulin["Lantus"] = "Lantus";
25
+ LongActingInsulin["Basaglar"] = "Basaglar";
26
+ LongActingInsulin["Tuojeo"] = "Tuojeo";
27
+ LongActingInsulin["Levemir"] = "Levemir";
28
+ LongActingInsulin["Tresiba"] = "Tresiba";
29
+ LongActingInsulin["Other"] = "Other";
30
+ LongActingInsulin["None"] = "None";
31
+ })(LongActingInsulin = Enums.LongActingInsulin || (Enums.LongActingInsulin = {}));
32
+ let DiabetesType;
33
+ (function (DiabetesType) {
34
+ DiabetesType[DiabetesType["Type1"] = 1] = "Type1";
35
+ DiabetesType[DiabetesType["Type2"] = 2] = "Type2";
36
+ })(DiabetesType = Enums.DiabetesType || (Enums.DiabetesType = {}));
37
+ let Gender;
38
+ (function (Gender) {
39
+ Gender["Male"] = "Male";
40
+ Gender["Female"] = "Female";
41
+ })(Gender = Enums.Gender || (Enums.Gender = {}));
42
+ /**
43
+ * String enum for differentiating between different methods by which someone can inject insulin into the body.
44
+ * Mainly used to determine how insulin amounts should be rounded.
45
+ */
46
+ let InjectionMethod;
47
+ (function (InjectionMethod) {
48
+ InjectionMethod["PenHalf"] = "Pen-half";
49
+ InjectionMethod["PenWhole"] = "Pen-whole";
50
+ InjectionMethod["Pump"] = "Pump";
51
+ })(InjectionMethod = Enums.InjectionMethod || (Enums.InjectionMethod = {}));
52
+ })(Enums = UserSettings.Enums || (UserSettings.Enums = {}));
53
+ })(UserSettings = exports.UserSettings || (exports.UserSettings = {}));
54
54
  //# sourceMappingURL=usersettings.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/types",
3
- "version": "2.1.60-alpha.7",
3
+ "version": "2.1.60",
4
4
  "description": "Enums, interfaces, and other common types for use in Hedia's software.",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
package/types/cgm/cgm.ts CHANGED
@@ -16,12 +16,11 @@ export namespace Cgm {
16
16
  export namespace Types {
17
17
  export interface ICgmReading<T extends Enums.Manufacturers> {
18
18
  userId: string;
19
- timestamp: Date;
20
19
  retrievalTimestamp: Date;
20
+ readingTimestamp: Date;
21
21
  glucoseMmol: number;
22
22
  manufacturer: T;
23
23
  model: IManufacturersToModels[T];
24
- version?: string;
25
24
  }
26
25
  }
27
26
  }
package/types/index.ts CHANGED
@@ -7,6 +7,5 @@ export * from "./services/outbound/notification";
7
7
  export * from "./services/rpc/auth";
8
8
  export * from "./services/rpc/logbook";
9
9
  export * from "./services/events/logbook";
10
- export * from "./services/events/projectLucas";
11
10
  export * from "./userdetails/userdetails";
12
11
  export * from "./usersettings/usersettings";
@@ -1,22 +0,0 @@
1
- export declare namespace ProjectLucas {
2
- namespace Types {
3
- interface IForecastPacket {
4
- inputDataTimestamp: string;
5
- calculationTimestamp: string;
6
- predictionValidTimestamp: string;
7
- glucoseForecastMmol: number;
8
- glucoseForecastMmolDelta: number;
9
- glucoseForecastStdDev: number;
10
- }
11
- interface IForecast {
12
- inputDataTimestamp: Date;
13
- calculationTimestamp: Date;
14
- predictionValidTimestamp: Date;
15
- glucoseForecastMmol: number;
16
- glucoseForecastMmolDelta: number;
17
- glucoseForecastStdDev: number;
18
- glucoseForecastLowerDev: number;
19
- glucoseForecastUpperDev: number;
20
- }
21
- }
22
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=projectLucas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"projectLucas.js","sourceRoot":"","sources":["../../../../types/services/events/projectLucas.ts"],"names":[],"mappings":""}
@@ -1,23 +0,0 @@
1
- export namespace ProjectLucas {
2
- export namespace Types {
3
- export interface IForecastPacket {
4
- inputDataTimestamp: string;
5
- calculationTimestamp: string;
6
- predictionValidTimestamp: string;
7
- glucoseForecastMmol: number;
8
- glucoseForecastMmolDelta: number;
9
- glucoseForecastStdDev: number;
10
- }
11
-
12
- export interface IForecast {
13
- inputDataTimestamp: Date;
14
- calculationTimestamp: Date;
15
- predictionValidTimestamp: Date;
16
- glucoseForecastMmol: number;
17
- glucoseForecastMmolDelta: number;
18
- glucoseForecastStdDev: number;
19
- glucoseForecastLowerDev: number;
20
- glucoseForecastUpperDev: number;
21
- }
22
- }
23
- }