@hedia/types 1.2.5 → 1.2.6

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
- 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
@@ -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.2.6",
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",