@kingstinct/react-native-healthkit 9.0.3 → 9.0.5
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/app.plugin.js +15 -27
- package/app.plugin.ts +67 -0
- package/lib/commonjs/index.ios.js +15 -0
- package/lib/commonjs/index.js +15 -0
- package/lib/commonjs/types/index.js +36 -0
- package/lib/module/index.ios.js +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/types/index.js +20 -0
- package/lib/typescript/hooks/useSubscribeToChanges.d.ts +1 -1
- package/lib/typescript/index.d.ts +41 -46
- package/lib/typescript/index.ios.d.ts +79 -78
- package/lib/typescript/specs/CoreModule.nitro.d.ts +1 -1
- package/lib/typescript/types/index.d.ts +20 -0
- package/lib/typescript/utils/getCategorySampleById.d.ts +1 -1
- package/lib/typescript/utils/getMostRecentCategorySample.d.ts +1 -1
- package/lib/typescript/utils/getMostRecentQuantitySample.d.ts +1 -1
- package/lib/typescript/utils/getQuantitySampleById.d.ts +1 -1
- package/lib/typescript/utils/subscribeToChanges.d.ts +1 -1
- package/package.json +15 -1
- package/src/hooks/useSubscribeToChanges.ts +1 -1
- package/src/index.ios.ts +2 -0
- package/src/index.ts +2 -13
- package/src/specs/CoreModule.nitro.ts +1 -1
- package/src/types/index.ts +20 -0
- package/src/utils/subscribeToChanges.ts +1 -1
- /package/lib/commonjs/types/{Subscriptons.js → Subscriptions.js} +0 -0
- /package/lib/module/types/{Subscriptons.js → Subscriptions.js} +0 -0
- /package/lib/typescript/types/{Subscriptons.d.ts → Subscriptions.d.ts} +0 -0
- /package/src/types/{Subscriptons.ts → Subscriptions.ts} +0 -0
package/app.plugin.js
CHANGED
|
@@ -11,36 +11,26 @@ const {
|
|
|
11
11
|
* @template T = void
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
// please note that the BackgroundConfig currently doesn't actually enable background delivery for any types, but you
|
|
15
|
-
// can set it to false if you don't want the entitlement
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @typedef BackgroundConfig
|
|
19
|
-
* @type {false | Partial<Record<
|
|
20
|
-
* import('./src/native-types').SampleTypeIdentifier,
|
|
21
|
-
* import('./src/native-types').UpdateFrequency
|
|
22
|
-
* >>}
|
|
23
|
-
|
|
24
14
|
/**
|
|
25
15
|
* @typedef InfoPlistConfig
|
|
26
16
|
* @type {{
|
|
27
|
-
* NSHealthShareUsageDescription?: string |
|
|
28
|
-
* NSHealthUpdateUsageDescription?: string |
|
|
17
|
+
* NSHealthShareUsageDescription?: string | boolean,
|
|
18
|
+
* NSHealthUpdateUsageDescription?: string | boolean
|
|
29
19
|
* }}
|
|
30
|
-
*/
|
|
20
|
+
*/
|
|
31
21
|
|
|
32
22
|
/**
|
|
33
23
|
* @typedef AppPluginConfig
|
|
34
|
-
* @type {InfoPlistConfig & { background?:
|
|
24
|
+
* @type {InfoPlistConfig & { background?: boolean }}
|
|
35
25
|
*/
|
|
36
26
|
|
|
37
27
|
/**
|
|
38
|
-
* @type {ConfigPlugin<{background:
|
|
28
|
+
* @type {ConfigPlugin<{background: boolean}>}
|
|
39
29
|
*/
|
|
40
30
|
const withEntitlementsPlugin = (
|
|
41
31
|
config,
|
|
42
32
|
/**
|
|
43
|
-
* @type {{background:
|
|
33
|
+
* @type {{background: boolean} | undefined}
|
|
44
34
|
* */
|
|
45
35
|
props,
|
|
46
36
|
) =>
|
|
@@ -63,22 +53,20 @@ const withEntitlementsPlugin = (
|
|
|
63
53
|
const withInfoPlistPlugin = (
|
|
64
54
|
config,
|
|
65
55
|
/**
|
|
66
|
-
* @type {{NSHealthShareUsageDescription: string |
|
|
56
|
+
* @type {{NSHealthShareUsageDescription: string | true, NSHealthUpdateUsageDescription: string | true} | undefined}
|
|
67
57
|
* */
|
|
68
58
|
props,
|
|
69
59
|
) =>
|
|
70
60
|
withInfoPlist(config, (config) => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
props.NSHealthShareUsageDescription
|
|
74
|
-
`${config.name} wants to read your health data`
|
|
75
|
-
}
|
|
61
|
+
config.modResults.NSHealthShareUsageDescription =
|
|
62
|
+
typeof props.NSHealthShareUsageDescription === 'string'
|
|
63
|
+
? props.NSHealthShareUsageDescription
|
|
64
|
+
: `${config.name} wants to read your health data`
|
|
76
65
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
props.NSHealthUpdateUsageDescription
|
|
80
|
-
`${config.name} wants to update your health data`
|
|
81
|
-
}
|
|
66
|
+
config.modResults.NSHealthUpdateUsageDescription =
|
|
67
|
+
typeof props.NSHealthUpdateUsageDescription === 'string'
|
|
68
|
+
? props.NSHealthUpdateUsageDescription
|
|
69
|
+
: `${config.name} wants to update your health data`
|
|
82
70
|
|
|
83
71
|
return config
|
|
84
72
|
})
|
package/app.plugin.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ConfigPlugin,
|
|
3
|
+
createRunOncePlugin,
|
|
4
|
+
withEntitlementsPlist,
|
|
5
|
+
withInfoPlist,
|
|
6
|
+
withPlugins,
|
|
7
|
+
} from '@expo/config-plugins'
|
|
8
|
+
|
|
9
|
+
import pkg from './package.json'
|
|
10
|
+
|
|
11
|
+
// please note that the BackgroundConfig currently doesn't actually enable background delivery for any types, but you
|
|
12
|
+
// can set it to false if you don't want the entitlement
|
|
13
|
+
type BackgroundConfig = boolean
|
|
14
|
+
|
|
15
|
+
type InfoPlistConfig = {
|
|
16
|
+
NSHealthShareUsageDescription?: string | true
|
|
17
|
+
NSHealthUpdateUsageDescription?: string | true
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type AppPluginConfig = InfoPlistConfig & {
|
|
21
|
+
background?: BackgroundConfig
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const withEntitlementsPlugin: ConfigPlugin<{
|
|
25
|
+
background?: BackgroundConfig
|
|
26
|
+
}> = (config, props) => {
|
|
27
|
+
return withEntitlementsPlist(config, (configPlist) => {
|
|
28
|
+
configPlist.modResults['com.apple.developer.healthkit'] = true
|
|
29
|
+
|
|
30
|
+
// background is enabled by default, but possible to opt-out from
|
|
31
|
+
// (haven't seen any drawbacks from having it enabled)
|
|
32
|
+
if (props?.background !== false) {
|
|
33
|
+
configPlist.modResults[
|
|
34
|
+
'com.apple.developer.healthkit.background-delivery'
|
|
35
|
+
] = true
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return configPlist
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const withInfoPlistPlugin: ConfigPlugin<InfoPlistConfig> = (config, props) => {
|
|
43
|
+
return withInfoPlist(config, (configPlist) => {
|
|
44
|
+
configPlist.modResults.NSHealthShareUsageDescription =
|
|
45
|
+
typeof props.NSHealthShareUsageDescription === 'string'
|
|
46
|
+
? props.NSHealthShareUsageDescription
|
|
47
|
+
: `${config.name ?? pkg.name} wants to read your health data`
|
|
48
|
+
|
|
49
|
+
// Add description if it's not undefined and not explicitly false
|
|
50
|
+
|
|
51
|
+
configPlist.modResults.NSHealthUpdateUsageDescription =
|
|
52
|
+
typeof props.NSHealthUpdateUsageDescription === 'string'
|
|
53
|
+
? props.NSHealthUpdateUsageDescription
|
|
54
|
+
: `${config.name ?? pkg.name} wants to update your health data`
|
|
55
|
+
|
|
56
|
+
return configPlist
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const healthkitAppPlugin: ConfigPlugin<AppPluginConfig> = (config, props) => {
|
|
61
|
+
return withPlugins(config, [
|
|
62
|
+
[withEntitlementsPlugin, props],
|
|
63
|
+
[withInfoPlistPlugin, props],
|
|
64
|
+
])
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export default createRunOncePlugin(healthkitAppPlugin, pkg.name, pkg.version)
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
18
|
};
|
|
@@ -31,6 +45,7 @@ const getMostRecentWorkout_1 = __importDefault(require("./utils/getMostRecentWor
|
|
|
31
45
|
exports.getMostRecentWorkout = getMostRecentWorkout_1.default;
|
|
32
46
|
const getPreferredUnit_1 = __importDefault(require("./utils/getPreferredUnit"));
|
|
33
47
|
exports.getPreferredUnit = getPreferredUnit_1.default;
|
|
48
|
+
__exportStar(require("./types"), exports);
|
|
34
49
|
const currentMajorVersionIOS = react_native_1.Platform.OS === 'ios' ? Number.parseInt(react_native_1.Platform.Version, 10) : 0;
|
|
35
50
|
// Named exports - all functions bound to their respective modules
|
|
36
51
|
exports.authorizationStatusFor = modules_1.Core.authorizationStatusFor.bind(modules_1.Core);
|
package/lib/commonjs/index.js
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
17
|
exports.getBiologicalSexAsync = exports.useStatisticsForQuantity = exports.useSources = exports.useIsHealthDataAvailable = exports.useHealthkitAuthorization = exports.useSubscribeToChanges = exports.useMostRecentWorkout = exports.useMostRecentQuantitySample = exports.getPreferredUnit = exports.getMostRecentWorkout = exports.getMostRecentQuantitySample = exports.saveStateOfMindSample = exports.queryStateOfMindSamples = exports.startWatchApp = exports.saveWorkoutSample = exports.queryWorkoutSamplesWithAnchor = exports.queryWorkoutSamples = exports.queryHeartbeatSeriesSamplesWithAnchor = exports.queryHeartbeatSeriesSamples = exports.saveCorrelationSample = exports.queryCorrelationSamples = exports.saveCategorySample = exports.isQuantityCompatibleWithUnit = exports.saveQuantitySample = exports.queryStatisticsCollectionForQuantity = exports.queryStatisticsForQuantity = exports.queryQuantitySamplesWithAnchor = exports.queryQuantitySamples = exports.getWheelchairUse = exports.getFitzpatrickSkinType = exports.getDateOfBirth = exports.getBloodType = exports.getBiologicalSex = exports.areObjectTypesAvailableAsync = exports.areObjectTypesAvailable = exports.isObjectTypeAvailableAsync = exports.isObjectTypeAvailable = exports.isProtectedDataAvailable = exports.subscribeToChanges = exports.deleteObjects = exports.requestAuthorization = exports.querySources = exports.isHealthDataAvailableAsync = exports.isHealthDataAvailable = exports.getRequestStatusForAuthorization = exports.getPreferredUnits = exports.enableBackgroundDelivery = exports.disableBackgroundDelivery = exports.disableAllBackgroundDelivery = exports.authorizationStatusFor = void 0;
|
|
4
18
|
exports.unsubscribeQueries = exports.getWheelchairUseAsync = exports.getFitzpatrickSkinTypeAsync = exports.getDateOfBirthAsync = exports.getBloodTypeAsync = void 0;
|
|
@@ -9,6 +23,7 @@ exports.useMostRecentCategorySample = useMostRecentCategorySample;
|
|
|
9
23
|
const react_native_1 = require("react-native");
|
|
10
24
|
const Auth_1 = require("./types/Auth");
|
|
11
25
|
const Characteristics_1 = require("./types/Characteristics");
|
|
26
|
+
__exportStar(require("./types"), exports);
|
|
12
27
|
const notAvailableError = `[@kingstinct/react-native-healthkit] Platform "${react_native_1.Platform.OS}" not supported. HealthKit is only available on iOS.`;
|
|
13
28
|
let hasWarned = false;
|
|
14
29
|
// @ts-ignore
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Auth"), exports);
|
|
18
|
+
__exportStar(require("./Background"), exports);
|
|
19
|
+
__exportStar(require("./CategoryType"), exports);
|
|
20
|
+
__exportStar(require("./Characteristics"), exports);
|
|
21
|
+
__exportStar(require("./Constants"), exports);
|
|
22
|
+
__exportStar(require("./CorrelationType"), exports);
|
|
23
|
+
__exportStar(require("./Device"), exports);
|
|
24
|
+
__exportStar(require("./HeartbeatSeries"), exports);
|
|
25
|
+
__exportStar(require("./QuantitySample"), exports);
|
|
26
|
+
__exportStar(require("./QuantityType"), exports);
|
|
27
|
+
__exportStar(require("./QuantityTypeIdentifier"), exports);
|
|
28
|
+
__exportStar(require("./QueryOptions"), exports);
|
|
29
|
+
__exportStar(require("./Shared"), exports);
|
|
30
|
+
__exportStar(require("./Source"), exports);
|
|
31
|
+
__exportStar(require("./StateOfMind"), exports);
|
|
32
|
+
__exportStar(require("./Subscriptions"), exports);
|
|
33
|
+
__exportStar(require("./Units"), exports);
|
|
34
|
+
__exportStar(require("./WeatherCondition"), exports);
|
|
35
|
+
__exportStar(require("./WorkoutKit"), exports);
|
|
36
|
+
__exportStar(require("./Workouts"), exports);
|
package/lib/module/index.ios.js
CHANGED
|
@@ -12,6 +12,7 @@ import getMostRecentCategorySample from './utils/getMostRecentCategorySample';
|
|
|
12
12
|
import getMostRecentQuantitySample from './utils/getMostRecentQuantitySample';
|
|
13
13
|
import getMostRecentWorkout from './utils/getMostRecentWorkout';
|
|
14
14
|
import getPreferredUnit from './utils/getPreferredUnit';
|
|
15
|
+
export * from './types';
|
|
15
16
|
const currentMajorVersionIOS = Platform.OS === 'ios' ? Number.parseInt(Platform.Version, 10) : 0;
|
|
16
17
|
export { getMostRecentCategorySample, getMostRecentQuantitySample, getMostRecentWorkout, getPreferredUnit, useMostRecentCategorySample, useMostRecentQuantitySample, useMostRecentWorkout, useSubscribeToChanges, useHealthkitAuthorization, useIsHealthDataAvailable, useSources, useStatisticsForQuantity, };
|
|
17
18
|
// Named exports - all functions bound to their respective modules
|
package/lib/module/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
2
|
import { AuthorizationRequestStatus, AuthorizationStatus } from './types/Auth';
|
|
3
3
|
import { BiologicalSex, BloodType, FitzpatrickSkinType, WheelchairUse, } from './types/Characteristics';
|
|
4
|
+
export * from './types';
|
|
4
5
|
const notAvailableError = `[@kingstinct/react-native-healthkit] Platform "${Platform.OS}" not supported. HealthKit is only available on iOS.`;
|
|
5
6
|
let hasWarned = false;
|
|
6
7
|
// @ts-ignore
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from './Auth';
|
|
2
|
+
export * from './Background';
|
|
3
|
+
export * from './CategoryType';
|
|
4
|
+
export * from './Characteristics';
|
|
5
|
+
export * from './Constants';
|
|
6
|
+
export * from './CorrelationType';
|
|
7
|
+
export * from './Device';
|
|
8
|
+
export * from './HeartbeatSeries';
|
|
9
|
+
export * from './QuantitySample';
|
|
10
|
+
export * from './QuantityType';
|
|
11
|
+
export * from './QuantityTypeIdentifier';
|
|
12
|
+
export * from './QueryOptions';
|
|
13
|
+
export * from './Shared';
|
|
14
|
+
export * from './Source';
|
|
15
|
+
export * from './StateOfMind';
|
|
16
|
+
export * from './Subscriptions';
|
|
17
|
+
export * from './Units';
|
|
18
|
+
export * from './WeatherCondition';
|
|
19
|
+
export * from './WorkoutKit';
|
|
20
|
+
export * from './Workouts';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SampleTypeIdentifier } from '../types/Shared';
|
|
2
|
-
import type { OnChangeCallbackArgs } from '../types/
|
|
2
|
+
import type { OnChangeCallbackArgs } from '../types/Subscriptions';
|
|
3
3
|
export declare function useSubscribeToChanges<TIdentifier extends SampleTypeIdentifier>(identifier: TIdentifier, onChange: (args: OnChangeCallbackArgs) => void): void;
|
|
4
4
|
export default useSubscribeToChanges;
|
|
@@ -1,69 +1,64 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { SourceProxy } from './specs/SourceProxy.nitro';
|
|
1
|
+
import type ReactNativeHealthkit from './index.ios';
|
|
3
2
|
import type { WorkoutProxy } from './specs/WorkoutProxy.nitro';
|
|
4
3
|
import { AuthorizationRequestStatus, AuthorizationStatus } from './types/Auth';
|
|
5
4
|
import type { CategorySampleTyped, CategorySamplesWithAnchorResponseTyped } from './types/CategoryType';
|
|
6
5
|
import type { CategoryTypeIdentifier } from './types/CategoryTypeIdentifier';
|
|
7
6
|
import { BiologicalSex, BloodType, FitzpatrickSkinType, WheelchairUse } from './types/Characteristics';
|
|
8
|
-
import type { CorrelationSample } from './types/CorrelationType';
|
|
9
|
-
import type { HeartbeatSeriesSample, HeartbeatSeriesSamplesWithAnchorResponse } from './types/HeartbeatSeries';
|
|
10
7
|
import type { QuantitySample } from './types/QuantitySample';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import type { QueryWorkoutSamplesWithAnchorResponse } from './types/Workouts';
|
|
14
|
-
export declare const authorizationStatusFor: (type: import("./types/Shared").ObjectTypeIdentifier) => AuthorizationStatus;
|
|
8
|
+
export * from './types';
|
|
9
|
+
export declare const authorizationStatusFor: (type: import("./types").ObjectTypeIdentifier) => AuthorizationStatus;
|
|
15
10
|
export declare const disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
16
|
-
export declare const disableBackgroundDelivery: (typeIdentifier: import("./types
|
|
17
|
-
export declare const enableBackgroundDelivery: (typeIdentifier: import("./types
|
|
18
|
-
export declare const getPreferredUnits: (identifiers: readonly import("./types
|
|
19
|
-
export declare const getRequestStatusForAuthorization: (toShare: import("./types
|
|
11
|
+
export declare const disableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier) => Promise<boolean>;
|
|
12
|
+
export declare const enableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier, updateFrequency: import("./types").UpdateFrequency) => Promise<boolean>;
|
|
13
|
+
export declare const getPreferredUnits: (identifiers: readonly import("./types").QuantityTypeIdentifier[], forceUpdate?: boolean) => Promise<import("./types").IdentifierWithUnit[]>;
|
|
14
|
+
export declare const getRequestStatusForAuthorization: (toShare: import("./types").SampleTypeIdentifierWriteable[], toRead: import("./types").ObjectTypeIdentifier[]) => Promise<AuthorizationRequestStatus>;
|
|
20
15
|
export declare const isHealthDataAvailable: () => boolean;
|
|
21
16
|
export declare const isHealthDataAvailableAsync: () => Promise<boolean>;
|
|
22
|
-
export declare const querySources: (identifier: import("./types
|
|
23
|
-
export declare const requestAuthorization: (toShare: import("./types
|
|
24
|
-
export declare const deleteObjects: (objectTypeIdentifier: import("./types
|
|
25
|
-
export declare const subscribeToChanges: (typeIdentifier: import("./types
|
|
17
|
+
export declare const querySources: (identifier: import("./types").SampleTypeIdentifier) => Promise<readonly import("./specs/SourceProxy.nitro").SourceProxy[]>;
|
|
18
|
+
export declare const requestAuthorization: (toShare: import("./types").SampleTypeIdentifierWriteable[], toRead: import("./types").ObjectTypeIdentifier[]) => Promise<boolean>;
|
|
19
|
+
export declare const deleteObjects: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier, filter: import("./types").FilterForSamples) => Promise<number>;
|
|
20
|
+
export declare const subscribeToChanges: (typeIdentifier: import("./types").SampleTypeIdentifier, callback: (args: import("./types").OnChangeCallbackArgs) => void) => string;
|
|
26
21
|
export declare const isProtectedDataAvailable: () => boolean;
|
|
27
|
-
export declare const isObjectTypeAvailable: (objectTypeIdentifier: import("./types
|
|
28
|
-
export declare const isObjectTypeAvailableAsync: (objectTypeIdentifier: import("./types
|
|
29
|
-
export declare const areObjectTypesAvailable: (objectTypeIdentifiers: import("./types
|
|
30
|
-
export declare const areObjectTypesAvailableAsync: (objectTypeIdentifiers: import("./types
|
|
22
|
+
export declare const isObjectTypeAvailable: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => boolean;
|
|
23
|
+
export declare const isObjectTypeAvailableAsync: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => Promise<boolean>;
|
|
24
|
+
export declare const areObjectTypesAvailable: (objectTypeIdentifiers: import("./types").ObjectTypeIdentifier[]) => Record<string, boolean>;
|
|
25
|
+
export declare const areObjectTypesAvailableAsync: (objectTypeIdentifiers: import("./types").ObjectTypeIdentifier[]) => Promise<Record<string, boolean>>;
|
|
31
26
|
export declare const getBiologicalSex: () => BiologicalSex;
|
|
32
27
|
export declare const getBloodType: () => BloodType;
|
|
33
28
|
export declare const getDateOfBirth: () => Date;
|
|
34
29
|
export declare const getFitzpatrickSkinType: () => FitzpatrickSkinType;
|
|
35
30
|
export declare const getWheelchairUse: () => WheelchairUse;
|
|
36
|
-
export declare const queryQuantitySamples: (identifier: import("./types
|
|
37
|
-
export declare const queryQuantitySamplesWithAnchor: (identifier: import("./types
|
|
38
|
-
export declare const queryStatisticsForQuantity: (identifier: import("./types
|
|
39
|
-
export declare const queryStatisticsCollectionForQuantity: (identifier: import("./types
|
|
40
|
-
export declare const saveQuantitySample: (identifier: import("./types
|
|
41
|
-
export declare const isQuantityCompatibleWithUnit: (identifier: import("./types
|
|
31
|
+
export declare const queryQuantitySamples: (identifier: import("./types").QuantityTypeIdentifier, options?: import("./types").QueryOptionsWithSortOrderAndUnit) => Promise<readonly QuantitySample[]>;
|
|
32
|
+
export declare const queryQuantitySamplesWithAnchor: (identifier: import("./types").QuantityTypeIdentifier, options: import("./types").QueryOptionsWithAnchorAndUnit) => Promise<import("./types").QuantitySamplesWithAnchorResponse>;
|
|
33
|
+
export declare const queryStatisticsForQuantity: (identifier: import("./types").QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], options?: import("./types").StatisticsQueryOptions) => Promise<import("./types").QueryStatisticsResponse>;
|
|
34
|
+
export declare const queryStatisticsCollectionForQuantity: (identifier: import("./types").QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], anchorDate: string, intervalComponents: import("./types").IntervalComponents, options?: import("./types").StatisticsQueryOptions) => Promise<readonly import("./types").QueryStatisticsResponse[]>;
|
|
35
|
+
export declare const saveQuantitySample: (identifier: import("./types").QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
36
|
+
export declare const isQuantityCompatibleWithUnit: (identifier: import("./types").QuantityTypeIdentifier, unit: string) => boolean;
|
|
42
37
|
export declare function queryCategorySamples<T extends CategoryTypeIdentifier>(categoryTypeIdentifier: T): Promise<CategorySampleTyped<T>[]>;
|
|
43
38
|
export declare function queryCategorySamplesWithAnchor<T extends CategoryTypeIdentifier>(categoryTypeIdentifier: T): Promise<CategorySamplesWithAnchorResponseTyped<T>>;
|
|
44
|
-
export declare const saveCategorySample: <T extends CategoryTypeIdentifier>(identifier: T, value: import("./types
|
|
45
|
-
export declare const queryCorrelationSamples: (typeIdentifier: import("./types
|
|
46
|
-
export declare const saveCorrelationSample: (typeIdentifier: import("./types
|
|
47
|
-
export declare const queryHeartbeatSeriesSamples: (options?: import("./types
|
|
48
|
-
export declare const queryHeartbeatSeriesSamplesWithAnchor: (options: import("./types
|
|
49
|
-
export declare const queryWorkoutSamples: (options: import("./types
|
|
50
|
-
export declare const queryWorkoutSamplesWithAnchor: (options: import("./types
|
|
51
|
-
export declare const saveWorkoutSample: (workoutActivityType: import("./types
|
|
52
|
-
export declare const startWatchApp: (workoutConfiguration: import("./types
|
|
53
|
-
export declare const queryStateOfMindSamples: (options?: import("./types
|
|
54
|
-
export declare const saveStateOfMindSample: (date: Date, kind: import("./types
|
|
39
|
+
export declare const saveCategorySample: <T extends CategoryTypeIdentifier>(identifier: T, value: import("./types").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata: import("./types").MetadataForCategoryIdentifier<T>) => Promise<boolean>;
|
|
40
|
+
export declare const queryCorrelationSamples: (typeIdentifier: import("./types").CorrelationTypeIdentifier, from: Date, to: Date) => Promise<readonly import("./types").CorrelationSample[]>;
|
|
41
|
+
export declare const saveCorrelationSample: (typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
42
|
+
export declare const queryHeartbeatSeriesSamples: (options?: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").HeartbeatSeriesSample[]>;
|
|
43
|
+
export declare const queryHeartbeatSeriesSamplesWithAnchor: (options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").HeartbeatSeriesSamplesWithAnchorResponse>;
|
|
44
|
+
export declare const queryWorkoutSamples: (options: import("./types").WorkoutQueryOptions) => Promise<WorkoutProxy[]>;
|
|
45
|
+
export declare const queryWorkoutSamplesWithAnchor: (options: import("./types").WorkoutQueryOptionsWithAnchor) => Promise<import("./types").QueryWorkoutSamplesWithAnchorResponse>;
|
|
46
|
+
export declare const saveWorkoutSample: (workoutActivityType: import("./types").WorkoutActivityType, quantities: readonly import("./types").QuantitySampleForSaving[], startDate: Date, endDate: Date, totals: import("./types").WorkoutTotals, metadata: import("react-native-nitro-modules").AnyMap) => Promise<string>;
|
|
47
|
+
export declare const startWatchApp: (workoutConfiguration: import("./types").WorkoutConfiguration) => Promise<boolean>;
|
|
48
|
+
export declare const queryStateOfMindSamples: (options?: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").StateOfMindSample[]>;
|
|
49
|
+
export declare const saveStateOfMindSample: (date: Date, kind: import("./types").StateOfMindKind, valence: number, labels: readonly import("./types").StateOfMindLabel[], associations: readonly import("./types").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
55
50
|
export declare function getMostRecentCategorySample<T extends CategoryTypeIdentifier>(identifier: T): Promise<CategorySampleTyped<T> | undefined>;
|
|
56
|
-
export declare const getMostRecentQuantitySample: typeof
|
|
57
|
-
export declare const getMostRecentWorkout: (options: Pick<import("./types
|
|
58
|
-
export declare const getPreferredUnit: (quantityType: import("./types
|
|
51
|
+
export declare const getMostRecentQuantitySample: typeof import("./index.ios").getMostRecentQuantitySample;
|
|
52
|
+
export declare const getMostRecentWorkout: (options: Pick<import("./types").WorkoutQueryOptions, "distanceUnit" | "energyUnit">) => Promise<WorkoutProxy | undefined>;
|
|
53
|
+
export declare const getPreferredUnit: (quantityType: import("./types").QuantityTypeIdentifier) => Promise<string>;
|
|
59
54
|
export declare function useMostRecentCategorySample<T extends CategoryTypeIdentifier>(categoryTypeIdentifier: T): CategorySampleTyped<T> | undefined;
|
|
60
|
-
export declare const useMostRecentQuantitySample: typeof
|
|
61
|
-
export declare const useMostRecentWorkout: typeof
|
|
62
|
-
export declare const useSubscribeToChanges: typeof
|
|
63
|
-
export declare const useHealthkitAuthorization: (read: import("./types
|
|
55
|
+
export declare const useMostRecentQuantitySample: typeof import("./index.ios").useMostRecentQuantitySample;
|
|
56
|
+
export declare const useMostRecentWorkout: typeof import("./index.ios").useMostRecentWorkout;
|
|
57
|
+
export declare const useSubscribeToChanges: typeof import("./index.ios").useSubscribeToChanges;
|
|
58
|
+
export declare const useHealthkitAuthorization: (read: import("./types").ObjectTypeIdentifier[], write?: import("./types").SampleTypeIdentifierWriteable[]) => readonly [AuthorizationRequestStatus | null, () => Promise<AuthorizationRequestStatus>];
|
|
64
59
|
export declare const useIsHealthDataAvailable: () => boolean | null;
|
|
65
|
-
export declare const useSources: typeof
|
|
66
|
-
export declare const useStatisticsForQuantity: typeof
|
|
60
|
+
export declare const useSources: typeof import("./index.ios").useSources;
|
|
61
|
+
export declare const useStatisticsForQuantity: typeof import("./index.ios").useStatisticsForQuantity;
|
|
67
62
|
export declare const getBiologicalSexAsync: () => Promise<BiologicalSex>;
|
|
68
63
|
export declare const getBloodTypeAsync: () => Promise<BloodType>;
|
|
69
64
|
export declare const getDateOfBirthAsync: () => Promise<Date>;
|
|
@@ -11,6 +11,7 @@ import getMostRecentCategorySample from './utils/getMostRecentCategorySample';
|
|
|
11
11
|
import getMostRecentQuantitySample from './utils/getMostRecentQuantitySample';
|
|
12
12
|
import getMostRecentWorkout from './utils/getMostRecentWorkout';
|
|
13
13
|
import getPreferredUnit from './utils/getPreferredUnit';
|
|
14
|
+
export * from './types';
|
|
14
15
|
declare const currentMajorVersionIOS: number;
|
|
15
16
|
/**
|
|
16
17
|
* Quantity types that are not available before iOS 17
|
|
@@ -31,110 +32,110 @@ export type AvailableQuantityTypesIOS17Plus = QuantityTypeIdentifier;
|
|
|
31
32
|
* @returns Available quantity types for the given iOS version
|
|
32
33
|
*/
|
|
33
34
|
export type AvailableQuantityTypes<T extends number = typeof currentMajorVersionIOS> = T extends 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 ? AvailableQuantityTypesIOS17Plus : AvailableQuantityTypesBeforeIOS17;
|
|
34
|
-
export declare const authorizationStatusFor: (type: import("./types
|
|
35
|
+
export declare const authorizationStatusFor: (type: import("./types").ObjectTypeIdentifier) => import("./types").AuthorizationStatus;
|
|
35
36
|
export declare const disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
36
|
-
export declare const disableBackgroundDelivery: (typeIdentifier: import("./types
|
|
37
|
-
export declare const enableBackgroundDelivery: (typeIdentifier: import("./types
|
|
38
|
-
export declare const getBiologicalSex: () => import("./types
|
|
39
|
-
export declare const getBloodType: () => import("./types
|
|
37
|
+
export declare const disableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier) => Promise<boolean>;
|
|
38
|
+
export declare const enableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier, updateFrequency: import("./types").UpdateFrequency) => Promise<boolean>;
|
|
39
|
+
export declare const getBiologicalSex: () => import("./types").BiologicalSex;
|
|
40
|
+
export declare const getBloodType: () => import("./types").BloodType;
|
|
40
41
|
export declare const getDateOfBirth: () => Date;
|
|
41
|
-
export declare const getFitzpatrickSkinType: () => import("./types
|
|
42
|
-
export declare const getPreferredUnits: (identifiers: readonly QuantityTypeIdentifier[], forceUpdate?: boolean) => Promise<import("./types
|
|
43
|
-
export declare const getRequestStatusForAuthorization: (toShare: import("./types
|
|
44
|
-
export declare const getWheelchairUse: () => import("./types
|
|
42
|
+
export declare const getFitzpatrickSkinType: () => import("./types").FitzpatrickSkinType;
|
|
43
|
+
export declare const getPreferredUnits: (identifiers: readonly QuantityTypeIdentifier[], forceUpdate?: boolean) => Promise<import("./types").IdentifierWithUnit[]>;
|
|
44
|
+
export declare const getRequestStatusForAuthorization: (toShare: import("./types").SampleTypeIdentifierWriteable[], toRead: import("./types").ObjectTypeIdentifier[]) => Promise<import("./types").AuthorizationRequestStatus>;
|
|
45
|
+
export declare const getWheelchairUse: () => import("./types").WheelchairUse;
|
|
45
46
|
export declare const isHealthDataAvailable: () => boolean;
|
|
46
47
|
export declare const isHealthDataAvailableAsync: () => Promise<boolean>;
|
|
47
|
-
export declare const queryCategorySamples: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, options?: import("./types
|
|
48
|
-
export declare const queryCategorySamplesWithAnchor: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, options: import("./types
|
|
49
|
-
export declare const queryCorrelationSamples: (typeIdentifier: import("./types
|
|
50
|
-
export declare const queryHeartbeatSeriesSamples: (options?: import("./types
|
|
51
|
-
export declare const queryHeartbeatSeriesSamplesWithAnchor: (options: import("./types
|
|
52
|
-
export declare const queryQuantitySamples: (identifier: QuantityTypeIdentifier, options?: import("./types
|
|
53
|
-
export declare const queryQuantitySamplesWithAnchor: (identifier: QuantityTypeIdentifier, options: import("./types
|
|
54
|
-
export declare const queryStatisticsForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types
|
|
55
|
-
export declare const queryStatisticsCollectionForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types
|
|
56
|
-
export declare const queryWorkoutSamples: (options: import("./types
|
|
57
|
-
export declare const queryWorkoutSamplesWithAnchor: (options: import("./types
|
|
58
|
-
export declare const querySources: (identifier: import("./types
|
|
59
|
-
export declare const requestAuthorization: (toShare: import("./types
|
|
60
|
-
export declare const deleteObjects: (objectTypeIdentifier: import("./types
|
|
61
|
-
export declare const saveCategorySample: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, value: import("./types
|
|
62
|
-
export declare const saveCorrelationSample: (typeIdentifier: import("./types
|
|
48
|
+
export declare const queryCategorySamples: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, options?: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").CategorySampleTyped<T>[]>;
|
|
49
|
+
export declare const queryCategorySamplesWithAnchor: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").CategorySamplesWithAnchorResponseTyped<T>>;
|
|
50
|
+
export declare const queryCorrelationSamples: (typeIdentifier: import("./types").CorrelationTypeIdentifier, from: Date, to: Date) => Promise<readonly import("./types").CorrelationSample[]>;
|
|
51
|
+
export declare const queryHeartbeatSeriesSamples: (options?: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").HeartbeatSeriesSample[]>;
|
|
52
|
+
export declare const queryHeartbeatSeriesSamplesWithAnchor: (options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").HeartbeatSeriesSamplesWithAnchorResponse>;
|
|
53
|
+
export declare const queryQuantitySamples: (identifier: QuantityTypeIdentifier, options?: import("./types").QueryOptionsWithSortOrderAndUnit) => Promise<readonly import("./types").QuantitySample[]>;
|
|
54
|
+
export declare const queryQuantitySamplesWithAnchor: (identifier: QuantityTypeIdentifier, options: import("./types").QueryOptionsWithAnchorAndUnit) => Promise<import("./types").QuantitySamplesWithAnchorResponse>;
|
|
55
|
+
export declare const queryStatisticsForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], options?: import("./types").StatisticsQueryOptions) => Promise<import("./types").QueryStatisticsResponse>;
|
|
56
|
+
export declare const queryStatisticsCollectionForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], anchorDate: string, intervalComponents: import("./types").IntervalComponents, options?: import("./types").StatisticsQueryOptions) => Promise<readonly import("./types").QueryStatisticsResponse[]>;
|
|
57
|
+
export declare const queryWorkoutSamples: (options: import("./types").WorkoutQueryOptions) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy[]>;
|
|
58
|
+
export declare const queryWorkoutSamplesWithAnchor: (options: import("./types").WorkoutQueryOptionsWithAnchor) => Promise<import("./types").QueryWorkoutSamplesWithAnchorResponse>;
|
|
59
|
+
export declare const querySources: (identifier: import("./types").SampleTypeIdentifier) => Promise<readonly import("./specs/SourceProxy.nitro").SourceProxy[]>;
|
|
60
|
+
export declare const requestAuthorization: (toShare: import("./types").SampleTypeIdentifierWriteable[], toRead: import("./types").ObjectTypeIdentifier[]) => Promise<boolean>;
|
|
61
|
+
export declare const deleteObjects: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier, filter: import("./types").FilterForSamples) => Promise<number>;
|
|
62
|
+
export declare const saveCategorySample: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, value: import("./types").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata: import("./types").MetadataForCategoryIdentifier<T>) => Promise<boolean>;
|
|
63
|
+
export declare const saveCorrelationSample: (typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
63
64
|
export declare const saveQuantitySample: (identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
64
|
-
export declare const saveWorkoutSample: (workoutActivityType: import("./types
|
|
65
|
-
export declare const subscribeToChanges: (typeIdentifier: import("./types
|
|
66
|
-
export declare const startWatchApp: (workoutConfiguration: import("./types
|
|
65
|
+
export declare const saveWorkoutSample: (workoutActivityType: import("./types").WorkoutActivityType, quantities: readonly import("./types").QuantitySampleForSaving[], startDate: Date, endDate: Date, totals: import("./types").WorkoutTotals, metadata: import("react-native-nitro-modules").AnyMap) => Promise<string>;
|
|
66
|
+
export declare const subscribeToChanges: (typeIdentifier: import("./types").SampleTypeIdentifier, callback: (args: import("./types").OnChangeCallbackArgs) => void) => string;
|
|
67
|
+
export declare const startWatchApp: (workoutConfiguration: import("./types").WorkoutConfiguration) => Promise<boolean>;
|
|
67
68
|
export declare const isProtectedDataAvailable: () => boolean;
|
|
68
|
-
export declare const queryStateOfMindSamples: (options?: import("./types
|
|
69
|
-
export declare const saveStateOfMindSample: (date: Date, kind: import("./types
|
|
69
|
+
export declare const queryStateOfMindSamples: (options?: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").StateOfMindSample[]>;
|
|
70
|
+
export declare const saveStateOfMindSample: (date: Date, kind: import("./types").StateOfMindKind, valence: number, labels: readonly import("./types").StateOfMindLabel[], associations: readonly import("./types").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
70
71
|
export declare const isQuantityCompatibleWithUnit: (identifier: QuantityTypeIdentifier, unit: string) => boolean;
|
|
71
72
|
export declare const unsubscribeQueries: (queryIds: string[]) => number;
|
|
72
|
-
export declare const isObjectTypeAvailable: (objectTypeIdentifier: import("./types
|
|
73
|
-
export declare const isObjectTypeAvailableAsync: (objectTypeIdentifier: import("./types
|
|
74
|
-
export declare const areObjectTypesAvailable: (objectTypeIdentifiers: import("./types
|
|
75
|
-
export declare const areObjectTypesAvailableAsync: (objectTypeIdentifiers: import("./types
|
|
76
|
-
export declare const getBiologicalSexAsync: () => Promise<import("./types
|
|
77
|
-
export declare const getBloodTypeAsync: () => Promise<import("./types
|
|
73
|
+
export declare const isObjectTypeAvailable: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => boolean;
|
|
74
|
+
export declare const isObjectTypeAvailableAsync: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => Promise<boolean>;
|
|
75
|
+
export declare const areObjectTypesAvailable: (objectTypeIdentifiers: import("./types").ObjectTypeIdentifier[]) => Record<string, boolean>;
|
|
76
|
+
export declare const areObjectTypesAvailableAsync: (objectTypeIdentifiers: import("./types").ObjectTypeIdentifier[]) => Promise<Record<string, boolean>>;
|
|
77
|
+
export declare const getBiologicalSexAsync: () => Promise<import("./types").BiologicalSex>;
|
|
78
|
+
export declare const getBloodTypeAsync: () => Promise<import("./types").BloodType>;
|
|
78
79
|
export declare const getDateOfBirthAsync: () => Promise<Date>;
|
|
79
|
-
export declare const getFitzpatrickSkinTypeAsync: () => Promise<import("./types
|
|
80
|
-
export declare const getWheelchairUseAsync: () => Promise<import("./types
|
|
80
|
+
export declare const getFitzpatrickSkinTypeAsync: () => Promise<import("./types").FitzpatrickSkinType>;
|
|
81
|
+
export declare const getWheelchairUseAsync: () => Promise<import("./types").WheelchairUse>;
|
|
81
82
|
declare const _default: {
|
|
82
|
-
authorizationStatusFor: (type: import("./types
|
|
83
|
-
isObjectTypeAvailable: (objectTypeIdentifier: import("./types
|
|
84
|
-
isObjectTypeAvailableAsync: (objectTypeIdentifier: import("./types
|
|
85
|
-
areObjectTypesAvailable: (objectTypeIdentifiers: import("./types
|
|
86
|
-
areObjectTypesAvailableAsync: (objectTypeIdentifiers: import("./types
|
|
83
|
+
authorizationStatusFor: (type: import("./types").ObjectTypeIdentifier) => import("./types").AuthorizationStatus;
|
|
84
|
+
isObjectTypeAvailable: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => boolean;
|
|
85
|
+
isObjectTypeAvailableAsync: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => Promise<boolean>;
|
|
86
|
+
areObjectTypesAvailable: (objectTypeIdentifiers: import("./types").ObjectTypeIdentifier[]) => Record<string, boolean>;
|
|
87
|
+
areObjectTypesAvailableAsync: (objectTypeIdentifiers: import("./types").ObjectTypeIdentifier[]) => Promise<Record<string, boolean>>;
|
|
87
88
|
isQuantityCompatibleWithUnit: (identifier: QuantityTypeIdentifier, unit: string) => boolean;
|
|
88
89
|
disableAllBackgroundDelivery: () => Promise<boolean>;
|
|
89
|
-
disableBackgroundDelivery: (typeIdentifier: import("./types
|
|
90
|
-
enableBackgroundDelivery: (typeIdentifier: import("./types
|
|
91
|
-
getBiologicalSex: () => import("./types
|
|
92
|
-
getBloodType: () => import("./types
|
|
90
|
+
disableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier) => Promise<boolean>;
|
|
91
|
+
enableBackgroundDelivery: (typeIdentifier: import("./types").ObjectTypeIdentifier, updateFrequency: import("./types").UpdateFrequency) => Promise<boolean>;
|
|
92
|
+
getBiologicalSex: () => import("./types").BiologicalSex;
|
|
93
|
+
getBloodType: () => import("./types").BloodType;
|
|
93
94
|
getDateOfBirth: () => Date;
|
|
94
|
-
getFitzpatrickSkinType: () => import("./types
|
|
95
|
-
getBiologicalSexAsync: () => Promise<import("./types
|
|
96
|
-
getBloodTypeAsync: () => Promise<import("./types
|
|
95
|
+
getFitzpatrickSkinType: () => import("./types").FitzpatrickSkinType;
|
|
96
|
+
getBiologicalSexAsync: () => Promise<import("./types").BiologicalSex>;
|
|
97
|
+
getBloodTypeAsync: () => Promise<import("./types").BloodType>;
|
|
97
98
|
getDateOfBirthAsync: () => Promise<Date>;
|
|
98
|
-
getFitzpatrickSkinTypeAsync: () => Promise<import("./types
|
|
99
|
-
getWheelchairUseAsync: () => Promise<import("./types
|
|
99
|
+
getFitzpatrickSkinTypeAsync: () => Promise<import("./types").FitzpatrickSkinType>;
|
|
100
|
+
getWheelchairUseAsync: () => Promise<import("./types").WheelchairUse>;
|
|
100
101
|
getMostRecentCategorySample: typeof getMostRecentCategorySample;
|
|
101
102
|
getMostRecentQuantitySample: typeof getMostRecentQuantitySample;
|
|
102
|
-
getMostRecentWorkout: (options: Pick<import("./types
|
|
103
|
-
getPreferredUnits: (identifiers: readonly QuantityTypeIdentifier[], forceUpdate?: boolean) => Promise<import("./types
|
|
103
|
+
getMostRecentWorkout: (options: Pick<import("./types").WorkoutQueryOptions, "distanceUnit" | "energyUnit">) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy | undefined>;
|
|
104
|
+
getPreferredUnits: (identifiers: readonly QuantityTypeIdentifier[], forceUpdate?: boolean) => Promise<import("./types").IdentifierWithUnit[]>;
|
|
104
105
|
getPreferredUnit: (quantityType: QuantityTypeIdentifier) => Promise<string>;
|
|
105
|
-
getRequestStatusForAuthorization: (toShare: import("./types
|
|
106
|
-
getWheelchairUse: () => import("./types
|
|
106
|
+
getRequestStatusForAuthorization: (toShare: import("./types").SampleTypeIdentifierWriteable[], toRead: import("./types").ObjectTypeIdentifier[]) => Promise<import("./types").AuthorizationRequestStatus>;
|
|
107
|
+
getWheelchairUse: () => import("./types").WheelchairUse;
|
|
107
108
|
isHealthDataAvailable: () => boolean;
|
|
108
109
|
isHealthDataAvailableAsync: () => Promise<boolean>;
|
|
109
|
-
queryCategorySamples: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, options?: import("./types
|
|
110
|
-
queryCategorySamplesWithAnchor: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, options: import("./types
|
|
111
|
-
queryCorrelationSamples: (typeIdentifier: import("./types
|
|
112
|
-
queryHeartbeatSeriesSamples: (options?: import("./types
|
|
113
|
-
queryHeartbeatSeriesSamplesWithAnchor: (options: import("./types
|
|
114
|
-
queryQuantitySamples: (identifier: QuantityTypeIdentifier, options?: import("./types
|
|
115
|
-
queryQuantitySamplesWithAnchor: (identifier: QuantityTypeIdentifier, options: import("./types
|
|
116
|
-
queryStatisticsForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types
|
|
117
|
-
queryStatisticsCollectionForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types
|
|
118
|
-
queryWorkoutSamples: (options: import("./types
|
|
119
|
-
queryWorkoutSamplesWithAnchor: (options: import("./types
|
|
120
|
-
querySources: (identifier: import("./types
|
|
121
|
-
requestAuthorization: (toShare: import("./types
|
|
122
|
-
deleteObjects: (objectTypeIdentifier: import("./types
|
|
123
|
-
saveCategorySample: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, value: import("./types
|
|
124
|
-
saveCorrelationSample: (typeIdentifier: import("./types
|
|
110
|
+
queryCategorySamples: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, options?: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").CategorySampleTyped<T>[]>;
|
|
111
|
+
queryCategorySamplesWithAnchor: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").CategorySamplesWithAnchorResponseTyped<T>>;
|
|
112
|
+
queryCorrelationSamples: (typeIdentifier: import("./types").CorrelationTypeIdentifier, from: Date, to: Date) => Promise<readonly import("./types").CorrelationSample[]>;
|
|
113
|
+
queryHeartbeatSeriesSamples: (options?: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").HeartbeatSeriesSample[]>;
|
|
114
|
+
queryHeartbeatSeriesSamplesWithAnchor: (options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").HeartbeatSeriesSamplesWithAnchorResponse>;
|
|
115
|
+
queryQuantitySamples: (identifier: QuantityTypeIdentifier, options?: import("./types").QueryOptionsWithSortOrderAndUnit) => Promise<readonly import("./types").QuantitySample[]>;
|
|
116
|
+
queryQuantitySamplesWithAnchor: (identifier: QuantityTypeIdentifier, options: import("./types").QueryOptionsWithAnchorAndUnit) => Promise<import("./types").QuantitySamplesWithAnchorResponse>;
|
|
117
|
+
queryStatisticsForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], options?: import("./types").StatisticsQueryOptions) => Promise<import("./types").QueryStatisticsResponse>;
|
|
118
|
+
queryStatisticsCollectionForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], anchorDate: string, intervalComponents: import("./types").IntervalComponents, options?: import("./types").StatisticsQueryOptions) => Promise<readonly import("./types").QueryStatisticsResponse[]>;
|
|
119
|
+
queryWorkoutSamples: (options: import("./types").WorkoutQueryOptions) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy[]>;
|
|
120
|
+
queryWorkoutSamplesWithAnchor: (options: import("./types").WorkoutQueryOptionsWithAnchor) => Promise<import("./types").QueryWorkoutSamplesWithAnchorResponse>;
|
|
121
|
+
querySources: (identifier: import("./types").SampleTypeIdentifier) => Promise<readonly import("./specs/SourceProxy.nitro").SourceProxy[]>;
|
|
122
|
+
requestAuthorization: (toShare: import("./types").SampleTypeIdentifierWriteable[], toRead: import("./types").ObjectTypeIdentifier[]) => Promise<boolean>;
|
|
123
|
+
deleteObjects: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier, filter: import("./types").FilterForSamples) => Promise<number>;
|
|
124
|
+
saveCategorySample: <T extends import("./types/CategoryTypeIdentifier").CategoryTypeIdentifier>(identifier: T, value: import("./types").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata: import("./types").MetadataForCategoryIdentifier<T>) => Promise<boolean>;
|
|
125
|
+
saveCorrelationSample: (typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
125
126
|
saveQuantitySample: (identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
126
|
-
saveWorkoutSample: (workoutActivityType: import("./types
|
|
127
|
-
subscribeToChanges: (typeIdentifier: import("./types
|
|
127
|
+
saveWorkoutSample: (workoutActivityType: import("./types").WorkoutActivityType, quantities: readonly import("./types").QuantitySampleForSaving[], startDate: Date, endDate: Date, totals: import("./types").WorkoutTotals, metadata: import("react-native-nitro-modules").AnyMap) => Promise<string>;
|
|
128
|
+
subscribeToChanges: (typeIdentifier: import("./types").SampleTypeIdentifier, callback: (args: import("./types").OnChangeCallbackArgs) => void) => string;
|
|
128
129
|
unsubscribeQueries: (queryIds: string[]) => number;
|
|
129
|
-
startWatchApp: (workoutConfiguration: import("./types
|
|
130
|
+
startWatchApp: (workoutConfiguration: import("./types").WorkoutConfiguration) => Promise<boolean>;
|
|
130
131
|
isProtectedDataAvailable: () => boolean;
|
|
131
|
-
queryStateOfMindSamples: (options?: import("./types
|
|
132
|
-
saveStateOfMindSample: (date: Date, kind: import("./types
|
|
132
|
+
queryStateOfMindSamples: (options?: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").StateOfMindSample[]>;
|
|
133
|
+
saveStateOfMindSample: (date: Date, kind: import("./types").StateOfMindKind, valence: number, labels: readonly import("./types").StateOfMindLabel[], associations: readonly import("./types").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<boolean>;
|
|
133
134
|
useMostRecentCategorySample: typeof useMostRecentCategorySample;
|
|
134
135
|
useMostRecentQuantitySample: typeof useMostRecentQuantitySample;
|
|
135
136
|
useMostRecentWorkout: typeof useMostRecentWorkout;
|
|
136
137
|
useSubscribeToChanges: typeof useSubscribeToChanges;
|
|
137
|
-
useHealthkitAuthorization: (read: import("./types
|
|
138
|
+
useHealthkitAuthorization: (read: import("./types").ObjectTypeIdentifier[], write?: import("./types").SampleTypeIdentifierWriteable[]) => readonly [import("./types").AuthorizationRequestStatus | null, () => Promise<import("./types").AuthorizationRequestStatus>];
|
|
138
139
|
useIsHealthDataAvailable: () => boolean | null;
|
|
139
140
|
useSources: typeof useSources;
|
|
140
141
|
useStatisticsForQuantity: typeof useStatisticsForQuantity;
|
|
@@ -4,7 +4,7 @@ import type { UpdateFrequency } from '../types/Background';
|
|
|
4
4
|
import type { QuantityTypeIdentifier } from '../types/QuantityTypeIdentifier';
|
|
5
5
|
import type { FilterForSamples } from '../types/QueryOptions';
|
|
6
6
|
import type { ObjectTypeIdentifier, SampleTypeIdentifier, SampleTypeIdentifierWriteable } from '../types/Shared';
|
|
7
|
-
import type { OnChangeCallbackArgs } from '../types/
|
|
7
|
+
import type { OnChangeCallbackArgs } from '../types/Subscriptions';
|
|
8
8
|
import type { IdentifierWithUnit } from '../types/Units';
|
|
9
9
|
import type { SourceProxy } from './SourceProxy.nitro';
|
|
10
10
|
export interface CoreModule extends HybridObject<{
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from './Auth';
|
|
2
|
+
export * from './Background';
|
|
3
|
+
export * from './CategoryType';
|
|
4
|
+
export * from './Characteristics';
|
|
5
|
+
export * from './Constants';
|
|
6
|
+
export * from './CorrelationType';
|
|
7
|
+
export * from './Device';
|
|
8
|
+
export * from './HeartbeatSeries';
|
|
9
|
+
export * from './QuantitySample';
|
|
10
|
+
export * from './QuantityType';
|
|
11
|
+
export * from './QuantityTypeIdentifier';
|
|
12
|
+
export * from './QueryOptions';
|
|
13
|
+
export * from './Shared';
|
|
14
|
+
export * from './Source';
|
|
15
|
+
export * from './StateOfMind';
|
|
16
|
+
export * from './Subscriptions';
|
|
17
|
+
export * from './Units';
|
|
18
|
+
export * from './WeatherCondition';
|
|
19
|
+
export * from './WorkoutKit';
|
|
20
|
+
export * from './Workouts';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { CategoryTypeIdentifier } from '../types/CategoryTypeIdentifier';
|
|
2
|
-
export declare function getCategorySampleById<T extends CategoryTypeIdentifier>(identifier: T, uuid: string): Promise<import("
|
|
2
|
+
export declare function getCategorySampleById<T extends CategoryTypeIdentifier>(identifier: T, uuid: string): Promise<import("..").CategorySampleTyped<T> | undefined>;
|
|
3
3
|
export default getCategorySampleById;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { CategoryTypeIdentifier } from '../types/CategoryTypeIdentifier';
|
|
2
|
-
export declare function getMostRecentCategorySample<T extends CategoryTypeIdentifier>(identifier: T): Promise<import("
|
|
2
|
+
export declare function getMostRecentCategorySample<T extends CategoryTypeIdentifier>(identifier: T): Promise<import("..").CategorySampleTyped<T> | undefined>;
|
|
3
3
|
export default getMostRecentCategorySample;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { QuantityTypeIdentifier } from '../types/QuantityTypeIdentifier';
|
|
2
|
-
declare function getMostRecentQuantitySample(identifier: QuantityTypeIdentifier, unit?: string): Promise<import("
|
|
2
|
+
declare function getMostRecentQuantitySample(identifier: QuantityTypeIdentifier, unit?: string): Promise<import("..").QuantitySample | undefined>;
|
|
3
3
|
export default getMostRecentQuantitySample;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { QuantityTypeIdentifier } from '../types/QuantityTypeIdentifier';
|
|
2
|
-
declare function getQuantitySampleById(identifier: QuantityTypeIdentifier, uuid: string, unit?: string): Promise<import("
|
|
2
|
+
declare function getQuantitySampleById(identifier: QuantityTypeIdentifier, uuid: string, unit?: string): Promise<import("..").QuantitySample | undefined>;
|
|
3
3
|
export default getQuantitySampleById;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SampleTypeIdentifier } from '../types/Shared';
|
|
2
|
-
import type { OnChangeCallbackArgs } from '../types/
|
|
2
|
+
import type { OnChangeCallbackArgs } from '../types/Subscriptions';
|
|
3
3
|
export declare const subscribeToChanges: (identifier: SampleTypeIdentifier, callback: (args: OnChangeCallbackArgs) => void) => {
|
|
4
4
|
remove: () => boolean;
|
|
5
5
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kingstinct/react-native-healthkit",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.5",
|
|
4
4
|
"description": "React Native bindings for HealthKit",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -14,6 +14,19 @@
|
|
|
14
14
|
"require": "./lib/commonjs/index.js",
|
|
15
15
|
"react-native": "./src/index.ts"
|
|
16
16
|
},
|
|
17
|
+
"./types": {
|
|
18
|
+
"types": "./lib/typescript/types/index.d.ts",
|
|
19
|
+
"import": "./lib/module/types/index.js",
|
|
20
|
+
"require": "./lib/commonjs/types/index.js",
|
|
21
|
+
"react-native": "./src/types/index.ts"
|
|
22
|
+
},
|
|
23
|
+
"./modules": {
|
|
24
|
+
"types": "./lib/typescript/modules.d.ts",
|
|
25
|
+
"import": "./lib/module/modules.js",
|
|
26
|
+
"require": "./lib/commonjs/modules.js",
|
|
27
|
+
"react-native": "./src/modules.ts"
|
|
28
|
+
},
|
|
29
|
+
"./app.plugin.js": "./app.plugin.js",
|
|
17
30
|
"./package.json": "./package.json"
|
|
18
31
|
},
|
|
19
32
|
"files": [
|
|
@@ -32,6 +45,7 @@
|
|
|
32
45
|
"ios/**/*.mm",
|
|
33
46
|
"ios/**/*.cpp",
|
|
34
47
|
"ios/**/*.swift",
|
|
48
|
+
"app.plugin.ts",
|
|
35
49
|
"app.plugin.js",
|
|
36
50
|
"*.podspec",
|
|
37
51
|
"README.md"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useRef } from 'react'
|
|
2
2
|
import type { SampleTypeIdentifier } from '../types/Shared'
|
|
3
|
-
import type { OnChangeCallbackArgs } from '../types/
|
|
3
|
+
import type { OnChangeCallbackArgs } from '../types/Subscriptions'
|
|
4
4
|
import { subscribeToChanges } from '../utils/subscribeToChanges'
|
|
5
5
|
|
|
6
6
|
export function useSubscribeToChanges<TIdentifier extends SampleTypeIdentifier>(
|
package/src/index.ios.ts
CHANGED
|
@@ -23,6 +23,8 @@ import getMostRecentQuantitySample from './utils/getMostRecentQuantitySample'
|
|
|
23
23
|
import getMostRecentWorkout from './utils/getMostRecentWorkout'
|
|
24
24
|
import getPreferredUnit from './utils/getPreferredUnit'
|
|
25
25
|
|
|
26
|
+
export * from './types'
|
|
27
|
+
|
|
26
28
|
const currentMajorVersionIOS =
|
|
27
29
|
Platform.OS === 'ios' ? Number.parseInt(Platform.Version, 10) : 0
|
|
28
30
|
|
package/src/index.ts
CHANGED
|
@@ -6,8 +6,7 @@ import { Platform } from 'react-native'
|
|
|
6
6
|
|
|
7
7
|
// This import is crucial for deriving the type of the default export `HealthkitModule`
|
|
8
8
|
// It assumes that index.ios.ts exports a default object matching the Healthkit native module structure.
|
|
9
|
-
import type
|
|
10
|
-
import type { SourceProxy } from './specs/SourceProxy.nitro'
|
|
9
|
+
import type ReactNativeHealthkit from './index.ios'
|
|
11
10
|
import type { WorkoutProxy } from './specs/WorkoutProxy.nitro'
|
|
12
11
|
import { AuthorizationRequestStatus, AuthorizationStatus } from './types/Auth'
|
|
13
12
|
import type {
|
|
@@ -21,18 +20,8 @@ import {
|
|
|
21
20
|
FitzpatrickSkinType,
|
|
22
21
|
WheelchairUse,
|
|
23
22
|
} from './types/Characteristics'
|
|
24
|
-
import type { CorrelationSample } from './types/CorrelationType'
|
|
25
|
-
import type {
|
|
26
|
-
HeartbeatSeriesSample,
|
|
27
|
-
HeartbeatSeriesSamplesWithAnchorResponse,
|
|
28
|
-
} from './types/HeartbeatSeries'
|
|
29
23
|
import type { QuantitySample } from './types/QuantitySample'
|
|
30
|
-
|
|
31
|
-
QuantitySamplesWithAnchorResponse,
|
|
32
|
-
QueryStatisticsResponse,
|
|
33
|
-
} from './types/QuantityType'
|
|
34
|
-
import type { StateOfMindSample } from './types/StateOfMind'
|
|
35
|
-
import type { QueryWorkoutSamplesWithAnchorResponse } from './types/Workouts'
|
|
24
|
+
export * from './types'
|
|
36
25
|
|
|
37
26
|
const notAvailableError = `[@kingstinct/react-native-healthkit] Platform "${Platform.OS}" not supported. HealthKit is only available on iOS.`
|
|
38
27
|
|
|
@@ -11,7 +11,7 @@ import type {
|
|
|
11
11
|
SampleTypeIdentifier,
|
|
12
12
|
SampleTypeIdentifierWriteable,
|
|
13
13
|
} from '../types/Shared'
|
|
14
|
-
import type { OnChangeCallbackArgs } from '../types/
|
|
14
|
+
import type { OnChangeCallbackArgs } from '../types/Subscriptions'
|
|
15
15
|
import type { IdentifierWithUnit } from '../types/Units'
|
|
16
16
|
import type { SourceProxy } from './SourceProxy.nitro'
|
|
17
17
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from './Auth'
|
|
2
|
+
export * from './Background'
|
|
3
|
+
export * from './CategoryType'
|
|
4
|
+
export * from './Characteristics'
|
|
5
|
+
export * from './Constants'
|
|
6
|
+
export * from './CorrelationType'
|
|
7
|
+
export * from './Device'
|
|
8
|
+
export * from './HeartbeatSeries'
|
|
9
|
+
export * from './QuantitySample'
|
|
10
|
+
export * from './QuantityType'
|
|
11
|
+
export * from './QuantityTypeIdentifier'
|
|
12
|
+
export * from './QueryOptions'
|
|
13
|
+
export * from './Shared'
|
|
14
|
+
export * from './Source'
|
|
15
|
+
export * from './StateOfMind'
|
|
16
|
+
export * from './Subscriptions'
|
|
17
|
+
export * from './Units'
|
|
18
|
+
export * from './WeatherCondition'
|
|
19
|
+
export * from './WorkoutKit'
|
|
20
|
+
export * from './Workouts'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Core } from '../modules'
|
|
2
2
|
import type { SampleTypeIdentifier } from '../types/Shared'
|
|
3
|
-
import type { OnChangeCallbackArgs } from '../types/
|
|
3
|
+
import type { OnChangeCallbackArgs } from '../types/Subscriptions'
|
|
4
4
|
|
|
5
5
|
export const subscribeToChanges = (
|
|
6
6
|
identifier: SampleTypeIdentifier,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|