@kingstinct/react-native-healthkit 12.1.2 → 12.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/ios/CategoryTypeModule.swift +49 -97
- package/ios/CharacteristicTypeModule.swift +77 -63
- package/ios/CoreModule.swift +324 -280
- package/ios/CorrelationTypeModule.swift +192 -144
- package/ios/ElectrocardiogramModule.swift +185 -194
- package/ios/HeartbeatSeriesModule.swift +123 -171
- package/ios/Helpers.swift +312 -571
- package/ios/MedicationModule.swift +259 -0
- package/ios/PredicateHelpers.swift +334 -0
- package/ios/QuantityTypeModule.swift +297 -378
- package/ios/Serializers.swift +273 -210
- package/ios/SourceProxy.swift +2 -2
- package/ios/StateOfMindModule.swift +179 -125
- package/ios/WorkoutProxy.swift +235 -112
- package/ios/WorkoutsModule.swift +214 -262
- package/lib/commonjs/healthkit.ios.js +22 -2
- package/lib/commonjs/healthkit.js +35 -5
- package/lib/commonjs/hooks/useStatisticsForQuantity.js +1 -1
- package/lib/commonjs/hooks/useSubscribeToCategorySamples.js +20 -0
- package/lib/commonjs/modules.js +2 -1
- package/lib/commonjs/specs/MedicationModule.nitro.js +27 -0
- package/lib/commonjs/types/Constants.js +2 -1
- package/lib/commonjs/types/QuantityType.js +8 -1
- package/lib/commonjs/types/QueryOptions.js +18 -0
- package/lib/commonjs/types/WeatherCondition.js +32 -32
- package/lib/commonjs/types/Workouts.js +1 -50
- package/lib/commonjs/utils/getCategorySampleById.js +1 -1
- package/lib/commonjs/utils/getQuantitySampleById.js +1 -1
- package/lib/commonjs/utils/getWorkoutById.js +1 -1
- package/lib/commonjs/utils/subscribeToCategorySamples.js +29 -0
- package/lib/commonjs/utils/subscribeToQuantitySamples.js +8 -25
- package/lib/module/healthkit.ios.js +20 -2
- package/lib/module/healthkit.js +32 -2
- package/lib/module/hooks/useStatisticsForQuantity.js +1 -1
- package/lib/module/hooks/useSubscribeToCategorySamples.js +17 -0
- package/lib/module/modules.js +1 -0
- package/lib/module/specs/MedicationModule.nitro.js +26 -0
- package/lib/module/types/Constants.js +1 -0
- package/lib/module/types/QuantityType.js +7 -0
- package/lib/module/types/QueryOptions.js +17 -1
- package/lib/module/types/WeatherCondition.js +31 -31
- package/lib/module/types/Workouts.js +0 -49
- package/lib/module/utils/getCategorySampleById.js +1 -1
- package/lib/module/utils/getQuantitySampleById.js +1 -1
- package/lib/module/utils/getWorkoutById.js +1 -1
- package/lib/module/utils/subscribeToCategorySamples.js +26 -0
- package/lib/module/utils/subscribeToQuantitySamples.js +8 -25
- package/lib/typescript/healthkit.d.ts +18 -9
- package/lib/typescript/healthkit.ios.d.ts +33 -15
- package/lib/typescript/hooks/useSubscribeToCategorySamples.d.ts +3 -0
- package/lib/typescript/modules.d.ts +2 -0
- package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +2 -2
- package/lib/typescript/specs/CoreModule.nitro.d.ts +2 -1
- package/lib/typescript/specs/CorrelationTypeModule.nitro.d.ts +4 -2
- package/lib/typescript/specs/ElectrocardiogramModule.nitro.d.ts +1 -1
- package/lib/typescript/specs/HeartbeatSeriesModule.nitro.d.ts +1 -1
- package/lib/typescript/specs/MedicationModule.nitro.d.ts +56 -0
- package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +4 -4
- package/lib/typescript/specs/StateOfMindModule.nitro.d.ts +4 -3
- package/lib/typescript/types/CategoryType.d.ts +10 -20
- package/lib/typescript/types/Constants.d.ts +1 -0
- package/lib/typescript/types/CorrelationType.d.ts +8 -10
- package/lib/typescript/types/ElectrocardiogramSample.d.ts +2 -12
- package/lib/typescript/types/HeartbeatSeries.d.ts +2 -14
- package/lib/typescript/types/QuantitySample.d.ts +2 -8
- package/lib/typescript/types/QuantityType.d.ts +7 -8
- package/lib/typescript/types/QuantityTypeIdentifier.d.ts +23 -23
- package/lib/typescript/types/QueryOptions.d.ts +43 -28
- package/lib/typescript/types/Shared.d.ts +52 -7
- package/lib/typescript/types/StateOfMind.d.ts +7 -10
- package/lib/typescript/types/Subscriptions.d.ts +12 -3
- package/lib/typescript/types/WeatherCondition.d.ts +1 -1
- package/lib/typescript/types/Workouts.d.ts +28 -81
- package/lib/typescript/utils/subscribeToCategorySamples.d.ts +5 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +57 -0
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +592 -389
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +65 -30
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +8 -0
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +15 -0
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +32 -26
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +36 -37
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +55 -2
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +36 -30
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +35 -29
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +181 -0
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +48 -42
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +59 -36
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +150 -29
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +13 -28
- package/nitrogen/generated/ios/swift/AggregationStyle.swift +48 -0
- package/nitrogen/generated/ios/swift/CategorySample.swift +571 -24
- package/nitrogen/generated/ios/swift/ComparisonPredicateOperator.swift +2 -2
- package/nitrogen/generated/ios/swift/CorrelationSample.swift +640 -17
- package/nitrogen/generated/ios/swift/{PredicateWithStartAndEnd.swift → DateFilter.swift} +5 -5
- package/nitrogen/generated/ios/swift/ECGQueryOptionsWithAnchor.swift +11 -91
- package/nitrogen/generated/ios/swift/ECGQueryOptionsWithSortOrder.swift +11 -91
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +570 -72
- package/nitrogen/generated/ios/swift/FilterForSamples.swift +349 -12
- package/nitrogen/generated/ios/swift/FilterForSamplesBase.swift +234 -0
- package/nitrogen/generated/ios/swift/FilterForWorkouts.swift +366 -0
- package/nitrogen/generated/ios/swift/FilterForWorkoutsBase.swift +240 -0
- package/nitrogen/generated/ios/swift/Func_void_MedicationDoseEventsWithAnchorResponse.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_QueryCorrelationSamplesWithAnchorResponse.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_StateOfMindSamplesWithAnchorResponse.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_MedicationDoseEvent_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_UserAnnotatedMedication_.swift +47 -0
- package/nitrogen/generated/ios/swift/GeneralForm.swift +104 -0
- package/nitrogen/generated/ios/swift/HeartRateMotionContext.swift +44 -0
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +565 -37
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +19 -31
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +21 -2
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec.swift +60 -0
- package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec_cxx.swift +208 -0
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +9 -43
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +2 -1
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +21 -2
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +34 -6
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +376 -36
- package/nitrogen/generated/ios/swift/InsulinDeliveryReason.swift +40 -0
- package/nitrogen/generated/ios/swift/MedicationConcept.swift +80 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +781 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEventLogStatus.swift +56 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEventScheduleType.swift +40 -0
- package/nitrogen/generated/ios/swift/MedicationDoseEventsWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +16 -16
- package/nitrogen/generated/ios/swift/PredicateWithMetadataKey.swift +7 -7
- package/nitrogen/generated/ios/swift/QuantitySample.swift +574 -27
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +16 -16
- package/nitrogen/generated/ios/swift/QueryCorrelationSamplesWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchor.swift +11 -91
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchorAndUnit.swift +11 -91
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrder.swift +11 -91
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrderAndUnit.swift +11 -91
- package/nitrogen/generated/ios/swift/RelatedCoding.swift +76 -0
- package/nitrogen/generated/ios/swift/SampleType.swift +68 -0
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +16 -16
- package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +0 -16
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +586 -58
- package/nitrogen/generated/ios/swift/StateOfMindSamplesWithAnchorResponse.swift +81 -0
- package/nitrogen/generated/ios/swift/StatisticsQueryOptions.swift +7 -75
- package/nitrogen/generated/ios/swift/UserAnnotatedMedication.swift +87 -0
- package/nitrogen/generated/ios/swift/WeatherCondition.swift +144 -0
- package/nitrogen/generated/ios/swift/WorkoutQueryOptions.swift +11 -105
- package/nitrogen/generated/ios/swift/WorkoutQueryOptionsWithAnchor.swift +11 -105
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +751 -78
- package/nitrogen/generated/shared/c++/AggregationStyle.hpp +64 -0
- package/nitrogen/generated/shared/c++/CategorySample.hpp +126 -23
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +134 -12
- package/nitrogen/generated/shared/c++/{PredicateWithStartAndEnd.hpp → DateFilter.hpp} +10 -10
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithAnchor.hpp +12 -31
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithSortOrder.hpp +12 -31
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +135 -36
- package/nitrogen/generated/shared/c++/FilterForSamples.hpp +124 -0
- package/nitrogen/generated/shared/c++/FilterForSamplesBase.hpp +109 -0
- package/nitrogen/generated/shared/c++/FilterForWorkouts.hpp +131 -0
- package/nitrogen/generated/shared/c++/FilterForWorkoutsBase.hpp +116 -0
- package/nitrogen/generated/shared/c++/GeneralForm.hpp +140 -0
- package/nitrogen/generated/shared/c++/HeartRateMotionContext.hpp +67 -0
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +131 -28
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +10 -28
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.hpp +11 -1
- package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.hpp +1 -2
- package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +6 -25
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.hpp +9 -2
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +33 -5
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +56 -16
- package/nitrogen/generated/shared/c++/InsulinDeliveryReason.hpp +62 -0
- package/nitrogen/generated/shared/c++/MedicationConcept.hpp +93 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +240 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEventLogStatus.hpp +66 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEventScheduleType.hpp +62 -0
- package/nitrogen/generated/shared/c++/MedicationDoseEventsWithAnchorResponse.hpp +89 -0
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +105 -105
- package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +8 -8
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +130 -27
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +105 -105
- package/nitrogen/generated/shared/c++/QueryCorrelationSamplesWithAnchorResponse.hpp +89 -0
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +12 -31
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +12 -31
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +12 -31
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +12 -31
- package/nitrogen/generated/shared/c++/RelatedCoding.hpp +84 -0
- package/nitrogen/generated/shared/c++/SampleType.hpp +87 -0
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +105 -105
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +105 -121
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +139 -36
- package/nitrogen/generated/shared/c++/StateOfMindSamplesWithAnchorResponse.hpp +89 -0
- package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +8 -27
- package/nitrogen/generated/shared/c++/UserAnnotatedMedication.hpp +90 -0
- package/nitrogen/generated/shared/c++/WeatherCondition.hpp +88 -0
- package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +12 -37
- package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +12 -37
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +159 -35
- package/package.json +1 -1
- package/src/healthkit.ios.ts +30 -0
- package/src/healthkit.ts +68 -3
- package/src/hooks/useStatisticsForQuantity.ts +1 -1
- package/src/hooks/useSubscribeToCategorySamples.ts +31 -0
- package/src/modules.ts +4 -0
- package/src/specs/CategoryTypeModule.nitro.ts +2 -2
- package/src/specs/CoreModule.nitro.ts +3 -0
- package/src/specs/CorrelationTypeModule.nitro.ts +11 -3
- package/src/specs/ElectrocardiogramModule.nitro.ts +1 -1
- package/src/specs/HeartbeatSeriesModule.nitro.ts +1 -1
- package/src/specs/MedicationModule.nitro.ts +140 -0
- package/src/specs/QuantityTypeModule.nitro.ts +4 -7
- package/src/specs/StateOfMindModule.nitro.ts +10 -2
- package/src/types/CategoryType.ts +15 -22
- package/src/types/Constants.ts +3 -0
- package/src/types/CorrelationType.ts +10 -15
- package/src/types/ElectrocardiogramSample.ts +2 -14
- package/src/types/HeartbeatSeries.ts +2 -15
- package/src/types/QuantitySample.ts +2 -8
- package/src/types/QuantityType.ts +8 -17
- package/src/types/QuantityTypeIdentifier.ts +25 -25
- package/src/types/QueryOptions.ts +54 -43
- package/src/types/Shared.ts +74 -17
- package/src/types/StateOfMind.ts +8 -10
- package/src/types/Subscriptions.ts +19 -3
- package/src/types/WeatherCondition.ts +1 -1
- package/src/types/Workouts.ts +28 -91
- package/src/utils/getCategorySampleById.ts +1 -1
- package/src/utils/getQuantitySampleById.ts +1 -1
- package/src/utils/getWorkoutById.ts +1 -2
- package/src/utils/subscribeToCategorySamples.ts +38 -0
- package/src/utils/subscribeToQuantitySamples.ts +12 -37
- package/nitrogen/generated/ios/swift/FilterForSamplesAnd.swift +0 -94
- package/nitrogen/generated/ios/swift/FilterForSamplesOr.swift +0 -94
- package/nitrogen/generated/ios/swift/PredicateForSamples.swift +0 -21
- package/nitrogen/generated/ios/swift/PredicateForWorkouts.swift +0 -23
- package/nitrogen/generated/ios/swift/PredicateForWorkoutsAnd.swift +0 -108
- package/nitrogen/generated/ios/swift/PredicateForWorkoutsOr.swift +0 -108
- package/nitrogen/generated/ios/swift/PredicateFromWorkout.swift +0 -45
- package/nitrogen/generated/ios/swift/PredicateWithMetadataOperator.swift +0 -48
- package/nitrogen/generated/ios/swift/PredicateWithUUID.swift +0 -35
- package/nitrogen/generated/ios/swift/PredicateWithUUIDs.swift +0 -47
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr.swift +0 -23
- package/nitrogen/generated/ios/swift/Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_WorkoutActivityTypePredicate_WorkoutDurationPredicate_PredicateForWorkoutsOr_PredicateForWorkoutsAnd.swift +0 -25
- package/nitrogen/generated/ios/swift/WorkoutActivityTypePredicate.swift +0 -35
- package/nitrogen/generated/shared/c++/FilterForSamplesAnd.hpp +0 -90
- package/nitrogen/generated/shared/c++/FilterForSamplesOr.hpp +0 -90
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsAnd.hpp +0 -96
- package/nitrogen/generated/shared/c++/PredicateForWorkoutsOr.hpp +0 -96
- package/nitrogen/generated/shared/c++/PredicateFromWorkout.hpp +0 -77
- package/nitrogen/generated/shared/c++/PredicateWithMetadataOperator.hpp +0 -84
- package/nitrogen/generated/shared/c++/PredicateWithUUID.hpp +0 -75
- package/nitrogen/generated/shared/c++/PredicateWithUUIDs.hpp +0 -76
- package/nitrogen/generated/shared/c++/WorkoutActivityTypePredicate.hpp +0 -76
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// PredicateForSamples.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* An Swift enum with associated values representing a Variant/Union type.
|
|
12
|
-
* JS type: `struct | struct | struct | struct | struct`
|
|
13
|
-
*/
|
|
14
|
-
@frozen
|
|
15
|
-
public indirect enum PredicateForSamples {
|
|
16
|
-
case first(PredicateWithUUID)
|
|
17
|
-
case second(PredicateWithUUIDs)
|
|
18
|
-
case third(PredicateWithMetadataKey)
|
|
19
|
-
case fourth(PredicateWithStartAndEnd)
|
|
20
|
-
case fifth(PredicateFromWorkout)
|
|
21
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// PredicateForWorkouts.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* An Swift enum with associated values representing a Variant/Union type.
|
|
12
|
-
* JS type: `struct | struct | struct | struct | struct | struct | struct`
|
|
13
|
-
*/
|
|
14
|
-
@frozen
|
|
15
|
-
public indirect enum PredicateForWorkouts {
|
|
16
|
-
case first(PredicateWithUUID)
|
|
17
|
-
case second(PredicateWithUUIDs)
|
|
18
|
-
case third(PredicateWithMetadataKey)
|
|
19
|
-
case fourth(PredicateWithStartAndEnd)
|
|
20
|
-
case fifth(PredicateFromWorkout)
|
|
21
|
-
case sixth(WorkoutActivityTypePredicate)
|
|
22
|
-
case seventh(WorkoutDurationPredicate)
|
|
23
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// PredicateForWorkoutsAnd.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
import NitroModules
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Represents an instance of `PredicateForWorkoutsAnd`, backed by a C++ struct.
|
|
12
|
-
*/
|
|
13
|
-
public typealias PredicateForWorkoutsAnd = margelo.nitro.healthkit.PredicateForWorkoutsAnd
|
|
14
|
-
|
|
15
|
-
public extension PredicateForWorkoutsAnd {
|
|
16
|
-
private typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Create a new instance of `PredicateForWorkoutsAnd`.
|
|
20
|
-
*/
|
|
21
|
-
init(AND: [PredicateForWorkouts]) {
|
|
22
|
-
self.init({ () -> bridge.std__vector_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate__ in
|
|
23
|
-
var __vector = bridge.create_std__vector_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate__(AND.count)
|
|
24
|
-
for __item in AND {
|
|
25
|
-
__vector.push_back({ () -> bridge.std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_ in
|
|
26
|
-
switch __item {
|
|
27
|
-
case .first(let __value):
|
|
28
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
29
|
-
case .second(let __value):
|
|
30
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
31
|
-
case .third(let __value):
|
|
32
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
33
|
-
case .fourth(let __value):
|
|
34
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
35
|
-
case .fifth(let __value):
|
|
36
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
37
|
-
case .sixth(let __value):
|
|
38
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
39
|
-
case .seventh(let __value):
|
|
40
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
41
|
-
}
|
|
42
|
-
}().variant)
|
|
43
|
-
}
|
|
44
|
-
return __vector
|
|
45
|
-
}())
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
var AND: [PredicateForWorkouts] {
|
|
49
|
-
@inline(__always)
|
|
50
|
-
get {
|
|
51
|
-
return self.__AND.map({ __item in { () -> PredicateForWorkouts in
|
|
52
|
-
let __variant = bridge.std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__item)
|
|
53
|
-
switch __variant.index() {
|
|
54
|
-
case 0:
|
|
55
|
-
let __actual = __variant.get_0()
|
|
56
|
-
return .first(__actual)
|
|
57
|
-
case 1:
|
|
58
|
-
let __actual = __variant.get_1()
|
|
59
|
-
return .second(__actual)
|
|
60
|
-
case 2:
|
|
61
|
-
let __actual = __variant.get_2()
|
|
62
|
-
return .third(__actual)
|
|
63
|
-
case 3:
|
|
64
|
-
let __actual = __variant.get_3()
|
|
65
|
-
return .fourth(__actual)
|
|
66
|
-
case 4:
|
|
67
|
-
let __actual = __variant.get_4()
|
|
68
|
-
return .fifth(__actual)
|
|
69
|
-
case 5:
|
|
70
|
-
let __actual = __variant.get_5()
|
|
71
|
-
return .sixth(__actual)
|
|
72
|
-
case 6:
|
|
73
|
-
let __actual = __variant.get_6()
|
|
74
|
-
return .seventh(__actual)
|
|
75
|
-
default:
|
|
76
|
-
fatalError("Variant can never have index \(__variant.index())!")
|
|
77
|
-
}
|
|
78
|
-
}() })
|
|
79
|
-
}
|
|
80
|
-
@inline(__always)
|
|
81
|
-
set {
|
|
82
|
-
self.__AND = { () -> bridge.std__vector_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate__ in
|
|
83
|
-
var __vector = bridge.create_std__vector_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate__(newValue.count)
|
|
84
|
-
for __item in newValue {
|
|
85
|
-
__vector.push_back({ () -> bridge.std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_ in
|
|
86
|
-
switch __item {
|
|
87
|
-
case .first(let __value):
|
|
88
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
89
|
-
case .second(let __value):
|
|
90
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
91
|
-
case .third(let __value):
|
|
92
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
93
|
-
case .fourth(let __value):
|
|
94
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
95
|
-
case .fifth(let __value):
|
|
96
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
97
|
-
case .sixth(let __value):
|
|
98
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
99
|
-
case .seventh(let __value):
|
|
100
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
101
|
-
}
|
|
102
|
-
}().variant)
|
|
103
|
-
}
|
|
104
|
-
return __vector
|
|
105
|
-
}()
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// PredicateForWorkoutsOr.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
import NitroModules
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Represents an instance of `PredicateForWorkoutsOr`, backed by a C++ struct.
|
|
12
|
-
*/
|
|
13
|
-
public typealias PredicateForWorkoutsOr = margelo.nitro.healthkit.PredicateForWorkoutsOr
|
|
14
|
-
|
|
15
|
-
public extension PredicateForWorkoutsOr {
|
|
16
|
-
private typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Create a new instance of `PredicateForWorkoutsOr`.
|
|
20
|
-
*/
|
|
21
|
-
init(OR: [PredicateForWorkouts]) {
|
|
22
|
-
self.init({ () -> bridge.std__vector_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate__ in
|
|
23
|
-
var __vector = bridge.create_std__vector_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate__(OR.count)
|
|
24
|
-
for __item in OR {
|
|
25
|
-
__vector.push_back({ () -> bridge.std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_ in
|
|
26
|
-
switch __item {
|
|
27
|
-
case .first(let __value):
|
|
28
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
29
|
-
case .second(let __value):
|
|
30
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
31
|
-
case .third(let __value):
|
|
32
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
33
|
-
case .fourth(let __value):
|
|
34
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
35
|
-
case .fifth(let __value):
|
|
36
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
37
|
-
case .sixth(let __value):
|
|
38
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
39
|
-
case .seventh(let __value):
|
|
40
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
41
|
-
}
|
|
42
|
-
}().variant)
|
|
43
|
-
}
|
|
44
|
-
return __vector
|
|
45
|
-
}())
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
var OR: [PredicateForWorkouts] {
|
|
49
|
-
@inline(__always)
|
|
50
|
-
get {
|
|
51
|
-
return self.__OR.map({ __item in { () -> PredicateForWorkouts in
|
|
52
|
-
let __variant = bridge.std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__item)
|
|
53
|
-
switch __variant.index() {
|
|
54
|
-
case 0:
|
|
55
|
-
let __actual = __variant.get_0()
|
|
56
|
-
return .first(__actual)
|
|
57
|
-
case 1:
|
|
58
|
-
let __actual = __variant.get_1()
|
|
59
|
-
return .second(__actual)
|
|
60
|
-
case 2:
|
|
61
|
-
let __actual = __variant.get_2()
|
|
62
|
-
return .third(__actual)
|
|
63
|
-
case 3:
|
|
64
|
-
let __actual = __variant.get_3()
|
|
65
|
-
return .fourth(__actual)
|
|
66
|
-
case 4:
|
|
67
|
-
let __actual = __variant.get_4()
|
|
68
|
-
return .fifth(__actual)
|
|
69
|
-
case 5:
|
|
70
|
-
let __actual = __variant.get_5()
|
|
71
|
-
return .sixth(__actual)
|
|
72
|
-
case 6:
|
|
73
|
-
let __actual = __variant.get_6()
|
|
74
|
-
return .seventh(__actual)
|
|
75
|
-
default:
|
|
76
|
-
fatalError("Variant can never have index \(__variant.index())!")
|
|
77
|
-
}
|
|
78
|
-
}() })
|
|
79
|
-
}
|
|
80
|
-
@inline(__always)
|
|
81
|
-
set {
|
|
82
|
-
self.__OR = { () -> bridge.std__vector_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate__ in
|
|
83
|
-
var __vector = bridge.create_std__vector_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate__(newValue.count)
|
|
84
|
-
for __item in newValue {
|
|
85
|
-
__vector.push_back({ () -> bridge.std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_ in
|
|
86
|
-
switch __item {
|
|
87
|
-
case .first(let __value):
|
|
88
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
89
|
-
case .second(let __value):
|
|
90
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
91
|
-
case .third(let __value):
|
|
92
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
93
|
-
case .fourth(let __value):
|
|
94
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
95
|
-
case .fifth(let __value):
|
|
96
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
97
|
-
case .sixth(let __value):
|
|
98
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
99
|
-
case .seventh(let __value):
|
|
100
|
-
return bridge.create_std__variant_PredicateWithUUID__PredicateWithUUIDs__PredicateWithMetadataKey__PredicateWithStartAndEnd__PredicateFromWorkout__WorkoutActivityTypePredicate__WorkoutDurationPredicate_(__value)
|
|
101
|
-
}
|
|
102
|
-
}().variant)
|
|
103
|
-
}
|
|
104
|
-
return __vector
|
|
105
|
-
}()
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// PredicateFromWorkout.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
import NitroModules
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Represents an instance of `PredicateFromWorkout`, backed by a C++ struct.
|
|
12
|
-
*/
|
|
13
|
-
public typealias PredicateFromWorkout = margelo.nitro.healthkit.PredicateFromWorkout
|
|
14
|
-
|
|
15
|
-
public extension PredicateFromWorkout {
|
|
16
|
-
private typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Create a new instance of `PredicateFromWorkout`.
|
|
20
|
-
*/
|
|
21
|
-
init(workout: (any HybridWorkoutProxySpec)) {
|
|
22
|
-
self.init({ () -> bridge.std__shared_ptr_HybridWorkoutProxySpec_ in
|
|
23
|
-
let __cxxWrapped = workout.getCxxWrapper()
|
|
24
|
-
return __cxxWrapped.getCxxPart()
|
|
25
|
-
}())
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
var workout: (any HybridWorkoutProxySpec) {
|
|
29
|
-
@inline(__always)
|
|
30
|
-
get {
|
|
31
|
-
return { () -> HybridWorkoutProxySpec in
|
|
32
|
-
let __unsafePointer = bridge.get_std__shared_ptr_HybridWorkoutProxySpec_(self.__workout)
|
|
33
|
-
let __instance = HybridWorkoutProxySpec_cxx.fromUnsafe(__unsafePointer)
|
|
34
|
-
return __instance.getHybridWorkoutProxySpec()
|
|
35
|
-
}()
|
|
36
|
-
}
|
|
37
|
-
@inline(__always)
|
|
38
|
-
set {
|
|
39
|
-
self.__workout = { () -> bridge.std__shared_ptr_HybridWorkoutProxySpec_ in
|
|
40
|
-
let __cxxWrapped = newValue.getCxxWrapper()
|
|
41
|
-
return __cxxWrapped.getCxxPart()
|
|
42
|
-
}()
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// PredicateWithMetadataOperator.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Represents the JS union `PredicateWithMetadataOperator`, backed by a C++ enum.
|
|
10
|
-
*/
|
|
11
|
-
public typealias PredicateWithMetadataOperator = margelo.nitro.healthkit.PredicateWithMetadataOperator
|
|
12
|
-
|
|
13
|
-
public extension PredicateWithMetadataOperator {
|
|
14
|
-
/**
|
|
15
|
-
* Get a PredicateWithMetadataOperator for the given String value, or
|
|
16
|
-
* return `nil` if the given value was invalid/unknown.
|
|
17
|
-
*/
|
|
18
|
-
init?(fromString string: String) {
|
|
19
|
-
switch string {
|
|
20
|
-
case "equalTo":
|
|
21
|
-
self = .equalto
|
|
22
|
-
case "notEqualTo":
|
|
23
|
-
self = .notequalto
|
|
24
|
-
case "greaterThan":
|
|
25
|
-
self = .greaterthan
|
|
26
|
-
case "lessThan":
|
|
27
|
-
self = .lessthan
|
|
28
|
-
default:
|
|
29
|
-
return nil
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Get the String value this PredicateWithMetadataOperator represents.
|
|
35
|
-
*/
|
|
36
|
-
var stringValue: String {
|
|
37
|
-
switch self {
|
|
38
|
-
case .equalto:
|
|
39
|
-
return "equalTo"
|
|
40
|
-
case .notequalto:
|
|
41
|
-
return "notEqualTo"
|
|
42
|
-
case .greaterthan:
|
|
43
|
-
return "greaterThan"
|
|
44
|
-
case .lessthan:
|
|
45
|
-
return "lessThan"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// PredicateWithUUID.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
import NitroModules
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Represents an instance of `PredicateWithUUID`, backed by a C++ struct.
|
|
12
|
-
*/
|
|
13
|
-
public typealias PredicateWithUUID = margelo.nitro.healthkit.PredicateWithUUID
|
|
14
|
-
|
|
15
|
-
public extension PredicateWithUUID {
|
|
16
|
-
private typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Create a new instance of `PredicateWithUUID`.
|
|
20
|
-
*/
|
|
21
|
-
init(uuid: String) {
|
|
22
|
-
self.init(std.string(uuid))
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var uuid: String {
|
|
26
|
-
@inline(__always)
|
|
27
|
-
get {
|
|
28
|
-
return String(self.__uuid)
|
|
29
|
-
}
|
|
30
|
-
@inline(__always)
|
|
31
|
-
set {
|
|
32
|
-
self.__uuid = std.string(newValue)
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// PredicateWithUUIDs.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
import NitroModules
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Represents an instance of `PredicateWithUUIDs`, backed by a C++ struct.
|
|
12
|
-
*/
|
|
13
|
-
public typealias PredicateWithUUIDs = margelo.nitro.healthkit.PredicateWithUUIDs
|
|
14
|
-
|
|
15
|
-
public extension PredicateWithUUIDs {
|
|
16
|
-
private typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Create a new instance of `PredicateWithUUIDs`.
|
|
20
|
-
*/
|
|
21
|
-
init(uuids: [String]) {
|
|
22
|
-
self.init({ () -> bridge.std__vector_std__string_ in
|
|
23
|
-
var __vector = bridge.create_std__vector_std__string_(uuids.count)
|
|
24
|
-
for __item in uuids {
|
|
25
|
-
__vector.push_back(std.string(__item))
|
|
26
|
-
}
|
|
27
|
-
return __vector
|
|
28
|
-
}())
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
var uuids: [String] {
|
|
32
|
-
@inline(__always)
|
|
33
|
-
get {
|
|
34
|
-
return self.__uuids.map({ __item in String(__item) })
|
|
35
|
-
}
|
|
36
|
-
@inline(__always)
|
|
37
|
-
set {
|
|
38
|
-
self.__uuids = { () -> bridge.std__vector_std__string_ in
|
|
39
|
-
var __vector = bridge.create_std__vector_std__string_(newValue.count)
|
|
40
|
-
for __item in newValue {
|
|
41
|
-
__vector.push_back(std.string(__item))
|
|
42
|
-
}
|
|
43
|
-
return __vector
|
|
44
|
-
}()
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* An Swift enum with associated values representing a Variant/Union type.
|
|
12
|
-
* JS type: `struct | struct | struct | struct | struct | struct | struct`
|
|
13
|
-
*/
|
|
14
|
-
@frozen
|
|
15
|
-
public indirect enum Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_FilterForSamplesAnd_FilterForSamplesOr {
|
|
16
|
-
case first(PredicateWithUUID)
|
|
17
|
-
case second(PredicateWithUUIDs)
|
|
18
|
-
case third(PredicateWithMetadataKey)
|
|
19
|
-
case fourth(PredicateWithStartAndEnd)
|
|
20
|
-
case fifth(PredicateFromWorkout)
|
|
21
|
-
case sixth(FilterForSamplesAnd)
|
|
22
|
-
case seventh(FilterForSamplesOr)
|
|
23
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_WorkoutActivityTypePredicate_WorkoutDurationPredicate_PredicateForWorkoutsOr_PredicateForWorkoutsAnd.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* An Swift enum with associated values representing a Variant/Union type.
|
|
12
|
-
* JS type: `struct | struct | struct | struct | struct | struct | struct | struct | struct`
|
|
13
|
-
*/
|
|
14
|
-
@frozen
|
|
15
|
-
public indirect enum Variant_PredicateWithUUID_PredicateWithUUIDs_PredicateWithMetadataKey_PredicateWithStartAndEnd_PredicateFromWorkout_WorkoutActivityTypePredicate_WorkoutDurationPredicate_PredicateForWorkoutsOr_PredicateForWorkoutsAnd {
|
|
16
|
-
case first(PredicateWithUUID)
|
|
17
|
-
case second(PredicateWithUUIDs)
|
|
18
|
-
case third(PredicateWithMetadataKey)
|
|
19
|
-
case fourth(PredicateWithStartAndEnd)
|
|
20
|
-
case fifth(PredicateFromWorkout)
|
|
21
|
-
case sixth(WorkoutActivityTypePredicate)
|
|
22
|
-
case seventh(WorkoutDurationPredicate)
|
|
23
|
-
case eigth(PredicateForWorkoutsOr)
|
|
24
|
-
case ninth(PredicateForWorkoutsAnd)
|
|
25
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// WorkoutActivityTypePredicate.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
import NitroModules
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Represents an instance of `WorkoutActivityTypePredicate`, backed by a C++ struct.
|
|
12
|
-
*/
|
|
13
|
-
public typealias WorkoutActivityTypePredicate = margelo.nitro.healthkit.WorkoutActivityTypePredicate
|
|
14
|
-
|
|
15
|
-
public extension WorkoutActivityTypePredicate {
|
|
16
|
-
private typealias bridge = margelo.nitro.healthkit.bridge.swift
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Create a new instance of `WorkoutActivityTypePredicate`.
|
|
20
|
-
*/
|
|
21
|
-
init(workoutActivityType: WorkoutActivityType) {
|
|
22
|
-
self.init(workoutActivityType)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var workoutActivityType: WorkoutActivityType {
|
|
26
|
-
@inline(__always)
|
|
27
|
-
get {
|
|
28
|
-
return self.__workoutActivityType
|
|
29
|
-
}
|
|
30
|
-
@inline(__always)
|
|
31
|
-
set {
|
|
32
|
-
self.__workoutActivityType = newValue
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// FilterForSamplesAnd.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
-
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
-
#else
|
|
13
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
-
#endif
|
|
15
|
-
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
-
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
-
#else
|
|
18
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
-
#endif
|
|
20
|
-
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
-
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
-
#else
|
|
23
|
-
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
-
#endif
|
|
25
|
-
|
|
26
|
-
// Forward declaration of `PredicateWithUUID` to properly resolve imports.
|
|
27
|
-
namespace margelo::nitro::healthkit { struct PredicateWithUUID; }
|
|
28
|
-
// Forward declaration of `PredicateWithUUIDs` to properly resolve imports.
|
|
29
|
-
namespace margelo::nitro::healthkit { struct PredicateWithUUIDs; }
|
|
30
|
-
// Forward declaration of `PredicateWithMetadataKey` to properly resolve imports.
|
|
31
|
-
namespace margelo::nitro::healthkit { struct PredicateWithMetadataKey; }
|
|
32
|
-
// Forward declaration of `PredicateWithStartAndEnd` to properly resolve imports.
|
|
33
|
-
namespace margelo::nitro::healthkit { struct PredicateWithStartAndEnd; }
|
|
34
|
-
// Forward declaration of `PredicateFromWorkout` to properly resolve imports.
|
|
35
|
-
namespace margelo::nitro::healthkit { struct PredicateFromWorkout; }
|
|
36
|
-
|
|
37
|
-
#include "PredicateWithUUID.hpp"
|
|
38
|
-
#include "PredicateWithUUIDs.hpp"
|
|
39
|
-
#include "PredicateWithMetadataKey.hpp"
|
|
40
|
-
#include "PredicateWithStartAndEnd.hpp"
|
|
41
|
-
#include "PredicateFromWorkout.hpp"
|
|
42
|
-
#include <variant>
|
|
43
|
-
#include <vector>
|
|
44
|
-
|
|
45
|
-
namespace margelo::nitro::healthkit {
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* A struct which can be represented as a JavaScript object (FilterForSamplesAnd).
|
|
49
|
-
*/
|
|
50
|
-
struct FilterForSamplesAnd {
|
|
51
|
-
public:
|
|
52
|
-
std::vector<std::variant<PredicateWithUUID, PredicateWithUUIDs, PredicateWithMetadataKey, PredicateWithStartAndEnd, PredicateFromWorkout>> AND SWIFT_PRIVATE;
|
|
53
|
-
|
|
54
|
-
public:
|
|
55
|
-
FilterForSamplesAnd() = default;
|
|
56
|
-
explicit FilterForSamplesAnd(std::vector<std::variant<PredicateWithUUID, PredicateWithUUIDs, PredicateWithMetadataKey, PredicateWithStartAndEnd, PredicateFromWorkout>> AND): AND(AND) {}
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
} // namespace margelo::nitro::healthkit
|
|
60
|
-
|
|
61
|
-
namespace margelo::nitro {
|
|
62
|
-
|
|
63
|
-
// C++ FilterForSamplesAnd <> JS FilterForSamplesAnd (object)
|
|
64
|
-
template <>
|
|
65
|
-
struct JSIConverter<margelo::nitro::healthkit::FilterForSamplesAnd> final {
|
|
66
|
-
static inline margelo::nitro::healthkit::FilterForSamplesAnd fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
67
|
-
jsi::Object obj = arg.asObject(runtime);
|
|
68
|
-
return margelo::nitro::healthkit::FilterForSamplesAnd(
|
|
69
|
-
JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::PredicateWithUUID, margelo::nitro::healthkit::PredicateWithUUIDs, margelo::nitro::healthkit::PredicateWithMetadataKey, margelo::nitro::healthkit::PredicateWithStartAndEnd, margelo::nitro::healthkit::PredicateFromWorkout>>>::fromJSI(runtime, obj.getProperty(runtime, "AND"))
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::FilterForSamplesAnd& arg) {
|
|
73
|
-
jsi::Object obj(runtime);
|
|
74
|
-
obj.setProperty(runtime, "AND", JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::PredicateWithUUID, margelo::nitro::healthkit::PredicateWithUUIDs, margelo::nitro::healthkit::PredicateWithMetadataKey, margelo::nitro::healthkit::PredicateWithStartAndEnd, margelo::nitro::healthkit::PredicateFromWorkout>>>::toJSI(runtime, arg.AND));
|
|
75
|
-
return obj;
|
|
76
|
-
}
|
|
77
|
-
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
78
|
-
if (!value.isObject()) {
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
jsi::Object obj = value.getObject(runtime);
|
|
82
|
-
if (!nitro::isPlainObject(runtime, obj)) {
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
if (!JSIConverter<std::vector<std::variant<margelo::nitro::healthkit::PredicateWithUUID, margelo::nitro::healthkit::PredicateWithUUIDs, margelo::nitro::healthkit::PredicateWithMetadataKey, margelo::nitro::healthkit::PredicateWithStartAndEnd, margelo::nitro::healthkit::PredicateFromWorkout>>>::canConvert(runtime, obj.getProperty(runtime, "AND"))) return false;
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
} // namespace margelo::nitro
|