@gromozeqa/react-native-apple-health-kit 0.1.5 → 0.2.0
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/README.md +14 -3
- package/{AppleHealthKit.podspec → ReactNativeAppleHealthKit.podspec} +1 -1
- package/android/generated/java/com/{applehealthkit/NativeAppleHealthKitSpec.java → gromozeqa/reactnativeapplehealthkit/NativeReactNativeAppleHealthKitSpec.java} +4 -4
- package/android/generated/jni/CMakeLists.txt +5 -5
- package/android/generated/jni/{RNAppleHealthKitSpec-generated.cpp → RNReactNativeAppleHealthKitSpec-generated.cpp} +13 -13
- package/android/generated/jni/{RNAppleHealthKitSpec.h → RNReactNativeAppleHealthKitSpec.h} +4 -4
- package/android/generated/jni/react/renderer/components/RNReactNativeAppleHealthKitSpec/RNReactNativeAppleHealthKitSpecJSI-generated.cpp +46 -0
- package/android/generated/jni/react/renderer/components/RNReactNativeAppleHealthKitSpec/RNReactNativeAppleHealthKitSpecJSI.h +303 -0
- package/ios/{AppleHealthKitManager.swift → HealthKitManager.swift} +8 -1
- package/ios/{AppleHealthKitPermissions.swift → HealthKitPermissions.swift} +8 -1
- package/ios/{AppleHealthKitQueries.swift → HealthKitQueries.swift} +8 -0
- package/ios/ReactNativeAppleHealthKit.h +6 -0
- package/ios/{AppleHealthKit.mm → ReactNativeAppleHealthKit.mm} +8 -8
- package/ios/{HealthKitUtils.swift → Utils.swift} +2 -2
- package/ios/generated/{RNAppleHealthKitSpec/RNAppleHealthKitSpec-generated.mm → RNReactNativeAppleHealthKitSpec/RNReactNativeAppleHealthKitSpec-generated.mm} +11 -11
- package/ios/generated/{RNAppleHealthKitSpec/RNAppleHealthKitSpec.h → RNReactNativeAppleHealthKitSpec/RNReactNativeAppleHealthKitSpec.h} +9 -9
- package/ios/generated/RNReactNativeAppleHealthKitSpecJSI-generated.cpp +46 -0
- package/ios/generated/RNReactNativeAppleHealthKitSpecJSI.h +303 -0
- package/lib/commonjs/{NativeAppleHealthKit.js → NativeReactNativeAppleHealthKit.js} +2 -2
- package/lib/commonjs/NativeReactNativeAppleHealthKit.js.map +1 -0
- package/lib/commonjs/index.js +16 -35
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/{NativeAppleHealthKit.js → NativeReactNativeAppleHealthKit.js} +2 -2
- package/lib/module/NativeReactNativeAppleHealthKit.js.map +1 -0
- package/lib/module/index.js +13 -14
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/NativeReactNativeAppleHealthKit.d.ts +28 -0
- package/lib/typescript/commonjs/src/NativeReactNativeAppleHealthKit.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +5 -5
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/NativeReactNativeAppleHealthKit.d.ts +28 -0
- package/lib/typescript/module/src/NativeReactNativeAppleHealthKit.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +5 -5
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +8 -8
- package/react-native.config.js +3 -2
- package/src/{NativeAppleHealthKit.ts → NativeReactNativeAppleHealthKit.ts} +23 -2
- package/src/index.tsx +19 -14
- package/android/generated/jni/react/renderer/components/RNAppleHealthKitSpec/RNAppleHealthKitSpecJSI-generated.cpp +0 -46
- package/android/generated/jni/react/renderer/components/RNAppleHealthKitSpec/RNAppleHealthKitSpecJSI.h +0 -98
- package/ios/AppleHealthKit.h +0 -6
- package/ios/generated/RNAppleHealthKitSpecJSI-generated.cpp +0 -46
- package/ios/generated/RNAppleHealthKitSpecJSI.h +0 -98
- package/lib/commonjs/NativeAppleHealthKit.js.map +0 -1
- package/lib/commonjs/types.js +0 -2
- package/lib/commonjs/types.js.map +0 -1
- package/lib/module/NativeAppleHealthKit.js.map +0 -1
- package/lib/module/types.js +0 -2
- package/lib/module/types.js.map +0 -1
- package/lib/typescript/commonjs/src/NativeAppleHealthKit.d.ts +0 -11
- package/lib/typescript/commonjs/src/NativeAppleHealthKit.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types.d.ts +0 -19
- package/lib/typescript/commonjs/src/types.d.ts.map +0 -1
- package/lib/typescript/module/src/NativeAppleHealthKit.d.ts +0 -11
- package/lib/typescript/module/src/NativeAppleHealthKit.d.ts.map +0 -1
- package/lib/typescript/module/src/types.d.ts +0 -19
- package/lib/typescript/module/src/types.d.ts.map +0 -1
- package/src/types.ts +0 -21
@@ -11,10 +11,10 @@
|
|
11
11
|
* must have a single output. More files => more genrule()s => slower builds.
|
12
12
|
*/
|
13
13
|
|
14
|
-
#import "
|
14
|
+
#import "RNReactNativeAppleHealthKitSpec.h"
|
15
15
|
|
16
16
|
|
17
|
-
@implementation
|
17
|
+
@implementation NativeReactNativeAppleHealthKitSpecBase
|
18
18
|
|
19
19
|
|
20
20
|
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
|
@@ -26,35 +26,35 @@
|
|
26
26
|
|
27
27
|
namespace facebook::react {
|
28
28
|
|
29
|
-
static facebook::jsi::Value
|
29
|
+
static facebook::jsi::Value __hostFunction_NativeReactNativeAppleHealthKitSpecJSI_requestHealthKitPermissions(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
30
30
|
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "requestHealthKitPermissions", @selector(requestHealthKitPermissions:reject:), args, count);
|
31
31
|
}
|
32
32
|
|
33
|
-
static facebook::jsi::Value
|
33
|
+
static facebook::jsi::Value __hostFunction_NativeReactNativeAppleHealthKitSpecJSI_getSteps(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
34
34
|
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getSteps", @selector(getSteps:resolve:reject:), args, count);
|
35
35
|
}
|
36
36
|
|
37
|
-
static facebook::jsi::Value
|
37
|
+
static facebook::jsi::Value __hostFunction_NativeReactNativeAppleHealthKitSpecJSI_getHeartRate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
38
38
|
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getHeartRate", @selector(getHeartRate:resolve:reject:), args, count);
|
39
39
|
}
|
40
40
|
|
41
|
-
static facebook::jsi::Value
|
41
|
+
static facebook::jsi::Value __hostFunction_NativeReactNativeAppleHealthKitSpecJSI_getMeasurement(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
42
42
|
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getMeasurement", @selector(getMeasurement:reject:), args, count);
|
43
43
|
}
|
44
44
|
|
45
|
-
|
45
|
+
NativeReactNativeAppleHealthKitSpecJSI::NativeReactNativeAppleHealthKitSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
46
46
|
: ObjCTurboModule(params) {
|
47
47
|
|
48
|
-
methodMap_["requestHealthKitPermissions"] = MethodMetadata {0,
|
48
|
+
methodMap_["requestHealthKitPermissions"] = MethodMetadata {0, __hostFunction_NativeReactNativeAppleHealthKitSpecJSI_requestHealthKitPermissions};
|
49
49
|
|
50
50
|
|
51
|
-
methodMap_["getSteps"] = MethodMetadata {1,
|
51
|
+
methodMap_["getSteps"] = MethodMetadata {1, __hostFunction_NativeReactNativeAppleHealthKitSpecJSI_getSteps};
|
52
52
|
|
53
53
|
|
54
|
-
methodMap_["getHeartRate"] = MethodMetadata {1,
|
54
|
+
methodMap_["getHeartRate"] = MethodMetadata {1, __hostFunction_NativeReactNativeAppleHealthKitSpecJSI_getHeartRate};
|
55
55
|
|
56
56
|
|
57
|
-
methodMap_["getMeasurement"] = MethodMetadata {0,
|
57
|
+
methodMap_["getMeasurement"] = MethodMetadata {0, __hostFunction_NativeReactNativeAppleHealthKitSpecJSI_getMeasurement};
|
58
58
|
|
59
59
|
}
|
60
60
|
} // namespace facebook::react
|
@@ -15,9 +15,9 @@
|
|
15
15
|
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
16
16
|
#endif
|
17
17
|
|
18
|
-
// Avoid multiple includes of
|
19
|
-
#ifndef
|
20
|
-
#define
|
18
|
+
// Avoid multiple includes of RNReactNativeAppleHealthKitSpec symbols
|
19
|
+
#ifndef RNReactNativeAppleHealthKitSpec_H
|
20
|
+
#define RNReactNativeAppleHealthKitSpec_H
|
21
21
|
|
22
22
|
#import <Foundation/Foundation.h>
|
23
23
|
#import <RCTRequired/RCTRequired.h>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
|
34
34
|
NS_ASSUME_NONNULL_BEGIN
|
35
35
|
|
36
|
-
@protocol
|
36
|
+
@protocol NativeReactNativeAppleHealthKitSpec <RCTBridgeModule, RCTTurboModule>
|
37
37
|
|
38
38
|
- (void)requestHealthKitPermissions:(RCTPromiseResolveBlock)resolve
|
39
39
|
reject:(RCTPromiseRejectBlock)reject;
|
@@ -48,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
48
48
|
|
49
49
|
@end
|
50
50
|
|
51
|
-
@interface
|
51
|
+
@interface NativeReactNativeAppleHealthKitSpecBase : NSObject {
|
52
52
|
@protected
|
53
53
|
facebook::react::EventEmitterCallback _eventEmitterCallback;
|
54
54
|
}
|
@@ -59,13 +59,13 @@ facebook::react::EventEmitterCallback _eventEmitterCallback;
|
|
59
59
|
|
60
60
|
namespace facebook::react {
|
61
61
|
/**
|
62
|
-
* ObjC++ class for module '
|
62
|
+
* ObjC++ class for module 'NativeReactNativeAppleHealthKit'
|
63
63
|
*/
|
64
|
-
class JSI_EXPORT
|
64
|
+
class JSI_EXPORT NativeReactNativeAppleHealthKitSpecJSI : public ObjCTurboModule {
|
65
65
|
public:
|
66
|
-
|
66
|
+
NativeReactNativeAppleHealthKitSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
67
67
|
};
|
68
68
|
} // namespace facebook::react
|
69
69
|
|
70
70
|
NS_ASSUME_NONNULL_END
|
71
|
-
#endif //
|
71
|
+
#endif // RNReactNativeAppleHealthKitSpec_H
|
@@ -0,0 +1,46 @@
|
|
1
|
+
/**
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
3
|
+
*
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
5
|
+
* once the code is regenerated.
|
6
|
+
*
|
7
|
+
* @generated by codegen project: GenerateModuleCpp.js
|
8
|
+
*/
|
9
|
+
|
10
|
+
#include "RNReactNativeAppleHealthKitSpecJSI.h"
|
11
|
+
|
12
|
+
namespace facebook::react {
|
13
|
+
|
14
|
+
static jsi::Value __hostFunction_NativeReactNativeAppleHealthKitCxxSpecJSI_requestHealthKitPermissions(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
15
|
+
return static_cast<NativeReactNativeAppleHealthKitCxxSpecJSI *>(&turboModule)->requestHealthKitPermissions(
|
16
|
+
rt
|
17
|
+
);
|
18
|
+
}
|
19
|
+
static jsi::Value __hostFunction_NativeReactNativeAppleHealthKitCxxSpecJSI_getSteps(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
20
|
+
return static_cast<NativeReactNativeAppleHealthKitCxxSpecJSI *>(&turboModule)->getSteps(
|
21
|
+
rt,
|
22
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
|
23
|
+
);
|
24
|
+
}
|
25
|
+
static jsi::Value __hostFunction_NativeReactNativeAppleHealthKitCxxSpecJSI_getHeartRate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
26
|
+
return static_cast<NativeReactNativeAppleHealthKitCxxSpecJSI *>(&turboModule)->getHeartRate(
|
27
|
+
rt,
|
28
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
|
29
|
+
);
|
30
|
+
}
|
31
|
+
static jsi::Value __hostFunction_NativeReactNativeAppleHealthKitCxxSpecJSI_getMeasurement(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
32
|
+
return static_cast<NativeReactNativeAppleHealthKitCxxSpecJSI *>(&turboModule)->getMeasurement(
|
33
|
+
rt
|
34
|
+
);
|
35
|
+
}
|
36
|
+
|
37
|
+
NativeReactNativeAppleHealthKitCxxSpecJSI::NativeReactNativeAppleHealthKitCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
38
|
+
: TurboModule("ReactNativeAppleHealthKit", jsInvoker) {
|
39
|
+
methodMap_["requestHealthKitPermissions"] = MethodMetadata {0, __hostFunction_NativeReactNativeAppleHealthKitCxxSpecJSI_requestHealthKitPermissions};
|
40
|
+
methodMap_["getSteps"] = MethodMetadata {1, __hostFunction_NativeReactNativeAppleHealthKitCxxSpecJSI_getSteps};
|
41
|
+
methodMap_["getHeartRate"] = MethodMetadata {1, __hostFunction_NativeReactNativeAppleHealthKitCxxSpecJSI_getHeartRate};
|
42
|
+
methodMap_["getMeasurement"] = MethodMetadata {0, __hostFunction_NativeReactNativeAppleHealthKitCxxSpecJSI_getMeasurement};
|
43
|
+
}
|
44
|
+
|
45
|
+
|
46
|
+
} // namespace facebook::react
|
@@ -0,0 +1,303 @@
|
|
1
|
+
/**
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
3
|
+
*
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
5
|
+
* once the code is regenerated.
|
6
|
+
*
|
7
|
+
* @generated by codegen project: GenerateModuleH.js
|
8
|
+
*/
|
9
|
+
|
10
|
+
#pragma once
|
11
|
+
|
12
|
+
#include <ReactCommon/TurboModule.h>
|
13
|
+
#include <react/bridging/Bridging.h>
|
14
|
+
|
15
|
+
namespace facebook::react {
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
#pragma mark - NativeReactNativeAppleHealthKitHeartRate
|
20
|
+
|
21
|
+
template <typename P0, typename P1>
|
22
|
+
struct NativeReactNativeAppleHealthKitHeartRate {
|
23
|
+
P0 date;
|
24
|
+
P1 value;
|
25
|
+
bool operator==(const NativeReactNativeAppleHealthKitHeartRate &other) const {
|
26
|
+
return date == other.date && value == other.value;
|
27
|
+
}
|
28
|
+
};
|
29
|
+
|
30
|
+
template <typename T>
|
31
|
+
struct NativeReactNativeAppleHealthKitHeartRateBridging {
|
32
|
+
static T types;
|
33
|
+
|
34
|
+
static T fromJs(
|
35
|
+
jsi::Runtime &rt,
|
36
|
+
const jsi::Object &value,
|
37
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
38
|
+
T result{
|
39
|
+
bridging::fromJs<decltype(types.date)>(rt, value.getProperty(rt, "date"), jsInvoker),
|
40
|
+
bridging::fromJs<decltype(types.value)>(rt, value.getProperty(rt, "value"), jsInvoker)};
|
41
|
+
return result;
|
42
|
+
}
|
43
|
+
|
44
|
+
#ifdef DEBUG
|
45
|
+
static jsi::String dateToJs(jsi::Runtime &rt, decltype(types.date) value) {
|
46
|
+
return bridging::toJs(rt, value);
|
47
|
+
}
|
48
|
+
|
49
|
+
static jsi::Array valueToJs(jsi::Runtime &rt, decltype(types.value) value) {
|
50
|
+
return bridging::toJs(rt, value);
|
51
|
+
}
|
52
|
+
#endif
|
53
|
+
|
54
|
+
static jsi::Object toJs(
|
55
|
+
jsi::Runtime &rt,
|
56
|
+
const T &value,
|
57
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
58
|
+
auto result = facebook::jsi::Object(rt);
|
59
|
+
result.setProperty(rt, "date", bridging::toJs(rt, value.date, jsInvoker));
|
60
|
+
result.setProperty(rt, "value", bridging::toJs(rt, value.value, jsInvoker));
|
61
|
+
return result;
|
62
|
+
}
|
63
|
+
};
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
#pragma mark - NativeReactNativeAppleHealthKitHeartRateValue
|
68
|
+
|
69
|
+
template <typename P0, typename P1>
|
70
|
+
struct NativeReactNativeAppleHealthKitHeartRateValue {
|
71
|
+
P0 time;
|
72
|
+
P1 heartRate;
|
73
|
+
bool operator==(const NativeReactNativeAppleHealthKitHeartRateValue &other) const {
|
74
|
+
return time == other.time && heartRate == other.heartRate;
|
75
|
+
}
|
76
|
+
};
|
77
|
+
|
78
|
+
template <typename T>
|
79
|
+
struct NativeReactNativeAppleHealthKitHeartRateValueBridging {
|
80
|
+
static T types;
|
81
|
+
|
82
|
+
static T fromJs(
|
83
|
+
jsi::Runtime &rt,
|
84
|
+
const jsi::Object &value,
|
85
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
86
|
+
T result{
|
87
|
+
bridging::fromJs<decltype(types.time)>(rt, value.getProperty(rt, "time"), jsInvoker),
|
88
|
+
bridging::fromJs<decltype(types.heartRate)>(rt, value.getProperty(rt, "heartRate"), jsInvoker)};
|
89
|
+
return result;
|
90
|
+
}
|
91
|
+
|
92
|
+
#ifdef DEBUG
|
93
|
+
static jsi::String timeToJs(jsi::Runtime &rt, decltype(types.time) value) {
|
94
|
+
return bridging::toJs(rt, value);
|
95
|
+
}
|
96
|
+
|
97
|
+
static double heartRateToJs(jsi::Runtime &rt, decltype(types.heartRate) value) {
|
98
|
+
return bridging::toJs(rt, value);
|
99
|
+
}
|
100
|
+
#endif
|
101
|
+
|
102
|
+
static jsi::Object toJs(
|
103
|
+
jsi::Runtime &rt,
|
104
|
+
const T &value,
|
105
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
106
|
+
auto result = facebook::jsi::Object(rt);
|
107
|
+
result.setProperty(rt, "time", bridging::toJs(rt, value.time, jsInvoker));
|
108
|
+
result.setProperty(rt, "heartRate", bridging::toJs(rt, value.heartRate, jsInvoker));
|
109
|
+
return result;
|
110
|
+
}
|
111
|
+
};
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
#pragma mark - NativeReactNativeAppleHealthKitMeasurement
|
116
|
+
|
117
|
+
template <typename P0, typename P1, typename P2, typename P3>
|
118
|
+
struct NativeReactNativeAppleHealthKitMeasurement {
|
119
|
+
P0 bodyMass;
|
120
|
+
P1 height;
|
121
|
+
P2 biologicalSex;
|
122
|
+
P3 dateOfBirth;
|
123
|
+
bool operator==(const NativeReactNativeAppleHealthKitMeasurement &other) const {
|
124
|
+
return bodyMass == other.bodyMass && height == other.height && biologicalSex == other.biologicalSex && dateOfBirth == other.dateOfBirth;
|
125
|
+
}
|
126
|
+
};
|
127
|
+
|
128
|
+
template <typename T>
|
129
|
+
struct NativeReactNativeAppleHealthKitMeasurementBridging {
|
130
|
+
static T types;
|
131
|
+
|
132
|
+
static T fromJs(
|
133
|
+
jsi::Runtime &rt,
|
134
|
+
const jsi::Object &value,
|
135
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
136
|
+
T result{
|
137
|
+
bridging::fromJs<decltype(types.bodyMass)>(rt, value.getProperty(rt, "bodyMass"), jsInvoker),
|
138
|
+
bridging::fromJs<decltype(types.height)>(rt, value.getProperty(rt, "height"), jsInvoker),
|
139
|
+
bridging::fromJs<decltype(types.biologicalSex)>(rt, value.getProperty(rt, "biologicalSex"), jsInvoker),
|
140
|
+
bridging::fromJs<decltype(types.dateOfBirth)>(rt, value.getProperty(rt, "dateOfBirth"), jsInvoker)};
|
141
|
+
return result;
|
142
|
+
}
|
143
|
+
|
144
|
+
#ifdef DEBUG
|
145
|
+
static std::optional<double> bodyMassToJs(jsi::Runtime &rt, decltype(types.bodyMass) value) {
|
146
|
+
return bridging::toJs(rt, value);
|
147
|
+
}
|
148
|
+
|
149
|
+
static std::optional<double> heightToJs(jsi::Runtime &rt, decltype(types.height) value) {
|
150
|
+
return bridging::toJs(rt, value);
|
151
|
+
}
|
152
|
+
|
153
|
+
static std::optional<jsi::String> biologicalSexToJs(jsi::Runtime &rt, decltype(types.biologicalSex) value) {
|
154
|
+
return bridging::toJs(rt, value);
|
155
|
+
}
|
156
|
+
|
157
|
+
static std::optional<jsi::String> dateOfBirthToJs(jsi::Runtime &rt, decltype(types.dateOfBirth) value) {
|
158
|
+
return bridging::toJs(rt, value);
|
159
|
+
}
|
160
|
+
#endif
|
161
|
+
|
162
|
+
static jsi::Object toJs(
|
163
|
+
jsi::Runtime &rt,
|
164
|
+
const T &value,
|
165
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
166
|
+
auto result = facebook::jsi::Object(rt);
|
167
|
+
result.setProperty(rt, "bodyMass", bridging::toJs(rt, value.bodyMass, jsInvoker));
|
168
|
+
result.setProperty(rt, "height", bridging::toJs(rt, value.height, jsInvoker));
|
169
|
+
result.setProperty(rt, "biologicalSex", bridging::toJs(rt, value.biologicalSex, jsInvoker));
|
170
|
+
result.setProperty(rt, "dateOfBirth", bridging::toJs(rt, value.dateOfBirth, jsInvoker));
|
171
|
+
return result;
|
172
|
+
}
|
173
|
+
};
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
#pragma mark - NativeReactNativeAppleHealthKitStep
|
178
|
+
|
179
|
+
template <typename P0, typename P1>
|
180
|
+
struct NativeReactNativeAppleHealthKitStep {
|
181
|
+
P0 dateString;
|
182
|
+
P1 stepCount;
|
183
|
+
bool operator==(const NativeReactNativeAppleHealthKitStep &other) const {
|
184
|
+
return dateString == other.dateString && stepCount == other.stepCount;
|
185
|
+
}
|
186
|
+
};
|
187
|
+
|
188
|
+
template <typename T>
|
189
|
+
struct NativeReactNativeAppleHealthKitStepBridging {
|
190
|
+
static T types;
|
191
|
+
|
192
|
+
static T fromJs(
|
193
|
+
jsi::Runtime &rt,
|
194
|
+
const jsi::Object &value,
|
195
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
196
|
+
T result{
|
197
|
+
bridging::fromJs<decltype(types.dateString)>(rt, value.getProperty(rt, "dateString"), jsInvoker),
|
198
|
+
bridging::fromJs<decltype(types.stepCount)>(rt, value.getProperty(rt, "stepCount"), jsInvoker)};
|
199
|
+
return result;
|
200
|
+
}
|
201
|
+
|
202
|
+
#ifdef DEBUG
|
203
|
+
static jsi::String dateStringToJs(jsi::Runtime &rt, decltype(types.dateString) value) {
|
204
|
+
return bridging::toJs(rt, value);
|
205
|
+
}
|
206
|
+
|
207
|
+
static double stepCountToJs(jsi::Runtime &rt, decltype(types.stepCount) value) {
|
208
|
+
return bridging::toJs(rt, value);
|
209
|
+
}
|
210
|
+
#endif
|
211
|
+
|
212
|
+
static jsi::Object toJs(
|
213
|
+
jsi::Runtime &rt,
|
214
|
+
const T &value,
|
215
|
+
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
216
|
+
auto result = facebook::jsi::Object(rt);
|
217
|
+
result.setProperty(rt, "dateString", bridging::toJs(rt, value.dateString, jsInvoker));
|
218
|
+
result.setProperty(rt, "stepCount", bridging::toJs(rt, value.stepCount, jsInvoker));
|
219
|
+
return result;
|
220
|
+
}
|
221
|
+
};
|
222
|
+
|
223
|
+
class JSI_EXPORT NativeReactNativeAppleHealthKitCxxSpecJSI : public TurboModule {
|
224
|
+
protected:
|
225
|
+
NativeReactNativeAppleHealthKitCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
226
|
+
|
227
|
+
public:
|
228
|
+
virtual jsi::Value requestHealthKitPermissions(jsi::Runtime &rt) = 0;
|
229
|
+
virtual jsi::Value getSteps(jsi::Runtime &rt, double daysBefore) = 0;
|
230
|
+
virtual jsi::Value getHeartRate(jsi::Runtime &rt, double daysBefore) = 0;
|
231
|
+
virtual jsi::Value getMeasurement(jsi::Runtime &rt) = 0;
|
232
|
+
|
233
|
+
};
|
234
|
+
|
235
|
+
template <typename T>
|
236
|
+
class JSI_EXPORT NativeReactNativeAppleHealthKitCxxSpec : public TurboModule {
|
237
|
+
public:
|
238
|
+
jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
239
|
+
return delegate_.create(rt, propName);
|
240
|
+
}
|
241
|
+
|
242
|
+
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
|
243
|
+
return delegate_.getPropertyNames(runtime);
|
244
|
+
}
|
245
|
+
|
246
|
+
static constexpr std::string_view kModuleName = "ReactNativeAppleHealthKit";
|
247
|
+
|
248
|
+
protected:
|
249
|
+
NativeReactNativeAppleHealthKitCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
250
|
+
: TurboModule(std::string{NativeReactNativeAppleHealthKitCxxSpec::kModuleName}, jsInvoker),
|
251
|
+
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
252
|
+
|
253
|
+
|
254
|
+
private:
|
255
|
+
class Delegate : public NativeReactNativeAppleHealthKitCxxSpecJSI {
|
256
|
+
public:
|
257
|
+
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
258
|
+
NativeReactNativeAppleHealthKitCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
259
|
+
|
260
|
+
}
|
261
|
+
|
262
|
+
jsi::Value requestHealthKitPermissions(jsi::Runtime &rt) override {
|
263
|
+
static_assert(
|
264
|
+
bridging::getParameterCount(&T::requestHealthKitPermissions) == 1,
|
265
|
+
"Expected requestHealthKitPermissions(...) to have 1 parameters");
|
266
|
+
|
267
|
+
return bridging::callFromJs<jsi::Value>(
|
268
|
+
rt, &T::requestHealthKitPermissions, jsInvoker_, instance_);
|
269
|
+
}
|
270
|
+
jsi::Value getSteps(jsi::Runtime &rt, double daysBefore) override {
|
271
|
+
static_assert(
|
272
|
+
bridging::getParameterCount(&T::getSteps) == 2,
|
273
|
+
"Expected getSteps(...) to have 2 parameters");
|
274
|
+
|
275
|
+
return bridging::callFromJs<jsi::Value>(
|
276
|
+
rt, &T::getSteps, jsInvoker_, instance_, std::move(daysBefore));
|
277
|
+
}
|
278
|
+
jsi::Value getHeartRate(jsi::Runtime &rt, double daysBefore) override {
|
279
|
+
static_assert(
|
280
|
+
bridging::getParameterCount(&T::getHeartRate) == 2,
|
281
|
+
"Expected getHeartRate(...) to have 2 parameters");
|
282
|
+
|
283
|
+
return bridging::callFromJs<jsi::Value>(
|
284
|
+
rt, &T::getHeartRate, jsInvoker_, instance_, std::move(daysBefore));
|
285
|
+
}
|
286
|
+
jsi::Value getMeasurement(jsi::Runtime &rt) override {
|
287
|
+
static_assert(
|
288
|
+
bridging::getParameterCount(&T::getMeasurement) == 1,
|
289
|
+
"Expected getMeasurement(...) to have 1 parameters");
|
290
|
+
|
291
|
+
return bridging::callFromJs<jsi::Value>(
|
292
|
+
rt, &T::getMeasurement, jsInvoker_, instance_);
|
293
|
+
}
|
294
|
+
|
295
|
+
private:
|
296
|
+
friend class NativeReactNativeAppleHealthKitCxxSpec;
|
297
|
+
T *instance_;
|
298
|
+
};
|
299
|
+
|
300
|
+
Delegate delegate_;
|
301
|
+
};
|
302
|
+
|
303
|
+
} // namespace facebook::react
|
@@ -19,5 +19,5 @@ const NoOpSpec = {
|
|
19
19
|
return Promise.reject(new Error('HealthKit is not available on Android.'));
|
20
20
|
}
|
21
21
|
};
|
22
|
-
var _default = exports.default = _reactNative.Platform.OS === 'android' ? NoOpSpec : _reactNative.TurboModuleRegistry.getEnforcing('
|
23
|
-
//# sourceMappingURL=
|
22
|
+
var _default = exports.default = _reactNative.Platform.OS === 'android' ? NoOpSpec : _reactNative.TurboModuleRegistry.getEnforcing('ReactNativeAppleHealthKit');
|
23
|
+
//# sourceMappingURL=NativeReactNativeAppleHealthKit.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_reactNative","require","NoOpSpec","requestHealthKitPermissions","Promise","reject","Error","getSteps","getHeartRate","getMeasurement","_default","exports","default","Platform","OS","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeReactNativeAppleHealthKit.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AA+BA,MAAMC,QAAc,GAAG;EACrBC,2BAA2BA,CAAA,EAAoB;IAC7C,OAAOC,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,wCAAwC,CAAC,CAAC;EAC5E,CAAC;EACDC,QAAQA,CAAA,EAAoB;IAC1B,OAAOH,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,wCAAwC,CAAC,CAAC;EAC5E,CAAC;EACDE,YAAYA,CAAA,EAAyB;IACnC,OAAOJ,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,wCAAwC,CAAC,CAAC;EAC5E,CAAC;EACDG,cAAcA,CAAA,EAAyB;IACrC,OAAOL,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,wCAAwC,CAAC,CAAC;EAC5E;AACF,CAAC;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaC,qBAAQ,CAACC,EAAE,KAAK,SAAS,GACpCZ,QAAQ,GACRa,gCAAmB,CAACC,YAAY,CAAO,2BAA2B,CAAC","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
@@ -3,41 +3,22 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
var _exportNames = {
|
7
|
-
requestHealthKitPermissions: true,
|
8
|
-
getHeartRate: true,
|
9
|
-
getSteps: true,
|
10
|
-
getMeasurement: true
|
11
|
-
};
|
12
|
-
exports.requestHealthKitPermissions = exports.getSteps = exports.getMeasurement = exports.getHeartRate = void 0;
|
13
|
-
var _NativeAppleHealthKit = _interopRequireDefault(require("./NativeAppleHealthKit.js"));
|
14
|
-
var _types = require("./types.js");
|
15
|
-
Object.keys(_types).forEach(function (key) {
|
16
|
-
if (key === "default" || key === "__esModule") return;
|
17
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
18
|
-
if (key in exports && exports[key] === _types[key]) return;
|
19
|
-
Object.defineProperty(exports, key, {
|
20
|
-
enumerable: true,
|
21
|
-
get: function () {
|
22
|
-
return _types[key];
|
23
|
-
}
|
24
|
-
});
|
25
|
-
});
|
26
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
27
|
-
const requestHealthKitPermissions = async () => {
|
28
|
-
await _NativeAppleHealthKit.default.requestHealthKitPermissions();
|
29
|
-
};
|
30
|
-
exports.requestHealthKitPermissions = requestHealthKitPermissions;
|
31
|
-
const getHeartRate = async days => {
|
32
|
-
await _NativeAppleHealthKit.default.getHeartRate(days);
|
33
|
-
};
|
34
6
|
exports.getHeartRate = getHeartRate;
|
35
|
-
const getSteps = async days => {
|
36
|
-
await _NativeAppleHealthKit.default.getSteps(days);
|
37
|
-
};
|
38
|
-
exports.getSteps = getSteps;
|
39
|
-
const getMeasurement = async () => {
|
40
|
-
await _NativeAppleHealthKit.default.getMeasurement();
|
41
|
-
};
|
42
7
|
exports.getMeasurement = getMeasurement;
|
8
|
+
exports.getSteps = getSteps;
|
9
|
+
exports.requestHealthKitPermissions = requestHealthKitPermissions;
|
10
|
+
var _NativeReactNativeAppleHealthKit = _interopRequireDefault(require("./NativeReactNativeAppleHealthKit.js"));
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
12
|
+
async function requestHealthKitPermissions() {
|
13
|
+
return await _NativeReactNativeAppleHealthKit.default.requestHealthKitPermissions();
|
14
|
+
}
|
15
|
+
async function getMeasurement() {
|
16
|
+
return await _NativeReactNativeAppleHealthKit.default.getMeasurement();
|
17
|
+
}
|
18
|
+
async function getSteps(forNumberOfDay) {
|
19
|
+
return await _NativeReactNativeAppleHealthKit.default.getSteps(forNumberOfDay);
|
20
|
+
}
|
21
|
+
async function getHeartRate(forNumberOfDay) {
|
22
|
+
return await _NativeReactNativeAppleHealthKit.default.getHeartRate(forNumberOfDay);
|
23
|
+
}
|
43
24
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["_NativeReactNativeAppleHealthKit","_interopRequireDefault","require","e","__esModule","default","requestHealthKitPermissions","ReactNativeAppleHealthKit","getMeasurement","getSteps","forNumberOfDay","getHeartRate"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;AAAA,IAAAA,gCAAA,GAAAC,sBAAA,CAAAC,OAAA;AAI2C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEpC,eAAeG,2BAA2BA,CAAA,EAAoB;EACnE,OAAO,MAAMC,wCAAyB,CAACD,2BAA2B,CAAC,CAAC;AACtE;AAEO,eAAeE,cAAcA,CAAA,EAAyB;EAC3D,OAAO,MAAMD,wCAAyB,CAACC,cAAc,CAAC,CAAC;AACzD;AAEO,eAAeC,QAAQA,CAACC,cAAsB,EAAmB;EACtE,OAAO,MAAMH,wCAAyB,CAACE,QAAQ,CAACC,cAAc,CAAC;AACjE;AAEO,eAAeC,YAAYA,CAChCD,cAAsB,EACA;EACtB,OAAO,MAAMH,wCAAyB,CAACI,YAAY,CAACD,cAAc,CAAC;AACrE","ignoreList":[]}
|
@@ -15,5 +15,5 @@ const NoOpSpec = {
|
|
15
15
|
return Promise.reject(new Error('HealthKit is not available on Android.'));
|
16
16
|
}
|
17
17
|
};
|
18
|
-
export default Platform.OS === 'android' ? NoOpSpec : TurboModuleRegistry.getEnforcing('
|
19
|
-
//# sourceMappingURL=
|
18
|
+
export default Platform.OS === 'android' ? NoOpSpec : TurboModuleRegistry.getEnforcing('ReactNativeAppleHealthKit');
|
19
|
+
//# sourceMappingURL=NativeReactNativeAppleHealthKit.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["Platform","TurboModuleRegistry","NoOpSpec","requestHealthKitPermissions","Promise","reject","Error","getSteps","getHeartRate","getMeasurement","OS","getEnforcing"],"sourceRoot":"../../src","sources":["NativeReactNativeAppleHealthKit.ts"],"mappings":";;AACA,SAASA,QAAQ,EAAEC,mBAAmB,QAAQ,cAAc;AA+B5D,MAAMC,QAAc,GAAG;EACrBC,2BAA2BA,CAAA,EAAoB;IAC7C,OAAOC,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,wCAAwC,CAAC,CAAC;EAC5E,CAAC;EACDC,QAAQA,CAAA,EAAoB;IAC1B,OAAOH,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,wCAAwC,CAAC,CAAC;EAC5E,CAAC;EACDE,YAAYA,CAAA,EAAyB;IACnC,OAAOJ,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,wCAAwC,CAAC,CAAC;EAC5E,CAAC;EACDG,cAAcA,CAAA,EAAyB;IACrC,OAAOL,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,wCAAwC,CAAC,CAAC;EAC5E;AACF,CAAC;AAED,eAAeN,QAAQ,CAACU,EAAE,KAAK,SAAS,GACpCR,QAAQ,GACRD,mBAAmB,CAACU,YAAY,CAAO,2BAA2B,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
import
|
4
|
-
export
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
};
|
3
|
+
import ReactNativeAppleHealthKit from "./NativeReactNativeAppleHealthKit.js";
|
4
|
+
export async function requestHealthKitPermissions() {
|
5
|
+
return await ReactNativeAppleHealthKit.requestHealthKitPermissions();
|
6
|
+
}
|
7
|
+
export async function getMeasurement() {
|
8
|
+
return await ReactNativeAppleHealthKit.getMeasurement();
|
9
|
+
}
|
10
|
+
export async function getSteps(forNumberOfDay) {
|
11
|
+
return await ReactNativeAppleHealthKit.getSteps(forNumberOfDay);
|
12
|
+
}
|
13
|
+
export async function getHeartRate(forNumberOfDay) {
|
14
|
+
return await ReactNativeAppleHealthKit.getHeartRate(forNumberOfDay);
|
15
|
+
}
|
17
16
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["ReactNativeAppleHealthKit","requestHealthKitPermissions","getMeasurement","getSteps","forNumberOfDay","getHeartRate"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,OAAOA,yBAAyB,MAIzB,sCAAmC;AAE1C,OAAO,eAAeC,2BAA2BA,CAAA,EAAoB;EACnE,OAAO,MAAMD,yBAAyB,CAACC,2BAA2B,CAAC,CAAC;AACtE;AAEA,OAAO,eAAeC,cAAcA,CAAA,EAAyB;EAC3D,OAAO,MAAMF,yBAAyB,CAACE,cAAc,CAAC,CAAC;AACzD;AAEA,OAAO,eAAeC,QAAQA,CAACC,cAAsB,EAAmB;EACtE,OAAO,MAAMJ,yBAAyB,CAACG,QAAQ,CAACC,cAAc,CAAC;AACjE;AAEA,OAAO,eAAeC,YAAYA,CAChCD,cAAsB,EACA;EACtB,OAAO,MAAMJ,yBAAyB,CAACK,YAAY,CAACD,cAAc,CAAC;AACrE","ignoreList":[]}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
2
|
+
export interface Step {
|
3
|
+
dateString: string;
|
4
|
+
stepCount: number;
|
5
|
+
}
|
6
|
+
export interface HeartRateValue {
|
7
|
+
time: string;
|
8
|
+
heartRate: number;
|
9
|
+
}
|
10
|
+
export interface HeartRate {
|
11
|
+
date: string;
|
12
|
+
value: HeartRateValue[];
|
13
|
+
}
|
14
|
+
export interface Measurement {
|
15
|
+
bodyMass: number | null;
|
16
|
+
height: number | null;
|
17
|
+
biologicalSex: string | null;
|
18
|
+
dateOfBirth: string | null;
|
19
|
+
}
|
20
|
+
export interface Spec extends TurboModule {
|
21
|
+
requestHealthKitPermissions(): Promise<string>;
|
22
|
+
getSteps(daysBefore: number): Promise<Step[]>;
|
23
|
+
getHeartRate(daysBefore: number): Promise<HeartRate[]>;
|
24
|
+
getMeasurement(): Promise<Measurement>;
|
25
|
+
}
|
26
|
+
declare const _default: Spec;
|
27
|
+
export default _default;
|
28
|
+
//# sourceMappingURL=NativeReactNativeAppleHealthKit.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"NativeReactNativeAppleHealthKit.d.ts","sourceRoot":"","sources":["../../../../src/NativeReactNativeAppleHealthKit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAI;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,2BAA2B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/C,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9C,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IACvD,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;CACxC;;AAiBD,wBAEwE"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
export declare
|
3
|
-
export declare
|
4
|
-
export declare
|
5
|
-
export declare
|
1
|
+
import { type HeartRate, type Measurement, type Step } from './NativeReactNativeAppleHealthKit';
|
2
|
+
export declare function requestHealthKitPermissions(): Promise<string>;
|
3
|
+
export declare function getMeasurement(): Promise<Measurement>;
|
4
|
+
export declare function getSteps(forNumberOfDay: number): Promise<Step[]>;
|
5
|
+
export declare function getHeartRate(forNumberOfDay: number): Promise<HeartRate[]>;
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAkC,EAChC,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,IAAI,EACV,MAAM,mCAAmC,CAAC;AAE3C,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,MAAM,CAAC,CAEnE;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAE3D;AAED,wBAAsB,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAEtE;AAED,wBAAsB,YAAY,CAChC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,SAAS,EAAE,CAAC,CAEtB"}
|