@ovok/native 1.17.0-dev.2285 → 1.17.0-dev.2293
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/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js +14 -5
- package/lib/commonjs/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +11 -8
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +53 -20
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/storage-manager.js +14 -0
- package/lib/commonjs/modules/data-sync/services/managers/storage-manager.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-health-record-sync-id.js +30 -4
- package/lib/commonjs/modules/data-sync/utils/get-health-record-sync-id.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js +2 -1
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +2 -1
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-records-count.js +4 -0
- package/lib/commonjs/modules/data-sync/utils/get-total-records-count.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js +4 -0
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-connect-series.js +4 -7
- package/lib/commonjs/modules/data-sync/utils/health-connect-series.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/healthkit-series.js +5 -8
- package/lib/commonjs/modules/data-sync/utils/healthkit-series.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/hourly-series.js +42 -2
- package/lib/commonjs/modules/data-sync/utils/hourly-series.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/identify-imported-observations.js +9 -1
- package/lib/commonjs/modules/data-sync/utils/identify-imported-observations.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/reading-groups.js +38 -0
- package/lib/commonjs/modules/data-sync/utils/reading-groups.js.map +1 -0
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js +15 -6
- package/lib/module/modules/data-sync/components/android/android-health-connect-authorization-provider.js.map +1 -1
- package/lib/module/modules/data-sync/services/base-health-sync-service.js +11 -8
- package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/data-processor.js +55 -22
- package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/storage-manager.js +14 -0
- package/lib/module/modules/data-sync/services/managers/storage-manager.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-health-record-sync-id.js +26 -2
- package/lib/module/modules/data-sync/utils/get-health-record-sync-id.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js +2 -1
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js +2 -1
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-total-records-count.js +4 -0
- package/lib/module/modules/data-sync/utils/get-total-records-count.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js +4 -0
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-connect-series.js +5 -8
- package/lib/module/modules/data-sync/utils/health-connect-series.js.map +1 -1
- package/lib/module/modules/data-sync/utils/healthkit-series.js +6 -9
- package/lib/module/modules/data-sync/utils/healthkit-series.js.map +1 -1
- package/lib/module/modules/data-sync/utils/hourly-series.js +41 -3
- package/lib/module/modules/data-sync/utils/hourly-series.js.map +1 -1
- package/lib/module/modules/data-sync/utils/identify-imported-observations.js +9 -1
- package/lib/module/modules/data-sync/utils/identify-imported-observations.js.map +1 -1
- package/lib/module/modules/data-sync/utils/reading-groups.js +35 -0
- package/lib/module/modules/data-sync/utils/reading-groups.js.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts +19 -14
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/storage-manager.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/storage-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +8 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-health-record-sync-id.d.ts +8 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-health-record-sync-id.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +5 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-records-count.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-connect-series.d.ts +9 -5
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-connect-series.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts +10 -6
- package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/hourly-series.d.ts +24 -4
- package/lib/typescript/commonjs/src/modules/data-sync/utils/hourly-series.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/identify-imported-observations.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/identify-imported-observations.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/reading-groups.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/reading-groups.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/components/android/android-health-connect-authorization-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts +19 -14
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/storage-manager.d.ts +4 -0
- package/lib/typescript/module/src/modules/data-sync/services/managers/storage-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +8 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-health-record-sync-id.d.ts +8 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-health-record-sync-id.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +5 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-records-count.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-connect-series.d.ts +9 -5
- package/lib/typescript/module/src/modules/data-sync/utils/health-connect-series.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts +10 -6
- package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/hourly-series.d.ts +24 -4
- package/lib/typescript/module/src/modules/data-sync/utils/hourly-series.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/identify-imported-observations.d.ts +3 -1
- package/lib/typescript/module/src/modules/data-sync/utils/identify-imported-observations.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/reading-groups.d.ts +17 -0
- package/lib/typescript/module/src/modules/data-sync/utils/reading-groups.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HealthProvider } from "../types/health-provider";
|
|
2
|
+
import { HealthSyncKey } from "../types/health-sync-keys";
|
|
3
|
+
/** Where a page of records ended: what a reading on it may still be waiting for. */
|
|
4
|
+
type PageEnd = {
|
|
5
|
+
typeCount: number;
|
|
6
|
+
lastRead: ReadonlySet<unknown>;
|
|
7
|
+
};
|
|
8
|
+
/** How several platform records make one reading, and when a reading may go on in the next page. */
|
|
9
|
+
type ReadingGroups = {
|
|
10
|
+
group: <TRecord>(records: TRecord[]) => TRecord[][];
|
|
11
|
+
mayContinue: (reading: unknown[], pageEnd: PageEnd) => boolean;
|
|
12
|
+
};
|
|
13
|
+
/** How a data type's records make readings, or nothing when each record is one reading. */
|
|
14
|
+
declare const readingGroupsFor: (provider: HealthProvider, measurementTypeKey: HealthSyncKey) => ReadingGroups | undefined;
|
|
15
|
+
export { readingGroupsFor };
|
|
16
|
+
export type { PageEnd, ReadingGroups };
|
|
17
|
+
//# sourceMappingURL=reading-groups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reading-groups.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/reading-groups.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAkB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM1E,oFAAoF;AACpF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CAChC,CAAC;AAEF,oGAAoG;AACpG,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,EAAE,CAAC;IACpD,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;CAChE,CAAC;AAoBF,2FAA2F;AAC3F,QAAA,MAAM,gBAAgB,GACpB,UAAU,cAAc,EACxB,oBAAoB,aAAa,KAChC,aAAa,GAAG,SAGJ,CAAC;AAEhB,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"android-health-connect-authorization-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/components/android/android-health-connect-authorization-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"android-health-connect-authorization-provider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/components/android/android-health-connect-authorization-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,OAAO,EAAE,8CAA8C,EAAE,MAAM,iEAAiE,CAAC;AA4MjI,eAAO,MAAM,yCAAyC,4KAUjD,KAAK,CAAC,iBAAiB,CAAC,8CAA8C,CAAC,uBAqE3E,CAAC"}
|
package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-health-sync-service.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/services/base-health-sync-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC;AASzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAWzD,2DAA2D;AAC3D,MAAM,MAAM,iBAAiB,CAAC,eAAe,SAAS,MAAM,EAAE,iBAAiB,IAAI;IACjF,QAAQ,EAAE,cAAc,CAAC;IACzB,aAAa,EAAE,CAAC,KAAK,EAAE,kBAAkB,CAAC,eAAe,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/E,OAAO,EAAE,CACP,KAAK,EAAE,wBAAwB,CAAC,eAAe,CAAC,KAC7C,OAAO,CAAC,sBAAsB,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC,CAAC;IACzE,OAAO,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;CACjF,CAAC;AAEF,8BAAsB,qBAAqB,CACzC,WAAW,SACT,sBAAsB,CAAC,YAAY,CAAC,GAAG,oBAAoB,CAAC,YAAY,CAAC,EAC3E,eAAe,SAAS,MAAM,EAC9B,iBAAiB,GAAG,OAAO;IAiBzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAf1B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAc;IACzC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAyB;IAErD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAmC;IACnE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAmB;IAChD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAI5B;gBAGA,KAAK,EAAE,gBAAgB,CAAC,WAAW,CAAC,EACnB,OAAO,EAAE,iBAAiB,CAAC,eAAe,EAAE,iBAAiB,CAAC;IA6BjF,2EAA2E;IAC9D,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAIvC,wFAAwF;IAC3E,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAGvB;YAEU,OAAO;IAyBR,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAMzB,SAAS,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;YAKjD,cAAc;YAUd,oBAAoB;YA0BpB,mBAAmB;YA4BnB,cAAc;
|
|
1
|
+
{"version":3,"file":"base-health-sync-service.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/services/base-health-sync-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC;AASzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BA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C,aAAa,CAI5B;gBAGA,KAAK,EAAE,gBAAgB,CAAC,WAAW,CAAC,EACnB,OAAO,EAAE,iBAAiB,CAAC,eAAe,EAAE,iBAAiB,CAAC;IA6BjF,2EAA2E;IAC9D,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAIvC,wFAAwF;IAC3E,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAGvB;YAEU,OAAO;IAyBR,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAMzB,SAAS,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;YAKjD,cAAc;YAUd,oBAAoB;YA0BpB,mBAAmB;YA4BnB,cAAc;IA4F5B;;;OAGG;YACW,YAAY;IA+B1B,OAAO,CAAC,WAAW;IAgCnB,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,yBAAyB;CAGlC"}
|
|
@@ -7,10 +7,25 @@ import { DataFromProviderResult } from "../../types/data-from-provider-result";
|
|
|
7
7
|
import { GetDataFromProviderProps } from "../../types/get-data-from-provider-props";
|
|
8
8
|
import { GetTotalCountProps } from "../../types/get-total-count-props";
|
|
9
9
|
import { HealthProvider } from "../../types/health-provider";
|
|
10
|
-
import { HealthSyncKey } from "../../types/health-sync-keys";
|
|
10
|
+
import { HealthDataMode, HealthSyncKey } from "../../types/health-sync-keys";
|
|
11
11
|
import { getLatestValidStartDate } from "../../utils/get-latest-valid-start-date";
|
|
12
|
-
import { identifyImportedObservations } from "../../utils/identify-imported-observations";
|
|
13
12
|
import { StorageManager } from "./storage-manager";
|
|
13
|
+
/** One page of a data type's readings, as observations, with what names them. */
|
|
14
|
+
export type ObservationPage<TRecord = unknown> = {
|
|
15
|
+
observationBodies: Observation[][];
|
|
16
|
+
observationSyncIds: Array<string | undefined>;
|
|
17
|
+
observationRecordIds: Array<string | undefined>;
|
|
18
|
+
/** The sync id each reading was saved under before, for a day's total its bounds; undefined when none changed. */
|
|
19
|
+
observationFormerSyncIds?: Array<string | undefined>;
|
|
20
|
+
deletedRecordIds: string[];
|
|
21
|
+
hasMore: boolean;
|
|
22
|
+
anchors: Array<{
|
|
23
|
+
typeIdentifier: string;
|
|
24
|
+
anchor: string;
|
|
25
|
+
}>;
|
|
26
|
+
/** Records of readings the next page may add to, kept for it; undefined for a type whose records stand alone. */
|
|
27
|
+
carriedRecords: TRecord[] | undefined;
|
|
28
|
+
};
|
|
14
29
|
export declare class DataProcessor<TDataToSync extends AndroidHealthSyncProps["dataToSync"] | AppleHealthSyncProps["dataToSync"], TTypeIdentifier extends string, TDataFromProvider> {
|
|
15
30
|
private client;
|
|
16
31
|
private patientId;
|
|
@@ -27,18 +42,8 @@ export declare class DataProcessor<TDataToSync extends AndroidHealthSyncProps["d
|
|
|
27
42
|
date: string | undefined;
|
|
28
43
|
}>>;
|
|
29
44
|
getTotalRecordsCountForType(measurementTypeKey: HealthSyncKey, data: NonNullable<TDataToSync[HealthSyncKey]>, latestValidStartDate: Date | undefined): Promise<number>;
|
|
30
|
-
getObservationBodiesForType(measurementTypeKey: HealthSyncKey, data: NonNullable<TDataToSync[HealthSyncKey]>, latestValidStartDate: Date | undefined): Promise<
|
|
31
|
-
|
|
32
|
-
observationSyncIds: Array<string | undefined>;
|
|
33
|
-
observationRecordIds: Array<string | undefined>;
|
|
34
|
-
deletedRecordIds: string[];
|
|
35
|
-
hasMore: boolean;
|
|
36
|
-
anchors: Array<{
|
|
37
|
-
typeIdentifier: string;
|
|
38
|
-
anchor: string;
|
|
39
|
-
}>;
|
|
40
|
-
}>;
|
|
41
|
-
identifyObservations(observationBodies: Observation[][], observationSyncIds?: Array<string | undefined>, observationRecordIds?: Array<string | undefined>, mode?: Parameters<typeof identifyImportedObservations>[0]["mode"]): Observation[][];
|
|
45
|
+
getObservationBodiesForType(measurementTypeKey: HealthSyncKey, data: NonNullable<TDataToSync[HealthSyncKey]>, latestValidStartDate: Date | undefined): Promise<ObservationPage<TDataFromProvider>>;
|
|
46
|
+
identifyObservations(page: ObservationPage, mode?: HealthDataMode): Observation[][];
|
|
42
47
|
getLatestValidStartDate(latestObservationDates: Array<{
|
|
43
48
|
code: string | undefined;
|
|
44
49
|
date: string | undefined;
|
package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-processor.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/services/managers/data-processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"data-processor.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/services/managers/data-processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAEL,cAAc,EACd,aAAa,EACd,MAAM,8BAA8B,CAAC;AAStC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAOlF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAanD,iFAAiF;AACjF,MAAM,MAAM,eAAe,CAAC,OAAO,GAAG,OAAO,IAAI;IAC/C,iBAAiB,EAAE,WAAW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AAiB,CAAC,KACvC,OAAO,CAAC,WAAW,EAAE,CAAC;IAG7B,YAAY,CAAC,UAAU,EAAE,WAAW,GAAG,MAAM,EAAE;IAoBzC,yBAAyB,CAAC,UAAU,EAAE,WAAW,GAAG,OAAO,CAC/D,KAAK,CAAC;QACJ,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;QACzB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;KAC1B,CAAC,CACH;IAWK,2BAA2B,CAC/B,kBAAkB,EAAE,aAAa,EACjC,IAAI,EAAE,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,EAC7C,oBAAoB,EAAE,IAAI,GAAG,SAAS,GACrC,OAAO,CAAC,MAAM,CAAC;IAmBZ,2BAA2B,CAC/B,kBAAkB,EAAE,aAAa,EACjC,IAAI,EAAE,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,EAC7C,oBAAoB,EAAE,IAAI,GAAG,SAAS,GACrC,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;IA4J9C,oBAAoB,CAAC,IAAI,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,cAAc;IAWjE,uBAAuB,CACrB,sBAAsB,EAAE,KAAK,CAAC;QAC5B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;QACzB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;KAC1B,CAAC,EACF,IAAI,EAAE,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,EAC7C,kBAAkB,EAAE,aAAa,EACjC,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAC3D,IAAI,GAAG,SAAS;CAyBpB"}
|
|
@@ -22,6 +22,10 @@ export declare class StorageManager {
|
|
|
22
22
|
getAnchor(typeIdentifier: string): Promise<string | undefined>;
|
|
23
23
|
saveSentReadings(measurementTypeKey: string, sent: SentReadings): Promise<void>;
|
|
24
24
|
getSentReadings(measurementTypeKey: string): Promise<SentReadings>;
|
|
25
|
+
/** Keeps the records of readings a page ended in the middle of, for the next page to finish. */
|
|
26
|
+
saveCarriedRecords(measurementTypeKey: string, records: unknown[]): Promise<void>;
|
|
27
|
+
getCarriedRecords(measurementTypeKey: string): Promise<unknown[]>;
|
|
28
|
+
private carriedRecordsKey;
|
|
25
29
|
private sentReadingsKey;
|
|
26
30
|
private storageKey;
|
|
27
31
|
saveAnchors(anchors: Array<{
|
package/lib/typescript/module/src/modules/data-sync/services/managers/storage-manager.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-manager.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/data-sync/services/managers/storage-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGzD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAI9D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,qBAAa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAHT,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,cAAc,EACxB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM;IAG9B,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQpD;;;;OAIG;IACG,gBAAgB,CACpB,MAAM,EAAE,WAAW,EAAE,EAAE,EACvB,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,MAAM,CAAC;IASlB,mFAAmF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
/** Background access is reported independently; it never blocks foreground import. */
|
|
26
26
|
backgroundAccess?: "authorized" | "shouldRequest" | "refused" | "unsupported";
|
|
27
|
+
/**
|
|
28
|
+
* Whether Health Connect can be used on the device. `updateRequired` means it is installed but too old: offer the
|
|
29
|
+
* update from the Play Store. Set once checked.
|
|
30
|
+
*/
|
|
31
|
+
availability?: HealthConnectAvailability;
|
|
27
32
|
};
|
|
28
|
-
|
|
33
|
+
/** Health Connect on the device: ready, missing, or installed but needing an update. */
|
|
34
|
+
type HealthConnectAvailability = "available" | "notInstalled" | "updateRequired";
|
|
35
|
+
export type { AndroidHealthConnectAuthorizationStatus, AppleHealthAuthorizationStatus, HealthConnectAvailability, };
|
|
29
36
|
//# sourceMappingURL=health-authorization-status.d.ts.map
|
package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health-authorization-status.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/types/health-authorization-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAExF,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,wCAAwC;AACxC,KAAK,8BAA8B,GAAG;IAEpC,mCAAmC;IACnC,KAAK,EAAE,SAAS,GAAG,eAAe,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;IAEtE,kEAAkE;IAClE,2BAA2B,EAAE,6BAA6B,EAAE,CAAC;IAE7D,wEAAwE;IACxE,4BAA4B,EAAE,6BAA6B,EAAE,CAAC;IAE9D,iFAAiF;IACjF,4BAA4B,EAAE,aAAa,EAAE,CAAC;IAE9C,+CAA+C;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,0CAA0C;AAC1C,KAAK,uCAAuC,GAAG;IAE7C,mCAAmC;IACnC,KAAK,EACD,SAAS,GACT,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,OAAO,CAAC;IAEZ,+CAA+C;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd,kDAAkD;IAClD,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEjC,sFAAsF;IACtF,gBAAgB,CAAC,EAAE,YAAY,GAAG,eAAe,GAAG,SAAS,GAAG,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"health-authorization-status.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/types/health-authorization-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAExF,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,wCAAwC;AACxC,KAAK,8BAA8B,GAAG;IAEpC,mCAAmC;IACnC,KAAK,EAAE,SAAS,GAAG,eAAe,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;IAEtE,kEAAkE;IAClE,2BAA2B,EAAE,6BAA6B,EAAE,CAAC;IAE7D,wEAAwE;IACxE,4BAA4B,EAAE,6BAA6B,EAAE,CAAC;IAE9D,iFAAiF;IACjF,4BAA4B,EAAE,aAAa,EAAE,CAAC;IAE9C,+CAA+C;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,0CAA0C;AAC1C,KAAK,uCAAuC,GAAG;IAE7C,mCAAmC;IACnC,KAAK,EACD,SAAS,GACT,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,OAAO,CAAC;IAEZ,+CAA+C;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd,kDAAkD;IAClD,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEjC,sFAAsF;IACtF,gBAAgB,CAAC,EAAE,YAAY,GAAG,eAAe,GAAG,SAAS,GAAG,aAAa,CAAC;IAE9E;;;OAGG;IACH,YAAY,CAAC,EAAE,yBAAyB,CAAC;CAC1C,CAAC;AAEF,wFAAwF;AACxF,KAAK,yBAAyB,GAAG,WAAW,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAEjF,YAAY,EACV,uCAAuC,EACvC,8BAA8B,EAC9B,yBAAyB,GAC1B,CAAC"}
|
|
@@ -2,17 +2,24 @@ import { Identifier } from "@medplum/fhirtypes";
|
|
|
2
2
|
import { HealthProvider } from "../types/health-provider";
|
|
3
3
|
/** The record's own id: `uuid` in Apple Health, `metadata.id` in Health Connect. */
|
|
4
4
|
declare const getHealthRecordSourceId: (record: unknown) => string | undefined;
|
|
5
|
+
/** The record's platform type, such as `HKQuantityTypeIdentifierBloodPressureSystolic`. */
|
|
6
|
+
declare const getHealthRecordType: (record: unknown) => string | undefined;
|
|
5
7
|
/**
|
|
6
8
|
* Builds an import identity from the source record's type and interval.
|
|
7
9
|
* Values are deliberately excluded so an updated daily total replaces the
|
|
8
10
|
* previous total instead of creating a second observation.
|
|
9
11
|
*/
|
|
10
12
|
declare const getHealthRecordSyncId: (record: unknown, measurementTypeKey: string) => string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Names a day's total by its calendar date where it was read. A re-read after a time zone change bounds the day at
|
|
15
|
+
* other instants, and this keeps it the same total instead of a second one.
|
|
16
|
+
*/
|
|
17
|
+
declare const getHealthDaySyncId: (record: unknown, measurementTypeKey: string) => string | undefined;
|
|
11
18
|
/**
|
|
12
19
|
* The identifier of every observation imported from a source record. A deletion
|
|
13
20
|
* reports only the record's id, so the import marks its observations with this
|
|
14
21
|
* and the deletion looks them up by it.
|
|
15
22
|
*/
|
|
16
23
|
declare const getHealthRecordIdentifier: (provider: HealthProvider, recordId: string) => Identifier;
|
|
17
|
-
export { getHealthRecordIdentifier, getHealthRecordSourceId, getHealthRecordSyncId, };
|
|
24
|
+
export { getHealthDaySyncId, getHealthRecordIdentifier, getHealthRecordSourceId, getHealthRecordSyncId, getHealthRecordType, };
|
|
18
25
|
//# sourceMappingURL=get-health-record-sync-id.d.ts.map
|
package/lib/typescript/module/src/modules/data-sync/utils/get-health-record-sync-id.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-health-record-sync-id.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-health-record-sync-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"get-health-record-sync-id.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-health-record-sync-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AA4B1D,oFAAoF;AACpF,QAAA,MAAM,uBAAuB,GAAI,QAAQ,OAAO,KAAG,MAAM,GAAG,SAI3D,CAAC;AAEF,2FAA2F;AAC3F,QAAA,MAAM,mBAAmB,GAAI,QAAQ,OAAO,KAAG,MAAM,GAAG,SASvD,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,qBAAqB,GACzB,QAAQ,OAAO,EACf,oBAAoB,MAAM,KACzB,MAAM,GAAG,SAwBX,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,kBAAkB,GACtB,QAAQ,OAAO,EACf,oBAAoB,MAAM,KACzB,MAAM,GAAG,SAWX,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,yBAAyB,GAC7B,UAAU,cAAc,EACxB,UAAU,MAAM,KACf,UAGD,CAAC;AAEH,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,GACpB,CAAC"}
|
package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-records-from-health-connect.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-records-from-health-connect.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,YAAY,EACZ,UAAU,EACX,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"get-records-from-health-connect.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-records-from-health-connect.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,YAAY,EACZ,UAAU,EACX,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAQ9E,KAAK,iBAAiB,GAAG,YAAY,CAAC,UAAU,CAAC,GAAG,oBAAoB,GAAG,gBAAgB,CAAC;AAO5F,eAAO,MAAM,2BAA2B,GAAU,0EAO/C,wBAAwB,CAAC,UAAU,CAAC,KAAG,OAAO,CAC/C,sBAAsB,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAoFtD,CAAC"}
|
|
@@ -5,7 +5,11 @@ declare const getSamplesFromHealth: ({ startDate: _startDate, typeIdentifier, an
|
|
|
5
5
|
anchor: undefined;
|
|
6
6
|
} | {
|
|
7
7
|
data: import("../types/health-data").SeriesHealthData[];
|
|
8
|
-
|
|
8
|
+
hasMore: boolean;
|
|
9
|
+
anchor: {
|
|
10
|
+
typeIdentifier: import("@kingstinct/react-native-healthkit").QuantityTypeIdentifier;
|
|
11
|
+
anchor: string;
|
|
12
|
+
} | undefined;
|
|
9
13
|
} | {
|
|
10
14
|
anchor: {
|
|
11
15
|
typeIdentifier: import("@kingstinct/react-native-healthkit").SampleTypeIdentifier;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-samples-from-health.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-samples-from-health.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"get-samples-from-health.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-samples-from-health.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AA4BjF,QAAA,MAAM,oBAAoB,GAAU,qEAMjC,wBAAwB,CAAC,6BAA6B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8GzD,CAAC;AAmBF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-total-records-count.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-total-records-count.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEX,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"get-total-records-count.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-total-records-count.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEX,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAMpE,sHAAsH;AACtH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,kBAAkB,CAAC,UAAU,CAAC,KACpC,OAAO,CAAC,MAAM,CAAuC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-total-samples-count.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-total-samples-count.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"get-total-samples-count.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/get-total-samples-count.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AASpE,eAAO,MAAM,oBAAoB,GAC/B,OAAO,kBAAkB,CAAC,6BAA6B,CAAC,KACvD,OAAO,CAAC,MAAM,CAgChB,CAAC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { RecordType } from "react-native-health-connect";
|
|
2
|
-
import {
|
|
3
|
-
/**
|
|
4
|
-
declare const getHealthConnectSeries: (typeIdentifier: RecordType,
|
|
5
|
-
data: SeriesHealthData[];
|
|
6
|
-
|
|
2
|
+
import { SeriesPage } from "./hourly-series";
|
|
3
|
+
/** A page of finished hours, one `series` item an hour, read a day at a time. */
|
|
4
|
+
declare const getHealthConnectSeries: (typeIdentifier: RecordType, page: SeriesPage) => Promise<{
|
|
5
|
+
data: import("../types/health-data").SeriesHealthData[];
|
|
6
|
+
hasMore: boolean;
|
|
7
|
+
anchor: {
|
|
8
|
+
typeIdentifier: "ActiveCaloriesBurned" | "BasalBodyTemperature" | "BasalMetabolicRate" | "BloodGlucose" | "BloodPressure" | "BodyFat" | "BodyTemperature" | "BodyWaterMass" | "BoneMass" | "CervicalMucus" | "CyclingPedalingCadence" | "ElevationGained" | "ExerciseSession" | "FloorsClimbed" | "HeartRate" | "RestingHeartRate" | "Steps" | "StepsCadence" | "Distance" | "Height" | "Hydration" | "HeartRateVariabilityRmssd" | "SexualActivity" | "Weight" | "Nutrition" | "LeanBodyMass" | "IntermenstrualBleeding" | "Speed" | "MenstruationFlow" | "MenstruationPeriod" | "SleepSession" | "RespiratoryRate" | "WheelchairPushes" | "Vo2Max" | "OvulationTest" | "TotalCaloriesBurned" | "OxygenSaturation" | "Power";
|
|
9
|
+
anchor: string;
|
|
10
|
+
} | undefined;
|
|
7
11
|
}>;
|
|
8
12
|
export { getHealthConnectSeries };
|
|
9
13
|
//# sourceMappingURL=health-connect-series.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health-connect-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/health-connect-series.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,UAAU,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"health-connect-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/health-connect-series.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAKhG,OAAO,EAAe,UAAU,EAAkC,MAAM,iBAAiB,CAAC;AAgE1F,iFAAiF;AACjF,QAAA,MAAM,sBAAsB,GAAU,gBAAgB,UAAU,EAAE,MAAM,UAAU;;;;;;;EAgBjF,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { QuantityTypeIdentifier } from "@kingstinct/react-native-healthkit";
|
|
2
|
-
import {
|
|
2
|
+
import { SeriesPage } from "./hourly-series";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* A page of finished hours, one `series` item an hour, from HealthKit's own average a minute: it follows the user's
|
|
5
|
+
* source priority where a watch and another app both recorded. Read a day at a time.
|
|
6
6
|
*/
|
|
7
|
-
declare const getHealthKitSeries: (typeIdentifier: QuantityTypeIdentifier,
|
|
8
|
-
data: SeriesHealthData[];
|
|
9
|
-
|
|
7
|
+
declare const getHealthKitSeries: (typeIdentifier: QuantityTypeIdentifier, page: SeriesPage) => Promise<{
|
|
8
|
+
data: import("../types/health-data").SeriesHealthData[];
|
|
9
|
+
hasMore: boolean;
|
|
10
|
+
anchor: {
|
|
11
|
+
typeIdentifier: QuantityTypeIdentifier;
|
|
12
|
+
anchor: string;
|
|
13
|
+
} | undefined;
|
|
10
14
|
}>;
|
|
11
15
|
export { getHealthKitSeries };
|
|
12
16
|
//# sourceMappingURL=healthkit-series.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"healthkit-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/healthkit-series.ts"],"names":[],"mappings":"AAAA,OAAkB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"healthkit-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/healthkit-series.ts"],"names":[],"mappings":"AAAA,OAAkB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAGvF,OAAO,EAAe,UAAU,EAAkC,MAAM,iBAAiB,CAAC;AAE1F;;;GAGG;AACH,QAAA,MAAM,kBAAkB,GAAU,gBAAgB,sBAAsB,EAAE,MAAM,UAAU;;;;;;;EAyBzF,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -13,10 +13,30 @@ declare const toHourlySeries: (typeIdentifier: string, unit: string, minutes: re
|
|
|
13
13
|
* The finished hours from `start`'s hour up to the current one, in windows of a day at most: one health-store query
|
|
14
14
|
* each, so a first import of months doesn't ask for everything at once.
|
|
15
15
|
*/
|
|
16
|
-
declare const finishedHourWindows: (start: Date, now?: Date) =>
|
|
16
|
+
declare const finishedHourWindows: (start: Date, now?: Date) => HourWindow[];
|
|
17
|
+
type HourWindow = {
|
|
17
18
|
from: Date;
|
|
18
19
|
to: Date;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
};
|
|
21
|
+
/** The day windows one read of a series takes, and where it got to. */
|
|
22
|
+
type SeriesPage = {
|
|
23
|
+
windows: HourWindow[];
|
|
24
|
+
readUpTo?: Date;
|
|
25
|
+
hasMore: boolean;
|
|
26
|
+
};
|
|
27
|
+
/** The next days of a series to read, at most `chunkSize` hours: what one save sends. */
|
|
28
|
+
declare const seriesPage: (startDate: Date, readUpTo: string | undefined, chunkSize: number) => SeriesPage;
|
|
29
|
+
/** The finished hours a series has left to read, for progress, without reading them. */
|
|
30
|
+
declare const seriesHoursLeft: (startDate: Date, readUpTo?: string) => number;
|
|
31
|
+
/** A page of a series as a provider result: its hours, the hour it was read up to as the anchor, and whether more is left. */
|
|
32
|
+
declare const toSeriesResult: <TTypeIdentifier>(typeIdentifier: TTypeIdentifier, page: SeriesPage, data: SeriesHealthData[]) => {
|
|
33
|
+
data: SeriesHealthData[];
|
|
34
|
+
hasMore: boolean;
|
|
35
|
+
anchor: {
|
|
36
|
+
typeIdentifier: TTypeIdentifier;
|
|
37
|
+
anchor: string;
|
|
38
|
+
} | undefined;
|
|
39
|
+
};
|
|
40
|
+
export { finishedHourWindows, seriesHoursLeft, seriesPage, toHourlySeries, toSeriesResult };
|
|
41
|
+
export type { MinuteValue, SeriesPage };
|
|
22
42
|
//# sourceMappingURL=hourly-series.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hourly-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/hourly-series.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hourly-series.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/hourly-series.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAMxD,gEAAgE;AAChE,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD;;;GAGG;AACH,QAAA,MAAM,cAAc,GAClB,gBAAgB,MAAM,EACtB,MAAM,MAAM,EACZ,SAAS,SAAS,WAAW,EAAE,KAC9B,gBAAgB,EAuBlB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,mBAAmB,GAAI,OAAO,IAAI,EAAE,UAAgB,KAAG,UAAU,EAStE,CAAC;AAEF,KAAK,UAAU,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,EAAE,EAAE,IAAI,CAAA;CAAE,CAAC;AAE3C,uEAAuE;AACvE,KAAK,UAAU,GAAG;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAY/E,yFAAyF;AACzF,QAAA,MAAM,UAAU,GAAI,WAAW,IAAI,EAAE,UAAU,MAAM,GAAG,SAAS,EAAE,WAAW,MAAM,KAAG,UAKtF,CAAC;AAEF,wFAAwF;AACxF,QAAA,MAAM,eAAe,GAAI,WAAW,IAAI,EAAE,WAAW,MAAM,KAAG,MAI3D,CAAC;AAEJ,8HAA8H;AAC9H,QAAA,MAAM,cAAc,GAAI,eAAe,EACrC,gBAAgB,eAAe,EAC/B,MAAM,UAAU,EAChB,MAAM,gBAAgB,EAAE;;;;;;;CAKxB,CAAC;AAEH,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC;AAC5F,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC"}
|
package/lib/typescript/module/src/modules/data-sync/utils/identify-imported-observations.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ type IdentifyImportedObservationsProps = {
|
|
|
7
7
|
groupedObservationSyncIds?: Array<string | undefined>;
|
|
8
8
|
/** Each group's source record, which a deletion of that record finds it by. */
|
|
9
9
|
groupedRecordIds?: Array<string | undefined>;
|
|
10
|
+
/** The sync id each group was saved under before, which the save also finds it by. */
|
|
11
|
+
groupedFormerSyncIds?: Array<string | undefined>;
|
|
10
12
|
mode?: HealthDataMode;
|
|
11
13
|
};
|
|
12
14
|
declare const getStableObservationId: ({ observation, provider, sourceId, bodyIndex, }: {
|
|
@@ -20,6 +22,6 @@ declare const getStableObservationId: ({ observation, provider, sourceId, bodyIn
|
|
|
20
22
|
* changes, and by the record it came from. Core's `saveObservationGroups` finds an earlier import by the sync id, so a
|
|
21
23
|
* read of the same source again saves nothing new, or writes over a total that grew.
|
|
22
24
|
*/
|
|
23
|
-
declare const identifyImportedObservations: ({ groupedObservationBodies, provider, groupedObservationSyncIds, groupedRecordIds, mode, }: IdentifyImportedObservationsProps) => Observation[][];
|
|
25
|
+
declare const identifyImportedObservations: ({ groupedObservationBodies, provider, groupedObservationSyncIds, groupedRecordIds, groupedFormerSyncIds, mode, }: IdentifyImportedObservationsProps) => Observation[][];
|
|
24
26
|
export { getStableObservationId, identifyImportedObservations };
|
|
25
27
|
//# sourceMappingURL=identify-imported-observations.d.ts.map
|
package/lib/typescript/module/src/modules/data-sync/utils/identify-imported-observations.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identify-imported-observations.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/identify-imported-observations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAM3D,KAAK,iCAAiC,GAAG;IACvC,wBAAwB,EAAE,WAAW,EAAE,EAAE,CAAC;IAC1C,QAAQ,EAAE,cAAc,CAAC;IACzB,yBAAyB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEtD,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"identify-imported-observations.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/identify-imported-observations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAM3D,KAAK,iCAAiC,GAAG;IACvC,wBAAwB,EAAE,WAAW,EAAE,EAAE,CAAC;IAC1C,QAAQ,EAAE,cAAc,CAAC;IACzB,yBAAyB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEtD,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAE7C,sFAAsF;IACtF,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACjD,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAiBF,QAAA,MAAM,sBAAsB,GAAI,iDAK7B;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,cAAc,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,KAAG,MAQa,CAAC;AAOlB;;;;GAIG;AACH,QAAA,MAAM,4BAA4B,GAAI,kHAOnC,iCAAiC,KAAG,WAAW,EAAE,EA4ChD,CAAC;AAEL,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HealthProvider } from "../types/health-provider";
|
|
2
|
+
import { HealthSyncKey } from "../types/health-sync-keys";
|
|
3
|
+
/** Where a page of records ended: what a reading on it may still be waiting for. */
|
|
4
|
+
type PageEnd = {
|
|
5
|
+
typeCount: number;
|
|
6
|
+
lastRead: ReadonlySet<unknown>;
|
|
7
|
+
};
|
|
8
|
+
/** How several platform records make one reading, and when a reading may go on in the next page. */
|
|
9
|
+
type ReadingGroups = {
|
|
10
|
+
group: <TRecord>(records: TRecord[]) => TRecord[][];
|
|
11
|
+
mayContinue: (reading: unknown[], pageEnd: PageEnd) => boolean;
|
|
12
|
+
};
|
|
13
|
+
/** How a data type's records make readings, or nothing when each record is one reading. */
|
|
14
|
+
declare const readingGroupsFor: (provider: HealthProvider, measurementTypeKey: HealthSyncKey) => ReadingGroups | undefined;
|
|
15
|
+
export { readingGroupsFor };
|
|
16
|
+
export type { PageEnd, ReadingGroups };
|
|
17
|
+
//# sourceMappingURL=reading-groups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reading-groups.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/data-sync/utils/reading-groups.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAkB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM1E,oFAAoF;AACpF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CAChC,CAAC;AAEF,oGAAoG;AACpG,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,EAAE,CAAC;IACpD,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;CAChE,CAAC;AAoBF,2FAA2F;AAC3F,QAAA,MAAM,gBAAgB,GACpB,UAAU,cAAc,EACxB,oBAAoB,aAAa,KAChC,aAAa,GAAG,SAGJ,CAAC;AAEhB,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC"}
|