@kingstinct/react-native-healthkit 13.2.0 → 13.2.2
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/Constants.swift +1 -1
- package/ios/QuantityTypeModule.swift +97 -64
- package/ios/WorkoutProxy.swift +4 -0
- package/lib/typescript/healthkit.d.ts +2 -2
- package/lib/typescript/healthkit.ios.d.ts +4 -4
- package/lib/typescript/specs/CoreModule.nitro.d.ts +1 -1
- package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +2 -2
- package/lib/typescript/types/QuantityType.d.ts +1 -1
- package/lib/typescript/types/QueryOptions.d.ts +5 -4
- package/lib/typescript/types/Workouts.d.ts +3 -3
- package/nitrogen/generated/ios/ReactNativeHealthkit+autolinking.rb +2 -2
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +1 -1
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +68 -68
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +4 -1
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.mm +1 -1
- package/nitrogen/generated/ios/ReactNativeHealthkitAutolinking.swift +45 -71
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +11 -2
- package/nitrogen/generated/ios/c++/HybridSourceProxySpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridSourceProxySpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/swift/AggregationStyle.swift +1 -1
- package/nitrogen/generated/ios/swift/AuthDataTypes.swift +19 -56
- package/nitrogen/generated/ios/swift/AuthorizationRequestStatus.swift +1 -1
- package/nitrogen/generated/ios/swift/AuthorizationStatus.swift +1 -1
- package/nitrogen/generated/ios/swift/BiologicalSex.swift +1 -1
- package/nitrogen/generated/ios/swift/BloodType.swift +1 -1
- package/nitrogen/generated/ios/swift/CategorySample.swift +166 -445
- package/nitrogen/generated/ios/swift/CategorySampleForSaving.swift +13 -56
- package/nitrogen/generated/ios/swift/CategorySamplesWithAnchorResponse.swift +7 -38
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +1 -1
- package/nitrogen/generated/ios/swift/ComparisonPredicateOperator.swift +1 -1
- package/nitrogen/generated/ios/swift/CorrelationObject.swift +1 -1
- package/nitrogen/generated/ios/swift/CorrelationSample.swift +187 -491
- package/nitrogen/generated/ios/swift/CorrelationTypeIdentifier.swift +1 -1
- package/nitrogen/generated/ios/swift/DateFilter.swift +37 -86
- package/nitrogen/generated/ios/swift/DeletedSample.swift +12 -31
- package/nitrogen/generated/ios/swift/Device.swift +73 -170
- package/nitrogen/generated/ios/swift/ECGQueryOptionsWithAnchor.swift +16 -53
- package/nitrogen/generated/ios/swift/ECGQueryOptionsWithSortOrder.swift +23 -66
- package/nitrogen/generated/ios/swift/ElectrocardiogramClassification.swift +1 -1
- package/nitrogen/generated/ios/swift/ElectrocardiogramLead.swift +1 -1
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +195 -508
- package/nitrogen/generated/ios/swift/ElectrocardiogramSamplesWithAnchorResponse.swift +7 -38
- package/nitrogen/generated/ios/swift/ElectrocardiogramSymptomsStatus.swift +1 -1
- package/nitrogen/generated/ios/swift/ElectrocardiogramVoltage.swift +7 -26
- package/nitrogen/generated/ios/swift/FilterForSamples.swift +96 -241
- package/nitrogen/generated/ios/swift/FilterForSamplesBase.swift +49 -140
- package/nitrogen/generated/ios/swift/FilterForWorkouts.swift +67 -221
- package/nitrogen/generated/ios/swift/FilterForWorkoutsBase.swift +40 -140
- package/nitrogen/generated/ios/swift/FitzpatrickSkinType.swift +1 -1
- package/nitrogen/generated/ios/swift/Func_void.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_AuthorizationRequestStatus.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_BiologicalSex.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_BloodType.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_CategorySamplesWithAnchorResponse.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_ElectrocardiogramSamplesWithAnchorResponse.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_FitzpatrickSkinType.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_HeartbeatSeriesSamplesWithAnchorResponse.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_MedicationDoseEventsWithAnchorResponse.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_OnChangeCallbackArgs.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_QuantitySamplesWithAnchorResponse.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_QueryCorrelationSamplesWithAnchorResponse.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_QueryStatisticsResponse.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_QueryWorkoutSamplesWithAnchorResponse.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_StateOfMindSamplesWithAnchorResponse.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_WheelchairUse.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_double.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__optional_CategorySample_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__optional_CorrelationSample_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__optional_QuantitySample_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__optional_QueryStatisticsResponse_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__optional_StateOfMindSample_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__optional_WorkoutPlan_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__chrono__system_clock__time_point_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_HybridWorkoutProxySpec_.swift +2 -3
- package/nitrogen/generated/ios/swift/Func_void_std__unordered_map_std__string__QueryStatisticsResponse_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__unordered_map_std__string__bool_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_CategorySample_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_CorrelationSample_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_ElectrocardiogramSample_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_HeartbeatSeriesSample_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_IdentifierWithUnit_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_MedicationDoseEvent_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_QuantitySample_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_QueryStatisticsResponseFromSingleSource_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_QueryStatisticsResponse_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_StateOfMindSample_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_UserAnnotatedMedication_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_WorkoutRoute_.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_HybridSourceProxySpec__.swift +2 -3
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_HybridWorkoutProxySpec__.swift +2 -3
- package/nitrogen/generated/ios/swift/GeneralForm.swift +1 -1
- package/nitrogen/generated/ios/swift/HeartRateMotionContext.swift +1 -1
- package/nitrogen/generated/ios/swift/Heartbeat.swift +5 -18
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +164 -443
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSamplesWithAnchorResponse.swift +7 -38
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridElectrocardiogramModuleSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridHeartbeatSeriesModuleSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridMedicationModuleSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +4 -5
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +10 -3
- package/nitrogen/generated/ios/swift/HybridSourceProxySpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridSourceProxySpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridWorkoutsModuleSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/IdentifierWithUnit.swift +5 -18
- package/nitrogen/generated/ios/swift/InsulinDeliveryReason.swift +1 -1
- package/nitrogen/generated/ios/swift/IntervalComponents.swift +46 -72
- package/nitrogen/generated/ios/swift/LocationForSaving.swift +17 -66
- package/nitrogen/generated/ios/swift/MedicationConcept.swift +9 -40
- package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +206 -531
- package/nitrogen/generated/ios/swift/MedicationDoseEventLogStatus.swift +1 -1
- package/nitrogen/generated/ios/swift/MedicationDoseEventScheduleType.swift +1 -1
- package/nitrogen/generated/ios/swift/MedicationDoseEventsWithAnchorResponse.swift +7 -38
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +1 -1
- package/nitrogen/generated/ios/swift/OnChangeCallbackArgs.swift +12 -31
- package/nitrogen/generated/ios/swift/PerObjectTypeIdentifier.swift +1 -1
- package/nitrogen/generated/ios/swift/PredicateWithMetadataKey.swift +32 -74
- package/nitrogen/generated/ios/swift/Quantity.swift +5 -18
- package/nitrogen/generated/ios/swift/QuantityDateInterval.swift +5 -18
- package/nitrogen/generated/ios/swift/QuantitySample.swift +168 -453
- package/nitrogen/generated/ios/swift/QuantitySampleForSaving.swift +22 -77
- package/nitrogen/generated/ios/swift/QuantitySamplesWithAnchorResponse.swift +7 -38
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +1 -1
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifierWriteable.swift +496 -0
- package/nitrogen/generated/ios/swift/QueryCorrelationSamplesWithAnchorResponse.swift +7 -38
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchor.swift +14 -45
- package/nitrogen/generated/ios/swift/QueryOptionsWithAnchorAndUnit.swift +23 -66
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrder.swift +14 -45
- package/nitrogen/generated/ios/swift/QueryOptionsWithSortOrderAndUnit.swift +23 -66
- package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +39 -163
- package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +39 -157
- package/nitrogen/generated/ios/swift/QueryWorkoutSamplesWithAnchorResponse.swift +11 -45
- package/nitrogen/generated/ios/swift/RelatedCoding.swift +14 -39
- package/nitrogen/generated/ios/swift/SampleForSaving.swift +1 -1
- package/nitrogen/generated/ios/swift/SampleType.swift +9 -34
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +1 -1
- package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +1 -1
- package/nitrogen/generated/ios/swift/Source.swift +5 -18
- package/nitrogen/generated/ios/swift/SourceRevision.swift +27 -67
- package/nitrogen/generated/ios/swift/StateOfMindAssociation.swift +1 -1
- package/nitrogen/generated/ios/swift/StateOfMindKind.swift +1 -1
- package/nitrogen/generated/ios/swift/StateOfMindLabel.swift +1 -1
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +172 -481
- package/nitrogen/generated/ios/swift/StateOfMindSamplesWithAnchorResponse.swift +7 -38
- package/nitrogen/generated/ios/swift/StateOfMindValenceClassification.swift +1 -1
- package/nitrogen/generated/ios/swift/StatisticsOptions.swift +1 -1
- package/nitrogen/generated/ios/swift/StatisticsQueryOptions.swift +12 -37
- package/nitrogen/generated/ios/swift/UpdateFrequency.swift +1 -1
- package/nitrogen/generated/ios/swift/UserAnnotatedMedication.swift +16 -47
- package/nitrogen/generated/ios/swift/Variant_Bool_String_Double_Date.swift +1 -1
- package/nitrogen/generated/ios/swift/WeatherCondition.swift +1 -1
- package/nitrogen/generated/ios/swift/WheelchairUse.swift +1 -1
- package/nitrogen/generated/ios/swift/WorkoutActivity.swift +9 -34
- package/nitrogen/generated/ios/swift/WorkoutActivityType.swift +1 -1
- package/nitrogen/generated/ios/swift/WorkoutConfiguration.swift +5 -24
- package/nitrogen/generated/ios/swift/WorkoutDurationPredicate.swift +5 -18
- package/nitrogen/generated/ios/swift/WorkoutEvent.swift +7 -26
- package/nitrogen/generated/ios/swift/WorkoutEventType.swift +1 -1
- package/nitrogen/generated/ios/swift/WorkoutPlan.swift +5 -18
- package/nitrogen/generated/ios/swift/WorkoutQueryOptions.swift +14 -45
- package/nitrogen/generated/ios/swift/WorkoutQueryOptionsWithAnchor.swift +14 -45
- package/nitrogen/generated/ios/swift/WorkoutRoute.swift +21 -51
- package/nitrogen/generated/ios/swift/WorkoutRouteLocation.swift +28 -88
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +211 -646
- package/nitrogen/generated/ios/swift/WorkoutSessionLocationType.swift +1 -1
- package/nitrogen/generated/ios/swift/WorkoutTotals.swift +19 -30
- package/nitrogen/generated/shared/c++/AggregationStyle.hpp +1 -1
- package/nitrogen/generated/shared/c++/AuthDataTypes.hpp +16 -8
- package/nitrogen/generated/shared/c++/AuthorizationRequestStatus.hpp +1 -1
- package/nitrogen/generated/shared/c++/AuthorizationStatus.hpp +1 -1
- package/nitrogen/generated/shared/c++/BiologicalSex.hpp +1 -1
- package/nitrogen/generated/shared/c++/BloodType.hpp +1 -1
- package/nitrogen/generated/shared/c++/CategorySample.hpp +100 -92
- package/nitrogen/generated/shared/c++/CategorySampleForSaving.hpp +28 -20
- package/nitrogen/generated/shared/c++/CategorySamplesWithAnchorResponse.hpp +19 -11
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +1 -1
- package/nitrogen/generated/shared/c++/ComparisonPredicateOperator.hpp +1 -1
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +103 -95
- package/nitrogen/generated/shared/c++/CorrelationTypeIdentifier.hpp +1 -1
- package/nitrogen/generated/shared/c++/DateFilter.hpp +22 -14
- package/nitrogen/generated/shared/c++/DeletedSample.hpp +16 -8
- package/nitrogen/generated/shared/c++/Device.hpp +34 -26
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithAnchor.hpp +22 -14
- package/nitrogen/generated/shared/c++/ECGQueryOptionsWithSortOrder.hpp +22 -14
- package/nitrogen/generated/shared/c++/ElectrocardiogramClassification.hpp +1 -1
- package/nitrogen/generated/shared/c++/ElectrocardiogramLead.hpp +1 -1
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +112 -104
- package/nitrogen/generated/shared/c++/ElectrocardiogramSamplesWithAnchorResponse.hpp +19 -11
- package/nitrogen/generated/shared/c++/ElectrocardiogramSymptomsStatus.hpp +1 -1
- package/nitrogen/generated/shared/c++/ElectrocardiogramVoltage.hpp +19 -11
- package/nitrogen/generated/shared/c++/FilterForSamples.hpp +44 -36
- package/nitrogen/generated/shared/c++/FilterForSamplesBase.hpp +28 -20
- package/nitrogen/generated/shared/c++/FilterForWorkouts.hpp +40 -32
- package/nitrogen/generated/shared/c++/FilterForWorkoutsBase.hpp +31 -23
- package/nitrogen/generated/shared/c++/FitzpatrickSkinType.hpp +1 -1
- package/nitrogen/generated/shared/c++/GeneralForm.hpp +1 -1
- package/nitrogen/generated/shared/c++/HeartRateMotionContext.hpp +1 -1
- package/nitrogen/generated/shared/c++/Heartbeat.hpp +16 -8
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +97 -89
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSamplesWithAnchorResponse.hpp +19 -11
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridCharacteristicTypeModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridCharacteristicTypeModuleSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridElectrocardiogramModuleSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridHeartbeatSeriesModuleSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridMedicationModuleSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +5 -2
- package/nitrogen/generated/shared/c++/HybridSourceProxySpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridSourceProxySpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridWorkoutsModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridWorkoutsModuleSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/IdentifierWithUnit.hpp +16 -8
- package/nitrogen/generated/shared/c++/InsulinDeliveryReason.hpp +1 -1
- package/nitrogen/generated/shared/c++/IntervalComponents.hpp +25 -17
- package/nitrogen/generated/shared/c++/LocationForSaving.hpp +34 -26
- package/nitrogen/generated/shared/c++/MedicationConcept.hpp +22 -14
- package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +118 -110
- package/nitrogen/generated/shared/c++/MedicationDoseEventLogStatus.hpp +1 -1
- package/nitrogen/generated/shared/c++/MedicationDoseEventScheduleType.hpp +1 -1
- package/nitrogen/generated/shared/c++/MedicationDoseEventsWithAnchorResponse.hpp +19 -11
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +1 -1
- package/nitrogen/generated/shared/c++/OnChangeCallbackArgs.hpp +16 -8
- package/nitrogen/generated/shared/c++/PerObjectTypeIdentifier.hpp +1 -1
- package/nitrogen/generated/shared/c++/PredicateWithMetadataKey.hpp +19 -11
- package/nitrogen/generated/shared/c++/Quantity.hpp +16 -8
- package/nitrogen/generated/shared/c++/QuantityDateInterval.hpp +16 -8
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +103 -95
- package/nitrogen/generated/shared/c++/QuantitySampleForSaving.hpp +31 -23
- package/nitrogen/generated/shared/c++/QuantitySamplesWithAnchorResponse.hpp +19 -11
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +1 -1
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifierWriteable.hpp +532 -0
- package/nitrogen/generated/shared/c++/QueryCorrelationSamplesWithAnchorResponse.hpp +19 -11
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchor.hpp +19 -11
- package/nitrogen/generated/shared/c++/QueryOptionsWithAnchorAndUnit.hpp +22 -14
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrder.hpp +19 -11
- package/nitrogen/generated/shared/c++/QueryOptionsWithSortOrderAndUnit.hpp +22 -14
- package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +40 -32
- package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +40 -32
- package/nitrogen/generated/shared/c++/QueryWorkoutSamplesWithAnchorResponse.hpp +19 -11
- package/nitrogen/generated/shared/c++/RelatedCoding.hpp +19 -11
- package/nitrogen/generated/shared/c++/SampleType.hpp +22 -14
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +1 -1
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +1 -1
- package/nitrogen/generated/shared/c++/Source.hpp +16 -8
- package/nitrogen/generated/shared/c++/SourceRevision.hpp +22 -14
- package/nitrogen/generated/shared/c++/StateOfMindAssociation.hpp +1 -1
- package/nitrogen/generated/shared/c++/StateOfMindKind.hpp +1 -1
- package/nitrogen/generated/shared/c++/StateOfMindLabel.hpp +1 -1
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +109 -101
- package/nitrogen/generated/shared/c++/StateOfMindSamplesWithAnchorResponse.hpp +19 -11
- package/nitrogen/generated/shared/c++/StateOfMindValenceClassification.hpp +1 -1
- package/nitrogen/generated/shared/c++/StatisticsOptions.hpp +1 -1
- package/nitrogen/generated/shared/c++/StatisticsQueryOptions.hpp +16 -8
- package/nitrogen/generated/shared/c++/UpdateFrequency.hpp +1 -1
- package/nitrogen/generated/shared/c++/UserAnnotatedMedication.hpp +22 -14
- package/nitrogen/generated/shared/c++/WeatherCondition.hpp +1 -1
- package/nitrogen/generated/shared/c++/WheelchairUse.hpp +1 -1
- package/nitrogen/generated/shared/c++/WorkoutActivity.hpp +22 -14
- package/nitrogen/generated/shared/c++/WorkoutActivityType.hpp +1 -1
- package/nitrogen/generated/shared/c++/WorkoutConfiguration.hpp +16 -8
- package/nitrogen/generated/shared/c++/WorkoutDurationPredicate.hpp +16 -8
- package/nitrogen/generated/shared/c++/WorkoutEvent.hpp +19 -11
- package/nitrogen/generated/shared/c++/WorkoutEventType.hpp +1 -1
- package/nitrogen/generated/shared/c++/WorkoutPlan.hpp +16 -8
- package/nitrogen/generated/shared/c++/WorkoutQueryOptions.hpp +19 -11
- package/nitrogen/generated/shared/c++/WorkoutQueryOptionsWithAnchor.hpp +19 -11
- package/nitrogen/generated/shared/c++/WorkoutRoute.hpp +19 -11
- package/nitrogen/generated/shared/c++/WorkoutRouteLocation.hpp +40 -32
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +136 -128
- package/nitrogen/generated/shared/c++/WorkoutSessionLocationType.hpp +1 -1
- package/nitrogen/generated/shared/c++/WorkoutTotals.hpp +16 -8
- package/package.json +4 -4
- package/src/specs/CoreModule.nitro.ts +1 -1
- package/src/specs/QuantityTypeModule.nitro.ts +5 -2
- package/src/types/QuantityType.ts +1 -1
- package/src/types/QueryOptions.ts +5 -4
- package/src/types/Workouts.ts +3 -3
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// WorkoutTotals.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -35,37 +34,27 @@ public extension WorkoutTotals {
|
|
|
35
34
|
}())
|
|
36
35
|
}
|
|
37
36
|
|
|
37
|
+
@inline(__always)
|
|
38
38
|
var distance: Double? {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
48
|
-
} else {
|
|
49
|
-
return .init()
|
|
50
|
-
}
|
|
51
|
-
}()
|
|
52
|
-
}
|
|
39
|
+
return { () -> Double? in
|
|
40
|
+
if bridge.has_value_std__optional_double_(self.__distance) {
|
|
41
|
+
let __unwrapped = bridge.get_std__optional_double_(self.__distance)
|
|
42
|
+
return __unwrapped
|
|
43
|
+
} else {
|
|
44
|
+
return nil
|
|
45
|
+
}
|
|
46
|
+
}()
|
|
53
47
|
}
|
|
54
48
|
|
|
49
|
+
@inline(__always)
|
|
55
50
|
var energyBurned: Double? {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
65
|
-
} else {
|
|
66
|
-
return .init()
|
|
67
|
-
}
|
|
68
|
-
}()
|
|
69
|
-
}
|
|
51
|
+
return { () -> Double? in
|
|
52
|
+
if bridge.has_value_std__optional_double_(self.__energyBurned) {
|
|
53
|
+
let __unwrapped = bridge.get_std__optional_double_(self.__energyBurned)
|
|
54
|
+
return __unwrapped
|
|
55
|
+
} else {
|
|
56
|
+
return nil
|
|
57
|
+
}
|
|
58
|
+
}()
|
|
70
59
|
}
|
|
71
60
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// AuthDataTypes.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
// Forward declaration of `SampleTypeIdentifierWriteable` to properly resolve imports.
|
|
27
32
|
namespace margelo::nitro::healthkit { enum class SampleTypeIdentifierWriteable; }
|
|
@@ -38,7 +43,7 @@ namespace margelo::nitro::healthkit {
|
|
|
38
43
|
/**
|
|
39
44
|
* A struct which can be represented as a JavaScript object (AuthDataTypes).
|
|
40
45
|
*/
|
|
41
|
-
struct AuthDataTypes {
|
|
46
|
+
struct AuthDataTypes final {
|
|
42
47
|
public:
|
|
43
48
|
std::optional<std::vector<SampleTypeIdentifierWriteable>> toShare SWIFT_PRIVATE;
|
|
44
49
|
std::optional<std::vector<ObjectTypeIdentifier>> toRead SWIFT_PRIVATE;
|
|
@@ -46,6 +51,9 @@ namespace margelo::nitro::healthkit {
|
|
|
46
51
|
public:
|
|
47
52
|
AuthDataTypes() = default;
|
|
48
53
|
explicit AuthDataTypes(std::optional<std::vector<SampleTypeIdentifierWriteable>> toShare, std::optional<std::vector<ObjectTypeIdentifier>> toRead): toShare(toShare), toRead(toRead) {}
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
friend bool operator==(const AuthDataTypes& lhs, const AuthDataTypes& rhs) = default;
|
|
49
57
|
};
|
|
50
58
|
|
|
51
59
|
} // namespace margelo::nitro::healthkit
|
|
@@ -58,14 +66,14 @@ namespace margelo::nitro {
|
|
|
58
66
|
static inline margelo::nitro::healthkit::AuthDataTypes fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
59
67
|
jsi::Object obj = arg.asObject(runtime);
|
|
60
68
|
return margelo::nitro::healthkit::AuthDataTypes(
|
|
61
|
-
JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::SampleTypeIdentifierWriteable>>>::fromJSI(runtime, obj.getProperty(runtime, "toShare")),
|
|
62
|
-
JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::ObjectTypeIdentifier>>>::fromJSI(runtime, obj.getProperty(runtime, "toRead"))
|
|
69
|
+
JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::SampleTypeIdentifierWriteable>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "toShare"))),
|
|
70
|
+
JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::ObjectTypeIdentifier>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "toRead")))
|
|
63
71
|
);
|
|
64
72
|
}
|
|
65
73
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::AuthDataTypes& arg) {
|
|
66
74
|
jsi::Object obj(runtime);
|
|
67
|
-
obj.setProperty(runtime, "toShare", JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::SampleTypeIdentifierWriteable>>>::toJSI(runtime, arg.toShare));
|
|
68
|
-
obj.setProperty(runtime, "toRead", JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::ObjectTypeIdentifier>>>::toJSI(runtime, arg.toRead));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "toShare"), JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::SampleTypeIdentifierWriteable>>>::toJSI(runtime, arg.toShare));
|
|
76
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "toRead"), JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::ObjectTypeIdentifier>>>::toJSI(runtime, arg.toRead));
|
|
69
77
|
return obj;
|
|
70
78
|
}
|
|
71
79
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -76,8 +84,8 @@ namespace margelo::nitro {
|
|
|
76
84
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
77
85
|
return false;
|
|
78
86
|
}
|
|
79
|
-
if (!JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::SampleTypeIdentifierWriteable>>>::canConvert(runtime, obj.getProperty(runtime, "toShare"))) return false;
|
|
80
|
-
if (!JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::ObjectTypeIdentifier>>>::canConvert(runtime, obj.getProperty(runtime, "toRead"))) return false;
|
|
87
|
+
if (!JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::SampleTypeIdentifierWriteable>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "toShare")))) return false;
|
|
88
|
+
if (!JSIConverter<std::optional<std::vector<margelo::nitro::healthkit::ObjectTypeIdentifier>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "toRead")))) return false;
|
|
81
89
|
return true;
|
|
82
90
|
}
|
|
83
91
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// CategorySample.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
// Forward declaration of `CategoryTypeIdentifier` to properly resolve imports.
|
|
27
32
|
namespace margelo::nitro::healthkit { enum class CategoryTypeIdentifier; }
|
|
@@ -58,7 +63,7 @@ namespace margelo::nitro::healthkit {
|
|
|
58
63
|
/**
|
|
59
64
|
* A struct which can be represented as a JavaScript object (CategorySample).
|
|
60
65
|
*/
|
|
61
|
-
struct CategorySample {
|
|
66
|
+
struct CategorySample final {
|
|
62
67
|
public:
|
|
63
68
|
CategoryTypeIdentifier categoryType SWIFT_PRIVATE;
|
|
64
69
|
double value SWIFT_PRIVATE;
|
|
@@ -94,6 +99,9 @@ namespace margelo::nitro::healthkit {
|
|
|
94
99
|
public:
|
|
95
100
|
CategorySample() = default;
|
|
96
101
|
explicit CategorySample(CategoryTypeIdentifier categoryType, double value, SampleType sampleType, std::chrono::system_clock::time_point startDate, std::chrono::system_clock::time_point endDate, bool hasUndeterminedDuration, std::optional<WeatherCondition> metadataWeatherCondition, std::optional<Quantity> metadataWeatherHumidity, std::optional<Quantity> metadataWeatherTemperature, std::optional<InsulinDeliveryReason> metadataInsulinDeliveryReason, std::optional<HeartRateMotionContext> metadataHeartRateMotionContext, std::string uuid, SourceRevision sourceRevision, std::optional<Device> device, std::shared_ptr<AnyMap> metadata, std::optional<std::string> metadataExternalUUID, std::optional<std::string> metadataTimeZone, std::optional<bool> metadataWasUserEntered, std::optional<std::string> metadataDeviceSerialNumber, std::optional<std::string> metadataUdiDeviceIdentifier, std::optional<std::string> metadataUdiProductionIdentifier, std::optional<std::string> metadataDigitalSignature, std::optional<std::string> metadataDeviceName, std::optional<std::string> metadataDeviceManufacturerName, std::optional<std::string> metadataSyncIdentifier, std::optional<double> metadataSyncVersion, std::optional<bool> metadataWasTakenInLab, std::optional<double> metadataReferenceRangeLowerLimit, std::optional<double> metadataReferenceRangeUpperLimit, std::optional<double> metadataAlgorithmVersion): categoryType(categoryType), value(value), sampleType(sampleType), startDate(startDate), endDate(endDate), hasUndeterminedDuration(hasUndeterminedDuration), metadataWeatherCondition(metadataWeatherCondition), metadataWeatherHumidity(metadataWeatherHumidity), metadataWeatherTemperature(metadataWeatherTemperature), metadataInsulinDeliveryReason(metadataInsulinDeliveryReason), metadataHeartRateMotionContext(metadataHeartRateMotionContext), uuid(uuid), sourceRevision(sourceRevision), device(device), metadata(metadata), metadataExternalUUID(metadataExternalUUID), metadataTimeZone(metadataTimeZone), metadataWasUserEntered(metadataWasUserEntered), metadataDeviceSerialNumber(metadataDeviceSerialNumber), metadataUdiDeviceIdentifier(metadataUdiDeviceIdentifier), metadataUdiProductionIdentifier(metadataUdiProductionIdentifier), metadataDigitalSignature(metadataDigitalSignature), metadataDeviceName(metadataDeviceName), metadataDeviceManufacturerName(metadataDeviceManufacturerName), metadataSyncIdentifier(metadataSyncIdentifier), metadataSyncVersion(metadataSyncVersion), metadataWasTakenInLab(metadataWasTakenInLab), metadataReferenceRangeLowerLimit(metadataReferenceRangeLowerLimit), metadataReferenceRangeUpperLimit(metadataReferenceRangeUpperLimit), metadataAlgorithmVersion(metadataAlgorithmVersion) {}
|
|
102
|
+
|
|
103
|
+
public:
|
|
104
|
+
friend bool operator==(const CategorySample& lhs, const CategorySample& rhs) = default;
|
|
97
105
|
};
|
|
98
106
|
|
|
99
107
|
} // namespace margelo::nitro::healthkit
|
|
@@ -106,70 +114,70 @@ namespace margelo::nitro {
|
|
|
106
114
|
static inline margelo::nitro::healthkit::CategorySample fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
107
115
|
jsi::Object obj = arg.asObject(runtime);
|
|
108
116
|
return margelo::nitro::healthkit::CategorySample(
|
|
109
|
-
JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::fromJSI(runtime, obj.getProperty(runtime, "categoryType")),
|
|
110
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "value")),
|
|
111
|
-
JSIConverter<margelo::nitro::healthkit::SampleType>::fromJSI(runtime, obj.getProperty(runtime, "sampleType")),
|
|
112
|
-
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "startDate")),
|
|
113
|
-
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "endDate")),
|
|
114
|
-
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "hasUndeterminedDuration")),
|
|
115
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWeatherCondition")),
|
|
116
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWeatherHumidity")),
|
|
117
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWeatherTemperature")),
|
|
118
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::fromJSI(runtime, obj.getProperty(runtime, "metadataInsulinDeliveryReason")),
|
|
119
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::fromJSI(runtime, obj.getProperty(runtime, "metadataHeartRateMotionContext")),
|
|
120
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "uuid")),
|
|
121
|
-
JSIConverter<margelo::nitro::healthkit::SourceRevision>::fromJSI(runtime, obj.getProperty(runtime, "sourceRevision")),
|
|
122
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::fromJSI(runtime, obj.getProperty(runtime, "device")),
|
|
123
|
-
JSIConverter<std::shared_ptr<AnyMap>>::fromJSI(runtime, obj.getProperty(runtime, "metadata")),
|
|
124
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataExternalUUID")),
|
|
125
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataTimeZone")),
|
|
126
|
-
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWasUserEntered")),
|
|
127
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataDeviceSerialNumber")),
|
|
128
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataUdiDeviceIdentifier")),
|
|
129
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataUdiProductionIdentifier")),
|
|
130
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataDigitalSignature")),
|
|
131
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataDeviceName")),
|
|
132
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataDeviceManufacturerName")),
|
|
133
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "metadataSyncIdentifier")),
|
|
134
|
-
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "metadataSyncVersion")),
|
|
135
|
-
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, "metadataWasTakenInLab")),
|
|
136
|
-
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "metadataReferenceRangeLowerLimit")),
|
|
137
|
-
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "metadataReferenceRangeUpperLimit")),
|
|
138
|
-
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "metadataAlgorithmVersion"))
|
|
117
|
+
JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "categoryType"))),
|
|
118
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "value"))),
|
|
119
|
+
JSIConverter<margelo::nitro::healthkit::SampleType>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sampleType"))),
|
|
120
|
+
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate"))),
|
|
121
|
+
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate"))),
|
|
122
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "hasUndeterminedDuration"))),
|
|
123
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherCondition"))),
|
|
124
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherHumidity"))),
|
|
125
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherTemperature"))),
|
|
126
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataInsulinDeliveryReason"))),
|
|
127
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataHeartRateMotionContext"))),
|
|
128
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid"))),
|
|
129
|
+
JSIConverter<margelo::nitro::healthkit::SourceRevision>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision"))),
|
|
130
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "device"))),
|
|
131
|
+
JSIConverter<std::shared_ptr<AnyMap>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata"))),
|
|
132
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataExternalUUID"))),
|
|
133
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataTimeZone"))),
|
|
134
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWasUserEntered"))),
|
|
135
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceSerialNumber"))),
|
|
136
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataUdiDeviceIdentifier"))),
|
|
137
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataUdiProductionIdentifier"))),
|
|
138
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDigitalSignature"))),
|
|
139
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceName"))),
|
|
140
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceManufacturerName"))),
|
|
141
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataSyncIdentifier"))),
|
|
142
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataSyncVersion"))),
|
|
143
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWasTakenInLab"))),
|
|
144
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataReferenceRangeLowerLimit"))),
|
|
145
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataReferenceRangeUpperLimit"))),
|
|
146
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataAlgorithmVersion")))
|
|
139
147
|
);
|
|
140
148
|
}
|
|
141
149
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::CategorySample& arg) {
|
|
142
150
|
jsi::Object obj(runtime);
|
|
143
|
-
obj.setProperty(runtime, "categoryType", JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::toJSI(runtime, arg.categoryType));
|
|
144
|
-
obj.setProperty(runtime, "value", JSIConverter<double>::toJSI(runtime, arg.value));
|
|
145
|
-
obj.setProperty(runtime, "sampleType", JSIConverter<margelo::nitro::healthkit::SampleType>::toJSI(runtime, arg.sampleType));
|
|
146
|
-
obj.setProperty(runtime, "startDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.startDate));
|
|
147
|
-
obj.setProperty(runtime, "endDate", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.endDate));
|
|
148
|
-
obj.setProperty(runtime, "hasUndeterminedDuration", JSIConverter<bool>::toJSI(runtime, arg.hasUndeterminedDuration));
|
|
149
|
-
obj.setProperty(runtime, "metadataWeatherCondition", JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::toJSI(runtime, arg.metadataWeatherCondition));
|
|
150
|
-
obj.setProperty(runtime, "metadataWeatherHumidity", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataWeatherHumidity));
|
|
151
|
-
obj.setProperty(runtime, "metadataWeatherTemperature", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataWeatherTemperature));
|
|
152
|
-
obj.setProperty(runtime, "metadataInsulinDeliveryReason", JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::toJSI(runtime, arg.metadataInsulinDeliveryReason));
|
|
153
|
-
obj.setProperty(runtime, "metadataHeartRateMotionContext", JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::toJSI(runtime, arg.metadataHeartRateMotionContext));
|
|
154
|
-
obj.setProperty(runtime, "uuid", JSIConverter<std::string>::toJSI(runtime, arg.uuid));
|
|
155
|
-
obj.setProperty(runtime, "sourceRevision", JSIConverter<margelo::nitro::healthkit::SourceRevision>::toJSI(runtime, arg.sourceRevision));
|
|
156
|
-
obj.setProperty(runtime, "device", JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::toJSI(runtime, arg.device));
|
|
157
|
-
obj.setProperty(runtime, "metadata", JSIConverter<std::shared_ptr<AnyMap>>::toJSI(runtime, arg.metadata));
|
|
158
|
-
obj.setProperty(runtime, "metadataExternalUUID", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataExternalUUID));
|
|
159
|
-
obj.setProperty(runtime, "metadataTimeZone", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataTimeZone));
|
|
160
|
-
obj.setProperty(runtime, "metadataWasUserEntered", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.metadataWasUserEntered));
|
|
161
|
-
obj.setProperty(runtime, "metadataDeviceSerialNumber", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceSerialNumber));
|
|
162
|
-
obj.setProperty(runtime, "metadataUdiDeviceIdentifier", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataUdiDeviceIdentifier));
|
|
163
|
-
obj.setProperty(runtime, "metadataUdiProductionIdentifier", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataUdiProductionIdentifier));
|
|
164
|
-
obj.setProperty(runtime, "metadataDigitalSignature", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDigitalSignature));
|
|
165
|
-
obj.setProperty(runtime, "metadataDeviceName", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceName));
|
|
166
|
-
obj.setProperty(runtime, "metadataDeviceManufacturerName", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceManufacturerName));
|
|
167
|
-
obj.setProperty(runtime, "metadataSyncIdentifier", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataSyncIdentifier));
|
|
168
|
-
obj.setProperty(runtime, "metadataSyncVersion", JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataSyncVersion));
|
|
169
|
-
obj.setProperty(runtime, "metadataWasTakenInLab", JSIConverter<std::optional<bool>>::toJSI(runtime, arg.metadataWasTakenInLab));
|
|
170
|
-
obj.setProperty(runtime, "metadataReferenceRangeLowerLimit", JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataReferenceRangeLowerLimit));
|
|
171
|
-
obj.setProperty(runtime, "metadataReferenceRangeUpperLimit", JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataReferenceRangeUpperLimit));
|
|
172
|
-
obj.setProperty(runtime, "metadataAlgorithmVersion", JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataAlgorithmVersion));
|
|
151
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "categoryType"), JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::toJSI(runtime, arg.categoryType));
|
|
152
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "value"), JSIConverter<double>::toJSI(runtime, arg.value));
|
|
153
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "sampleType"), JSIConverter<margelo::nitro::healthkit::SampleType>::toJSI(runtime, arg.sampleType));
|
|
154
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "startDate"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.startDate));
|
|
155
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "endDate"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.endDate));
|
|
156
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "hasUndeterminedDuration"), JSIConverter<bool>::toJSI(runtime, arg.hasUndeterminedDuration));
|
|
157
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherCondition"), JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::toJSI(runtime, arg.metadataWeatherCondition));
|
|
158
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherHumidity"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataWeatherHumidity));
|
|
159
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherTemperature"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.metadataWeatherTemperature));
|
|
160
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataInsulinDeliveryReason"), JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::toJSI(runtime, arg.metadataInsulinDeliveryReason));
|
|
161
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataHeartRateMotionContext"), JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::toJSI(runtime, arg.metadataHeartRateMotionContext));
|
|
162
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "uuid"), JSIConverter<std::string>::toJSI(runtime, arg.uuid));
|
|
163
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision"), JSIConverter<margelo::nitro::healthkit::SourceRevision>::toJSI(runtime, arg.sourceRevision));
|
|
164
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "device"), JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::toJSI(runtime, arg.device));
|
|
165
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadata"), JSIConverter<std::shared_ptr<AnyMap>>::toJSI(runtime, arg.metadata));
|
|
166
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataExternalUUID"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataExternalUUID));
|
|
167
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataTimeZone"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataTimeZone));
|
|
168
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataWasUserEntered"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.metadataWasUserEntered));
|
|
169
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceSerialNumber"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceSerialNumber));
|
|
170
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataUdiDeviceIdentifier"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataUdiDeviceIdentifier));
|
|
171
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataUdiProductionIdentifier"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataUdiProductionIdentifier));
|
|
172
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataDigitalSignature"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDigitalSignature));
|
|
173
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceName"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceName));
|
|
174
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceManufacturerName"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataDeviceManufacturerName));
|
|
175
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataSyncIdentifier"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.metadataSyncIdentifier));
|
|
176
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataSyncVersion"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataSyncVersion));
|
|
177
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataWasTakenInLab"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.metadataWasTakenInLab));
|
|
178
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataReferenceRangeLowerLimit"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataReferenceRangeLowerLimit));
|
|
179
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataReferenceRangeUpperLimit"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataReferenceRangeUpperLimit));
|
|
180
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadataAlgorithmVersion"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.metadataAlgorithmVersion));
|
|
173
181
|
return obj;
|
|
174
182
|
}
|
|
175
183
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -180,36 +188,36 @@ namespace margelo::nitro {
|
|
|
180
188
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
181
189
|
return false;
|
|
182
190
|
}
|
|
183
|
-
if (!JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::canConvert(runtime, obj.getProperty(runtime, "categoryType"))) return false;
|
|
184
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "value"))) return false;
|
|
185
|
-
if (!JSIConverter<margelo::nitro::healthkit::SampleType>::canConvert(runtime, obj.getProperty(runtime, "sampleType"))) return false;
|
|
186
|
-
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "startDate"))) return false;
|
|
187
|
-
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "endDate"))) return false;
|
|
188
|
-
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "hasUndeterminedDuration"))) return false;
|
|
189
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::canConvert(runtime, obj.getProperty(runtime, "metadataWeatherCondition"))) return false;
|
|
190
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "metadataWeatherHumidity"))) return false;
|
|
191
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "metadataWeatherTemperature"))) return false;
|
|
192
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::canConvert(runtime, obj.getProperty(runtime, "metadataInsulinDeliveryReason"))) return false;
|
|
193
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::canConvert(runtime, obj.getProperty(runtime, "metadataHeartRateMotionContext"))) return false;
|
|
194
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "uuid"))) return false;
|
|
195
|
-
if (!JSIConverter<margelo::nitro::healthkit::SourceRevision>::canConvert(runtime, obj.getProperty(runtime, "sourceRevision"))) return false;
|
|
196
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::canConvert(runtime, obj.getProperty(runtime, "device"))) return false;
|
|
197
|
-
if (!JSIConverter<std::shared_ptr<AnyMap>>::canConvert(runtime, obj.getProperty(runtime, "metadata"))) return false;
|
|
198
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataExternalUUID"))) return false;
|
|
199
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataTimeZone"))) return false;
|
|
200
|
-
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "metadataWasUserEntered"))) return false;
|
|
201
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataDeviceSerialNumber"))) return false;
|
|
202
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataUdiDeviceIdentifier"))) return false;
|
|
203
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataUdiProductionIdentifier"))) return false;
|
|
204
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataDigitalSignature"))) return false;
|
|
205
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataDeviceName"))) return false;
|
|
206
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataDeviceManufacturerName"))) return false;
|
|
207
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "metadataSyncIdentifier"))) return false;
|
|
208
|
-
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "metadataSyncVersion"))) return false;
|
|
209
|
-
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, "metadataWasTakenInLab"))) return false;
|
|
210
|
-
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "metadataReferenceRangeLowerLimit"))) return false;
|
|
211
|
-
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "metadataReferenceRangeUpperLimit"))) return false;
|
|
212
|
-
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "metadataAlgorithmVersion"))) return false;
|
|
191
|
+
if (!JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "categoryType")))) return false;
|
|
192
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "value")))) return false;
|
|
193
|
+
if (!JSIConverter<margelo::nitro::healthkit::SampleType>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sampleType")))) return false;
|
|
194
|
+
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate")))) return false;
|
|
195
|
+
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate")))) return false;
|
|
196
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "hasUndeterminedDuration")))) return false;
|
|
197
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::WeatherCondition>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherCondition")))) return false;
|
|
198
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherHumidity")))) return false;
|
|
199
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWeatherTemperature")))) return false;
|
|
200
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::InsulinDeliveryReason>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataInsulinDeliveryReason")))) return false;
|
|
201
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::HeartRateMotionContext>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataHeartRateMotionContext")))) return false;
|
|
202
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "uuid")))) return false;
|
|
203
|
+
if (!JSIConverter<margelo::nitro::healthkit::SourceRevision>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision")))) return false;
|
|
204
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Device>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "device")))) return false;
|
|
205
|
+
if (!JSIConverter<std::shared_ptr<AnyMap>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata")))) return false;
|
|
206
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataExternalUUID")))) return false;
|
|
207
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataTimeZone")))) return false;
|
|
208
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWasUserEntered")))) return false;
|
|
209
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceSerialNumber")))) return false;
|
|
210
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataUdiDeviceIdentifier")))) return false;
|
|
211
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataUdiProductionIdentifier")))) return false;
|
|
212
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDigitalSignature")))) return false;
|
|
213
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceName")))) return false;
|
|
214
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataDeviceManufacturerName")))) return false;
|
|
215
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataSyncIdentifier")))) return false;
|
|
216
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataSyncVersion")))) return false;
|
|
217
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataWasTakenInLab")))) return false;
|
|
218
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataReferenceRangeLowerLimit")))) return false;
|
|
219
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataReferenceRangeUpperLimit")))) return false;
|
|
220
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadataAlgorithmVersion")))) return false;
|
|
213
221
|
return true;
|
|
214
222
|
}
|
|
215
223
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// CategorySampleForSaving.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
// Forward declaration of `CategoryTypeIdentifier` to properly resolve imports.
|
|
27
32
|
namespace margelo::nitro::healthkit { enum class CategoryTypeIdentifier; }
|
|
@@ -39,7 +44,7 @@ namespace margelo::nitro::healthkit {
|
|
|
39
44
|
/**
|
|
40
45
|
* A struct which can be represented as a JavaScript object (CategorySampleForSaving).
|
|
41
46
|
*/
|
|
42
|
-
struct CategorySampleForSaving {
|
|
47
|
+
struct CategorySampleForSaving final {
|
|
43
48
|
public:
|
|
44
49
|
std::chrono::system_clock::time_point start SWIFT_PRIVATE;
|
|
45
50
|
std::chrono::system_clock::time_point end SWIFT_PRIVATE;
|
|
@@ -51,6 +56,9 @@ namespace margelo::nitro::healthkit {
|
|
|
51
56
|
public:
|
|
52
57
|
CategorySampleForSaving() = default;
|
|
53
58
|
explicit CategorySampleForSaving(std::chrono::system_clock::time_point start, std::chrono::system_clock::time_point end, CategoryTypeIdentifier categoryType, double value, std::shared_ptr<AnyMap> metadata, std::optional<SourceRevision> sourceRevision): start(start), end(end), categoryType(categoryType), value(value), metadata(metadata), sourceRevision(sourceRevision) {}
|
|
59
|
+
|
|
60
|
+
public:
|
|
61
|
+
friend bool operator==(const CategorySampleForSaving& lhs, const CategorySampleForSaving& rhs) = default;
|
|
54
62
|
};
|
|
55
63
|
|
|
56
64
|
} // namespace margelo::nitro::healthkit
|
|
@@ -63,22 +71,22 @@ namespace margelo::nitro {
|
|
|
63
71
|
static inline margelo::nitro::healthkit::CategorySampleForSaving fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
64
72
|
jsi::Object obj = arg.asObject(runtime);
|
|
65
73
|
return margelo::nitro::healthkit::CategorySampleForSaving(
|
|
66
|
-
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "start")),
|
|
67
|
-
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, "end")),
|
|
68
|
-
JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::fromJSI(runtime, obj.getProperty(runtime, "categoryType")),
|
|
69
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "value")),
|
|
70
|
-
JSIConverter<std::shared_ptr<AnyMap>>::fromJSI(runtime, obj.getProperty(runtime, "metadata")),
|
|
71
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::SourceRevision>>::fromJSI(runtime, obj.getProperty(runtime, "sourceRevision"))
|
|
74
|
+
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "start"))),
|
|
75
|
+
JSIConverter<std::chrono::system_clock::time_point>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "end"))),
|
|
76
|
+
JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "categoryType"))),
|
|
77
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "value"))),
|
|
78
|
+
JSIConverter<std::shared_ptr<AnyMap>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata"))),
|
|
79
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::SourceRevision>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision")))
|
|
72
80
|
);
|
|
73
81
|
}
|
|
74
82
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::CategorySampleForSaving& arg) {
|
|
75
83
|
jsi::Object obj(runtime);
|
|
76
|
-
obj.setProperty(runtime, "start", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.start));
|
|
77
|
-
obj.setProperty(runtime, "end", JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.end));
|
|
78
|
-
obj.setProperty(runtime, "categoryType", JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::toJSI(runtime, arg.categoryType));
|
|
79
|
-
obj.setProperty(runtime, "value", JSIConverter<double>::toJSI(runtime, arg.value));
|
|
80
|
-
obj.setProperty(runtime, "metadata", JSIConverter<std::shared_ptr<AnyMap>>::toJSI(runtime, arg.metadata));
|
|
81
|
-
obj.setProperty(runtime, "sourceRevision", JSIConverter<std::optional<margelo::nitro::healthkit::SourceRevision>>::toJSI(runtime, arg.sourceRevision));
|
|
84
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "start"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.start));
|
|
85
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "end"), JSIConverter<std::chrono::system_clock::time_point>::toJSI(runtime, arg.end));
|
|
86
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "categoryType"), JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::toJSI(runtime, arg.categoryType));
|
|
87
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "value"), JSIConverter<double>::toJSI(runtime, arg.value));
|
|
88
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "metadata"), JSIConverter<std::shared_ptr<AnyMap>>::toJSI(runtime, arg.metadata));
|
|
89
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision"), JSIConverter<std::optional<margelo::nitro::healthkit::SourceRevision>>::toJSI(runtime, arg.sourceRevision));
|
|
82
90
|
return obj;
|
|
83
91
|
}
|
|
84
92
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -89,12 +97,12 @@ namespace margelo::nitro {
|
|
|
89
97
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
90
98
|
return false;
|
|
91
99
|
}
|
|
92
|
-
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "start"))) return false;
|
|
93
|
-
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, "end"))) return false;
|
|
94
|
-
if (!JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::canConvert(runtime, obj.getProperty(runtime, "categoryType"))) return false;
|
|
95
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "value"))) return false;
|
|
96
|
-
if (!JSIConverter<std::shared_ptr<AnyMap>>::canConvert(runtime, obj.getProperty(runtime, "metadata"))) return false;
|
|
97
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::SourceRevision>>::canConvert(runtime, obj.getProperty(runtime, "sourceRevision"))) return false;
|
|
100
|
+
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "start")))) return false;
|
|
101
|
+
if (!JSIConverter<std::chrono::system_clock::time_point>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "end")))) return false;
|
|
102
|
+
if (!JSIConverter<margelo::nitro::healthkit::CategoryTypeIdentifier>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "categoryType")))) return false;
|
|
103
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "value")))) return false;
|
|
104
|
+
if (!JSIConverter<std::shared_ptr<AnyMap>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "metadata")))) return false;
|
|
105
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::SourceRevision>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sourceRevision")))) return false;
|
|
98
106
|
return true;
|
|
99
107
|
}
|
|
100
108
|
};
|