@kingstinct/react-native-healthkit 14.1.0 → 16.0.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 +37 -3
- package/ReactNativeHealthkit.podspec +11 -7
- package/app.plugin.js +33 -94
- package/app.plugin.ts +29 -104
- package/ios/CategoryTypeModule.swift +1 -0
- package/ios/CharacteristicTypeModule.swift +7 -6
- package/ios/Constants.swift +9 -10
- package/ios/CoreModule.swift +77 -42
- package/ios/CorrelationTypeModule.swift +3 -2
- package/ios/ElectrocardiogramModule.swift +4 -3
- package/ios/HeartbeatSeriesModule.swift +4 -3
- package/ios/Helpers.swift +11 -216
- package/ios/MedicationModule.swift +9 -8
- package/ios/MemoryEstimation.swift +84 -0
- package/ios/PredicateHelpers.swift +16 -86
- package/ios/QuantityTypeModule.swift +37 -28
- package/ios/Serializers.swift +34 -70
- package/ios/SourceProxy.swift +15 -5
- package/ios/StateOfMindModule.swift +3 -2
- package/ios/WorkoutProxy.swift +31 -13
- package/ios/WorkoutsModule.swift +4 -3
- package/lib/commonjs/generated/healthkit.generated.js +15 -3
- package/lib/commonjs/healthkit.ios.js +6 -2
- package/lib/commonjs/healthkit.js +24 -79
- package/lib/commonjs/types/Auth.js +3 -18
- package/lib/commonjs/types/Background.js +2 -10
- package/lib/commonjs/types/QueryOptions.js +2 -17
- package/lib/module/generated/healthkit.generated.js +14 -2
- package/lib/module/healthkit.ios.js +4 -0
- package/lib/module/healthkit.js +22 -77
- package/lib/module/types/Auth.js +1 -18
- package/lib/module/types/Background.js +1 -10
- package/lib/module/types/QueryOptions.js +1 -17
- package/lib/typescript/generated/healthkit.generated.d.ts +20 -7
- package/lib/typescript/healthkit.d.ts +4 -2
- package/lib/typescript/healthkit.ios.d.ts +13 -9
- package/lib/typescript/specs/CoreModule.nitro.d.ts +22 -4
- package/lib/typescript/specs/SourceProxy.nitro.d.ts +2 -5
- package/lib/typescript/types/Auth.d.ts +1 -16
- package/lib/typescript/types/Background.d.ts +1 -9
- package/lib/typescript/types/Device.d.ts +1 -13
- package/lib/typescript/types/QuantityType.d.ts +3 -3
- package/lib/typescript/types/QueryOptions.d.ts +3 -37
- package/lib/typescript/types/Shared.d.ts +2 -25
- package/lib/typescript/types/Source.d.ts +1 -10
- package/lib/typescript/types/Subscriptions.d.ts +2 -3
- package/lib/typescript/types/Units.d.ts +1 -1
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +24 -16
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +91 -12
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +8 -0
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +8 -5
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +3 -4
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +6 -3
- package/nitrogen/generated/ios/swift/CategorySample.swift +8 -8
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +8 -0
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifierWriteable.swift +8 -0
- package/nitrogen/generated/ios/swift/CorrelationSample.swift +8 -8
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +8 -8
- package/nitrogen/generated/ios/swift/Func_void_std__unordered_map_std__string__std__chrono__system_clock__time_point_.swift +54 -0
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +8 -8
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +25 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +8 -8
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +12 -4
- package/nitrogen/generated/ios/swift/QuantitySample.swift +8 -8
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +4 -4
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifierWriteable.swift +4 -4
- package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +6 -13
- package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +4 -11
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +12 -4
- package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +12 -4
- package/nitrogen/generated/ios/swift/SourceRevision.swift +4 -11
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +8 -8
- package/nitrogen/generated/ios/swift/WorkoutActivityType.swift +8 -0
- package/nitrogen/generated/shared/c++/CategorySample.hpp +7 -7
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +67 -59
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifierWriteable.hpp +67 -59
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +7 -7
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +7 -7
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +7 -7
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +3 -1
- package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +7 -7
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +206 -198
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +7 -7
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +73 -73
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifierWriteable.hpp +73 -73
- package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +8 -9
- package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +8 -9
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +199 -191
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +193 -185
- package/nitrogen/generated/shared/c++/SourceRevision.hpp +8 -9
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +7 -7
- package/nitrogen/generated/shared/c++/WorkoutActivityType.hpp +4 -0
- package/package.json +8 -3
- package/src/generated/healthkit-schema.json +53 -8
- package/src/generated/healthkit.generated.ts +22 -6
- package/src/healthkit.ios.ts +6 -0
- package/src/healthkit.ts +32 -84
- package/src/specs/CoreModule.nitro.ts +25 -4
- package/src/specs/SourceProxy.nitro.ts +2 -4
- package/src/test-setup.ts +1 -0
- package/src/type-tests/generated-typing.ts +30 -8
- package/src/types/Auth.ts +4 -17
- package/src/types/Background.ts +1 -9
- package/src/types/Device.ts +1 -13
- package/src/types/QuantityType.ts +3 -3
- package/src/types/QueryOptions.ts +7 -65
- package/src/types/Shared.ts +7 -28
- package/src/types/Source.ts +1 -11
- package/src/types/Subscriptions.ts +2 -3
- package/src/types/Units.ts +1 -1
- package/ios/BackgroundDeliveryManager.swift +0 -277
- package/ios/Bridge.h +0 -10
- package/ios/ExceptionCatcher.h +0 -5
- package/ios/ExceptionCatcher.mm +0 -32
- package/ios/module.modulemap +0 -5
|
@@ -50,11 +50,11 @@ namespace margelo::nitro::healthkit { struct Device; }
|
|
|
50
50
|
#include "StateOfMindLabel.hpp"
|
|
51
51
|
#include "SampleType.hpp"
|
|
52
52
|
#include <chrono>
|
|
53
|
-
#include <NitroModules/AnyMap.hpp>
|
|
54
53
|
#include <string>
|
|
55
54
|
#include "SourceRevision.hpp"
|
|
56
55
|
#include "Device.hpp"
|
|
57
56
|
#include <optional>
|
|
57
|
+
#include <NitroModules/AnyMap.hpp>
|
|
58
58
|
|
|
59
59
|
namespace margelo::nitro::healthkit {
|
|
60
60
|
|
|
@@ -72,14 +72,14 @@ namespace margelo::nitro::healthkit {
|
|
|
72
72
|
std::chrono::system_clock::time_point startDate SWIFT_PRIVATE;
|
|
73
73
|
std::chrono::system_clock::time_point endDate SWIFT_PRIVATE;
|
|
74
74
|
bool hasUndeterminedDuration SWIFT_PRIVATE;
|
|
75
|
-
std::shared_ptr<AnyMap> metadata SWIFT_PRIVATE;
|
|
76
75
|
std::string uuid SWIFT_PRIVATE;
|
|
77
76
|
SourceRevision sourceRevision SWIFT_PRIVATE;
|
|
78
77
|
std::optional<Device> device SWIFT_PRIVATE;
|
|
78
|
+
std::shared_ptr<AnyMap> metadata SWIFT_PRIVATE;
|
|
79
79
|
|
|
80
80
|
public:
|
|
81
81
|
StateOfMindSample() = default;
|
|
82
|
-
explicit StateOfMindSample(double valence, StateOfMindKind kind, StateOfMindValenceClassification valenceClassification, std::vector<StateOfMindAssociation> associations, std::vector<StateOfMindLabel> labels, SampleType sampleType, std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate, bool hasUndeterminedDuration, std::
|
|
82
|
+
explicit StateOfMindSample(double valence, StateOfMindKind kind, StateOfMindValenceClassification valenceClassification, std::vector<StateOfMindAssociation> associations, std::vector<StateOfMindLabel> labels, SampleType sampleType, std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate, bool hasUndeterminedDuration, std::string uuid, SourceRevision sourceRevision, std::optional<Device> device, std::shared_ptr<AnyMap> metadata): valence(valence), kind(kind), valenceClassification(valenceClassification), associations(associations), labels(labels), sampleType(sampleType), startDate(startDate), endDate(endDate), hasUndeterminedDuration(hasUndeterminedDuration), uuid(uuid), sourceRevision(sourceRevision), device(device), metadata(metadata) {}
|
|
83
83
|
|
|
84
84
|
public:
|
|
85
85
|
friend bool operator==(const StateOfMindSample& lhs, const StateOfMindSample& rhs) = default;
|
|
@@ -104,10 +104,10 @@ namespace margelo::nitro {
|
|
|
104
104
|
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate"))),
|
|
105
105
|
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate"))),
|
|
106
106
|
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "hasUndeterminedDuration"))),
|
|
107
|
-
JSIConverter<std::shared_ptr<AnyMap>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata"))),
|
|
108
107
|
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid"))),
|
|
109
108
|
JSIConverter<margelo::nitro::healthkit::SourceRevision>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision"))),
|
|
110
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "device")))
|
|
109
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "device"))),
|
|
110
|
+
JSIConverter<std::shared_ptr<AnyMap>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata")))
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
113
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::StateOfMindSample& arg) {
|
|
@@ -121,10 +121,10 @@ namespace margelo::nitro {
|
|
|
121
121
|
obj.setProperty(runtime, PropNameIDCache::get(runtime, "startDate"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.startDate));
|
|
122
122
|
obj.setProperty(runtime, PropNameIDCache::get(runtime, "endDate"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.endDate));
|
|
123
123
|
obj.setProperty(runtime, PropNameIDCache::get(runtime, "hasUndeterminedDuration"), JSIConverter<bool>::toJSI(runtime, arg.hasUndeterminedDuration));
|
|
124
|
-
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadata"), JSIConverter<std::shared_ptr<AnyMap>>::toJSI(runtime, arg.metadata));
|
|
125
124
|
obj.setProperty(runtime, PropNameIDCache::get(runtime, "uuid"), JSIConverter<std::string>::toJSI(runtime, arg.uuid));
|
|
126
125
|
obj.setProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision"), JSIConverter<margelo::nitro::healthkit::SourceRevision>::toJSI(runtime, arg.sourceRevision));
|
|
127
126
|
obj.setProperty(runtime, PropNameIDCache::get(runtime, "device"), JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::toJSI(runtime, arg.device));
|
|
127
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadata"), JSIConverter<std::shared_ptr<AnyMap>>::toJSI(runtime, arg.metadata));
|
|
128
128
|
return obj;
|
|
129
129
|
}
|
|
130
130
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -144,10 +144,10 @@ namespace margelo::nitro {
|
|
|
144
144
|
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate")))) return false;
|
|
145
145
|
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate")))) return false;
|
|
146
146
|
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "hasUndeterminedDuration")))) return false;
|
|
147
|
-
if (!JSIConverter<std::shared_ptr<AnyMap>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata")))) return false;
|
|
148
147
|
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid")))) return false;
|
|
149
148
|
if (!JSIConverter<margelo::nitro::healthkit::SourceRevision>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision")))) return false;
|
|
150
149
|
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "device")))) return false;
|
|
150
|
+
if (!JSIConverter<std::shared_ptr<AnyMap>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata")))) return false;
|
|
151
151
|
return true;
|
|
152
152
|
}
|
|
153
153
|
};
|
|
@@ -107,6 +107,8 @@ namespace margelo::nitro::healthkit {
|
|
|
107
107
|
SWIMBIKERUN SWIFT_NAME(swimbikerun) = 82,
|
|
108
108
|
TRANSITION SWIFT_NAME(transition) = 83,
|
|
109
109
|
UNDERWATERDIVING SWIFT_NAME(underwaterdiving) = 84,
|
|
110
|
+
REST SWIFT_NAME(rest) = 2998,
|
|
111
|
+
GROUP SWIFT_NAME(group) = 2999,
|
|
110
112
|
OTHER SWIFT_NAME(other) = 3000,
|
|
111
113
|
} CLOSED_ENUM;
|
|
112
114
|
|
|
@@ -220,6 +222,8 @@ namespace margelo::nitro {
|
|
|
220
222
|
case 82 /* SWIMBIKERUN */: return true;
|
|
221
223
|
case 83 /* TRANSITION */: return true;
|
|
222
224
|
case 84 /* UNDERWATERDIVING */: return true;
|
|
225
|
+
case 2998 /* REST */: return true;
|
|
226
|
+
case 2999 /* GROUP */: return true;
|
|
223
227
|
case 3000 /* OTHER */: return true;
|
|
224
228
|
default: return false;
|
|
225
229
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kingstinct/react-native-healthkit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"description": "React Native bindings for HealthKit",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -58,13 +58,15 @@
|
|
|
58
58
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
59
59
|
"build:esm": "tsc -p tsconfig.esm.json",
|
|
60
60
|
"build:types": "tsc -p tsconfig.declarations.json",
|
|
61
|
-
"build": "bun run clean && bun run build:cjs && bun run build:esm && bun run build:types",
|
|
61
|
+
"build": "bun run clean && bun run build:cjs && bun run build:esm && bun run build:types && bun run build:plugin",
|
|
62
|
+
"build:plugin": "bun ../../scripts/build-app-plugin.ts",
|
|
62
63
|
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.type-tests.json",
|
|
63
64
|
"lint": "bunx @biomejs/biome format --write",
|
|
64
65
|
"check:generated": "bun run generate:healthkit && bun run verify:healthkit-sdk && git diff --exit-code -- src/generated/healthkit.generated.ts src/generated/healthkit-schema.json ../../apps/example/contracts/generated ios/generated",
|
|
65
66
|
"codegen": "bun run build && nitrogen --logLevel=\"debug\" && perl -i -pe 's/Bool\\(fromCxx: cachedCxxPart\\)/cachedCxxPart.use_count() > 0/g' nitrogen/generated/ios/swift/*Spec_cxx.swift",
|
|
66
67
|
"test": "bun test",
|
|
67
|
-
"prepublishOnly": "bun run build && bun run codegen"
|
|
68
|
+
"prepublishOnly": "bun run build && bun run codegen",
|
|
69
|
+
"prepack": "test -f app.plugin.js || { echo \"app.plugin.js is missing; run bun run build:plugin (it is generated, not committed)\" >&2; exit 1; }"
|
|
68
70
|
},
|
|
69
71
|
"keywords": [
|
|
70
72
|
"react-native",
|
|
@@ -100,6 +102,9 @@
|
|
|
100
102
|
"react-native-nitro-modules": "^0.35.0",
|
|
101
103
|
"typescript": "~5.9.3"
|
|
102
104
|
},
|
|
105
|
+
"dependencies": {
|
|
106
|
+
"@react-native-healthkit/core": "16.0.0"
|
|
107
|
+
},
|
|
103
108
|
"peerDependencies": {
|
|
104
109
|
"react": ">=19",
|
|
105
110
|
"react-native": ">=0.79",
|
|
@@ -96,14 +96,6 @@
|
|
|
96
96
|
"writeable": true,
|
|
97
97
|
"legacy": false
|
|
98
98
|
},
|
|
99
|
-
{
|
|
100
|
-
"name": "HKQuantityTypeIdentifierBloodKetones",
|
|
101
|
-
"ios": "8.0",
|
|
102
|
-
"canonicalUnit": "mmol/L",
|
|
103
|
-
"aggregationStyle": "Discrete (Arithmetic)",
|
|
104
|
-
"writeable": true,
|
|
105
|
-
"legacy": false
|
|
106
|
-
},
|
|
107
99
|
{
|
|
108
100
|
"name": "HKQuantityTypeIdentifierBloodPressureDiastolic",
|
|
109
101
|
"ios": "8.0",
|
|
@@ -656,6 +648,14 @@
|
|
|
656
648
|
"writeable": true,
|
|
657
649
|
"legacy": false
|
|
658
650
|
},
|
|
651
|
+
{
|
|
652
|
+
"name": "HKQuantityTypeIdentifierHeartRateVariabilityRMSSD",
|
|
653
|
+
"ios": "27.0",
|
|
654
|
+
"canonicalUnit": "ms",
|
|
655
|
+
"aggregationStyle": "Discrete (Arithmetic)",
|
|
656
|
+
"writeable": true,
|
|
657
|
+
"legacy": false
|
|
658
|
+
},
|
|
659
659
|
{
|
|
660
660
|
"name": "HKQuantityTypeIdentifierHeartRateVariabilitySDNN",
|
|
661
661
|
"ios": "11.0",
|
|
@@ -1019,6 +1019,13 @@
|
|
|
1019
1019
|
"writeable": true,
|
|
1020
1020
|
"legacy": false
|
|
1021
1021
|
},
|
|
1022
|
+
{
|
|
1023
|
+
"name": "HKCategoryTypeIdentifierBleedingAfterMenopause",
|
|
1024
|
+
"ios": "27.0",
|
|
1025
|
+
"valueEnum": "HKCategoryValueVaginalBleeding",
|
|
1026
|
+
"writeable": true,
|
|
1027
|
+
"legacy": false
|
|
1028
|
+
},
|
|
1022
1029
|
{
|
|
1023
1030
|
"name": "HKCategoryTypeIdentifierBleedingAfterPregnancy",
|
|
1024
1031
|
"ios": "18.0",
|
|
@@ -1278,6 +1285,13 @@
|
|
|
1278
1285
|
"writeable": true,
|
|
1279
1286
|
"legacy": false
|
|
1280
1287
|
},
|
|
1288
|
+
{
|
|
1289
|
+
"name": "HKCategoryTypeIdentifierMenopausalState",
|
|
1290
|
+
"ios": "27.0",
|
|
1291
|
+
"valueEnum": "HKCategoryValueMenopausalState",
|
|
1292
|
+
"writeable": true,
|
|
1293
|
+
"legacy": false
|
|
1294
|
+
},
|
|
1281
1295
|
{
|
|
1282
1296
|
"name": "HKCategoryTypeIdentifierMenstrualFlow",
|
|
1283
1297
|
"ios": "9.0",
|
|
@@ -1755,6 +1769,27 @@
|
|
|
1755
1769
|
}
|
|
1756
1770
|
]
|
|
1757
1771
|
},
|
|
1772
|
+
{
|
|
1773
|
+
"name": "CategoryValueMenopausalState",
|
|
1774
|
+
"ios": "27.0",
|
|
1775
|
+
"members": [
|
|
1776
|
+
{
|
|
1777
|
+
"name": "menopause",
|
|
1778
|
+
"swiftName": "HKCategoryValueMenopausalStateMenopause",
|
|
1779
|
+
"rawValue": 1
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
"name": "perimenopause",
|
|
1783
|
+
"swiftName": "HKCategoryValueMenopausalStatePerimenopause",
|
|
1784
|
+
"rawValue": 2
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
"name": "none",
|
|
1788
|
+
"swiftName": "HKCategoryValueMenopausalStateNone",
|
|
1789
|
+
"rawValue": 3
|
|
1790
|
+
}
|
|
1791
|
+
]
|
|
1792
|
+
},
|
|
1758
1793
|
{
|
|
1759
1794
|
"name": "CategoryValueMenstrualFlow",
|
|
1760
1795
|
"ios": "9.0",
|
|
@@ -2814,6 +2849,16 @@
|
|
|
2814
2849
|
"swiftName": "HKWorkoutActivityTypeUnderwaterDiving",
|
|
2815
2850
|
"rawValue": 84
|
|
2816
2851
|
},
|
|
2852
|
+
{
|
|
2853
|
+
"name": "rest",
|
|
2854
|
+
"swiftName": "HKWorkoutActivityTypeRest",
|
|
2855
|
+
"rawValue": 2998
|
|
2856
|
+
},
|
|
2857
|
+
{
|
|
2858
|
+
"name": "group",
|
|
2859
|
+
"swiftName": "HKWorkoutActivityTypeGroup",
|
|
2860
|
+
"rawValue": 2999
|
|
2861
|
+
},
|
|
2817
2862
|
{
|
|
2818
2863
|
"name": "other",
|
|
2819
2864
|
"swiftName": "HKWorkoutActivityTypeOther",
|
|
@@ -30,7 +30,6 @@ export type QuantityTypeIdentifierWriteable =
|
|
|
30
30
|
| 'HKQuantityTypeIdentifierBasalEnergyBurned'
|
|
31
31
|
| 'HKQuantityTypeIdentifierBloodAlcoholContent'
|
|
32
32
|
| 'HKQuantityTypeIdentifierBloodGlucose'
|
|
33
|
-
| 'HKQuantityTypeIdentifierBloodKetones'
|
|
34
33
|
| 'HKQuantityTypeIdentifierBloodPressureDiastolic'
|
|
35
34
|
| 'HKQuantityTypeIdentifierBloodPressureSystolic'
|
|
36
35
|
| 'HKQuantityTypeIdentifierBodyFatPercentage'
|
|
@@ -100,6 +99,7 @@ export type QuantityTypeIdentifierWriteable =
|
|
|
100
99
|
| 'HKQuantityTypeIdentifierHeadphoneAudioExposure'
|
|
101
100
|
| 'HKQuantityTypeIdentifierHeartRate'
|
|
102
101
|
| 'HKQuantityTypeIdentifierHeartRateRecoveryOneMinute'
|
|
102
|
+
| 'HKQuantityTypeIdentifierHeartRateVariabilityRMSSD'
|
|
103
103
|
| 'HKQuantityTypeIdentifierHeartRateVariabilitySDNN'
|
|
104
104
|
| 'HKQuantityTypeIdentifierHeight'
|
|
105
105
|
| 'HKQuantityTypeIdentifierInhalerUsage'
|
|
@@ -154,6 +154,7 @@ export type CategoryTypeIdentifierWriteable =
|
|
|
154
154
|
| 'HKCategoryTypeIdentifierAppleWalkingSteadinessEvent'
|
|
155
155
|
| 'HKCategoryTypeIdentifierAudioExposureEvent'
|
|
156
156
|
| 'HKCategoryTypeIdentifierBladderIncontinence'
|
|
157
|
+
| 'HKCategoryTypeIdentifierBleedingAfterMenopause'
|
|
157
158
|
| 'HKCategoryTypeIdentifierBleedingAfterPregnancy'
|
|
158
159
|
| 'HKCategoryTypeIdentifierBleedingDuringPregnancy'
|
|
159
160
|
| 'HKCategoryTypeIdentifierBloating'
|
|
@@ -187,6 +188,7 @@ export type CategoryTypeIdentifierWriteable =
|
|
|
187
188
|
| 'HKCategoryTypeIdentifierLowCardioFitnessEvent'
|
|
188
189
|
| 'HKCategoryTypeIdentifierLowerBackPain'
|
|
189
190
|
| 'HKCategoryTypeIdentifierMemoryLapse'
|
|
191
|
+
| 'HKCategoryTypeIdentifierMenopausalState'
|
|
190
192
|
| 'HKCategoryTypeIdentifierMenstrualFlow'
|
|
191
193
|
| 'HKCategoryTypeIdentifierMindfulSession'
|
|
192
194
|
| 'HKCategoryTypeIdentifierMoodChanges'
|
|
@@ -229,7 +231,6 @@ export const QUANTITY_IDENTIFIER_IOS_AVAILABILITY = {
|
|
|
229
231
|
HKQuantityTypeIdentifierBasalEnergyBurned: '8.0',
|
|
230
232
|
HKQuantityTypeIdentifierBloodAlcoholContent: '8.0',
|
|
231
233
|
HKQuantityTypeIdentifierBloodGlucose: '8.0',
|
|
232
|
-
HKQuantityTypeIdentifierBloodKetones: '8.0',
|
|
233
234
|
HKQuantityTypeIdentifierBloodPressureDiastolic: '8.0',
|
|
234
235
|
HKQuantityTypeIdentifierBloodPressureSystolic: '8.0',
|
|
235
236
|
HKQuantityTypeIdentifierBodyFatPercentage: '8.0',
|
|
@@ -299,6 +300,7 @@ export const QUANTITY_IDENTIFIER_IOS_AVAILABILITY = {
|
|
|
299
300
|
HKQuantityTypeIdentifierHeadphoneAudioExposure: '13.0',
|
|
300
301
|
HKQuantityTypeIdentifierHeartRate: '8.0',
|
|
301
302
|
HKQuantityTypeIdentifierHeartRateRecoveryOneMinute: '16.0',
|
|
303
|
+
HKQuantityTypeIdentifierHeartRateVariabilityRMSSD: '27.0',
|
|
302
304
|
HKQuantityTypeIdentifierHeartRateVariabilitySDNN: '11.0',
|
|
303
305
|
HKQuantityTypeIdentifierHeight: '8.0',
|
|
304
306
|
HKQuantityTypeIdentifierInhalerUsage: '8.0',
|
|
@@ -347,6 +349,7 @@ export const CATEGORY_IDENTIFIER_IOS_AVAILABILITY = {
|
|
|
347
349
|
HKCategoryTypeIdentifierAppleWalkingSteadinessEvent: '15.0',
|
|
348
350
|
HKCategoryTypeIdentifierAudioExposureEvent: '13.0',
|
|
349
351
|
HKCategoryTypeIdentifierBladderIncontinence: '14.0',
|
|
352
|
+
HKCategoryTypeIdentifierBleedingAfterMenopause: '27.0',
|
|
350
353
|
HKCategoryTypeIdentifierBleedingAfterPregnancy: '18.0',
|
|
351
354
|
HKCategoryTypeIdentifierBleedingDuringPregnancy: '18.0',
|
|
352
355
|
HKCategoryTypeIdentifierBloating: '13.6',
|
|
@@ -384,6 +387,7 @@ export const CATEGORY_IDENTIFIER_IOS_AVAILABILITY = {
|
|
|
384
387
|
HKCategoryTypeIdentifierLowerBackPain: '13.6',
|
|
385
388
|
HKCategoryTypeIdentifierLowHeartRateEvent: '12.2',
|
|
386
389
|
HKCategoryTypeIdentifierMemoryLapse: '14.0',
|
|
390
|
+
HKCategoryTypeIdentifierMenopausalState: '27.0',
|
|
387
391
|
HKCategoryTypeIdentifierMenstrualFlow: '9.0',
|
|
388
392
|
HKCategoryTypeIdentifierMindfulSession: '10.0',
|
|
389
393
|
HKCategoryTypeIdentifierMoodChanges: '13.6',
|
|
@@ -424,7 +428,6 @@ export const QUANTITY_IDENTIFIER_CANONICAL_UNITS = {
|
|
|
424
428
|
HKQuantityTypeIdentifierBasalEnergyBurned: 'kcal',
|
|
425
429
|
HKQuantityTypeIdentifierBloodAlcoholContent: '%',
|
|
426
430
|
HKQuantityTypeIdentifierBloodGlucose: 'mg/dL',
|
|
427
|
-
HKQuantityTypeIdentifierBloodKetones: 'mmol/L',
|
|
428
431
|
HKQuantityTypeIdentifierBloodPressureDiastolic: 'mmHg',
|
|
429
432
|
HKQuantityTypeIdentifierBloodPressureSystolic: 'mmHg',
|
|
430
433
|
HKQuantityTypeIdentifierBodyFatPercentage: '%',
|
|
@@ -494,6 +497,7 @@ export const QUANTITY_IDENTIFIER_CANONICAL_UNITS = {
|
|
|
494
497
|
HKQuantityTypeIdentifierHeadphoneAudioExposure: 'dBASPL',
|
|
495
498
|
HKQuantityTypeIdentifierHeartRate: 'count/s',
|
|
496
499
|
HKQuantityTypeIdentifierHeartRateRecoveryOneMinute: 'count/min',
|
|
500
|
+
HKQuantityTypeIdentifierHeartRateVariabilityRMSSD: 'ms',
|
|
497
501
|
HKQuantityTypeIdentifierHeartRateVariabilitySDNN: 'ms',
|
|
498
502
|
HKQuantityTypeIdentifierHeight: 'm',
|
|
499
503
|
HKQuantityTypeIdentifierInhalerUsage: 'count',
|
|
@@ -543,6 +547,8 @@ export const CATEGORY_IDENTIFIER_VALUE_ENUMS = {
|
|
|
543
547
|
'CategoryValueAppleWalkingSteadinessEvent',
|
|
544
548
|
HKCategoryTypeIdentifierAudioExposureEvent: null,
|
|
545
549
|
HKCategoryTypeIdentifierBladderIncontinence: 'CategoryValueSeverity',
|
|
550
|
+
HKCategoryTypeIdentifierBleedingAfterMenopause:
|
|
551
|
+
'CategoryValueVaginalBleeding',
|
|
546
552
|
HKCategoryTypeIdentifierBleedingAfterPregnancy:
|
|
547
553
|
'CategoryValueVaginalBleeding',
|
|
548
554
|
HKCategoryTypeIdentifierBleedingDuringPregnancy:
|
|
@@ -586,6 +592,7 @@ export const CATEGORY_IDENTIFIER_VALUE_ENUMS = {
|
|
|
586
592
|
HKCategoryTypeIdentifierLowerBackPain: 'CategoryValueSeverity',
|
|
587
593
|
HKCategoryTypeIdentifierLowHeartRateEvent: 'CategoryValue',
|
|
588
594
|
HKCategoryTypeIdentifierMemoryLapse: 'CategoryValueSeverity',
|
|
595
|
+
HKCategoryTypeIdentifierMenopausalState: 'CategoryValueMenopausalState',
|
|
589
596
|
HKCategoryTypeIdentifierMenstrualFlow: 'CategoryValueMenstrualFlow',
|
|
590
597
|
HKCategoryTypeIdentifierMindfulSession: 'CategoryValue',
|
|
591
598
|
HKCategoryTypeIdentifierMoodChanges: 'CategoryValuePresence',
|
|
@@ -686,6 +693,11 @@ export enum CategoryValueHeadphoneAudioExposureEvent {
|
|
|
686
693
|
export enum CategoryValueLowCardioFitnessEvent {
|
|
687
694
|
lowFitness = 1,
|
|
688
695
|
}
|
|
696
|
+
export enum CategoryValueMenopausalState {
|
|
697
|
+
menopause = 1,
|
|
698
|
+
perimenopause = 2,
|
|
699
|
+
none = 3,
|
|
700
|
+
}
|
|
689
701
|
export enum CategoryValueMenstrualFlow {
|
|
690
702
|
unspecified = 1,
|
|
691
703
|
light = 2,
|
|
@@ -914,6 +926,8 @@ export enum WorkoutActivityType {
|
|
|
914
926
|
swimBikeRun = 82,
|
|
915
927
|
transition = 83,
|
|
916
928
|
underwaterDiving = 84,
|
|
929
|
+
rest = 2998,
|
|
930
|
+
group = 2999,
|
|
917
931
|
other = 3000,
|
|
918
932
|
}
|
|
919
933
|
export enum WorkoutEventType {
|
|
@@ -938,6 +952,7 @@ export interface CategoryValueByIdentifierMap {
|
|
|
938
952
|
readonly HKCategoryTypeIdentifierAppleStandHour: CategoryValueAppleStandHour
|
|
939
953
|
readonly HKCategoryTypeIdentifierAppleWalkingSteadinessEvent: CategoryValueAppleWalkingSteadinessEvent
|
|
940
954
|
readonly HKCategoryTypeIdentifierBladderIncontinence: CategoryValueSeverity
|
|
955
|
+
readonly HKCategoryTypeIdentifierBleedingAfterMenopause: CategoryValueVaginalBleeding
|
|
941
956
|
readonly HKCategoryTypeIdentifierBleedingAfterPregnancy: CategoryValueVaginalBleeding
|
|
942
957
|
readonly HKCategoryTypeIdentifierBleedingDuringPregnancy: CategoryValueVaginalBleeding
|
|
943
958
|
readonly HKCategoryTypeIdentifierBloating: CategoryValueSeverity
|
|
@@ -975,6 +990,7 @@ export interface CategoryValueByIdentifierMap {
|
|
|
975
990
|
readonly HKCategoryTypeIdentifierLowerBackPain: CategoryValueSeverity
|
|
976
991
|
readonly HKCategoryTypeIdentifierLowHeartRateEvent: CategoryValue
|
|
977
992
|
readonly HKCategoryTypeIdentifierMemoryLapse: CategoryValueSeverity
|
|
993
|
+
readonly HKCategoryTypeIdentifierMenopausalState: CategoryValueMenopausalState
|
|
978
994
|
readonly HKCategoryTypeIdentifierMenstrualFlow: CategoryValueMenstrualFlow
|
|
979
995
|
readonly HKCategoryTypeIdentifierMindfulSession: CategoryValue
|
|
980
996
|
readonly HKCategoryTypeIdentifierMoodChanges: CategoryValuePresence
|
|
@@ -1128,7 +1144,7 @@ export type CategoryTypedMetadataForIdentifierGenerated<
|
|
|
1128
1144
|
> = KnownSampleMetadata &
|
|
1129
1145
|
(T extends keyof CategorySpecificMetadataByIdentifierMap
|
|
1130
1146
|
? CategorySpecificMetadataByIdentifierMap[T]
|
|
1131
|
-
:
|
|
1147
|
+
: unknown)
|
|
1132
1148
|
export interface QuantitySpecificMetadataByIdentifierMap {
|
|
1133
1149
|
readonly HKQuantityTypeIdentifierBasalBodyTemperature: Pick<
|
|
1134
1150
|
QuantityTypedMetadata,
|
|
@@ -1168,7 +1184,7 @@ export type QuantityTypedMetadataForIdentifierGenerated<
|
|
|
1168
1184
|
> &
|
|
1169
1185
|
(T extends keyof QuantitySpecificMetadataByIdentifierMap
|
|
1170
1186
|
? QuantitySpecificMetadataByIdentifierMap[T]
|
|
1171
|
-
:
|
|
1187
|
+
: unknown)
|
|
1172
1188
|
export interface QuantityUnitByIdentifierMap {
|
|
1173
1189
|
readonly HKQuantityTypeIdentifierActiveEnergyBurned: EnergyUnit
|
|
1174
1190
|
readonly HKQuantityTypeIdentifierAppleExerciseTime: TimeUnit
|
|
@@ -1182,7 +1198,6 @@ export interface QuantityUnitByIdentifierMap {
|
|
|
1182
1198
|
readonly HKQuantityTypeIdentifierBasalEnergyBurned: EnergyUnit
|
|
1183
1199
|
readonly HKQuantityTypeIdentifierBloodAlcoholContent: '%'
|
|
1184
1200
|
readonly HKQuantityTypeIdentifierBloodGlucose: BloodGlucoseUnit
|
|
1185
|
-
readonly HKQuantityTypeIdentifierBloodKetones: BloodGlucoseUnit
|
|
1186
1201
|
readonly HKQuantityTypeIdentifierBloodPressureDiastolic: PressureUnit
|
|
1187
1202
|
readonly HKQuantityTypeIdentifierBloodPressureSystolic: PressureUnit
|
|
1188
1203
|
readonly HKQuantityTypeIdentifierBodyFatPercentage: '%'
|
|
@@ -1255,6 +1270,7 @@ export interface QuantityUnitByIdentifierMap {
|
|
|
1255
1270
|
readonly HKQuantityTypeIdentifierHeadphoneAudioExposure: PressureUnit
|
|
1256
1271
|
readonly HKQuantityTypeIdentifierHeartRate: CountPerTime<TimeUnit>
|
|
1257
1272
|
readonly HKQuantityTypeIdentifierHeartRateRecoveryOneMinute: CountPerTime<TimeUnit>
|
|
1273
|
+
readonly HKQuantityTypeIdentifierHeartRateVariabilityRMSSD: string
|
|
1258
1274
|
readonly HKQuantityTypeIdentifierHeartRateVariabilitySDNN: string
|
|
1259
1275
|
readonly HKQuantityTypeIdentifierHeight: LengthUnit
|
|
1260
1276
|
readonly HKQuantityTypeIdentifierInhalerUsage: 'count'
|
package/src/healthkit.ios.ts
CHANGED
|
@@ -300,6 +300,8 @@ const MedicationBindings = {
|
|
|
300
300
|
export const authorizationStatusFor = Core.authorizationStatusFor.bind(Core)
|
|
301
301
|
export const requestPerObjectReadAuthorization =
|
|
302
302
|
Core.requestPerObjectReadAuthorization.bind(Core)
|
|
303
|
+
export const getEarliestAuthorizedSampleDates =
|
|
304
|
+
Core.getEarliestAuthorizedSampleDates.bind(Core)
|
|
303
305
|
export const disableAllBackgroundDelivery =
|
|
304
306
|
Core.disableAllBackgroundDelivery.bind(Core)
|
|
305
307
|
export const disableBackgroundDelivery =
|
|
@@ -368,6 +370,8 @@ export const saveWorkoutSample = WorkoutBindings.saveWorkoutSample
|
|
|
368
370
|
export const startWatchApp =
|
|
369
371
|
Workouts.startWatchAppWithWorkoutConfiguration.bind(Workouts)
|
|
370
372
|
export const isProtectedDataAvailable = Core.isProtectedDataAvailable.bind(Core)
|
|
373
|
+
export const isProtectedDataAvailableAsync =
|
|
374
|
+
Core.isProtectedDataAvailableAsync.bind(Core)
|
|
371
375
|
export const queryStateOfMindSamples =
|
|
372
376
|
StateOfMindBindings.queryStateOfMindSamples
|
|
373
377
|
export const queryStateOfMindSamplesWithAnchor =
|
|
@@ -452,6 +456,7 @@ export default {
|
|
|
452
456
|
querySources,
|
|
453
457
|
requestAuthorization,
|
|
454
458
|
requestPerObjectReadAuthorization,
|
|
459
|
+
getEarliestAuthorizedSampleDates,
|
|
455
460
|
deleteObjects,
|
|
456
461
|
saveCategorySample,
|
|
457
462
|
saveCorrelationSample,
|
|
@@ -461,6 +466,7 @@ export default {
|
|
|
461
466
|
subscribeToQuantitySamples,
|
|
462
467
|
startWatchApp,
|
|
463
468
|
isProtectedDataAvailable,
|
|
469
|
+
isProtectedDataAvailableAsync,
|
|
464
470
|
queryStateOfMindSamples,
|
|
465
471
|
queryStateOfMindSamplesWithAnchor,
|
|
466
472
|
saveStateOfMindSample,
|