@hedia/types 1.1.1 → 1.2.2
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.
- package/dist/index.d.ts +2 -3
- package/dist/index.js +14 -15
- package/dist/index.js.map +1 -1
- package/dist/types/activity/activity.d.ts +31 -0
- package/dist/types/activity/activity.js +23 -0
- package/dist/types/activity/activity.js.map +1 -0
- package/dist/types/boluscalculator/boluscalculator.d.ts +40 -0
- package/dist/types/boluscalculator/boluscalculator.js +21 -0
- package/dist/types/boluscalculator/boluscalculator.js.map +1 -0
- package/dist/types/enums.d.ts +417 -450
- package/dist/types/enums.js +434 -468
- package/dist/types/enums.js.map +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +17 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/userdetails/userdetails.d.ts +13 -0
- package/dist/types/{types.js → userdetails/userdetails.js} +3 -3
- package/dist/types/userdetails/userdetails.js.map +1 -0
- package/dist/types/usersettings/usersettings.d.ts +99 -0
- package/dist/types/usersettings/usersettings.js +50 -0
- package/dist/types/usersettings/usersettings.js.map +1 -0
- package/index.ts +1 -2
- package/package.json +7 -2
- package/tsconfig.json +3 -2
- package/types/activity/activity.ts +39 -0
- package/types/boluscalculator/boluscalculator.ts +45 -0
- package/types/enums.ts +16 -52
- package/types/index.ts +4 -0
- package/types/userdetails/userdetails.ts +14 -0
- package/types/usersettings/usersettings.ts +112 -0
- package/dist/types/measurements.d.ts +0 -8
- package/dist/types/measurements.js +0 -19
- package/dist/types/measurements.js.map +0 -1
- package/dist/types/types.d.ts +0 -76
- package/dist/types/types.js.map +0 -1
- package/types/measurements.ts +0 -12
- package/types/types.ts +0 -94
package/dist/types/types.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { DiabetesType, InjectionMethod, Gender, Usage, ActivityReduction, ActivityReductionIntervals, Languages } from "./enums";
|
|
2
|
-
import { BloodGlucoseUnit, BloodKetonesUnit } from "./measurements";
|
|
3
|
-
export interface IUserSettings {
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
diabetesType?: DiabetesType;
|
|
6
|
-
insulinDependent?: boolean;
|
|
7
|
-
gender?: Gender;
|
|
8
|
-
height?: number;
|
|
9
|
-
email?: string;
|
|
10
|
-
weight?: number;
|
|
11
|
-
birthday?: string;
|
|
12
|
-
treatmentType?: InjectionMethod;
|
|
13
|
-
bloodGlucoseUnits?: BloodGlucoseUnit;
|
|
14
|
-
bloodKetonesUnit?: BloodKetonesUnit;
|
|
15
|
-
parameters?: IParameters;
|
|
16
|
-
glucoseLevelTargets?: IBGLTargets;
|
|
17
|
-
fastActingInsulin?: string | null;
|
|
18
|
-
longActingInsulin?: string | null;
|
|
19
|
-
uuidOld?: string;
|
|
20
|
-
uuid?: string;
|
|
21
|
-
created?: string;
|
|
22
|
-
activity?: ActivitySettings;
|
|
23
|
-
notifications?: IUSerSettingsNotifications;
|
|
24
|
-
}
|
|
25
|
-
export declare type ActivitySettings = ActivityReductionSettings & {
|
|
26
|
-
target: number;
|
|
27
|
-
};
|
|
28
|
-
export declare type ActivityReductionSettings = {
|
|
29
|
-
[key in keyof typeof ActivityReduction]: ActivityReductionIntervalSettings;
|
|
30
|
-
};
|
|
31
|
-
export declare type ActivityReductionIntervalSettings = {
|
|
32
|
-
[key in keyof typeof ActivityReductionIntervals]: number;
|
|
33
|
-
};
|
|
34
|
-
export interface IUSerSettingsNotifications {
|
|
35
|
-
medicineNotification: IMedicineNotification;
|
|
36
|
-
remeasurementNotification: IRemeasurementNotification;
|
|
37
|
-
}
|
|
38
|
-
export interface INotifications {
|
|
39
|
-
toggle: boolean;
|
|
40
|
-
}
|
|
41
|
-
export interface IMedicineNotification extends INotifications {
|
|
42
|
-
dailyReminderTime: string;
|
|
43
|
-
}
|
|
44
|
-
export interface IRemeasurementNotification extends INotifications {
|
|
45
|
-
remeasurement: number;
|
|
46
|
-
}
|
|
47
|
-
export interface IUserDetails {
|
|
48
|
-
name?: string;
|
|
49
|
-
email?: string;
|
|
50
|
-
research_consent?: Date | boolean;
|
|
51
|
-
newsletter_consent?: Date | boolean;
|
|
52
|
-
country?: string;
|
|
53
|
-
language?: keyof typeof Languages;
|
|
54
|
-
}
|
|
55
|
-
export interface IInterval {
|
|
56
|
-
startTime?: string;
|
|
57
|
-
}
|
|
58
|
-
export interface IParameters {
|
|
59
|
-
parameterIntervals: Array<IParameterInterval>;
|
|
60
|
-
overallParameters: IParameterInterval;
|
|
61
|
-
use?: Usage;
|
|
62
|
-
}
|
|
63
|
-
export interface IParameterInterval extends IInterval {
|
|
64
|
-
insulinSensitivity?: number;
|
|
65
|
-
carbohydrateRatio?: number;
|
|
66
|
-
}
|
|
67
|
-
export interface IBGLTargets {
|
|
68
|
-
targetBGLIntervals?: Array<IBGLInterval>;
|
|
69
|
-
overallTargetBGL?: IBGLInterval;
|
|
70
|
-
use?: Usage;
|
|
71
|
-
}
|
|
72
|
-
export interface IBGLInterval extends IInterval {
|
|
73
|
-
low: number;
|
|
74
|
-
target: number;
|
|
75
|
-
high: number;
|
|
76
|
-
}
|
package/dist/types/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../types/types.ts"],"names":[],"mappings":""}
|
package/types/measurements.ts
DELETED
package/types/types.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DiabetesType,
|
|
3
|
-
InjectionMethod,
|
|
4
|
-
Gender,
|
|
5
|
-
Usage,
|
|
6
|
-
ActivityReduction,
|
|
7
|
-
ActivityReductionIntervals,
|
|
8
|
-
Languages,
|
|
9
|
-
} from "./enums";
|
|
10
|
-
import { BloodGlucoseUnit, BloodKetonesUnit } from "./measurements";
|
|
11
|
-
|
|
12
|
-
export interface IUserSettings {
|
|
13
|
-
[key: string]: unknown; //required to read keys as string
|
|
14
|
-
diabetesType?: DiabetesType; //Diabetes 2, with or without insulin treatment ?
|
|
15
|
-
insulinDependent?: boolean; //Only set if diabetesType=2; true = insulin treatment and false = dont need insulin calculator
|
|
16
|
-
gender?: Gender;
|
|
17
|
-
height?: number; //cm
|
|
18
|
-
email?: string;
|
|
19
|
-
weight?: number; //kg
|
|
20
|
-
birthday?: string; //ISO
|
|
21
|
-
treatmentType?: InjectionMethod;
|
|
22
|
-
bloodGlucoseUnits?: BloodGlucoseUnit;
|
|
23
|
-
bloodKetonesUnit?: BloodKetonesUnit;
|
|
24
|
-
parameters?: IParameters;
|
|
25
|
-
glucoseLevelTargets?: IBGLTargets;
|
|
26
|
-
fastActingInsulin?: string | null;
|
|
27
|
-
longActingInsulin?: string | null;
|
|
28
|
-
uuidOld?: string;
|
|
29
|
-
uuid?: string;
|
|
30
|
-
created?: string; //ISO
|
|
31
|
-
activity?: ActivitySettings;
|
|
32
|
-
notifications?: IUSerSettingsNotifications;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type ActivitySettings = ActivityReductionSettings & { target: number };
|
|
36
|
-
export type ActivityReductionSettings = {
|
|
37
|
-
[key in keyof typeof ActivityReduction]: ActivityReductionIntervalSettings;
|
|
38
|
-
};
|
|
39
|
-
export type ActivityReductionIntervalSettings = {
|
|
40
|
-
[key in keyof typeof ActivityReductionIntervals]: number;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export interface IUSerSettingsNotifications {
|
|
44
|
-
medicineNotification: IMedicineNotification;
|
|
45
|
-
remeasurementNotification: IRemeasurementNotification;
|
|
46
|
-
}
|
|
47
|
-
export interface INotifications {
|
|
48
|
-
toggle: boolean;
|
|
49
|
-
}
|
|
50
|
-
export interface IMedicineNotification extends INotifications {
|
|
51
|
-
dailyReminderTime: string;
|
|
52
|
-
}
|
|
53
|
-
export interface IRemeasurementNotification extends INotifications {
|
|
54
|
-
remeasurement: number;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface IUserDetails {
|
|
58
|
-
name?: string;
|
|
59
|
-
email?: string;
|
|
60
|
-
research_consent?: Date | boolean;
|
|
61
|
-
newsletter_consent?: Date | boolean;
|
|
62
|
-
country?: string;
|
|
63
|
-
language?: keyof typeof Languages;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface IInterval {
|
|
67
|
-
startTime?: string; //"00:00" format
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// TODO: Delete when we have all people changed from old managers to new.???
|
|
71
|
-
export interface IParameters {
|
|
72
|
-
parameterIntervals: Array<IParameterInterval>;
|
|
73
|
-
overallParameters: IParameterInterval;
|
|
74
|
-
use?: Usage;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface IParameterInterval extends IInterval {
|
|
78
|
-
insulinSensitivity?: number;
|
|
79
|
-
carbohydrateRatio?: number;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// TODO: Delete when we have all people changed from old managers to new.???
|
|
83
|
-
export interface IBGLTargets {
|
|
84
|
-
targetBGLIntervals?: Array<IBGLInterval>;
|
|
85
|
-
overallTargetBGL?: IBGLInterval;
|
|
86
|
-
use?: Usage;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// TODO: Delete when we have all people changed from old managers to new.???
|
|
90
|
-
export interface IBGLInterval extends IInterval {
|
|
91
|
-
low: number;
|
|
92
|
-
target: number;
|
|
93
|
-
high: number;
|
|
94
|
-
}
|