@kingstinct/react-native-healthkit 13.2.1 → 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/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,7 +2,7 @@
|
|
|
2
2
|
/// QueryStatisticsResponseFromSingleSource.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 `HybridSourceProxySpec` to properly resolve imports.
|
|
27
32
|
namespace margelo::nitro::healthkit { class HybridSourceProxySpec; }
|
|
@@ -42,7 +47,7 @@ namespace margelo::nitro::healthkit {
|
|
|
42
47
|
/**
|
|
43
48
|
* A struct which can be represented as a JavaScript object (QueryStatisticsResponseFromSingleSource).
|
|
44
49
|
*/
|
|
45
|
-
struct QueryStatisticsResponseFromSingleSource {
|
|
50
|
+
struct QueryStatisticsResponseFromSingleSource final {
|
|
46
51
|
public:
|
|
47
52
|
std::shared_ptr<HybridSourceProxySpec> source SWIFT_PRIVATE;
|
|
48
53
|
std::optional<Quantity> duration SWIFT_PRIVATE;
|
|
@@ -58,6 +63,9 @@ namespace margelo::nitro::healthkit {
|
|
|
58
63
|
public:
|
|
59
64
|
QueryStatisticsResponseFromSingleSource() = default;
|
|
60
65
|
explicit QueryStatisticsResponseFromSingleSource(std::shared_ptr<HybridSourceProxySpec> source, std::optional<Quantity> duration, std::optional<Quantity> averageQuantity, std::optional<Quantity> maximumQuantity, std::optional<Quantity> minimumQuantity, std::optional<Quantity> sumQuantity, std::optional<Quantity> mostRecentQuantity, std::optional<QuantityDateInterval> mostRecentQuantityDateInterval, std::optional<std::chrono::system_clock::time_point> startDate, std::optional<std::chrono::system_clock::time_point> endDate): source(source), duration(duration), averageQuantity(averageQuantity), maximumQuantity(maximumQuantity), minimumQuantity(minimumQuantity), sumQuantity(sumQuantity), mostRecentQuantity(mostRecentQuantity), mostRecentQuantityDateInterval(mostRecentQuantityDateInterval), startDate(startDate), endDate(endDate) {}
|
|
66
|
+
|
|
67
|
+
public:
|
|
68
|
+
friend bool operator==(const QueryStatisticsResponseFromSingleSource& lhs, const QueryStatisticsResponseFromSingleSource& rhs) = default;
|
|
61
69
|
};
|
|
62
70
|
|
|
63
71
|
} // namespace margelo::nitro::healthkit
|
|
@@ -70,30 +78,30 @@ namespace margelo::nitro {
|
|
|
70
78
|
static inline margelo::nitro::healthkit::QueryStatisticsResponseFromSingleSource fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
71
79
|
jsi::Object obj = arg.asObject(runtime);
|
|
72
80
|
return margelo::nitro::healthkit::QueryStatisticsResponseFromSingleSource(
|
|
73
|
-
JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>::fromJSI(runtime, obj.getProperty(runtime, "source")),
|
|
74
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "duration")),
|
|
75
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "averageQuantity")),
|
|
76
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "maximumQuantity")),
|
|
77
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "minimumQuantity")),
|
|
78
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "sumQuantity")),
|
|
79
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, "mostRecentQuantity")),
|
|
80
|
-
JSIConverter<std::optional<margelo::nitro::healthkit::QuantityDateInterval>>::fromJSI(runtime, obj.getProperty(runtime, "mostRecentQuantityDateInterval")),
|
|
81
|
-
JSIConverter<std::optional<std::chrono::system_clock::time_point>>::fromJSI(runtime, obj.getProperty(runtime, "startDate")),
|
|
82
|
-
JSIConverter<std::optional<std::chrono::system_clock::time_point>>::fromJSI(runtime, obj.getProperty(runtime, "endDate"))
|
|
81
|
+
JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "source"))),
|
|
82
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "duration"))),
|
|
83
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "averageQuantity"))),
|
|
84
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maximumQuantity"))),
|
|
85
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "minimumQuantity"))),
|
|
86
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sumQuantity"))),
|
|
87
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mostRecentQuantity"))),
|
|
88
|
+
JSIConverter<std::optional<margelo::nitro::healthkit::QuantityDateInterval>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mostRecentQuantityDateInterval"))),
|
|
89
|
+
JSIConverter<std::optional<std::chrono::system_clock::time_point>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate"))),
|
|
90
|
+
JSIConverter<std::optional<std::chrono::system_clock::time_point>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate")))
|
|
83
91
|
);
|
|
84
92
|
}
|
|
85
93
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::QueryStatisticsResponseFromSingleSource& arg) {
|
|
86
94
|
jsi::Object obj(runtime);
|
|
87
|
-
obj.setProperty(runtime, "source", JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>::toJSI(runtime, arg.source));
|
|
88
|
-
obj.setProperty(runtime, "duration", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.duration));
|
|
89
|
-
obj.setProperty(runtime, "averageQuantity", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.averageQuantity));
|
|
90
|
-
obj.setProperty(runtime, "maximumQuantity", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.maximumQuantity));
|
|
91
|
-
obj.setProperty(runtime, "minimumQuantity", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.minimumQuantity));
|
|
92
|
-
obj.setProperty(runtime, "sumQuantity", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.sumQuantity));
|
|
93
|
-
obj.setProperty(runtime, "mostRecentQuantity", JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.mostRecentQuantity));
|
|
94
|
-
obj.setProperty(runtime, "mostRecentQuantityDateInterval", JSIConverter<std::optional<margelo::nitro::healthkit::QuantityDateInterval>>::toJSI(runtime, arg.mostRecentQuantityDateInterval));
|
|
95
|
-
obj.setProperty(runtime, "startDate", JSIConverter<std::optional<std::chrono::system_clock::time_point>>::toJSI(runtime, arg.startDate));
|
|
96
|
-
obj.setProperty(runtime, "endDate", JSIConverter<std::optional<std::chrono::system_clock::time_point>>::toJSI(runtime, arg.endDate));
|
|
95
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "source"), JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>::toJSI(runtime, arg.source));
|
|
96
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "duration"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.duration));
|
|
97
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "averageQuantity"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.averageQuantity));
|
|
98
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maximumQuantity"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.maximumQuantity));
|
|
99
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "minimumQuantity"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.minimumQuantity));
|
|
100
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "sumQuantity"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.sumQuantity));
|
|
101
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "mostRecentQuantity"), JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::toJSI(runtime, arg.mostRecentQuantity));
|
|
102
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "mostRecentQuantityDateInterval"), JSIConverter<std::optional<margelo::nitro::healthkit::QuantityDateInterval>>::toJSI(runtime, arg.mostRecentQuantityDateInterval));
|
|
103
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "startDate"), JSIConverter<std::optional<std::chrono::system_clock::time_point>>::toJSI(runtime, arg.startDate));
|
|
104
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "endDate"), JSIConverter<std::optional<std::chrono::system_clock::time_point>>::toJSI(runtime, arg.endDate));
|
|
97
105
|
return obj;
|
|
98
106
|
}
|
|
99
107
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -104,16 +112,16 @@ namespace margelo::nitro {
|
|
|
104
112
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
105
113
|
return false;
|
|
106
114
|
}
|
|
107
|
-
if (!JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>::canConvert(runtime, obj.getProperty(runtime, "source"))) return false;
|
|
108
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "duration"))) return false;
|
|
109
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "averageQuantity"))) return false;
|
|
110
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "maximumQuantity"))) return false;
|
|
111
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "minimumQuantity"))) return false;
|
|
112
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "sumQuantity"))) return false;
|
|
113
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, "mostRecentQuantity"))) return false;
|
|
114
|
-
if (!JSIConverter<std::optional<margelo::nitro::healthkit::QuantityDateInterval>>::canConvert(runtime, obj.getProperty(runtime, "mostRecentQuantityDateInterval"))) return false;
|
|
115
|
-
if (!JSIConverter<std::optional<std::chrono::system_clock::time_point>>::canConvert(runtime, obj.getProperty(runtime, "startDate"))) return false;
|
|
116
|
-
if (!JSIConverter<std::optional<std::chrono::system_clock::time_point>>::canConvert(runtime, obj.getProperty(runtime, "endDate"))) return false;
|
|
115
|
+
if (!JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "source")))) return false;
|
|
116
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "duration")))) return false;
|
|
117
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "averageQuantity")))) return false;
|
|
118
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maximumQuantity")))) return false;
|
|
119
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "minimumQuantity")))) return false;
|
|
120
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sumQuantity")))) return false;
|
|
121
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::Quantity>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mostRecentQuantity")))) return false;
|
|
122
|
+
if (!JSIConverter<std::optional<margelo::nitro::healthkit::QuantityDateInterval>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "mostRecentQuantityDateInterval")))) return false;
|
|
123
|
+
if (!JSIConverter<std::optional<std::chrono::system_clock::time_point>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "startDate")))) return false;
|
|
124
|
+
if (!JSIConverter<std::optional<std::chrono::system_clock::time_point>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "endDate")))) return false;
|
|
117
125
|
return true;
|
|
118
126
|
}
|
|
119
127
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// QueryWorkoutSamplesWithAnchorResponse.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 `HybridWorkoutProxySpec` to properly resolve imports.
|
|
27
32
|
namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
@@ -39,7 +44,7 @@ namespace margelo::nitro::healthkit {
|
|
|
39
44
|
/**
|
|
40
45
|
* A struct which can be represented as a JavaScript object (QueryWorkoutSamplesWithAnchorResponse).
|
|
41
46
|
*/
|
|
42
|
-
struct QueryWorkoutSamplesWithAnchorResponse {
|
|
47
|
+
struct QueryWorkoutSamplesWithAnchorResponse final {
|
|
43
48
|
public:
|
|
44
49
|
std::vector<std::shared_ptr<HybridWorkoutProxySpec>> workouts SWIFT_PRIVATE;
|
|
45
50
|
std::vector<DeletedSample> deletedSamples SWIFT_PRIVATE;
|
|
@@ -48,6 +53,9 @@ namespace margelo::nitro::healthkit {
|
|
|
48
53
|
public:
|
|
49
54
|
QueryWorkoutSamplesWithAnchorResponse() = default;
|
|
50
55
|
explicit QueryWorkoutSamplesWithAnchorResponse(std::vector<std::shared_ptr<HybridWorkoutProxySpec>> workouts, std::vector<DeletedSample> deletedSamples, std::string newAnchor): workouts(workouts), deletedSamples(deletedSamples), newAnchor(newAnchor) {}
|
|
56
|
+
|
|
57
|
+
public:
|
|
58
|
+
friend bool operator==(const QueryWorkoutSamplesWithAnchorResponse& lhs, const QueryWorkoutSamplesWithAnchorResponse& rhs) = default;
|
|
51
59
|
};
|
|
52
60
|
|
|
53
61
|
} // namespace margelo::nitro::healthkit
|
|
@@ -60,16 +68,16 @@ namespace margelo::nitro {
|
|
|
60
68
|
static inline margelo::nitro::healthkit::QueryWorkoutSamplesWithAnchorResponse fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
61
69
|
jsi::Object obj = arg.asObject(runtime);
|
|
62
70
|
return margelo::nitro::healthkit::QueryWorkoutSamplesWithAnchorResponse(
|
|
63
|
-
JSIConverter<std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>>>::fromJSI(runtime, obj.getProperty(runtime, "workouts")),
|
|
64
|
-
JSIConverter<std::vector<margelo::nitro::healthkit::DeletedSample>>::fromJSI(runtime, obj.getProperty(runtime, "deletedSamples")),
|
|
65
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "newAnchor"))
|
|
71
|
+
JSIConverter<std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "workouts"))),
|
|
72
|
+
JSIConverter<std::vector<margelo::nitro::healthkit::DeletedSample>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deletedSamples"))),
|
|
73
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "newAnchor")))
|
|
66
74
|
);
|
|
67
75
|
}
|
|
68
76
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::QueryWorkoutSamplesWithAnchorResponse& arg) {
|
|
69
77
|
jsi::Object obj(runtime);
|
|
70
|
-
obj.setProperty(runtime, "workouts", JSIConverter<std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>>>::toJSI(runtime, arg.workouts));
|
|
71
|
-
obj.setProperty(runtime, "deletedSamples", JSIConverter<std::vector<margelo::nitro::healthkit::DeletedSample>>::toJSI(runtime, arg.deletedSamples));
|
|
72
|
-
obj.setProperty(runtime, "newAnchor", JSIConverter<std::string>::toJSI(runtime, arg.newAnchor));
|
|
78
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "workouts"), JSIConverter<std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>>>::toJSI(runtime, arg.workouts));
|
|
79
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "deletedSamples"), JSIConverter<std::vector<margelo::nitro::healthkit::DeletedSample>>::toJSI(runtime, arg.deletedSamples));
|
|
80
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "newAnchor"), JSIConverter<std::string>::toJSI(runtime, arg.newAnchor));
|
|
73
81
|
return obj;
|
|
74
82
|
}
|
|
75
83
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -80,9 +88,9 @@ namespace margelo::nitro {
|
|
|
80
88
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
81
89
|
return false;
|
|
82
90
|
}
|
|
83
|
-
if (!JSIConverter<std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>>>::canConvert(runtime, obj.getProperty(runtime, "workouts"))) return false;
|
|
84
|
-
if (!JSIConverter<std::vector<margelo::nitro::healthkit::DeletedSample>>::canConvert(runtime, obj.getProperty(runtime, "deletedSamples"))) return false;
|
|
85
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "newAnchor"))) return false;
|
|
91
|
+
if (!JSIConverter<std::vector<std::shared_ptr<margelo::nitro::healthkit::HybridWorkoutProxySpec>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "workouts")))) return false;
|
|
92
|
+
if (!JSIConverter<std::vector<margelo::nitro::healthkit::DeletedSample>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "deletedSamples")))) return false;
|
|
93
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "newAnchor")))) return false;
|
|
86
94
|
return true;
|
|
87
95
|
}
|
|
88
96
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// RelatedCoding.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
|
|
|
27
32
|
|
|
@@ -33,7 +38,7 @@ namespace margelo::nitro::healthkit {
|
|
|
33
38
|
/**
|
|
34
39
|
* A struct which can be represented as a JavaScript object (RelatedCoding).
|
|
35
40
|
*/
|
|
36
|
-
struct RelatedCoding {
|
|
41
|
+
struct RelatedCoding final {
|
|
37
42
|
public:
|
|
38
43
|
std::string system SWIFT_PRIVATE;
|
|
39
44
|
std::string code SWIFT_PRIVATE;
|
|
@@ -42,6 +47,9 @@ namespace margelo::nitro::healthkit {
|
|
|
42
47
|
public:
|
|
43
48
|
RelatedCoding() = default;
|
|
44
49
|
explicit RelatedCoding(std::string system, std::string code, std::optional<std::string> version): system(system), code(code), version(version) {}
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
friend bool operator==(const RelatedCoding& lhs, const RelatedCoding& rhs) = default;
|
|
45
53
|
};
|
|
46
54
|
|
|
47
55
|
} // namespace margelo::nitro::healthkit
|
|
@@ -54,16 +62,16 @@ namespace margelo::nitro {
|
|
|
54
62
|
static inline margelo::nitro::healthkit::RelatedCoding fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
63
|
jsi::Object obj = arg.asObject(runtime);
|
|
56
64
|
return margelo::nitro::healthkit::RelatedCoding(
|
|
57
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "system")),
|
|
58
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "code")),
|
|
59
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "version"))
|
|
65
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "system"))),
|
|
66
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "code"))),
|
|
67
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "version")))
|
|
60
68
|
);
|
|
61
69
|
}
|
|
62
70
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::RelatedCoding& arg) {
|
|
63
71
|
jsi::Object obj(runtime);
|
|
64
|
-
obj.setProperty(runtime, "system", JSIConverter<std::string>::toJSI(runtime, arg.system));
|
|
65
|
-
obj.setProperty(runtime, "code", JSIConverter<std::string>::toJSI(runtime, arg.code));
|
|
66
|
-
obj.setProperty(runtime, "version", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.version));
|
|
72
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "system"), JSIConverter<std::string>::toJSI(runtime, arg.system));
|
|
73
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "code"), JSIConverter<std::string>::toJSI(runtime, arg.code));
|
|
74
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "version"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.version));
|
|
67
75
|
return obj;
|
|
68
76
|
}
|
|
69
77
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -74,9 +82,9 @@ namespace margelo::nitro {
|
|
|
74
82
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
75
83
|
return false;
|
|
76
84
|
}
|
|
77
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "system"))) return false;
|
|
78
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "code"))) return false;
|
|
79
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "version"))) return false;
|
|
85
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "system")))) return false;
|
|
86
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "code")))) return false;
|
|
87
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "version")))) return false;
|
|
80
88
|
return true;
|
|
81
89
|
}
|
|
82
90
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// SampleType.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
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::healthkit {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (SampleType).
|
|
34
39
|
*/
|
|
35
|
-
struct SampleType {
|
|
40
|
+
struct SampleType final {
|
|
36
41
|
public:
|
|
37
42
|
std::string identifier SWIFT_PRIVATE;
|
|
38
43
|
bool allowsRecalibrationForEstimates SWIFT_PRIVATE;
|
|
@@ -42,6 +47,9 @@ namespace margelo::nitro::healthkit {
|
|
|
42
47
|
public:
|
|
43
48
|
SampleType() = default;
|
|
44
49
|
explicit SampleType(std::string identifier, bool allowsRecalibrationForEstimates, bool isMinimumDurationRestricted, bool isMaximumDurationRestricted): identifier(identifier), allowsRecalibrationForEstimates(allowsRecalibrationForEstimates), isMinimumDurationRestricted(isMinimumDurationRestricted), isMaximumDurationRestricted(isMaximumDurationRestricted) {}
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
friend bool operator==(const SampleType& lhs, const SampleType& rhs) = default;
|
|
45
53
|
};
|
|
46
54
|
|
|
47
55
|
} // namespace margelo::nitro::healthkit
|
|
@@ -54,18 +62,18 @@ namespace margelo::nitro {
|
|
|
54
62
|
static inline margelo::nitro::healthkit::SampleType fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
63
|
jsi::Object obj = arg.asObject(runtime);
|
|
56
64
|
return margelo::nitro::healthkit::SampleType(
|
|
57
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "identifier")),
|
|
58
|
-
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "allowsRecalibrationForEstimates")),
|
|
59
|
-
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "isMinimumDurationRestricted")),
|
|
60
|
-
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "isMaximumDurationRestricted"))
|
|
65
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "identifier"))),
|
|
66
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowsRecalibrationForEstimates"))),
|
|
67
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isMinimumDurationRestricted"))),
|
|
68
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isMaximumDurationRestricted")))
|
|
61
69
|
);
|
|
62
70
|
}
|
|
63
71
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::SampleType& arg) {
|
|
64
72
|
jsi::Object obj(runtime);
|
|
65
|
-
obj.setProperty(runtime, "identifier", JSIConverter<std::string>::toJSI(runtime, arg.identifier));
|
|
66
|
-
obj.setProperty(runtime, "allowsRecalibrationForEstimates", JSIConverter<bool>::toJSI(runtime, arg.allowsRecalibrationForEstimates));
|
|
67
|
-
obj.setProperty(runtime, "isMinimumDurationRestricted", JSIConverter<bool>::toJSI(runtime, arg.isMinimumDurationRestricted));
|
|
68
|
-
obj.setProperty(runtime, "isMaximumDurationRestricted", JSIConverter<bool>::toJSI(runtime, arg.isMaximumDurationRestricted));
|
|
73
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "identifier"), JSIConverter<std::string>::toJSI(runtime, arg.identifier));
|
|
74
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "allowsRecalibrationForEstimates"), JSIConverter<bool>::toJSI(runtime, arg.allowsRecalibrationForEstimates));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "isMinimumDurationRestricted"), JSIConverter<bool>::toJSI(runtime, arg.isMinimumDurationRestricted));
|
|
76
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "isMaximumDurationRestricted"), JSIConverter<bool>::toJSI(runtime, arg.isMaximumDurationRestricted));
|
|
69
77
|
return obj;
|
|
70
78
|
}
|
|
71
79
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -76,10 +84,10 @@ namespace margelo::nitro {
|
|
|
76
84
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
77
85
|
return false;
|
|
78
86
|
}
|
|
79
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "identifier"))) return false;
|
|
80
|
-
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "allowsRecalibrationForEstimates"))) return false;
|
|
81
|
-
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "isMinimumDurationRestricted"))) return false;
|
|
82
|
-
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "isMaximumDurationRestricted"))) return false;
|
|
87
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "identifier")))) return false;
|
|
88
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "allowsRecalibrationForEstimates")))) return false;
|
|
89
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isMinimumDurationRestricted")))) return false;
|
|
90
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "isMaximumDurationRestricted")))) return false;
|
|
83
91
|
return true;
|
|
84
92
|
}
|
|
85
93
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// Source.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
|
|
|
27
32
|
|
|
@@ -32,7 +37,7 @@ namespace margelo::nitro::healthkit {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (Source).
|
|
34
39
|
*/
|
|
35
|
-
struct Source {
|
|
40
|
+
struct Source final {
|
|
36
41
|
public:
|
|
37
42
|
std::string name SWIFT_PRIVATE;
|
|
38
43
|
std::string bundleIdentifier SWIFT_PRIVATE;
|
|
@@ -40,6 +45,9 @@ namespace margelo::nitro::healthkit {
|
|
|
40
45
|
public:
|
|
41
46
|
Source() = default;
|
|
42
47
|
explicit Source(std::string name, std::string bundleIdentifier): name(name), bundleIdentifier(bundleIdentifier) {}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
friend bool operator==(const Source& lhs, const Source& rhs) = default;
|
|
43
51
|
};
|
|
44
52
|
|
|
45
53
|
} // namespace margelo::nitro::healthkit
|
|
@@ -52,14 +60,14 @@ namespace margelo::nitro {
|
|
|
52
60
|
static inline margelo::nitro::healthkit::Source fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
61
|
jsi::Object obj = arg.asObject(runtime);
|
|
54
62
|
return margelo::nitro::healthkit::Source(
|
|
55
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "name")),
|
|
56
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "bundleIdentifier"))
|
|
63
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "name"))),
|
|
64
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleIdentifier")))
|
|
57
65
|
);
|
|
58
66
|
}
|
|
59
67
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::Source& arg) {
|
|
60
68
|
jsi::Object obj(runtime);
|
|
61
|
-
obj.setProperty(runtime, "name", JSIConverter<std::string>::toJSI(runtime, arg.name));
|
|
62
|
-
obj.setProperty(runtime, "bundleIdentifier", JSIConverter<std::string>::toJSI(runtime, arg.bundleIdentifier));
|
|
69
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "name"), JSIConverter<std::string>::toJSI(runtime, arg.name));
|
|
70
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "bundleIdentifier"), JSIConverter<std::string>::toJSI(runtime, arg.bundleIdentifier));
|
|
63
71
|
return obj;
|
|
64
72
|
}
|
|
65
73
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -70,8 +78,8 @@ namespace margelo::nitro {
|
|
|
70
78
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
79
|
return false;
|
|
72
80
|
}
|
|
73
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "name"))) return false;
|
|
74
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "bundleIdentifier"))) return false;
|
|
81
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "name")))) return false;
|
|
82
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "bundleIdentifier")))) return false;
|
|
75
83
|
return true;
|
|
76
84
|
}
|
|
77
85
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// SourceRevision.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 `HybridSourceProxySpec` to properly resolve imports.
|
|
27
32
|
namespace margelo::nitro::healthkit { class HybridSourceProxySpec; }
|
|
@@ -36,7 +41,7 @@ namespace margelo::nitro::healthkit {
|
|
|
36
41
|
/**
|
|
37
42
|
* A struct which can be represented as a JavaScript object (SourceRevision).
|
|
38
43
|
*/
|
|
39
|
-
struct SourceRevision {
|
|
44
|
+
struct SourceRevision final {
|
|
40
45
|
public:
|
|
41
46
|
std::shared_ptr<HybridSourceProxySpec> source SWIFT_PRIVATE;
|
|
42
47
|
std::optional<std::string> version SWIFT_PRIVATE;
|
|
@@ -46,6 +51,9 @@ namespace margelo::nitro::healthkit {
|
|
|
46
51
|
public:
|
|
47
52
|
SourceRevision() = default;
|
|
48
53
|
explicit SourceRevision(std::shared_ptr<HybridSourceProxySpec> source, std::optional<std::string> version, std::string operatingSystemVersion, std::optional<std::string> productType): source(source), version(version), operatingSystemVersion(operatingSystemVersion), productType(productType) {}
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
friend bool operator==(const SourceRevision& lhs, const SourceRevision& rhs) = default;
|
|
49
57
|
};
|
|
50
58
|
|
|
51
59
|
} // namespace margelo::nitro::healthkit
|
|
@@ -58,18 +66,18 @@ namespace margelo::nitro {
|
|
|
58
66
|
static inline margelo::nitro::healthkit::SourceRevision fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
59
67
|
jsi::Object obj = arg.asObject(runtime);
|
|
60
68
|
return margelo::nitro::healthkit::SourceRevision(
|
|
61
|
-
JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>::fromJSI(runtime, obj.getProperty(runtime, "source")),
|
|
62
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "version")),
|
|
63
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "operatingSystemVersion")),
|
|
64
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "productType"))
|
|
69
|
+
JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "source"))),
|
|
70
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "version"))),
|
|
71
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "operatingSystemVersion"))),
|
|
72
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "productType")))
|
|
65
73
|
);
|
|
66
74
|
}
|
|
67
75
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::healthkit::SourceRevision& arg) {
|
|
68
76
|
jsi::Object obj(runtime);
|
|
69
|
-
obj.setProperty(runtime, "source", JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>::toJSI(runtime, arg.source));
|
|
70
|
-
obj.setProperty(runtime, "version", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.version));
|
|
71
|
-
obj.setProperty(runtime, "operatingSystemVersion", JSIConverter<std::string>::toJSI(runtime, arg.operatingSystemVersion));
|
|
72
|
-
obj.setProperty(runtime, "productType", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.productType));
|
|
77
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "source"), JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>::toJSI(runtime, arg.source));
|
|
78
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "version"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.version));
|
|
79
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "operatingSystemVersion"), JSIConverter<std::string>::toJSI(runtime, arg.operatingSystemVersion));
|
|
80
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "productType"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.productType));
|
|
73
81
|
return obj;
|
|
74
82
|
}
|
|
75
83
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -80,10 +88,10 @@ namespace margelo::nitro {
|
|
|
80
88
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
81
89
|
return false;
|
|
82
90
|
}
|
|
83
|
-
if (!JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>::canConvert(runtime, obj.getProperty(runtime, "source"))) return false;
|
|
84
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "version"))) return false;
|
|
85
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "operatingSystemVersion"))) return false;
|
|
86
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "productType"))) return false;
|
|
91
|
+
if (!JSIConverter<std::shared_ptr<margelo::nitro::healthkit::HybridSourceProxySpec>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "source")))) return false;
|
|
92
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "version")))) return false;
|
|
93
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "operatingSystemVersion")))) return false;
|
|
94
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "productType")))) return false;
|
|
87
95
|
return true;
|
|
88
96
|
}
|
|
89
97
|
};
|