@hedia/types 2.1.1 → 2.1.3

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.
@@ -5,7 +5,7 @@ export declare namespace Activity {
5
5
  type ActivityIntensityKeys = keyof typeof Enums.ActivityIntensity;
6
6
  type ActivityReductionKeys = keyof typeof Enums.ActivityReductionIntervals;
7
7
  type ActivityReductionSettings = ActivityPostReduction & {
8
- [key in ActivityIntensityKeys]: ActivityReductionSettingsIntervals<key, `hard`, `fromFortysix`>;
8
+ [key in ActivityIntensityKeys]: ActivityReductionSettingsIntervals<key, "hard", "fromFortysix">;
9
9
  };
10
10
  type ActivityPostReduction = {
11
11
  post: {
@@ -9,7 +9,7 @@ export declare namespace Logbook {
9
9
  }
10
10
  }
11
11
  namespace Types {
12
- interface logbookEntry {
12
+ interface ILogbookEntry {
13
13
  uuid: string;
14
14
  entry_timestamp: string;
15
15
  server_timestamp: Date | null;
@@ -23,11 +23,28 @@ export declare namespace Logbook {
23
23
  insulin_entered_units: number | null;
24
24
  carbohydrates_suggested_grams: number | null;
25
25
  carbohydrates_entered_grams: number | null;
26
+ carbohydrates_modified_suggested_grams: number | null;
26
27
  blood_glucose_millimolar: number | null;
28
+ blood_ketone_millimolar: number | null;
27
29
  mood: Enums.MoodEnum | null;
28
30
  event_uuid: string | null;
29
31
  is_deleted: Date | null;
30
32
  utc_timezone_offset: string | null;
31
33
  }
34
+ interface IEditedUUID {
35
+ oldUUID: string;
36
+ newUUID: string;
37
+ }
38
+ interface IClientSyncObject {
39
+ last_sync_timestamp: string;
40
+ created: Array<ILogbookEntry>;
41
+ edited: Array<IEditedUUID>;
42
+ deleted: Array<string>;
43
+ }
44
+ interface IBackendSyncObject {
45
+ last_sync_timestamp: string;
46
+ created: Array<ILogbookEntry>;
47
+ deleted: Array<string>;
48
+ }
32
49
  }
33
50
  }
@@ -1 +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
+ {"version":3,"file":"logbook.js","sourceRoot":"","sources":["../../../types/logbook/logbook.ts"],"names":[],"mappings":";;;AAAA,IAAiB,OAAO,CAqDvB;AArDD,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;AA4CF,CAAC,EArDgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAqDvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/types",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "description": "Enums, interfaces, and other common types for use in Hedia's software.",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -8,7 +8,7 @@ export namespace Activity {
8
8
 
9
9
  // prettier-ignore
10
10
  type ActivityReductionSettings = ActivityPostReduction & {
11
- [key in ActivityIntensityKeys]: ActivityReductionSettingsIntervals<key, `hard`, `fromFortysix`>;
11
+ [key in ActivityIntensityKeys]: ActivityReductionSettingsIntervals<key, "hard", "fromFortysix">;
12
12
  };
13
13
 
14
14
  type ActivityPostReduction = {
@@ -10,7 +10,7 @@ export namespace Logbook {
10
10
  }
11
11
 
12
12
  export namespace Types {
13
- export interface logbookEntry {
13
+ export interface ILogbookEntry {
14
14
  uuid: string;
15
15
  entry_timestamp: string; // The date where the entry appears when the user look at their logbook in the app
16
16
  server_timestamp: Date | null;
@@ -24,11 +24,31 @@ export namespace Logbook {
24
24
  insulin_entered_units: number | null;
25
25
  carbohydrates_suggested_grams: number | null;
26
26
  carbohydrates_entered_grams: number | null;
27
+ carbohydrates_modified_suggested_grams: number | null;
27
28
  blood_glucose_millimolar: number | null;
29
+ blood_ketone_millimolar: number | null;
28
30
  mood: Enums.MoodEnum | null;
29
31
  event_uuid: string | null;
30
32
  is_deleted: Date | null;
31
33
  utc_timezone_offset: string | null;
32
34
  }
35
+
36
+ export interface IEditedUUID {
37
+ oldUUID: string;
38
+ newUUID: string;
39
+ }
40
+
41
+ export interface IClientSyncObject {
42
+ last_sync_timestamp: string;
43
+ created: Array<ILogbookEntry>;
44
+ edited: Array<IEditedUUID>;
45
+ deleted: Array<string>;
46
+ }
47
+
48
+ export interface IBackendSyncObject {
49
+ last_sync_timestamp: string;
50
+ created: Array<ILogbookEntry>;
51
+ deleted: Array<string>;
52
+ }
33
53
  }
34
54
  }