@hedia/types 1.2.5 → 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 +1 @@
1
- {"version":3,"file":"enums.js","sourceRoot":"","sources":["../../types/enums.ts"],"names":[],"mappings":";;;AAAA,IAAK,KAGJ;AAHD,WAAK,KAAK;IACT,0BAAiB,CAAA;IACjB,wBAAe,CAAA;AAChB,CAAC,EAHI,KAAK,KAAL,KAAK,QAGT;AACD,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC3B,qCAAqB,CAAA;IACrB,mCAAmB,CAAA;AACpB,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B;AACD,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC3B,qCAAqB,CAAA;IACrB,mCAAmB,CAAA;AACpB,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B;AAED,IAAY,SAOX;AAPD,WAAY,SAAS;IACpB,yBAAY,CAAA;IACZ,2BAAc,CAAA;IACd,2BAAc,CAAA;IACd,gCAAc,CAAA;IACd,iCAAe,CAAA;IACf,4BAAe,CAAA;AAChB,CAAC,EAPW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAOpB;AAED,IAAY,YAKX;AALD,WAAY,YAAY;IACvB,sDAAa,CAAA;IACb,uDAAc,CAAA;IACd,qDAAc,CAAA;IACd,oDAAc,CAAA;AACf,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AAED,IAAY,QAMX;AAND,WAAY,QAAQ;IACnB,qCAAO,CAAA;IACP,6CAAW,CAAA;IACX,6CAAW,CAAA;IACX,iDAAa,CAAA;IACb,yCAAS,CAAA;AACV,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB;AAED,IAAY,YAMX;AAND,WAAY,YAAY;IACvB,uDAAQ,CAAA;IACR,mDAAM,CAAA;IACN,yEA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;IAE1B;;OAEG;IACH,6DAAkB,CAAA;IAElB;;;;OAIG;IACH,mGAAqC,CAAA;IAErC;;OAEG;IACH,+DAAmB,CAAA;AACpB,CAAC,EAjYW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAiYrB;AAED,IAAY,iBAoDX;AApDD,WAAY,iBAAiB;IAC5B;;;OAGG;IACH,wCAAmB,CAAA;IAEnB;;OAEG;IACH,sCAAiB,CAAA;IAEjB;;;OAGG;IACH,gCAAW,CAAA;IAEX;;;OAGG;IACH,kCAAa,CAAA;IAEb;;;OAGG;IACH,wCAAmB,CAAA;IAEnB;;OAEG;IACH,oCAAe,CAAA;IAEf;;;OAGG;IACH,kCAAa,CAAA;IAEb;;;OAGG;IACH,gCAAW,CAAA;IAEX;;;OAGG;IACH,oCAAe,CAAA;AAChB,CAAC,EApDW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAoD5B"}
@@ -1,4 +1,4 @@
1
- export * from "./activity/activity";
2
- export * from "./usersettings/usersettings";
3
- export * from "./userdetails/userdetails";
4
- export * from "./boluscalculator/boluscalculator";
1
+ export * from "./activity/activity";
2
+ export * from "./usersettings/usersettings";
3
+ export * from "./userdetails/userdetails";
4
+ export * from "./boluscalculator/boluscalculator";
@@ -1,17 +1,17 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./activity/activity"), exports);
14
- __exportStar(require("./usersettings/usersettings"), exports);
15
- __exportStar(require("./userdetails/userdetails"), exports);
16
- __exportStar(require("./boluscalculator/boluscalculator"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./activity/activity"), exports);
14
+ __exportStar(require("./usersettings/usersettings"), exports);
15
+ __exportStar(require("./userdetails/userdetails"), exports);
16
+ __exportStar(require("./boluscalculator/boluscalculator"), exports);
17
17
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,33 @@
1
+ export declare namespace Logbook {
2
+ namespace Enums {
3
+ enum MoodEnum {
4
+ Sad = 1,
5
+ SemiSad = 2,
6
+ Neutral = 3,
7
+ SemiHappy = 4,
8
+ Happy = 5
9
+ }
10
+ }
11
+ namespace Types {
12
+ interface logbookEntry {
13
+ uuid: string;
14
+ entry_timestamp: string;
15
+ server_timestamp: Date | null;
16
+ client_timestamp: string;
17
+ overwritten_by_id: string | null;
18
+ settings_uuid: string;
19
+ client_version: number;
20
+ server_version: number | null;
21
+ device_and_os: string;
22
+ insulin_suggested_units: number | null;
23
+ insulin_entered_units: number | null;
24
+ carbohydrates_suggested_grams: number | null;
25
+ carbohydrates_entered_grams: number | null;
26
+ blood_glucose_millimolar: number | null;
27
+ mood: Enums.MoodEnum | null;
28
+ event_uuid: string | null;
29
+ is_deleted: Date | null;
30
+ utc_timezone_offset: string | null;
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Logbook = void 0;
4
+ var Logbook;
5
+ (function (Logbook) {
6
+ let Enums;
7
+ (function (Enums) {
8
+ let MoodEnum;
9
+ (function (MoodEnum) {
10
+ MoodEnum[MoodEnum["Sad"] = 1] = "Sad";
11
+ MoodEnum[MoodEnum["SemiSad"] = 2] = "SemiSad";
12
+ MoodEnum[MoodEnum["Neutral"] = 3] = "Neutral";
13
+ MoodEnum[MoodEnum["SemiHappy"] = 4] = "SemiHappy";
14
+ MoodEnum[MoodEnum["Happy"] = 5] = "Happy";
15
+ })(MoodEnum = Enums.MoodEnum || (Enums.MoodEnum = {}));
16
+ })(Enums = Logbook.Enums || (Logbook.Enums = {}));
17
+ })(Logbook = exports.Logbook || (exports.Logbook = {}));
18
+ //# sourceMappingURL=logbook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logbook.js","sourceRoot":"","sources":["../../../types/logbook/logbook.ts"],"names":[],"mappings":";;;AAAA,IAAiB,OAAO,CAiCvB;AAjCD,WAAiB,OAAO;IACvB,IAAiB,KAAK,CAQrB;IARD,WAAiB,KAAK;QACrB,IAAY,QAMX;QAND,WAAY,QAAQ;YACnB,qCAAO,CAAA;YACP,6CAAW,CAAA;YACX,6CAAW,CAAA;YACX,iDAAa,CAAA;YACb,yCAAS,CAAA;QACV,CAAC,EANW,QAAQ,GAAR,cAAQ,KAAR,cAAQ,QAMnB;IACF,CAAC,EARgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAQrB;AAwBF,CAAC,EAjCgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAiCvB"}
@@ -1,13 +1,13 @@
1
- import { Languages } from "../enums";
2
- export declare namespace UserDetails {
3
- namespace Types {
4
- interface IUserDetails {
5
- name?: string;
6
- email: string;
7
- research_consent?: Date | boolean;
8
- newsletter_consent?: Date | boolean;
9
- country?: string;
10
- language?: keyof typeof Languages;
11
- }
12
- }
13
- }
1
+ import { Languages } from "../enums";
2
+ export declare namespace UserDetails {
3
+ namespace Types {
4
+ interface IUserDetails {
5
+ name?: string;
6
+ email: string;
7
+ research_consent?: Date | boolean;
8
+ newsletter_consent?: Date | boolean;
9
+ country?: string;
10
+ language?: keyof typeof Languages;
11
+ }
12
+ }
13
+ }
@@ -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,99 +1,99 @@
1
- import { Activity } from "../activity/activity";
2
- import { BloodGlucoseUnit, BloodKetonesUnit } from "../enums";
3
- export declare namespace UserSettings {
4
- namespace Types {
5
- interface IUserSettings {
6
- [key: string]: unknown;
7
- diabetesType?: Enums.DiabetesType;
8
- insulinDependent?: boolean;
9
- gender?: Enums.Gender;
10
- height?: number;
11
- email?: string;
12
- weight?: number;
13
- birthday?: string;
14
- treatmentType?: Enums.InjectionMethod;
15
- bloodGlucoseUnits?: BloodGlucoseUnit;
16
- bloodKetonesUnit?: BloodKetonesUnit;
17
- parameters?: IParameters;
18
- glucoseLevelTargets?: IBGLTargets;
19
- fastActingInsulin?: string | null;
20
- longActingInsulin?: string | null;
21
- uuidOld?: string;
22
- uuid?: string;
23
- created?: string;
24
- activity?: Activity.Types.ActivitySettings;
25
- notifications?: IUSerSettingsNotifications;
26
- }
27
- interface IUSerSettingsNotifications {
28
- medicineNotification: IMedicineNotification;
29
- remeasurementNotification: IRemeasurementNotification;
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
- }
63
- namespace Enums {
64
- enum Usage {
65
- Overall = "overall",
66
- Intervals = "intervals"
67
- }
68
- enum FastActingInsulin {
69
- Novorapid = "Novorapid",
70
- Fiasp = "Fiasp",
71
- Humalog = "Humalog",
72
- Apidra = "Apidra",
73
- Other = "Other",
74
- None = "None"
75
- }
76
- enum LongActingInsulin {
77
- Lantus = "Lantus",
78
- Basaglar = "Basaglar",
79
- Tuojeo = "Tuojeo",
80
- Levemir = "Levemir",
81
- Tresiba = "Tresiba",
82
- Other = "Other",
83
- None = "None"
84
- }
85
- enum DiabetesType {
86
- Type1 = 1,
87
- Type2 = 2
88
- }
89
- enum Gender {
90
- Male = "Male",
91
- Female = "Female"
92
- }
93
- enum InjectionMethod {
94
- PenHalf = "Pen-half",
95
- PenWhole = "Pen-whole",
96
- Pump = "Pump"
97
- }
98
- }
99
- }
1
+ import { Activity } from "../activity/activity";
2
+ import { BloodGlucoseUnit, BloodKetonesUnit } from "../enums";
3
+ export declare namespace UserSettings {
4
+ namespace Types {
5
+ interface IUserSettings {
6
+ [key: string]: unknown;
7
+ diabetesType?: Enums.DiabetesType;
8
+ insulinDependent?: boolean;
9
+ gender?: Enums.Gender;
10
+ height?: number;
11
+ email?: string;
12
+ weight?: number;
13
+ birthday?: string;
14
+ treatmentType?: Enums.InjectionMethod;
15
+ bloodGlucoseUnits?: BloodGlucoseUnit;
16
+ bloodKetonesUnit?: BloodKetonesUnit;
17
+ parameters?: IParameters;
18
+ glucoseLevelTargets?: IBGLTargets;
19
+ fastActingInsulin?: string | null;
20
+ longActingInsulin?: string | null;
21
+ uuidOld?: string;
22
+ uuid?: string;
23
+ created?: string;
24
+ activity?: Activity.Types.ActivitySettings;
25
+ notifications?: IUSerSettingsNotifications;
26
+ }
27
+ interface IUSerSettingsNotifications {
28
+ medicineNotification: IMedicineNotification;
29
+ remeasurementNotification: IRemeasurementNotification;
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
+ }
63
+ namespace Enums {
64
+ enum Usage {
65
+ Overall = "overall",
66
+ Intervals = "intervals"
67
+ }
68
+ enum FastActingInsulin {
69
+ Novorapid = "Novorapid",
70
+ Fiasp = "Fiasp",
71
+ Humalog = "Humalog",
72
+ Apidra = "Apidra",
73
+ Other = "Other",
74
+ None = "None"
75
+ }
76
+ enum LongActingInsulin {
77
+ Lantus = "Lantus",
78
+ Basaglar = "Basaglar",
79
+ Tuojeo = "Tuojeo",
80
+ Levemir = "Levemir",
81
+ Tresiba = "Tresiba",
82
+ Other = "Other",
83
+ None = "None"
84
+ }
85
+ enum DiabetesType {
86
+ Type1 = 1,
87
+ Type2 = 2
88
+ }
89
+ enum Gender {
90
+ Male = "Male",
91
+ Female = "Female"
92
+ }
93
+ enum InjectionMethod {
94
+ PenHalf = "Pen-half",
95
+ PenWhole = "Pen-whole",
96
+ Pump = "Pump"
97
+ }
98
+ }
99
+ }
@@ -1,50 +1,50 @@
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
- let InjectionMethod;
43
- (function (InjectionMethod) {
44
- InjectionMethod["PenHalf"] = "Pen-half";
45
- InjectionMethod["PenWhole"] = "Pen-whole";
46
- InjectionMethod["Pump"] = "Pump";
47
- })(InjectionMethod = Enums.InjectionMethod || (Enums.InjectionMethod = {}));
48
- })(Enums = UserSettings.Enums || (UserSettings.Enums = {}));
49
- })(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
+ let InjectionMethod;
43
+ (function (InjectionMethod) {
44
+ InjectionMethod["PenHalf"] = "Pen-half";
45
+ InjectionMethod["PenWhole"] = "Pen-whole";
46
+ InjectionMethod["Pump"] = "Pump";
47
+ })(InjectionMethod = Enums.InjectionMethod || (Enums.InjectionMethod = {}));
48
+ })(Enums = UserSettings.Enums || (UserSettings.Enums = {}));
49
+ })(UserSettings = exports.UserSettings || (exports.UserSettings = {}));
50
50
  //# sourceMappingURL=usersettings.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/types",
3
- "version": "1.2.5",
3
+ "version": "1.4.33",
4
4
  "description": "Enums, interfaces, and other common types for use in Hedia's software.",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -10,7 +10,8 @@
10
10
  "scripts": {
11
11
  "tsc": "tsc --build",
12
12
  "clean": "tsc --build --clean",
13
- "publish-patch": "npm version patch && npx tsc && npm publish"
13
+ "prepublish": "npm ci --ignore-scripts && npm run tsc",
14
+ "postpublish": "npm run clean"
14
15
  },
15
16
  "keywords": [],
16
17
  "author": "Hedia",
@@ -8,17 +8,19 @@ export namespace BolusCalculator {
8
8
  export const REDUCTION_MIN = 0;
9
9
  }
10
10
 
11
- export namespace Types {
12
- export interface IRecentBolus {
13
- secondsPassed: number;
14
- insulinDose: number;
15
- }
16
-
11
+ export namespace Enums {
17
12
  export enum ActivityErrors {
18
13
  OutOfRange = `Out of range`,
19
14
  InvalidInterval = `Invalid activity settings interval`,
20
15
  InvalidReduction = `Invalid activity Reduction`,
21
16
  }
17
+ }
18
+
19
+ export namespace Types {
20
+ export interface IRecentBolus {
21
+ secondsPassed: number;
22
+ insulinDose: number;
23
+ }
22
24
  export interface IActivityParams {
23
25
  activityDuration: number;
24
26
  activityIntensity: Activity.Enums.ActivityIntensity;
package/types/enums.ts CHANGED
@@ -2,10 +2,12 @@ enum Units {
2
2
  MMOL_L = "mmol/l",
3
3
  MG_DL = "mg/dl",
4
4
  }
5
+
5
6
  export enum BloodGlucoseUnit {
6
7
  MMOL_L = Units.MMOL_L,
7
8
  MG_DL = Units.MG_DL,
8
9
  }
10
+
9
11
  export enum BloodKetonesUnit {
10
12
  MMOL_L = Units.MMOL_L,
11
13
  MG_DL = Units.MG_DL,
@@ -27,14 +29,6 @@ export enum Milliseconds {
27
29
  Day = 86400000,
28
30
  }
29
31
 
30
- export enum MoodEnum {
31
- Sad = 1,
32
- SemiSad = 2,
33
- Neutral = 3,
34
- SemiHappy = 4,
35
- Happy = 5,
36
- }
37
-
38
32
  export enum KetoneLevels {
39
33
  Negative,
40
34
  Normal,
@@ -0,0 +1,34 @@
1
+ export namespace Logbook {
2
+ export namespace Enums {
3
+ export enum MoodEnum {
4
+ Sad = 1,
5
+ SemiSad = 2,
6
+ Neutral = 3,
7
+ SemiHappy = 4,
8
+ Happy = 5,
9
+ }
10
+ }
11
+
12
+ export namespace Types {
13
+ export interface logbookEntry {
14
+ uuid: string;
15
+ entry_timestamp: string; // The date where the entry appears when the user look at their logbook in the app
16
+ server_timestamp: Date | null;
17
+ client_timestamp: string; // The time when the entry was created by the user on their phone
18
+ overwritten_by_id: string | null;
19
+ settings_uuid: string;
20
+ client_version: number;
21
+ server_version: number | null;
22
+ device_and_os: string;
23
+ insulin_suggested_units: number | null;
24
+ insulin_entered_units: number | null;
25
+ carbohydrates_suggested_grams: number | null;
26
+ carbohydrates_entered_grams: number | null;
27
+ blood_glucose_millimolar: number | null;
28
+ mood: Enums.MoodEnum | null;
29
+ event_uuid: string | null;
30
+ is_deleted: Date | null;
31
+ utc_timezone_offset: string | null;
32
+ }
33
+ }
34
+ }