@kingstinct/react-native-healthkit 13.3.1 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReactNativeHealthkit.podspec +1 -0
- package/app.plugin.ts +40 -2
- package/ios/BackgroundDeliveryManager.swift +196 -0
- package/ios/CategoryTypeModule.swift +1 -1
- package/ios/CoreModule.swift +24 -0
- package/ios/CorrelationTypeModule.swift +2 -35
- package/ios/ElectrocardiogramModule.swift +2 -34
- package/ios/HeartbeatSeriesModule.swift +2 -34
- package/ios/MedicationModule.swift +3 -35
- package/ios/PredicateHelpers.swift +2 -2
- package/ios/QuantityTypeModule.swift +11 -11
- package/ios/Serializers.swift +58 -90
- package/ios/StateOfMindModule.swift +2 -34
- package/ios/WorkoutProxy.swift +4 -149
- package/ios/generated/HealthkitGenerated.swift +52 -0
- package/lib/commonjs/generated/healthkit.generated.js +745 -0
- package/lib/commonjs/healthkit.ios.js +51 -17
- package/lib/commonjs/healthkit.js +120 -34
- package/lib/commonjs/specs/QuantityTypeModule.nitro.js +1 -0
- package/lib/commonjs/type-tests/generated-typing.js +2 -0
- package/lib/commonjs/types/CategoryType.js +19 -99
- package/lib/commonjs/types/Medication.js +2 -0
- package/lib/commonjs/types/MetadataEnums.js +17 -0
- package/lib/commonjs/types/QuantityType.js +4 -15
- package/lib/commonjs/types/WeatherCondition.js +2 -32
- package/lib/commonjs/types/Workouts.js +3 -98
- package/lib/commonjs/types/index.js +2 -0
- package/lib/module/generated/healthkit.generated.js +742 -0
- package/lib/module/healthkit.ios.js +49 -15
- package/lib/module/healthkit.js +94 -20
- package/lib/module/specs/QuantityTypeModule.nitro.js +1 -0
- package/lib/module/type-tests/generated-typing.js +1 -0
- package/lib/module/types/CategoryType.js +2 -98
- package/lib/module/types/Medication.js +1 -0
- package/lib/module/types/MetadataEnums.js +1 -0
- package/lib/module/types/QuantityType.js +2 -14
- package/lib/module/types/WeatherCondition.js +1 -32
- package/lib/module/types/Workouts.js +2 -98
- package/lib/module/types/index.js +2 -0
- package/lib/typescript/generated/healthkit.generated.d.ts +1006 -0
- package/lib/typescript/healthkit.d.ts +39 -36
- package/lib/typescript/healthkit.ios.d.ts +64 -53
- package/lib/typescript/hooks/useMostRecentQuantitySample.d.ts +3 -2
- package/lib/typescript/hooks/useMostRecentWorkout.d.ts +2 -2
- package/lib/typescript/hooks/useQuantitySampleById.d.ts +5 -4
- package/lib/typescript/hooks/useStatisticsForQuantity.d.ts +2 -2
- package/lib/typescript/hooks/useSubscribeToQuantitySamples.d.ts +1 -1
- package/lib/typescript/modules.d.ts +2 -2
- package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +3 -3
- package/lib/typescript/specs/CoreModule.nitro.d.ts +15 -0
- package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +20 -9
- package/lib/typescript/type-tests/generated-typing.d.ts +1 -0
- package/lib/typescript/types/CategoryType.d.ts +10 -104
- package/lib/typescript/types/CategoryTypeIdentifier.d.ts +1 -61
- package/lib/typescript/types/CorrelationType.d.ts +8 -2
- package/lib/typescript/types/ElectrocardiogramSample.d.ts +8 -1
- package/lib/typescript/types/HeartbeatSeries.d.ts +8 -1
- package/lib/typescript/types/InterfaceVerification.d.ts +14 -1
- package/lib/typescript/types/Medication.d.ts +10 -0
- package/lib/typescript/types/MetadataEnums.d.ts +1 -0
- package/lib/typescript/types/QuantitySample.d.ts +9 -1
- package/lib/typescript/types/QuantityType.d.ts +14 -18
- package/lib/typescript/types/QuantityTypeIdentifier.d.ts +1 -671
- package/lib/typescript/types/QueryOptions.d.ts +8 -4
- package/lib/typescript/types/Shared.d.ts +12 -41
- package/lib/typescript/types/StateOfMind.d.ts +8 -1
- package/lib/typescript/types/Subscriptions.d.ts +11 -11
- package/lib/typescript/types/WeatherCondition.d.ts +1 -30
- package/lib/typescript/types/Workouts.d.ts +20 -104
- package/lib/typescript/types/index.d.ts +2 -0
- package/lib/typescript/utils/getMostRecentQuantitySample.d.ts +2 -1
- package/lib/typescript/utils/getMostRecentWorkout.d.ts +2 -1
- package/lib/typescript/utils/getPreferredUnit.d.ts +2 -1
- package/lib/typescript/utils/getQuantitySampleById.d.ts +2 -1
- package/lib/typescript/utils/subscribeToQuantitySamples.d.ts +1 -1
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +55 -109
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +12 -18
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +5 -14
- package/nitrogen/generated/ios/c++/HybridCoreModuleSpecSwift.hpp +18 -2
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +1 -13
- package/nitrogen/generated/ios/c++/HybridElectrocardiogramModuleSpecSwift.hpp +1 -13
- package/nitrogen/generated/ios/c++/HybridHeartbeatSeriesModuleSpecSwift.hpp +2 -14
- package/nitrogen/generated/ios/c++/HybridMedicationModuleSpecSwift.hpp +1 -13
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +19 -28
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +2 -14
- package/nitrogen/generated/ios/c++/HybridWorkoutProxySpecSwift.hpp +3 -116
- package/nitrogen/generated/ios/swift/CategorySample.swift +4 -329
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifier.swift +112 -108
- package/nitrogen/generated/ios/swift/CategoryTypeIdentifierWriteable.swift +292 -0
- package/nitrogen/generated/ios/swift/CorrelationSample.swift +4 -347
- package/nitrogen/generated/ios/swift/ElectrocardiogramSample.swift +4 -329
- package/nitrogen/generated/ios/swift/FilterForWorkouts.swift +30 -30
- package/nitrogen/generated/ios/swift/FilterForWorkoutsBase.swift +30 -30
- package/nitrogen/generated/ios/swift/GeneralForm.swift +4 -4
- package/nitrogen/generated/ios/swift/HeartbeatSeriesSample.swift +4 -329
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec.swift +2 -0
- package/nitrogen/generated/ios/swift/HybridCoreModuleSpec_cxx.swift +38 -0
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec.swift +1 -27
- package/nitrogen/generated/ios/swift/HybridWorkoutProxySpec_cxx.swift +2 -340
- package/nitrogen/generated/ios/swift/MedicationDoseEvent.swift +4 -329
- package/nitrogen/generated/ios/swift/ObjectTypeIdentifier.swift +492 -492
- package/nitrogen/generated/ios/swift/QuantitySample.swift +4 -329
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifier.swift +380 -384
- package/nitrogen/generated/ios/swift/QuantityTypeIdentifierWriteable.swift +372 -376
- package/nitrogen/generated/ios/swift/{QueryOptionsWithAnchorAndUnit.swift → QueryOptionsWithAnchorAndStringUnit.swift} +5 -5
- package/nitrogen/generated/ios/swift/{QueryOptionsWithSortOrderAndUnit.swift → QueryOptionsWithSortOrderAndStringUnit.swift} +5 -5
- package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +37 -37
- package/nitrogen/generated/ios/swift/SampleTypeIdentifier.swift +492 -492
- package/nitrogen/generated/ios/swift/SampleTypeIdentifierWriteable.swift +482 -486
- package/nitrogen/generated/ios/swift/StateOfMindSample.swift +4 -329
- package/nitrogen/generated/ios/swift/{StatisticsQueryOptions.swift → StatisticsQueryOptionsWithStringUnit.swift} +5 -5
- package/nitrogen/generated/ios/swift/WorkoutEvent.swift +20 -2
- package/nitrogen/generated/ios/swift/WorkoutSample.swift +4 -402
- package/nitrogen/generated/shared/c++/CategorySample.hpp +8 -100
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifier.hpp +153 -149
- package/nitrogen/generated/shared/c++/CategoryTypeIdentifierWriteable.hpp +328 -0
- package/nitrogen/generated/shared/c++/CorrelationSample.hpp +9 -105
- package/nitrogen/generated/shared/c++/ElectrocardiogramSample.hpp +7 -99
- package/nitrogen/generated/shared/c++/FilterForWorkouts.hpp +13 -13
- package/nitrogen/generated/shared/c++/FilterForWorkoutsBase.hpp +13 -13
- package/nitrogen/generated/shared/c++/GeneralForm.hpp +7 -7
- package/nitrogen/generated/shared/c++/HeartbeatSeriesSample.hpp +8 -100
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +5 -2
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridCoreModuleSpec.hpp +4 -2
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +15 -15
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.cpp +1 -27
- package/nitrogen/generated/shared/c++/HybridWorkoutProxySpec.hpp +2 -37
- package/nitrogen/generated/shared/c++/MedicationDoseEvent.hpp +7 -99
- package/nitrogen/generated/shared/c++/ObjectTypeIdentifier.hpp +565 -565
- package/nitrogen/generated/shared/c++/QuantitySample.hpp +8 -100
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifier.hpp +407 -411
- package/nitrogen/generated/shared/c++/QuantityTypeIdentifierWriteable.hpp +398 -402
- package/nitrogen/generated/shared/c++/{QueryOptionsWithAnchorAndUnit.hpp → QueryOptionsWithAnchorAndStringUnit.hpp} +11 -11
- package/nitrogen/generated/shared/c++/{QueryOptionsWithSortOrderAndUnit.hpp → QueryOptionsWithSortOrderAndStringUnit.hpp} +11 -11
- package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +12 -12
- package/nitrogen/generated/shared/c++/SampleTypeIdentifier.hpp +559 -559
- package/nitrogen/generated/shared/c++/SampleTypeIdentifierWriteable.hpp +541 -545
- package/nitrogen/generated/shared/c++/StateOfMindSample.hpp +8 -100
- package/nitrogen/generated/shared/c++/{StatisticsQueryOptions.hpp → StatisticsQueryOptionsWithStringUnit.hpp} +11 -11
- package/nitrogen/generated/shared/c++/WorkoutEvent.hpp +8 -2
- package/nitrogen/generated/shared/c++/WorkoutSample.hpp +7 -120
- package/package.json +5 -2
- package/src/generated/healthkit-schema.json +3680 -0
- package/src/generated/healthkit.generated.ts +1307 -0
- package/src/healthkit.ios.ts +225 -19
- package/src/healthkit.ts +181 -55
- package/src/hooks/useMostRecentQuantitySample.ts +6 -5
- package/src/hooks/useMostRecentWorkout.ts +2 -2
- package/src/hooks/useQuantitySampleById.ts +6 -5
- package/src/hooks/useStatisticsForQuantity.ts +2 -1
- package/src/hooks/useSubscribeToQuantitySamples.ts +1 -1
- package/src/modules.ts +7 -2
- package/src/specs/CategoryTypeModule.nitro.ts +8 -5
- package/src/specs/CoreModule.nitro.ts +20 -0
- package/src/specs/QuantityTypeModule.nitro.ts +81 -7
- package/src/test-setup.ts +2 -0
- package/src/type-tests/generated-typing.ts +133 -0
- package/src/types/CategoryType.ts +52 -148
- package/src/types/CategoryTypeIdentifier.ts +5 -134
- package/src/types/CorrelationType.ts +13 -3
- package/src/types/ElectrocardiogramSample.ts +13 -1
- package/src/types/HeartbeatSeries.ts +13 -1
- package/src/types/InterfaceVerification.ts +38 -1
- package/src/types/Medication.ts +19 -0
- package/src/types/MetadataEnums.ts +15 -0
- package/src/types/QuantitySample.ts +14 -2
- package/src/types/QuantityType.ts +22 -122
- package/src/types/QuantityTypeIdentifier.ts +5 -772
- package/src/types/QueryOptions.ts +11 -4
- package/src/types/Shared.ts +22 -49
- package/src/types/StateOfMind.ts +13 -1
- package/src/types/Subscriptions.ts +19 -13
- package/src/types/WeatherCondition.ts +1 -31
- package/src/types/Workouts.ts +46 -108
- package/src/types/index.ts +2 -0
- package/src/utils/getMostRecentQuantitySample.ts +4 -3
- package/src/utils/getMostRecentWorkout.ts +5 -2
- package/src/utils/getPreferredUnit.ts +5 -4
- package/src/utils/getQuantitySampleById.ts +4 -3
- package/src/utils/subscribeToQuantitySamples.ts +5 -3
- package/nitrogen/generated/ios/swift/HeartRateMotionContext.swift +0 -44
- package/nitrogen/generated/ios/swift/InsulinDeliveryReason.swift +0 -40
- package/nitrogen/generated/ios/swift/WeatherCondition.swift +0 -144
- package/nitrogen/generated/shared/c++/HeartRateMotionContext.hpp +0 -67
- package/nitrogen/generated/shared/c++/InsulinDeliveryReason.hpp +0 -62
- package/nitrogen/generated/shared/c++/WeatherCondition.hpp +0 -88
|
@@ -66,10 +66,14 @@ export interface QueryOptionsWithAnchor extends GenericQueryOptions {
|
|
|
66
66
|
export interface QueryOptionsWithSortOrder extends GenericQueryOptions {
|
|
67
67
|
readonly ascending?: boolean;
|
|
68
68
|
}
|
|
69
|
-
export interface QueryOptionsWithSortOrderAndUnit extends QueryOptionsWithSortOrder {
|
|
70
|
-
readonly unit?:
|
|
69
|
+
export interface QueryOptionsWithSortOrderAndUnit<TUnit extends string = string> extends QueryOptionsWithSortOrder {
|
|
70
|
+
readonly unit?: TUnit;
|
|
71
71
|
}
|
|
72
|
-
export interface QueryOptionsWithAnchorAndUnit extends QueryOptionsWithAnchor {
|
|
73
|
-
readonly unit?:
|
|
72
|
+
export interface QueryOptionsWithAnchorAndUnit<TUnit extends string = string> extends QueryOptionsWithAnchor {
|
|
73
|
+
readonly unit?: TUnit;
|
|
74
|
+
}
|
|
75
|
+
export interface QueryOptionsWithSortOrderAndStringUnit extends QueryOptionsWithSortOrderAndUnit<string> {
|
|
76
|
+
}
|
|
77
|
+
export interface QueryOptionsWithAnchorAndStringUnit extends QueryOptionsWithAnchorAndUnit<string> {
|
|
74
78
|
}
|
|
75
79
|
export {};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { AnyMap } from 'react-native-nitro-modules';
|
|
2
|
+
import type { KnownObjectMetadata, KnownSampleMetadata } from '../generated/healthkit.generated';
|
|
2
3
|
import type { CategoryTypeIdentifier, CategoryTypeIdentifierWriteable } from './CategoryTypeIdentifier';
|
|
3
4
|
import type { CharacteristicTypeIdentifier } from './Characteristics';
|
|
4
5
|
import type { ActivitySummaryTypeIdentifier, AudiogramTypeIdentifier, ElectrocardiogramTypeIdentifier, HeartbeatSeriesTypeIdentifier, HKVisionPrescriptionTypeIdentifier, StateOfMindTypeIdentifier, UserAnnotatedMedicationTypeIdentifier, WorkoutRouteTypeIdentifier, WorkoutTypeIdentifier } from './Constants';
|
|
5
6
|
import type { CorrelationTypeIdentifier } from './CorrelationType';
|
|
6
7
|
import type { Device } from './Device';
|
|
7
|
-
import type { HeartRateMotionContext, InsulinDeliveryReason, Quantity } from './QuantityType';
|
|
8
8
|
import type { QuantityTypeIdentifier, QuantityTypeIdentifierWriteable } from './QuantityTypeIdentifier';
|
|
9
9
|
import type { SourceRevision } from './Source';
|
|
10
|
-
import type { WeatherCondition } from './WeatherCondition';
|
|
11
10
|
export interface DeletedSample {
|
|
12
11
|
readonly uuid: string;
|
|
13
12
|
readonly metadata?: AnyMap;
|
|
@@ -16,42 +15,21 @@ export type ObjectTypeIdentifier = CharacteristicTypeIdentifier | SampleTypeIden
|
|
|
16
15
|
export type PerObjectTypeIdentifier = typeof HKVisionPrescriptionTypeIdentifier | typeof UserAnnotatedMedicationTypeIdentifier;
|
|
17
16
|
export type SampleTypeIdentifier = CategoryTypeIdentifier | CorrelationTypeIdentifier | QuantityTypeIdentifier | typeof StateOfMindTypeIdentifier | typeof AudiogramTypeIdentifier | typeof HeartbeatSeriesTypeIdentifier | typeof WorkoutRouteTypeIdentifier | typeof WorkoutTypeIdentifier | typeof ElectrocardiogramTypeIdentifier;
|
|
18
17
|
export type SampleTypeIdentifierWriteable = CategoryTypeIdentifierWriteable | CorrelationTypeIdentifier | QuantityTypeIdentifierWriteable | typeof StateOfMindTypeIdentifier | typeof AudiogramTypeIdentifier | typeof HeartbeatSeriesTypeIdentifier | typeof WorkoutRouteTypeIdentifier | typeof WorkoutTypeIdentifier;
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
readonly
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
readonly
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
readonly HKSyncIdentifier?: string;
|
|
30
|
-
readonly HKSyncVersion?: number;
|
|
31
|
-
readonly HKWasTakenInLab?: boolean;
|
|
32
|
-
readonly HKReferenceRangeLowerLimit?: number;
|
|
33
|
-
readonly HKReferenceRangeUpperLimit?: number;
|
|
34
|
-
}
|
|
18
|
+
export type MetadataWithUnknown<T extends object> = AnyMap & T;
|
|
19
|
+
export type GenericMetadata = AnyMap & KnownObjectMetadata;
|
|
20
|
+
export type WithTypedMetadata<T, TMetadata extends object> = Omit<T, 'metadata'> & {
|
|
21
|
+
readonly metadata: AnyMap & TMetadata;
|
|
22
|
+
};
|
|
23
|
+
export type WithOptionalTypedMetadata<T, TMetadata extends object> = Omit<T, 'metadata'> & {
|
|
24
|
+
readonly metadata?: AnyMap & TMetadata;
|
|
25
|
+
};
|
|
26
|
+
export type BaseObjectTyped<TMetadata extends object = KnownObjectMetadata> = WithTypedMetadata<BaseObject, TMetadata>;
|
|
27
|
+
export type BaseSampleTyped<TMetadata extends object = KnownSampleMetadata> = WithTypedMetadata<BaseSample, TMetadata>;
|
|
35
28
|
export interface BaseObject {
|
|
36
29
|
readonly uuid: string;
|
|
37
30
|
readonly sourceRevision: SourceRevision;
|
|
38
31
|
readonly device?: Device;
|
|
39
32
|
readonly metadata: AnyMap;
|
|
40
|
-
readonly metadataExternalUUID?: string;
|
|
41
|
-
readonly metadataTimeZone?: string;
|
|
42
|
-
readonly metadataWasUserEntered?: boolean;
|
|
43
|
-
readonly metadataDeviceSerialNumber?: string;
|
|
44
|
-
readonly metadataUdiDeviceIdentifier?: string;
|
|
45
|
-
readonly metadataUdiProductionIdentifier?: string;
|
|
46
|
-
readonly metadataDigitalSignature?: string;
|
|
47
|
-
readonly metadataDeviceName?: string;
|
|
48
|
-
readonly metadataDeviceManufacturerName?: string;
|
|
49
|
-
readonly metadataSyncIdentifier?: string;
|
|
50
|
-
readonly metadataSyncVersion?: number;
|
|
51
|
-
readonly metadataWasTakenInLab?: boolean;
|
|
52
|
-
readonly metadataReferenceRangeLowerLimit?: number;
|
|
53
|
-
readonly metadataReferenceRangeUpperLimit?: number;
|
|
54
|
-
readonly metadataAlgorithmVersion?: number;
|
|
55
33
|
}
|
|
56
34
|
export interface SampleType {
|
|
57
35
|
identifier: string;
|
|
@@ -64,12 +42,5 @@ export interface BaseSample extends BaseObject {
|
|
|
64
42
|
readonly startDate: Date;
|
|
65
43
|
readonly endDate: Date;
|
|
66
44
|
readonly hasUndeterminedDuration: boolean;
|
|
67
|
-
readonly
|
|
68
|
-
readonly metadataWeatherHumidity?: Quantity;
|
|
69
|
-
readonly metadataWeatherTemperature?: Quantity;
|
|
70
|
-
readonly metadataInsulinDeliveryReason?: InsulinDeliveryReason;
|
|
71
|
-
/**
|
|
72
|
-
* postprandial or preprandial (https://developer.apple.com/documentation/healthkit/hkbloodglucosemealtime)
|
|
73
|
-
*/
|
|
74
|
-
readonly metadataHeartRateMotionContext?: HeartRateMotionContext;
|
|
45
|
+
readonly metadata: AnyMap;
|
|
75
46
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { KnownSampleMetadata } from '../generated/healthkit.generated';
|
|
2
|
+
import type { BaseSample, DeletedSample, WithTypedMetadata } from './Shared';
|
|
2
3
|
export declare enum StateOfMindValenceClassification {
|
|
3
4
|
veryUnpleasant = 1,
|
|
4
5
|
unpleasant = 2,
|
|
@@ -19,11 +20,17 @@ export interface StateOfMindSample extends BaseSample {
|
|
|
19
20
|
readonly associations: readonly StateOfMindAssociation[];
|
|
20
21
|
readonly labels: readonly StateOfMindLabel[];
|
|
21
22
|
}
|
|
23
|
+
export type StateOfMindSampleTyped = WithTypedMetadata<StateOfMindSample, KnownSampleMetadata>;
|
|
22
24
|
export interface StateOfMindSamplesWithAnchorResponse {
|
|
23
25
|
readonly samples: readonly StateOfMindSample[];
|
|
24
26
|
readonly deletedSamples: readonly DeletedSample[];
|
|
25
27
|
readonly newAnchor: string;
|
|
26
28
|
}
|
|
29
|
+
export interface StateOfMindSamplesWithAnchorResponseTyped {
|
|
30
|
+
readonly samples: readonly StateOfMindSampleTyped[];
|
|
31
|
+
readonly deletedSamples: readonly DeletedSample[];
|
|
32
|
+
readonly newAnchor: string;
|
|
33
|
+
}
|
|
27
34
|
/**
|
|
28
35
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkstateofmind/label Apple Docs}
|
|
29
36
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CategorySampleTyped } from './CategoryType';
|
|
2
2
|
import type { CategoryTypeIdentifier } from './CategoryTypeIdentifier';
|
|
3
|
-
import type {
|
|
3
|
+
import type { QuantitySampleTyped } from './QuantitySample';
|
|
4
4
|
import type { QuantityTypeIdentifier } from './QuantityTypeIdentifier';
|
|
5
5
|
import type { SampleTypeIdentifier } from './Shared';
|
|
6
6
|
export interface EmitterSubscription {
|
|
@@ -10,21 +10,21 @@ export interface OnChangeCallbackArgs {
|
|
|
10
10
|
readonly typeIdentifier: SampleTypeIdentifier;
|
|
11
11
|
readonly errorMessage?: string;
|
|
12
12
|
}
|
|
13
|
-
export interface OnQuantitySamplesCallbackError {
|
|
14
|
-
readonly typeIdentifier:
|
|
13
|
+
export interface OnQuantitySamplesCallbackError<T extends QuantityTypeIdentifier = QuantityTypeIdentifier> {
|
|
14
|
+
readonly typeIdentifier: T;
|
|
15
15
|
readonly errorMessage: string;
|
|
16
16
|
}
|
|
17
|
-
export interface OnQuantitySamplesCallbackSuccess {
|
|
18
|
-
readonly typeIdentifier:
|
|
19
|
-
readonly samples: readonly
|
|
17
|
+
export interface OnQuantitySamplesCallbackSuccess<T extends QuantityTypeIdentifier = QuantityTypeIdentifier> {
|
|
18
|
+
readonly typeIdentifier: T;
|
|
19
|
+
readonly samples: readonly QuantitySampleTyped<T>[];
|
|
20
20
|
}
|
|
21
|
-
export type OnQuantitySamplesCallback = OnQuantitySamplesCallbackError | OnQuantitySamplesCallbackSuccess
|
|
22
|
-
export interface OnCategorySamplesCallbackError {
|
|
23
|
-
readonly typeIdentifier:
|
|
21
|
+
export type OnQuantitySamplesCallback<T extends QuantityTypeIdentifier = QuantityTypeIdentifier> = OnQuantitySamplesCallbackError<T> | OnQuantitySamplesCallbackSuccess<T>;
|
|
22
|
+
export interface OnCategorySamplesCallbackError<T extends CategoryTypeIdentifier = CategoryTypeIdentifier> {
|
|
23
|
+
readonly typeIdentifier: T;
|
|
24
24
|
readonly errorMessage: string;
|
|
25
25
|
}
|
|
26
26
|
export interface OnCategorySamplesCallbackSuccess<T extends CategoryTypeIdentifier> {
|
|
27
|
-
readonly typeIdentifier:
|
|
27
|
+
readonly typeIdentifier: T;
|
|
28
28
|
readonly samples: readonly CategorySampleTyped<T>[];
|
|
29
29
|
}
|
|
30
|
-
export type OnCategorySamplesCallback<T extends CategoryTypeIdentifier> = OnCategorySamplesCallbackError | OnCategorySamplesCallbackSuccess<T>;
|
|
30
|
+
export type OnCategorySamplesCallback<T extends CategoryTypeIdentifier> = OnCategorySamplesCallbackError<T> | OnCategorySamplesCallbackSuccess<T>;
|
|
@@ -1,30 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
none = 0,
|
|
3
|
-
clear = 1,
|
|
4
|
-
fair = 2,
|
|
5
|
-
partlyCloudy = 3,
|
|
6
|
-
mostlyCloudy = 4,
|
|
7
|
-
cloudy = 5,
|
|
8
|
-
foggy = 6,
|
|
9
|
-
haze = 7,
|
|
10
|
-
windy = 8,
|
|
11
|
-
blustery = 9,
|
|
12
|
-
smoky = 10,
|
|
13
|
-
dust = 11,
|
|
14
|
-
snow = 12,
|
|
15
|
-
hail = 13,
|
|
16
|
-
sleet = 14,
|
|
17
|
-
freezingDrizzle = 15,
|
|
18
|
-
freezingRain = 16,
|
|
19
|
-
mixedRainAndHail = 17,
|
|
20
|
-
mixedRainAndSnow = 18,
|
|
21
|
-
mixedRainAndSleet = 19,
|
|
22
|
-
mixedSnowAndSleet = 20,
|
|
23
|
-
drizzle = 21,
|
|
24
|
-
scatteredShowers = 22,
|
|
25
|
-
showers = 23,
|
|
26
|
-
thunderstorms = 24,
|
|
27
|
-
tropicalStorm = 25,
|
|
28
|
-
hurricane = 26,
|
|
29
|
-
tornado = 27
|
|
30
|
-
}
|
|
1
|
+
export { WeatherCondition } from '../generated/healthkit.generated';
|
|
@@ -1,109 +1,19 @@
|
|
|
1
|
+
import type { AnyMap } from 'react-native-nitro-modules';
|
|
2
|
+
import type { WorkoutEventTypedMetadata, WorkoutTypedMetadata } from '../generated/healthkit.generated';
|
|
3
|
+
import { WorkoutActivityType, WorkoutEventType } from '../generated/healthkit.generated';
|
|
1
4
|
import type { WorkoutProxy } from '../specs/WorkoutProxy.nitro';
|
|
2
5
|
import type { BaseSample, ComparisonPredicateOperator } from '../types';
|
|
3
6
|
import type { Quantity } from './QuantityType';
|
|
4
7
|
import type { FilterForSamplesBase } from './QueryOptions';
|
|
5
|
-
import type { DeletedSample } from './Shared';
|
|
6
|
-
export
|
|
7
|
-
americanFootball = 1,
|
|
8
|
-
archery = 2,
|
|
9
|
-
australianFootball = 3,
|
|
10
|
-
badminton = 4,
|
|
11
|
-
baseball = 5,
|
|
12
|
-
basketball = 6,
|
|
13
|
-
bowling = 7,
|
|
14
|
-
boxing = 8,// See also HKWorkoutActivityTypeKickboxing.,
|
|
15
|
-
climbing = 9,
|
|
16
|
-
cricket = 10,
|
|
17
|
-
crossTraining = 11,// Any mix of cardio and/or strength training. See also HKWorkoutActivityTypeCoreTraining and HKWorkoutActivityTypeFlexibility.,
|
|
18
|
-
curling = 12,
|
|
19
|
-
cycling = 13,
|
|
20
|
-
dance = 14,
|
|
21
|
-
danceInspiredTraining = 15,// This enum remains available to access older data.,
|
|
22
|
-
elliptical = 16,
|
|
23
|
-
equestrianSports = 17,// Polo, Horse Racing, Horse Riding, etc.,
|
|
24
|
-
fencing = 18,
|
|
25
|
-
fishing = 19,
|
|
26
|
-
functionalStrengthTraining = 20,// Primarily free weights and/or body weight and/or accessories,
|
|
27
|
-
golf = 21,
|
|
28
|
-
gymnastics = 22,
|
|
29
|
-
handball = 23,
|
|
30
|
-
hiking = 24,
|
|
31
|
-
hockey = 25,// Ice Hockey, Field Hockey, etc.,
|
|
32
|
-
hunting = 26,
|
|
33
|
-
lacrosse = 27,
|
|
34
|
-
martialArts = 28,
|
|
35
|
-
mindAndBody = 29,// Qigong, meditation, etc.,
|
|
36
|
-
mixedMetabolicCardioTraining = 30,// This enum remains available to access older data.,
|
|
37
|
-
paddleSports = 31,// Canoeing, Kayaking, Outrigger, Stand Up Paddle Board, etc.,
|
|
38
|
-
play = 32,// Dodge Ball, Hopscotch, Tetherball, Jungle Gym, etc.,
|
|
39
|
-
preparationAndRecovery = 33,// Foam rolling, stretching, etc.,
|
|
40
|
-
racquetball = 34,
|
|
41
|
-
rowing = 35,
|
|
42
|
-
rugby = 36,
|
|
43
|
-
running = 37,
|
|
44
|
-
sailing = 38,
|
|
45
|
-
skatingSports = 39,// Ice Skating, Speed Skating, Inline Skating, Skateboarding, etc.,
|
|
46
|
-
snowSports = 40,// Sledding, Snowmobiling, Building a Snowman, etc. See also HKWorkoutActivityTypeCrossCountrySkiing, HKWorkoutActivityTypeSnowboarding, and HKWorkoutActivityTypeDownhillSkiing.,
|
|
47
|
-
soccer = 41,
|
|
48
|
-
softball = 42,
|
|
49
|
-
squash = 43,
|
|
50
|
-
stairClimbing = 44,// See also HKWorkoutActivityTypeStairs and HKWorkoutActivityTypeStepTraining.,
|
|
51
|
-
surfingSports = 45,// Traditional Surfing, Kite Surfing, Wind Surfing, etc.,
|
|
52
|
-
swimming = 46,
|
|
53
|
-
tableTennis = 47,
|
|
54
|
-
tennis = 48,
|
|
55
|
-
trackAndField = 49,// Shot Put, Javelin, Pole Vaulting, etc.,
|
|
56
|
-
traditionalStrengthTraining = 50,// Primarily machines and/or free weights,
|
|
57
|
-
volleyball = 51,
|
|
58
|
-
walking = 52,
|
|
59
|
-
waterFitness = 53,
|
|
60
|
-
waterPolo = 54,
|
|
61
|
-
waterSports = 55,// Water Skiing, Wake Boarding, etc.,
|
|
62
|
-
wrestling = 56,
|
|
63
|
-
yoga = 57,
|
|
64
|
-
barre = 58,// HKWorkoutActivityTypeDanceInspiredTraining,
|
|
65
|
-
coreTraining = 59,
|
|
66
|
-
crossCountrySkiing = 60,
|
|
67
|
-
downhillSkiing = 61,
|
|
68
|
-
flexibility = 62,
|
|
69
|
-
highIntensityIntervalTraining = 63,
|
|
70
|
-
jumpRope = 64,
|
|
71
|
-
kickboxing = 65,
|
|
72
|
-
pilates = 66,// HKWorkoutActivityTypeDanceInspiredTraining,
|
|
73
|
-
snowboarding = 67,
|
|
74
|
-
stairs = 68,
|
|
75
|
-
stepTraining = 69,
|
|
76
|
-
wheelchairWalkPace = 70,
|
|
77
|
-
wheelchairRunPace = 71,
|
|
78
|
-
taiChi = 72,
|
|
79
|
-
mixedCardio = 73,// HKWorkoutActivityTypeMixedMetabolicCardioTraining,
|
|
80
|
-
handCycling = 74,
|
|
81
|
-
discSports = 75,
|
|
82
|
-
fitnessGaming = 76,
|
|
83
|
-
cardioDance = 77,
|
|
84
|
-
socialDance = 78,
|
|
85
|
-
pickleball = 79,
|
|
86
|
-
cooldown = 80,
|
|
87
|
-
swimBikeRun = 82,
|
|
88
|
-
transition = 83,
|
|
89
|
-
underwaterDiving = 84,
|
|
90
|
-
other = 3000
|
|
91
|
-
}
|
|
8
|
+
import type { DeletedSample, WithOptionalTypedMetadata, WithTypedMetadata } from './Shared';
|
|
9
|
+
export { WorkoutActivityType, WorkoutEventType };
|
|
92
10
|
export interface WorkoutEvent {
|
|
93
11
|
readonly type: WorkoutEventType;
|
|
94
12
|
readonly startDate: Date;
|
|
95
13
|
readonly endDate: Date;
|
|
14
|
+
readonly metadata?: AnyMap;
|
|
96
15
|
}
|
|
97
|
-
export
|
|
98
|
-
pause = 1,
|
|
99
|
-
resume = 2,
|
|
100
|
-
lap = 3,
|
|
101
|
-
marker = 4,
|
|
102
|
-
motionPaused = 5,
|
|
103
|
-
motionResumed = 6,
|
|
104
|
-
segment = 7,
|
|
105
|
-
pauseOrResumeRequest = 8
|
|
106
|
-
}
|
|
16
|
+
export type WorkoutEventTyped = WithOptionalTypedMetadata<WorkoutEvent, WorkoutEventTypedMetadata>;
|
|
107
17
|
export interface WorkoutActivity {
|
|
108
18
|
readonly startDate: Date;
|
|
109
19
|
readonly endDate: Date;
|
|
@@ -120,6 +30,11 @@ export interface QueryWorkoutSamplesWithAnchorResponse {
|
|
|
120
30
|
readonly deletedSamples: readonly DeletedSample[];
|
|
121
31
|
readonly newAnchor: string;
|
|
122
32
|
}
|
|
33
|
+
export interface QueryWorkoutSamplesWithAnchorResponseTyped {
|
|
34
|
+
readonly workouts: readonly WorkoutProxyTyped[];
|
|
35
|
+
readonly deletedSamples: readonly DeletedSample[];
|
|
36
|
+
readonly newAnchor: string;
|
|
37
|
+
}
|
|
123
38
|
export type WorkoutDurationPredicate = {
|
|
124
39
|
readonly predicateOperator: ComparisonPredicateOperator;
|
|
125
40
|
readonly durationInSeconds: number;
|
|
@@ -179,7 +94,7 @@ export interface WorkoutTotals {
|
|
|
179
94
|
readonly distance?: number;
|
|
180
95
|
readonly energyBurned?: number;
|
|
181
96
|
}
|
|
182
|
-
export interface WorkoutSample extends BaseSample {
|
|
97
|
+
export interface WorkoutSample extends Omit<BaseSample, 'metadata'> {
|
|
183
98
|
readonly workoutActivityType: WorkoutActivityType;
|
|
184
99
|
readonly duration: Quantity;
|
|
185
100
|
readonly totalEnergyBurned?: Quantity;
|
|
@@ -188,10 +103,11 @@ export interface WorkoutSample extends BaseSample {
|
|
|
188
103
|
readonly totalFlightsClimbed?: Quantity;
|
|
189
104
|
readonly events?: readonly WorkoutEvent[];
|
|
190
105
|
readonly activities?: readonly WorkoutActivity[];
|
|
191
|
-
readonly
|
|
192
|
-
readonly metadataElevationAscended?: Quantity;
|
|
193
|
-
readonly metadataElevationDescended?: Quantity;
|
|
194
|
-
readonly metadataIndoorWorkout?: boolean;
|
|
195
|
-
readonly metadataAverageSpeed?: Quantity;
|
|
196
|
-
readonly metadataMaximumSpeed?: Quantity;
|
|
106
|
+
readonly metadata: AnyMap;
|
|
197
107
|
}
|
|
108
|
+
export type WorkoutSampleTyped = WithTypedMetadata<Omit<WorkoutSample, 'events'> & {
|
|
109
|
+
readonly events?: readonly WorkoutEventTyped[];
|
|
110
|
+
}, WorkoutTypedMetadata>;
|
|
111
|
+
export type WorkoutProxyTyped = Omit<WorkoutProxy, keyof WorkoutSample | 'toJSON'> & WorkoutSampleTyped & {
|
|
112
|
+
toJSON(key?: string): WorkoutSampleTyped;
|
|
113
|
+
};
|
|
@@ -7,6 +7,8 @@ export * from './Constants';
|
|
|
7
7
|
export * from './CorrelationType';
|
|
8
8
|
export * from './Device';
|
|
9
9
|
export * from './HeartbeatSeries';
|
|
10
|
+
export * from './Medication';
|
|
11
|
+
export * from './MetadataEnums';
|
|
10
12
|
export * from './QuantitySample';
|
|
11
13
|
export * from './QuantityType';
|
|
12
14
|
export * from './QuantityTypeIdentifier';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UnitForIdentifier } from '../types/QuantityType';
|
|
1
2
|
import type { QuantityTypeIdentifier } from '../types/QuantityTypeIdentifier';
|
|
2
|
-
declare function getMostRecentQuantitySample(identifier:
|
|
3
|
+
declare function getMostRecentQuantitySample<T extends QuantityTypeIdentifier>(identifier: T, unit?: UnitForIdentifier<T>): Promise<import("..").QuantitySampleTyped<T> | undefined>;
|
|
3
4
|
export default getMostRecentQuantitySample;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { WorkoutProxyTyped } from '../types/Workouts';
|
|
2
|
+
declare const getMostRecentWorkout: () => Promise<WorkoutProxyTyped | undefined>;
|
|
2
3
|
export default getMostRecentWorkout;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UnitForIdentifier } from '../types/QuantityType';
|
|
1
2
|
import type { QuantityTypeIdentifier } from '../types/QuantityTypeIdentifier';
|
|
2
|
-
declare const getPreferredUnit: (quantityType:
|
|
3
|
+
declare const getPreferredUnit: <T extends QuantityTypeIdentifier>(quantityType: T) => Promise<UnitForIdentifier<T>>;
|
|
3
4
|
export default getPreferredUnit;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UnitForIdentifier } from '../types/QuantityType';
|
|
1
2
|
import type { QuantityTypeIdentifier } from '../types/QuantityTypeIdentifier';
|
|
2
|
-
declare function getQuantitySampleById(identifier:
|
|
3
|
+
declare function getQuantitySampleById<T extends QuantityTypeIdentifier>(identifier: T, uuid: string, unit?: UnitForIdentifier<T>): Promise<import("..").QuantitySampleTyped<T> | undefined>;
|
|
3
4
|
export default getQuantitySampleById;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { QuantityTypeIdentifier } from '../types';
|
|
2
2
|
import type { OnQuantitySamplesCallback } from '../types/Subscriptions';
|
|
3
|
-
export declare const subscribeToQuantitySamples: (identifier:
|
|
3
|
+
export declare const subscribeToQuantitySamples: <TIdentifier extends QuantityTypeIdentifier>(identifier: TIdentifier, callback: (args: OnQuantitySamplesCallback<TIdentifier>) => void, after?: Date) => {
|
|
4
4
|
remove: () => boolean;
|
|
5
5
|
};
|
|
@@ -62,8 +62,6 @@ namespace margelo::nitro::healthkit { struct FilterForWorkouts; }
|
|
|
62
62
|
namespace margelo::nitro::healthkit { enum class FitzpatrickSkinType; }
|
|
63
63
|
// Forward declaration of `GeneralForm` to properly resolve imports.
|
|
64
64
|
namespace margelo::nitro::healthkit { enum class GeneralForm; }
|
|
65
|
-
// Forward declaration of `HeartRateMotionContext` to properly resolve imports.
|
|
66
|
-
namespace margelo::nitro::healthkit { enum class HeartRateMotionContext; }
|
|
67
65
|
// Forward declaration of `HeartbeatSeriesSample` to properly resolve imports.
|
|
68
66
|
namespace margelo::nitro::healthkit { struct HeartbeatSeriesSample; }
|
|
69
67
|
// Forward declaration of `HeartbeatSeriesSamplesWithAnchorResponse` to properly resolve imports.
|
|
@@ -96,8 +94,6 @@ namespace margelo::nitro::healthkit { class HybridWorkoutProxySpec; }
|
|
|
96
94
|
namespace margelo::nitro::healthkit { class HybridWorkoutsModuleSpec; }
|
|
97
95
|
// Forward declaration of `IdentifierWithUnit` to properly resolve imports.
|
|
98
96
|
namespace margelo::nitro::healthkit { struct IdentifierWithUnit; }
|
|
99
|
-
// Forward declaration of `InsulinDeliveryReason` to properly resolve imports.
|
|
100
|
-
namespace margelo::nitro::healthkit { enum class InsulinDeliveryReason; }
|
|
101
97
|
// Forward declaration of `LocationForSaving` to properly resolve imports.
|
|
102
98
|
namespace margelo::nitro::healthkit { struct LocationForSaving; }
|
|
103
99
|
// Forward declaration of `MedicationConcept` to properly resolve imports.
|
|
@@ -162,12 +158,10 @@ namespace margelo::nitro::healthkit { struct StateOfMindSamplesWithAnchorRespons
|
|
|
162
158
|
namespace margelo::nitro::healthkit { enum class StateOfMindValenceClassification; }
|
|
163
159
|
// Forward declaration of `StatisticsOptions` to properly resolve imports.
|
|
164
160
|
namespace margelo::nitro::healthkit { enum class StatisticsOptions; }
|
|
165
|
-
// Forward declaration of `
|
|
166
|
-
namespace margelo::nitro::healthkit { struct
|
|
161
|
+
// Forward declaration of `StatisticsQueryOptionsWithStringUnit` to properly resolve imports.
|
|
162
|
+
namespace margelo::nitro::healthkit { struct StatisticsQueryOptionsWithStringUnit; }
|
|
167
163
|
// Forward declaration of `UserAnnotatedMedication` to properly resolve imports.
|
|
168
164
|
namespace margelo::nitro::healthkit { struct UserAnnotatedMedication; }
|
|
169
|
-
// Forward declaration of `WeatherCondition` to properly resolve imports.
|
|
170
|
-
namespace margelo::nitro::healthkit { enum class WeatherCondition; }
|
|
171
165
|
// Forward declaration of `WheelchairUse` to properly resolve imports.
|
|
172
166
|
namespace margelo::nitro::healthkit { enum class WheelchairUse; }
|
|
173
167
|
// Forward declaration of `WorkoutActivityType` to properly resolve imports.
|
|
@@ -247,7 +241,6 @@ namespace ReactNativeHealthkit { class HybridWorkoutsModuleSpec_cxx; }
|
|
|
247
241
|
#include "FilterForWorkoutsBase.hpp"
|
|
248
242
|
#include "FitzpatrickSkinType.hpp"
|
|
249
243
|
#include "GeneralForm.hpp"
|
|
250
|
-
#include "HeartRateMotionContext.hpp"
|
|
251
244
|
#include "Heartbeat.hpp"
|
|
252
245
|
#include "HeartbeatSeriesSample.hpp"
|
|
253
246
|
#include "HeartbeatSeriesSamplesWithAnchorResponse.hpp"
|
|
@@ -264,7 +257,6 @@ namespace ReactNativeHealthkit { class HybridWorkoutsModuleSpec_cxx; }
|
|
|
264
257
|
#include "HybridWorkoutProxySpec.hpp"
|
|
265
258
|
#include "HybridWorkoutsModuleSpec.hpp"
|
|
266
259
|
#include "IdentifierWithUnit.hpp"
|
|
267
|
-
#include "InsulinDeliveryReason.hpp"
|
|
268
260
|
#include "LocationForSaving.hpp"
|
|
269
261
|
#include "MedicationConcept.hpp"
|
|
270
262
|
#include "MedicationDoseEvent.hpp"
|
|
@@ -297,9 +289,8 @@ namespace ReactNativeHealthkit { class HybridWorkoutsModuleSpec_cxx; }
|
|
|
297
289
|
#include "StateOfMindSamplesWithAnchorResponse.hpp"
|
|
298
290
|
#include "StateOfMindValenceClassification.hpp"
|
|
299
291
|
#include "StatisticsOptions.hpp"
|
|
300
|
-
#include "
|
|
292
|
+
#include "StatisticsQueryOptionsWithStringUnit.hpp"
|
|
301
293
|
#include "UserAnnotatedMedication.hpp"
|
|
302
|
-
#include "WeatherCondition.hpp"
|
|
303
294
|
#include "WheelchairUse.hpp"
|
|
304
295
|
#include "WorkoutActivity.hpp"
|
|
305
296
|
#include "WorkoutActivityType.hpp"
|
|
@@ -332,66 +323,6 @@ namespace ReactNativeHealthkit { class HybridWorkoutsModuleSpec_cxx; }
|
|
|
332
323
|
*/
|
|
333
324
|
namespace margelo::nitro::healthkit::bridge::swift {
|
|
334
325
|
|
|
335
|
-
// pragma MARK: std::optional<WeatherCondition>
|
|
336
|
-
/**
|
|
337
|
-
* Specialized version of `std::optional<WeatherCondition>`.
|
|
338
|
-
*/
|
|
339
|
-
using std__optional_WeatherCondition_ = std::optional<WeatherCondition>;
|
|
340
|
-
inline std::optional<WeatherCondition> create_std__optional_WeatherCondition_(const WeatherCondition& value) noexcept {
|
|
341
|
-
return std::optional<WeatherCondition>(value);
|
|
342
|
-
}
|
|
343
|
-
inline bool has_value_std__optional_WeatherCondition_(const std::optional<WeatherCondition>& optional) noexcept {
|
|
344
|
-
return optional.has_value();
|
|
345
|
-
}
|
|
346
|
-
inline WeatherCondition get_std__optional_WeatherCondition_(const std::optional<WeatherCondition>& optional) noexcept {
|
|
347
|
-
return optional.value();
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
// pragma MARK: std::optional<Quantity>
|
|
351
|
-
/**
|
|
352
|
-
* Specialized version of `std::optional<Quantity>`.
|
|
353
|
-
*/
|
|
354
|
-
using std__optional_Quantity_ = std::optional<Quantity>;
|
|
355
|
-
inline std::optional<Quantity> create_std__optional_Quantity_(const Quantity& value) noexcept {
|
|
356
|
-
return std::optional<Quantity>(value);
|
|
357
|
-
}
|
|
358
|
-
inline bool has_value_std__optional_Quantity_(const std::optional<Quantity>& optional) noexcept {
|
|
359
|
-
return optional.has_value();
|
|
360
|
-
}
|
|
361
|
-
inline Quantity get_std__optional_Quantity_(const std::optional<Quantity>& optional) noexcept {
|
|
362
|
-
return optional.value();
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
// pragma MARK: std::optional<InsulinDeliveryReason>
|
|
366
|
-
/**
|
|
367
|
-
* Specialized version of `std::optional<InsulinDeliveryReason>`.
|
|
368
|
-
*/
|
|
369
|
-
using std__optional_InsulinDeliveryReason_ = std::optional<InsulinDeliveryReason>;
|
|
370
|
-
inline std::optional<InsulinDeliveryReason> create_std__optional_InsulinDeliveryReason_(const InsulinDeliveryReason& value) noexcept {
|
|
371
|
-
return std::optional<InsulinDeliveryReason>(value);
|
|
372
|
-
}
|
|
373
|
-
inline bool has_value_std__optional_InsulinDeliveryReason_(const std::optional<InsulinDeliveryReason>& optional) noexcept {
|
|
374
|
-
return optional.has_value();
|
|
375
|
-
}
|
|
376
|
-
inline InsulinDeliveryReason get_std__optional_InsulinDeliveryReason_(const std::optional<InsulinDeliveryReason>& optional) noexcept {
|
|
377
|
-
return optional.value();
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
// pragma MARK: std::optional<HeartRateMotionContext>
|
|
381
|
-
/**
|
|
382
|
-
* Specialized version of `std::optional<HeartRateMotionContext>`.
|
|
383
|
-
*/
|
|
384
|
-
using std__optional_HeartRateMotionContext_ = std::optional<HeartRateMotionContext>;
|
|
385
|
-
inline std::optional<HeartRateMotionContext> create_std__optional_HeartRateMotionContext_(const HeartRateMotionContext& value) noexcept {
|
|
386
|
-
return std::optional<HeartRateMotionContext>(value);
|
|
387
|
-
}
|
|
388
|
-
inline bool has_value_std__optional_HeartRateMotionContext_(const std::optional<HeartRateMotionContext>& optional) noexcept {
|
|
389
|
-
return optional.has_value();
|
|
390
|
-
}
|
|
391
|
-
inline HeartRateMotionContext get_std__optional_HeartRateMotionContext_(const std::optional<HeartRateMotionContext>& optional) noexcept {
|
|
392
|
-
return optional.value();
|
|
393
|
-
}
|
|
394
|
-
|
|
395
326
|
// pragma MARK: std::shared_ptr<HybridSourceProxySpec>
|
|
396
327
|
/**
|
|
397
328
|
* Specialized version of `std::shared_ptr<HybridSourceProxySpec>`.
|
|
@@ -434,36 +365,6 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
434
365
|
return optional.value();
|
|
435
366
|
}
|
|
436
367
|
|
|
437
|
-
// pragma MARK: std::optional<bool>
|
|
438
|
-
/**
|
|
439
|
-
* Specialized version of `std::optional<bool>`.
|
|
440
|
-
*/
|
|
441
|
-
using std__optional_bool_ = std::optional<bool>;
|
|
442
|
-
inline std::optional<bool> create_std__optional_bool_(const bool& value) noexcept {
|
|
443
|
-
return std::optional<bool>(value);
|
|
444
|
-
}
|
|
445
|
-
inline bool has_value_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
446
|
-
return optional.has_value();
|
|
447
|
-
}
|
|
448
|
-
inline bool get_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
449
|
-
return optional.value();
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
// pragma MARK: std::optional<double>
|
|
453
|
-
/**
|
|
454
|
-
* Specialized version of `std::optional<double>`.
|
|
455
|
-
*/
|
|
456
|
-
using std__optional_double_ = std::optional<double>;
|
|
457
|
-
inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
|
|
458
|
-
return std::optional<double>(value);
|
|
459
|
-
}
|
|
460
|
-
inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
461
|
-
return optional.has_value();
|
|
462
|
-
}
|
|
463
|
-
inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
464
|
-
return optional.value();
|
|
465
|
-
}
|
|
466
|
-
|
|
467
368
|
// pragma MARK: std::optional<CategorySample>
|
|
468
369
|
/**
|
|
469
370
|
* Specialized version of `std::optional<CategorySample>`.
|
|
@@ -595,6 +496,21 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
595
496
|
return Func_void_std__vector_CategorySample__Wrapper(std::move(value));
|
|
596
497
|
}
|
|
597
498
|
|
|
499
|
+
// pragma MARK: std::optional<bool>
|
|
500
|
+
/**
|
|
501
|
+
* Specialized version of `std::optional<bool>`.
|
|
502
|
+
*/
|
|
503
|
+
using std__optional_bool_ = std::optional<bool>;
|
|
504
|
+
inline std::optional<bool> create_std__optional_bool_(const bool& value) noexcept {
|
|
505
|
+
return std::optional<bool>(value);
|
|
506
|
+
}
|
|
507
|
+
inline bool has_value_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
508
|
+
return optional.has_value();
|
|
509
|
+
}
|
|
510
|
+
inline bool get_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
511
|
+
return optional.value();
|
|
512
|
+
}
|
|
513
|
+
|
|
598
514
|
// pragma MARK: std::vector<std::shared_ptr<HybridSourceProxySpec>>
|
|
599
515
|
/**
|
|
600
516
|
* Specialized version of `std::vector<std::shared_ptr<HybridSourceProxySpec>>`.
|
|
@@ -1937,6 +1853,21 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
1937
1853
|
return Result<std::shared_ptr<Promise<QueryCorrelationSamplesWithAnchorResponse>>>::withError(error);
|
|
1938
1854
|
}
|
|
1939
1855
|
|
|
1856
|
+
// pragma MARK: std::optional<double>
|
|
1857
|
+
/**
|
|
1858
|
+
* Specialized version of `std::optional<double>`.
|
|
1859
|
+
*/
|
|
1860
|
+
using std__optional_double_ = std::optional<double>;
|
|
1861
|
+
inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
|
|
1862
|
+
return std::optional<double>(value);
|
|
1863
|
+
}
|
|
1864
|
+
inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
1865
|
+
return optional.has_value();
|
|
1866
|
+
}
|
|
1867
|
+
inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
1868
|
+
return optional.value();
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1940
1871
|
// pragma MARK: std::vector<ElectrocardiogramVoltage>
|
|
1941
1872
|
/**
|
|
1942
1873
|
* Specialized version of `std::vector<ElectrocardiogramVoltage>`.
|
|
@@ -2460,6 +2391,21 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
2460
2391
|
return Func_void_std__vector_QuantitySample__Wrapper(std::move(value));
|
|
2461
2392
|
}
|
|
2462
2393
|
|
|
2394
|
+
// pragma MARK: std::optional<Quantity>
|
|
2395
|
+
/**
|
|
2396
|
+
* Specialized version of `std::optional<Quantity>`.
|
|
2397
|
+
*/
|
|
2398
|
+
using std__optional_Quantity_ = std::optional<Quantity>;
|
|
2399
|
+
inline std::optional<Quantity> create_std__optional_Quantity_(const Quantity& value) noexcept {
|
|
2400
|
+
return std::optional<Quantity>(value);
|
|
2401
|
+
}
|
|
2402
|
+
inline bool has_value_std__optional_Quantity_(const std::optional<Quantity>& optional) noexcept {
|
|
2403
|
+
return optional.has_value();
|
|
2404
|
+
}
|
|
2405
|
+
inline Quantity get_std__optional_Quantity_(const std::optional<Quantity>& optional) noexcept {
|
|
2406
|
+
return optional.value();
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2463
2409
|
// pragma MARK: std::optional<QuantityDateInterval>
|
|
2464
2410
|
/**
|
|
2465
2411
|
* Specialized version of `std::optional<QuantityDateInterval>`.
|
|
@@ -2520,18 +2466,18 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
2520
2466
|
return vector;
|
|
2521
2467
|
}
|
|
2522
2468
|
|
|
2523
|
-
// pragma MARK: std::optional<
|
|
2469
|
+
// pragma MARK: std::optional<StatisticsQueryOptionsWithStringUnit>
|
|
2524
2470
|
/**
|
|
2525
|
-
* Specialized version of `std::optional<
|
|
2471
|
+
* Specialized version of `std::optional<StatisticsQueryOptionsWithStringUnit>`.
|
|
2526
2472
|
*/
|
|
2527
|
-
using
|
|
2528
|
-
inline std::optional<
|
|
2529
|
-
return std::optional<
|
|
2473
|
+
using std__optional_StatisticsQueryOptionsWithStringUnit_ = std::optional<StatisticsQueryOptionsWithStringUnit>;
|
|
2474
|
+
inline std::optional<StatisticsQueryOptionsWithStringUnit> create_std__optional_StatisticsQueryOptionsWithStringUnit_(const StatisticsQueryOptionsWithStringUnit& value) noexcept {
|
|
2475
|
+
return std::optional<StatisticsQueryOptionsWithStringUnit>(value);
|
|
2530
2476
|
}
|
|
2531
|
-
inline bool
|
|
2477
|
+
inline bool has_value_std__optional_StatisticsQueryOptionsWithStringUnit_(const std::optional<StatisticsQueryOptionsWithStringUnit>& optional) noexcept {
|
|
2532
2478
|
return optional.has_value();
|
|
2533
2479
|
}
|
|
2534
|
-
inline
|
|
2480
|
+
inline StatisticsQueryOptionsWithStringUnit get_std__optional_StatisticsQueryOptionsWithStringUnit_(const std::optional<StatisticsQueryOptionsWithStringUnit>& optional) noexcept {
|
|
2535
2481
|
return optional.value();
|
|
2536
2482
|
}
|
|
2537
2483
|
|