@hedia/types 2.3.1 → 2.3.2-alpha.0

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,4 +1,4 @@
1
- import { TreamentModelEnums } from "../treatment/treatment";
1
+ import { TreatmentModelEnums } from "../treatment/treatment";
2
2
  export declare namespace PhysicalActivityModel {
3
3
  /** Enum used to indicate the type of physical activity performed by the user. */
4
4
  enum ActivityEnum {
@@ -18,7 +18,7 @@ export declare namespace PhysicalActivityModel {
18
18
  }
19
19
  interface PhysicalActivityProperties {
20
20
  type: ActivityEnum;
21
- activityIntensity: TreamentModelEnums.ActivityIntensity;
21
+ activityIntensity: TreatmentModelEnums.ActivityIntensity;
22
22
  durationSeconds: number;
23
23
  title: string | null;
24
24
  }
@@ -1,4 +1,4 @@
1
- export declare namespace TreamentModelEnums {
1
+ export declare namespace TreatmentModelEnums {
2
2
  /** Represents a unit for measuring blood glucose levels. */
3
3
  enum BloodGlucoseUnit {
4
4
  MMOL_L = "mmol/l",
@@ -88,15 +88,15 @@ export declare namespace TreatmentModel {
88
88
  startTime: TimeOfDay;
89
89
  }
90
90
  export interface Insulin {
91
- injectionMethod: TreamentModelEnums.InjectionMethod;
91
+ injectionMethod: TreatmentModelEnums.InjectionMethod;
92
92
  insulinSettings: ICalculationParameter<InsulinSettingsInterval>;
93
93
  }
94
94
  export interface BloodGlucose {
95
- bloodGlucoseUnit: TreamentModelEnums.BloodGlucoseUnit;
95
+ bloodGlucoseUnit: TreatmentModelEnums.BloodGlucoseUnit;
96
96
  bloodGlucoseTargets: ICalculationParameter<BGLInterval>;
97
97
  }
98
98
  export interface BloodKetone {
99
- bloodKetoneUnit: TreamentModelEnums.BloodKetonesUnit;
99
+ bloodKetoneUnit: TreatmentModelEnums.BloodKetonesUnit;
100
100
  }
101
101
  export interface Notifications {
102
102
  medicineNotification: IMedicineNotification;
@@ -125,8 +125,8 @@ export declare namespace TreatmentModel {
125
125
  * A null value represents that it is not supported by HDA.
126
126
  */
127
127
  export type ReductionType = ActivityReductionIntervals[keyof ActivityReductionIntervals];
128
- type ActivityIntensityKeys = keyof typeof TreamentModelEnums.ActivityIntensity;
129
- type ActivityReductionKeys = keyof typeof TreamentModelEnums.ActivityReductionIntervals;
128
+ type ActivityIntensityKeys = keyof typeof TreatmentModelEnums.ActivityIntensity;
129
+ type ActivityReductionKeys = keyof typeof TreatmentModelEnums.ActivityReductionIntervals;
130
130
  type ActivityReductionSettings = ActivityPostReduction & {
131
131
  [key in ActivityIntensityKeys]: ActivityReductionSettingsIntervals<key, "hard", "fromFortysix">;
132
132
  };
@@ -142,11 +142,11 @@ export declare namespace TreatmentModel {
142
142
  [key in ActivityReductionKeys]: K extends T ? (key extends U ? null | number : number) : number;
143
143
  };
144
144
  export interface PersonalInfo {
145
- diabetesType: TreamentModelEnums.DiabetesType;
145
+ diabetesType: TreatmentModelEnums.DiabetesType;
146
146
  insulinDependent: boolean;
147
- fastActingInsulin: TreamentModelEnums.FastActingInsulin;
148
- longActingInsulin: TreamentModelEnums.LongActingInsulin;
149
- gender: TreamentModelEnums.Gender;
147
+ fastActingInsulin: TreatmentModelEnums.FastActingInsulin;
148
+ longActingInsulin: TreatmentModelEnums.LongActingInsulin;
149
+ gender: TreatmentModelEnums.Gender;
150
150
  height: number;
151
151
  weight: number;
152
152
  birthday: Birthday;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TreamentModelEnums = void 0;
4
- var TreamentModelEnums;
5
- (function (TreamentModelEnums) {
3
+ exports.TreatmentModelEnums = void 0;
4
+ var TreatmentModelEnums;
5
+ (function (TreatmentModelEnums) {
6
6
  let Units;
7
7
  (function (Units) {
8
8
  Units["MMOL_L"] = "mmol/l";
@@ -13,13 +13,13 @@ var TreamentModelEnums;
13
13
  (function (BloodGlucoseUnit) {
14
14
  BloodGlucoseUnit["MMOL_L"] = "mmol/l";
15
15
  BloodGlucoseUnit["MG_DL"] = "mg/dl";
16
- })(BloodGlucoseUnit = TreamentModelEnums.BloodGlucoseUnit || (TreamentModelEnums.BloodGlucoseUnit = {}));
16
+ })(BloodGlucoseUnit = TreatmentModelEnums.BloodGlucoseUnit || (TreatmentModelEnums.BloodGlucoseUnit = {}));
17
17
  /** Represents a unit for measuring blood ketone levels. */
18
18
  let BloodKetonesUnit;
19
19
  (function (BloodKetonesUnit) {
20
20
  BloodKetonesUnit["MMOL_L"] = "mmol/l";
21
21
  BloodKetonesUnit["MG_DL"] = "mg/dl";
22
- })(BloodKetonesUnit = TreamentModelEnums.BloodKetonesUnit || (TreamentModelEnums.BloodKetonesUnit = {}));
22
+ })(BloodKetonesUnit = TreatmentModelEnums.BloodKetonesUnit || (TreatmentModelEnums.BloodKetonesUnit = {}));
23
23
  let FastActingInsulin;
24
24
  (function (FastActingInsulin) {
25
25
  FastActingInsulin["Novorapid"] = "Novorapid";
@@ -28,7 +28,7 @@ var TreamentModelEnums;
28
28
  FastActingInsulin["Apidra"] = "Apidra";
29
29
  FastActingInsulin["Other"] = "Other";
30
30
  FastActingInsulin["None"] = "None";
31
- })(FastActingInsulin = TreamentModelEnums.FastActingInsulin || (TreamentModelEnums.FastActingInsulin = {}));
31
+ })(FastActingInsulin = TreatmentModelEnums.FastActingInsulin || (TreatmentModelEnums.FastActingInsulin = {}));
32
32
  let LongActingInsulin;
33
33
  (function (LongActingInsulin) {
34
34
  LongActingInsulin["Lantus"] = "Lantus";
@@ -38,17 +38,17 @@ var TreamentModelEnums;
38
38
  LongActingInsulin["Tresiba"] = "Tresiba";
39
39
  LongActingInsulin["Other"] = "Other";
40
40
  LongActingInsulin["None"] = "None";
41
- })(LongActingInsulin = TreamentModelEnums.LongActingInsulin || (TreamentModelEnums.LongActingInsulin = {}));
41
+ })(LongActingInsulin = TreatmentModelEnums.LongActingInsulin || (TreatmentModelEnums.LongActingInsulin = {}));
42
42
  let DiabetesType;
43
43
  (function (DiabetesType) {
44
44
  DiabetesType[DiabetesType["Type1"] = 1] = "Type1";
45
45
  DiabetesType[DiabetesType["Type2"] = 2] = "Type2";
46
- })(DiabetesType = TreamentModelEnums.DiabetesType || (TreamentModelEnums.DiabetesType = {}));
46
+ })(DiabetesType = TreatmentModelEnums.DiabetesType || (TreatmentModelEnums.DiabetesType = {}));
47
47
  let Gender;
48
48
  (function (Gender) {
49
49
  Gender["Male"] = "Male";
50
50
  Gender["Female"] = "Female";
51
- })(Gender = TreamentModelEnums.Gender || (TreamentModelEnums.Gender = {}));
51
+ })(Gender = TreatmentModelEnums.Gender || (TreatmentModelEnums.Gender = {}));
52
52
  /**
53
53
  * String enum for differentiating between different methods by which someone can inject insulin into the body.
54
54
  * Mainly used to determine how insulin amounts should be rounded.
@@ -58,20 +58,20 @@ var TreamentModelEnums;
58
58
  InjectionMethod["PenHalf"] = "Pen-half";
59
59
  InjectionMethod["PenWhole"] = "Pen-whole";
60
60
  InjectionMethod["Pump"] = "Pump";
61
- })(InjectionMethod = TreamentModelEnums.InjectionMethod || (TreamentModelEnums.InjectionMethod = {}));
61
+ })(InjectionMethod = TreatmentModelEnums.InjectionMethod || (TreatmentModelEnums.InjectionMethod = {}));
62
62
  /** Enum that represents a set of insulin reduction fraction settings that can vary by the duration of the activity */
63
63
  let ActivityReductionIntervals;
64
64
  (function (ActivityReductionIntervals) {
65
65
  ActivityReductionIntervals["fromZero"] = "fromZero";
66
66
  ActivityReductionIntervals["fromThirty"] = "fromThirty";
67
67
  ActivityReductionIntervals["fromFortysix"] = "fromFortysix";
68
- })(ActivityReductionIntervals = TreamentModelEnums.ActivityReductionIntervals || (TreamentModelEnums.ActivityReductionIntervals = {}));
68
+ })(ActivityReductionIntervals = TreatmentModelEnums.ActivityReductionIntervals || (TreatmentModelEnums.ActivityReductionIntervals = {}));
69
69
  /** Enum used to indicate the category or intensity of a physical activity. */
70
70
  let ActivityIntensity;
71
71
  (function (ActivityIntensity) {
72
72
  ActivityIntensity["light"] = "light";
73
73
  ActivityIntensity["moderate"] = "moderate";
74
74
  ActivityIntensity["hard"] = "hard";
75
- })(ActivityIntensity = TreamentModelEnums.ActivityIntensity || (TreamentModelEnums.ActivityIntensity = {}));
76
- })(TreamentModelEnums = exports.TreamentModelEnums || (exports.TreamentModelEnums = {}));
75
+ })(ActivityIntensity = TreatmentModelEnums.ActivityIntensity || (TreatmentModelEnums.ActivityIntensity = {}));
76
+ })(TreatmentModelEnums = exports.TreatmentModelEnums || (exports.TreatmentModelEnums = {}));
77
77
  //# sourceMappingURL=treatment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"treatment.js","sourceRoot":"","sources":["../../../v3/treatment/treatment.ts"],"names":[],"mappings":";;;AAAA,IAAiB,kBAAkB,CA6DlC;AA7DD,WAAiB,kBAAkB;IAClC,IAAK,KAGJ;IAHD,WAAK,KAAK;QACT,0BAAiB,CAAA;QACjB,wBAAe,CAAA;IAChB,CAAC,EAHI,KAAK,KAAL,KAAK,QAGT;IACD,4DAA4D;IAC5D,IAAY,gBAGX;IAHD,WAAY,gBAAgB;QAC3B,qCAAqB,CAAA;QACrB,mCAAmB,CAAA;IACpB,CAAC,EAHW,gBAAgB,GAAhB,mCAAgB,KAAhB,mCAAgB,QAG3B;IACD,2DAA2D;IAC3D,IAAY,gBAGX;IAHD,WAAY,gBAAgB;QAC3B,qCAAqB,CAAA;QACrB,mCAAmB,CAAA;IACpB,CAAC,EAHW,gBAAgB,GAAhB,mCAAgB,KAAhB,mCAAgB,QAG3B;IACD,IAAY,iBAOX;IAPD,WAAY,iBAAiB;QAC5B,4CAAuB,CAAA;QACvB,oCAAe,CAAA;QACf,wCAAmB,CAAA;QACnB,sCAAiB,CAAA;QACjB,oCAAe,CAAA;QACf,kCAAa,CAAA;IACd,CAAC,EAPW,iBAAiB,GAAjB,oCAAiB,KAAjB,oCAAiB,QAO5B;IACD,IAAY,iBAQX;IARD,WAAY,iBAAiB;QAC5B,sCAAiB,CAAA;QACjB,0CAAqB,CAAA;QACrB,sCAAiB,CAAA;QACjB,wCA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tH,IAAY,0BAIX;IAJD,WAAY,0BAA0B;QACrC,mDAAqB,CAAA;QACrB,uDAAyB,CAAA;QACzB,2DAA6B,CAAA;IAC9B,CAAC,EAJW,0BAA0B,GAA1B,8CAA0B,KAA1B,8CAA0B,QAIrC;IACD,8EAA8E;IAC9E,IAAY,iBAIX;IAJD,WAAY,iBAAiB;QAC5B,oCAAe,CAAA;QACf,0CAAqB,CAAA;QACrB,kCAAa,CAAA;IACd,CAAC,EAJW,iBAAiB,GAAjB,qCAAiB,KAAjB,qCAAiB,QAI5B;AACF,CAAC,EA7DgB,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QA6DnC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/types",
3
- "version": "2.3.1",
3
+ "version": "2.3.2-alpha.0",
4
4
  "description": "Enums, interfaces, and other common types for use in Hedia's software.",
5
5
  "main": "./dist/index.js",
6
6
  "repository": {