@hedia/types 2.1.62-alpha.1 → 2.1.62-alpha.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.
Files changed (65) hide show
  1. package/dist/index.js.map +1 -0
  2. package/dist/types/activity/activity.d.ts +64 -0
  3. package/dist/types/activity/activity.js +33 -0
  4. package/dist/types/activity/activity.js.map +1 -0
  5. package/dist/types/boluscalculator/boluscalculator.d.ts +80 -0
  6. package/dist/types/boluscalculator/boluscalculator.js +28 -0
  7. package/dist/types/boluscalculator/boluscalculator.js.map +1 -0
  8. package/dist/types/cgm/cgm.d.ts +24 -0
  9. package/dist/types/cgm/cgm.js +18 -0
  10. package/dist/types/cgm/cgm.js.map +1 -0
  11. package/dist/types/enums.d.ts +424 -0
  12. package/dist/types/enums.js +442 -0
  13. package/dist/types/enums.js.map +1 -0
  14. package/{types/index.ts → dist/types/index.d.ts} +0 -1
  15. package/dist/types/index.js +24 -0
  16. package/dist/types/index.js.map +1 -0
  17. package/dist/types/logbook/logbook.d.ts +121 -0
  18. package/dist/types/logbook/logbook.js +19 -0
  19. package/dist/types/logbook/logbook.js.map +1 -0
  20. package/dist/types/services/events/logbook.d.ts +11 -0
  21. package/dist/types/services/events/logbook.js +3 -0
  22. package/dist/types/services/events/logbook.js.map +1 -0
  23. package/dist/types/services/outbound/email.d.ts +19 -0
  24. package/dist/types/services/outbound/email.js +16 -0
  25. package/dist/types/services/outbound/email.js.map +1 -0
  26. package/dist/types/services/outbound/notification.d.ts +12 -0
  27. package/dist/types/services/outbound/notification.js +3 -0
  28. package/dist/types/services/outbound/notification.js.map +1 -0
  29. package/dist/types/services/rpc/auth.d.ts +17 -0
  30. package/dist/types/services/rpc/auth.js +3 -0
  31. package/dist/types/services/rpc/auth.js.map +1 -0
  32. package/dist/types/services/rpc/logbook.d.ts +28 -0
  33. package/dist/types/services/rpc/logbook.js +3 -0
  34. package/dist/types/services/rpc/logbook.js.map +1 -0
  35. package/dist/types/userdetails/userdetails.d.ts +13 -0
  36. package/dist/types/userdetails/userdetails.js +3 -0
  37. package/dist/types/userdetails/userdetails.js.map +1 -0
  38. package/dist/types/usersettings/usersettings.d.ts +107 -0
  39. package/dist/types/usersettings/usersettings.js +54 -0
  40. package/dist/types/usersettings/usersettings.js.map +1 -0
  41. package/package.json +4 -1
  42. package/.github/pull_request_template.md +0 -7
  43. package/.github/workflows/ci.yaml +0 -12
  44. package/.github/workflows/publish-release-package.yaml +0 -16
  45. package/.github/workflows/validate-pr-title.yaml +0 -9
  46. package/.npmpackagejsonlintrc.json +0 -12
  47. package/.prettierignore +0 -3
  48. package/.prettierrc +0 -25
  49. package/tsconfig.json +0 -68
  50. package/tslint.json +0 -184
  51. package/types/activity/activity.ts +0 -76
  52. package/types/boluscalculator/boluscalculator.ts +0 -86
  53. package/types/cgm/cgm.ts +0 -26
  54. package/types/enums.ts +0 -503
  55. package/types/logbook/logbook.ts +0 -122
  56. package/types/services/events/logbook.ts +0 -12
  57. package/types/services/outbound/email.ts +0 -19
  58. package/types/services/outbound/notification.ts +0 -13
  59. package/types/services/rpc/auth.ts +0 -21
  60. package/types/services/rpc/food.ts +0 -70
  61. package/types/services/rpc/logbook.ts +0 -32
  62. package/types/types.ts +0 -4
  63. package/types/userdetails/userdetails.ts +0 -14
  64. package/types/usersettings/usersettings.ts +0 -121
  65. /package/{index.ts → dist/index.d.ts} +0 -0
@@ -1,70 +0,0 @@
1
- import { Languages } from "../../enums";
2
- import { IRpcRoute } from "../../types";
3
-
4
- export namespace FoodService {
5
- export namespace Enums {
6
- export enum Timespans {
7
- Breakfast = "breakfast",
8
- Lunch = "lunch",
9
- Dinner = "dinner",
10
- Night = "night",
11
- }
12
- }
13
-
14
- export namespace RPC {
15
- export namespace SearchFood {
16
- export type Get = IRpcRoute<Types.IFoodSearchRequest, Types.IFoodSearchResponse>;
17
- }
18
-
19
- export namespace FavoriteFood {}
20
-
21
- export namespace RecentFood {}
22
- }
23
-
24
- export namespace Types {
25
- export interface IFoodSearchRequest {
26
- language: Languages;
27
- text: string;
28
- }
29
-
30
- export interface IFoodSearchResponse {
31
- results: Array<IFoodNames>;
32
- }
33
-
34
- export interface IFoodTransactions {
35
- id: number;
36
- food_items_id: number;
37
- grams: number;
38
- timestamp: Date;
39
- logbook_id: number;
40
- }
41
-
42
- export interface IFoodFavorites {
43
- id: number;
44
- food_items_id: number;
45
- timespan: Date;
46
- }
47
-
48
- export interface IFoodItems {
49
- id: number;
50
- user_id: number;
51
- energy: number;
52
- carbohydrates: number;
53
- protein: number;
54
- sugar: number;
55
- fibers: number;
56
- fat: number;
57
- saturated_fat: number;
58
- }
59
-
60
- export interface IFoodNames {
61
- id: number;
62
- food_items_id: number;
63
- title: string;
64
- keyword: string;
65
- description: string;
66
- language: keyof Languages;
67
- ts: unknown;
68
- }
69
- }
70
- }
@@ -1,32 +0,0 @@
1
- import { Logbook } from "../../logbook/logbook";
2
-
3
- export namespace LogbookService {
4
- export namespace Types {
5
- interface IEditedUUID {
6
- oldUUID: string;
7
- newUUID: string;
8
- }
9
-
10
- export interface ILogbookSyncRequest {
11
- lastSyncTimestamp: string;
12
- created: Array<Logbook.Types.ILogbookEntry>;
13
- edited: Array<IEditedUUID>;
14
- deleted: Array<string>;
15
- }
16
-
17
- export interface ILogbookSyncResponse {
18
- lastSyncTimestamp: string;
19
- created: Array<Logbook.Types.ILogbookEntry>;
20
- deleted: Array<string>;
21
- }
22
-
23
- export interface ILogbookGetRequest {
24
- cursor?: string;
25
- }
26
-
27
- export interface ILogbookGetResponse {
28
- cursor?: string;
29
- logbooks: Array<Logbook.Types.ILogbookEntry>;
30
- }
31
- }
32
- }
package/types/types.ts DELETED
@@ -1,4 +0,0 @@
1
- export interface IRpcRoute<Request, Response> {
2
- Request: Request;
3
- Response: Response;
4
- }
@@ -1,14 +0,0 @@
1
- import { Languages } from "../enums";
2
-
3
- export namespace UserDetails {
4
- export namespace Types {
5
- export interface IUserDetails {
6
- name?: string;
7
- email: string;
8
- research_consent: Date | null;
9
- newsletter_consent: Date | null;
10
- country?: string;
11
- language?: keyof typeof Languages;
12
- }
13
- }
14
- }
@@ -1,121 +0,0 @@
1
- import { Activity } from "../activity/activity";
2
- import { BloodGlucoseUnit, BloodKetonesUnit } from "../enums";
3
-
4
- export namespace UserSettings {
5
- export namespace Types {
6
- export interface IUserSettings {
7
- diabetesType?: Enums.DiabetesType; //Diabetes 2, with or without insulin treatment ?
8
- insulinDependent?: boolean; //Only set if diabetesType=2; true = insulin treatment and false = dont need insulin calculator
9
- gender?: Enums.Gender;
10
- height?: number; //cm
11
- email?: string;
12
- weight?: number; //kg
13
- birthday?: string; //ISO
14
- treatmentType?: Enums.InjectionMethod;
15
- bloodGlucoseUnits?: BloodGlucoseUnit;
16
- bloodKetonesUnit?: BloodKetonesUnit;
17
- parameters?: IParameters;
18
- glucoseLevelTargets?: IBGLTargets;
19
- fastActingInsulin?: Enums.FastActingInsulin;
20
- longActingInsulin?: Enums.LongActingInsulin;
21
- uuidOld?: string;
22
- uuid?: string;
23
- created?: string; //ISO
24
- activity?: Activity.Types.ActivitySettings;
25
- notifications?: IUSerSettingsNotifications;
26
- }
27
- export interface IUSerSettingsNotifications {
28
- medicineNotification: IMedicineNotification;
29
- remeasurementNotification: IRemeasurementNotification;
30
- deviceIdentifiers?: Array<INotificationDeviceIdentifier>;
31
- }
32
- export interface INotifications {
33
- toggle: boolean;
34
- }
35
- export interface IMedicineNotification extends INotifications {
36
- dailyReminderTime: string;
37
- }
38
- export interface IRemeasurementNotification extends INotifications {
39
- remeasurement: number;
40
- }
41
- export interface IInterval {
42
- startTime: string; //"00:00" format
43
- }
44
-
45
- // TODO: Delete when we have all people changed from old managers to new.???
46
- export interface IParameters {
47
- parameterIntervals: Array<IParameterInterval>;
48
- overallParameters: IParameterInterval;
49
- use?: Enums.Usage;
50
- }
51
-
52
- export interface IParameterInterval extends IInterval {
53
- insulinSensitivity: number;
54
- carbohydrateRatio: number;
55
- }
56
-
57
- // TODO: Delete when we have all people changed from old managers to new.???
58
- export interface IBGLTargets {
59
- targetBGLIntervals?: Array<IBGLInterval>;
60
- overallTargetBGL?: IBGLInterval;
61
- use?: Enums.Usage;
62
- }
63
-
64
- // TODO: Delete when we have all people changed from old managers to new.???
65
- export interface IBGLInterval extends IInterval {
66
- low: number;
67
- target: number;
68
- high: number;
69
- }
70
-
71
- export interface INotificationDeviceIdentifier {
72
- token: string;
73
- timestamp: number;
74
- }
75
- }
76
-
77
- export namespace Enums {
78
- export enum Usage {
79
- Overall = `overall`,
80
- Intervals = `intervals`,
81
- }
82
-
83
- export enum FastActingInsulin {
84
- Novorapid = `Novorapid`,
85
- Fiasp = `Fiasp`,
86
- Humalog = `Humalog`,
87
- Apidra = `Apidra`,
88
- Other = `Other`,
89
- None = `None`,
90
- }
91
- export enum LongActingInsulin {
92
- Lantus = `Lantus`,
93
- Basaglar = `Basaglar`,
94
- Tuojeo = `Tuojeo`,
95
- Levemir = `Levemir`,
96
- Tresiba = `Tresiba`,
97
- Other = `Other`,
98
- None = `None`,
99
- }
100
-
101
- export enum DiabetesType {
102
- Type1 = 1,
103
- Type2 = 2,
104
- }
105
-
106
- export enum Gender {
107
- Male = `Male`,
108
- Female = `Female`,
109
- }
110
-
111
- /**
112
- * String enum for differentiating between different methods by which someone can inject insulin into the body.
113
- * Mainly used to determine how insulin amounts should be rounded.
114
- */
115
- export enum InjectionMethod {
116
- PenHalf = `Pen-half`,
117
- PenWhole = `Pen-whole`,
118
- Pump = `Pump`,
119
- }
120
- }
121
- }
File without changes