@kingstinct/react-native-healthkit 12.2.0 → 13.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/ios/CategoryTypeModule.swift +6 -4
- package/ios/CorrelationTypeModule.swift +11 -5
- package/ios/Helpers.swift +7 -0
- package/ios/PredicateHelpers.swift +1 -1
- package/ios/QuantityTypeModule.swift +244 -100
- package/ios/StateOfMindModule.swift +4 -2
- package/lib/commonjs/healthkit.ios.js +6 -2
- package/lib/commonjs/healthkit.js +13 -7
- package/lib/module/healthkit.ios.js +4 -0
- package/lib/module/healthkit.js +11 -5
- package/lib/typescript/healthkit.d.ts +6 -4
- package/lib/typescript/healthkit.ios.d.ts +12 -8
- package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +2 -2
- package/lib/typescript/specs/CorrelationTypeModule.nitro.d.ts +1 -1
- package/lib/typescript/specs/QuantityTypeModule.nitro.d.ts +4 -2
- package/lib/typescript/specs/StateOfMindModule.nitro.d.ts +1 -1
- package/lib/typescript/types/QuantitySample.d.ts +1 -1
- package/lib/typescript/types/QuantityType.d.ts +6 -1
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +56 -16
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +406 -117
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridCategoryTypeModuleSpecSwift.hpp +8 -8
- package/nitrogen/generated/ios/c++/HybridCorrelationTypeModuleSpecSwift.hpp +28 -28
- package/nitrogen/generated/ios/c++/HybridQuantityTypeModuleSpecSwift.hpp +25 -6
- package/nitrogen/generated/ios/c++/HybridStateOfMindModuleSpecSwift.hpp +1 -1
- package/nitrogen/generated/ios/c++/HybridWorkoutsModuleSpecSwift.hpp +1 -1
- package/nitrogen/generated/ios/swift/FilterForWorkouts.swift +53 -53
- package/nitrogen/generated/ios/swift/FilterForWorkoutsBase.swift +53 -53
- package/nitrogen/generated/ios/swift/Func_void_std__optional_CategorySample_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_CorrelationSample_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_QuantitySample_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__optional_StateOfMindSample_.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_QueryStatisticsResponseFromSingleSource_.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCategoryTypeModuleSpec_cxx.swift +21 -8
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridCorrelationTypeModuleSpec_cxx.swift +21 -8
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec.swift +3 -1
- package/nitrogen/generated/ios/swift/HybridQuantityTypeModuleSpec_cxx.swift +71 -8
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridStateOfMindModuleSpec_cxx.swift +13 -7
- package/nitrogen/generated/ios/swift/QuantitySampleForSaving.swift +24 -5
- package/nitrogen/generated/ios/swift/QueryStatisticsResponse.swift +34 -1
- package/nitrogen/generated/ios/swift/QueryStatisticsResponseFromSingleSource.swift +266 -0
- package/nitrogen/generated/ios/swift/StatisticsOptions.swift +0 -4
- package/nitrogen/generated/shared/c++/FilterForWorkouts.hpp +10 -10
- package/nitrogen/generated/shared/c++/FilterForWorkoutsBase.hpp +11 -11
- package/nitrogen/generated/shared/c++/HybridCategoryTypeModuleSpec.hpp +5 -4
- package/nitrogen/generated/shared/c++/HybridCorrelationTypeModuleSpec.hpp +5 -4
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridQuantityTypeModuleSpec.hpp +8 -3
- package/nitrogen/generated/shared/c++/HybridStateOfMindModuleSpec.hpp +2 -2
- package/nitrogen/generated/shared/c++/QuantitySampleForSaving.hpp +6 -6
- package/nitrogen/generated/shared/c++/QueryStatisticsResponse.hpp +11 -2
- package/nitrogen/generated/shared/c++/QueryStatisticsResponseFromSingleSource.hpp +121 -0
- package/nitrogen/generated/shared/c++/StatisticsOptions.hpp +0 -4
- package/package.json +1 -1
- package/src/healthkit.ios.ts +8 -0
- package/src/healthkit.ts +20 -5
- package/src/hooks/queryStatisticsForQuantity.test.ts +4 -1
- package/src/specs/CategoryTypeModule.nitro.ts +4 -4
- package/src/specs/CorrelationTypeModule.nitro.ts +2 -2
- package/src/specs/MedicationModule.nitro.ts +2 -7
- package/src/specs/QuantityTypeModule.nitro.ts +17 -2
- package/src/specs/StateOfMindModule.nitro.ts +1 -1
- package/src/types/QuantitySample.ts +1 -1
- package/src/types/QuantityType.ts +8 -1
- package/src/types/Subscriptions.ts +1 -1
package/lib/module/healthkit.js
CHANGED
|
@@ -48,9 +48,13 @@ export const queryQuantitySamplesWithAnchor = UnavailableFnFromModule('queryQuan
|
|
|
48
48
|
deletedSamples: [],
|
|
49
49
|
newAnchor: '',
|
|
50
50
|
}));
|
|
51
|
-
export const queryStatisticsForQuantity = UnavailableFnFromModule('queryStatisticsForQuantity', Promise.resolve({
|
|
51
|
+
export const queryStatisticsForQuantity = UnavailableFnFromModule('queryStatisticsForQuantity', Promise.resolve({
|
|
52
|
+
sources: [],
|
|
53
|
+
}));
|
|
52
54
|
export const queryStatisticsCollectionForQuantity = UnavailableFnFromModule('queryStatisticsCollectionForQuantity', Promise.resolve([]));
|
|
53
|
-
export const
|
|
55
|
+
export const queryStatisticsForQuantitySeparateBySource = UnavailableFnFromModule('queryStatisticsForQuantitySeparateBySource', Promise.resolve([]));
|
|
56
|
+
export const queryStatisticsCollectionForQuantitySeparateBySource = UnavailableFnFromModule('queryStatisticsCollectionForQuantitySeparateBySource', Promise.resolve([]));
|
|
57
|
+
export const saveQuantitySample = UnavailableFnFromModule('saveQuantitySample', Promise.resolve(undefined));
|
|
54
58
|
export const isQuantityCompatibleWithUnit = UnavailableFnFromModule('isQuantityCompatibleWithUnit', false);
|
|
55
59
|
// CategoryTypeModule functions
|
|
56
60
|
export function queryCategorySamples(_categoryTypeIdentifier, _options) {
|
|
@@ -71,10 +75,10 @@ export function queryCategorySamplesWithAnchor(_categoryTypeIdentifier, _options
|
|
|
71
75
|
newAnchor: '',
|
|
72
76
|
});
|
|
73
77
|
}
|
|
74
|
-
export const saveCategorySample = UnavailableFnFromModule('saveCategorySample', Promise.resolve(
|
|
78
|
+
export const saveCategorySample = UnavailableFnFromModule('saveCategorySample', Promise.resolve(undefined));
|
|
75
79
|
// CorrelationTypeModule functions
|
|
76
80
|
export const queryCorrelationSamples = UnavailableFnFromModule('queryCorrelationSamples', Promise.resolve([]));
|
|
77
|
-
export const saveCorrelationSample = UnavailableFnFromModule('saveCorrelationSample', Promise.resolve(
|
|
81
|
+
export const saveCorrelationSample = UnavailableFnFromModule('saveCorrelationSample', Promise.resolve(undefined));
|
|
78
82
|
// HeartbeatSeriesModule functions
|
|
79
83
|
export const queryHeartbeatSeriesSamples = UnavailableFnFromModule('queryHeartbeatSeriesSamples', Promise.resolve([]));
|
|
80
84
|
export const queryHeartbeatSeriesSamplesWithAnchor = UnavailableFnFromModule('queryHeartbeatSeriesSamplesWithAnchor', Promise.resolve({
|
|
@@ -111,7 +115,7 @@ export const queryCorrelationSamplesWithAnchor = UnavailableFnFromModule('queryC
|
|
|
111
115
|
deletedSamples: [],
|
|
112
116
|
newAnchor: '',
|
|
113
117
|
}));
|
|
114
|
-
export const saveStateOfMindSample = UnavailableFnFromModule('saveStateOfMindSample', Promise.resolve(
|
|
118
|
+
export const saveStateOfMindSample = UnavailableFnFromModule('saveStateOfMindSample', Promise.resolve(undefined));
|
|
115
119
|
// Utility functions (from original export list)
|
|
116
120
|
export function getMostRecentCategorySample(_identifier) {
|
|
117
121
|
if (Platform.OS !== 'ios' && !hasWarned) {
|
|
@@ -204,6 +208,8 @@ const HealthkitModule = {
|
|
|
204
208
|
queryQuantitySamplesWithAnchor,
|
|
205
209
|
queryStatisticsForQuantity,
|
|
206
210
|
queryStatisticsCollectionForQuantity,
|
|
211
|
+
queryStatisticsForQuantitySeparateBySource,
|
|
212
|
+
queryStatisticsCollectionForQuantitySeparateBySource,
|
|
207
213
|
queryWorkoutSamples,
|
|
208
214
|
queryWorkoutSamplesWithAnchor,
|
|
209
215
|
querySources,
|
|
@@ -36,13 +36,15 @@ export declare const queryQuantitySamples: (identifier: import("./types").Quanti
|
|
|
36
36
|
export declare const queryQuantitySamplesWithAnchor: (identifier: import("./types").QuantityTypeIdentifier, options: import("./types").QueryOptionsWithAnchorAndUnit) => Promise<import("./types").QuantitySamplesWithAnchorResponse>;
|
|
37
37
|
export declare const queryStatisticsForQuantity: (identifier: import("./types").QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], options?: import("./types").StatisticsQueryOptions) => Promise<import("./types").QueryStatisticsResponse>;
|
|
38
38
|
export declare const queryStatisticsCollectionForQuantity: (identifier: import("./types").QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], anchorDate: Date, intervalComponents: import("./types").IntervalComponents, options?: import("./types").StatisticsQueryOptions) => Promise<readonly import("./types").QueryStatisticsResponse[]>;
|
|
39
|
-
export declare const
|
|
39
|
+
export declare const queryStatisticsForQuantitySeparateBySource: (identifier: import("./types").QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], options?: import("./types").StatisticsQueryOptions) => Promise<import("./types").QueryStatisticsResponseFromSingleSource[]>;
|
|
40
|
+
export declare const queryStatisticsCollectionForQuantitySeparateBySource: (identifier: import("./types").QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], anchorDate: Date, intervalComponents: import("./types").IntervalComponents, options?: import("./types").StatisticsQueryOptions) => Promise<readonly import("./types").QueryStatisticsResponseFromSingleSource[]>;
|
|
41
|
+
export declare const saveQuantitySample: (identifier: import("./types").QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<QuantitySample | undefined>;
|
|
40
42
|
export declare const isQuantityCompatibleWithUnit: (identifier: import("./types").QuantityTypeIdentifier, unit: string) => boolean;
|
|
41
43
|
export declare function queryCategorySamples<T extends CategoryTypeIdentifier>(_categoryTypeIdentifier: T, _options: QueryOptionsWithSortOrder): Promise<CategorySampleTyped<T>[]>;
|
|
42
44
|
export declare function queryCategorySamplesWithAnchor<T extends CategoryTypeIdentifier>(_categoryTypeIdentifier: T, _options: QueryOptionsWithAnchor): Promise<CategorySamplesWithAnchorResponseTyped<T>>;
|
|
43
|
-
export declare const saveCategorySample: <T extends CategoryTypeIdentifier>(identifier: T, value: import("./types").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata
|
|
45
|
+
export declare const saveCategorySample: <T extends CategoryTypeIdentifier>(identifier: T, value: import("./types").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata?: import("./types").MetadataForCategoryIdentifier<T>) => Promise<import("./types").CategorySample | undefined>;
|
|
44
46
|
export declare const queryCorrelationSamples: (typeIdentifier: import("./types").CorrelationTypeIdentifier, options: QueryOptionsWithSortOrder) => Promise<readonly import("./types").CorrelationSample[]>;
|
|
45
|
-
export declare const saveCorrelationSample: (typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata
|
|
47
|
+
export declare const saveCorrelationSample: (typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").CorrelationSample | undefined>;
|
|
46
48
|
export declare const queryHeartbeatSeriesSamples: (options: QueryOptionsWithSortOrder) => Promise<readonly import("./types").HeartbeatSeriesSample[]>;
|
|
47
49
|
export declare const queryHeartbeatSeriesSamplesWithAnchor: (options: QueryOptionsWithAnchor) => Promise<import("./types").HeartbeatSeriesSamplesWithAnchorResponse>;
|
|
48
50
|
export declare const queryElectrocardiogramSamples: (options: import("./types/ElectrocardiogramSample").ECGQueryOptionsWithSortOrder) => Promise<readonly import("./types/ElectrocardiogramSample").ElectrocardiogramSample[]>;
|
|
@@ -54,7 +56,7 @@ export declare const startWatchApp: (workoutConfiguration: import("./types").Wor
|
|
|
54
56
|
export declare const queryStateOfMindSamples: (options: QueryOptionsWithSortOrder) => Promise<readonly import("./types").StateOfMindSample[]>;
|
|
55
57
|
export declare const queryStateOfMindSamplesWithAnchor: (options: QueryOptionsWithAnchor) => Promise<import("./types").StateOfMindSamplesWithAnchorResponse>;
|
|
56
58
|
export declare const queryCorrelationSamplesWithAnchor: (typeIdentifier: import("./types").CorrelationTypeIdentifier, options: QueryOptionsWithAnchor) => Promise<import("./types").QueryCorrelationSamplesWithAnchorResponse>;
|
|
57
|
-
export declare const saveStateOfMindSample: (date: Date, kind: import("./types").StateOfMindKind, valence: number, labels: readonly import("./types").StateOfMindLabel[], associations: readonly import("./types").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<
|
|
59
|
+
export declare const saveStateOfMindSample: (date: Date, kind: import("./types").StateOfMindKind, valence: number, labels: readonly import("./types").StateOfMindLabel[], associations: readonly import("./types").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").StateOfMindSample | undefined>;
|
|
58
60
|
export declare function getMostRecentCategorySample<T extends CategoryTypeIdentifier>(_identifier: T): Promise<CategorySampleTyped<T> | undefined>;
|
|
59
61
|
export declare const getMostRecentQuantitySample: typeof import("./healthkit.ios").getMostRecentQuantitySample;
|
|
60
62
|
export declare const getMostRecentWorkout: () => Promise<WorkoutProxy | undefined>;
|
|
@@ -62,20 +62,22 @@ export declare const queryQuantitySamples: (identifier: QuantityTypeIdentifier,
|
|
|
62
62
|
export declare const queryQuantitySamplesWithAnchor: (identifier: QuantityTypeIdentifier, options: import("./types").QueryOptionsWithAnchorAndUnit) => Promise<import("./types").QuantitySamplesWithAnchorResponse>;
|
|
63
63
|
export declare const queryStatisticsForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], options?: import("./types").StatisticsQueryOptions) => Promise<import("./types").QueryStatisticsResponse>;
|
|
64
64
|
export declare const queryStatisticsCollectionForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], anchorDate: Date, intervalComponents: import("./types").IntervalComponents, options?: import("./types").StatisticsQueryOptions) => Promise<readonly import("./types").QueryStatisticsResponse[]>;
|
|
65
|
+
export declare const queryStatisticsForQuantitySeparateBySource: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], options?: import("./types").StatisticsQueryOptions) => Promise<import("./types").QueryStatisticsResponseFromSingleSource[]>;
|
|
66
|
+
export declare const queryStatisticsCollectionForQuantitySeparateBySource: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], anchorDate: Date, intervalComponents: import("./types").IntervalComponents, options?: import("./types").StatisticsQueryOptions) => Promise<readonly import("./types").QueryStatisticsResponseFromSingleSource[]>;
|
|
65
67
|
export declare const queryWorkoutSamples: (options: import("./types").WorkoutQueryOptions) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy[]>;
|
|
66
68
|
export declare const queryWorkoutSamplesWithAnchor: (options: import("./types").WorkoutQueryOptionsWithAnchor) => Promise<import("./types").QueryWorkoutSamplesWithAnchorResponse>;
|
|
67
69
|
export declare const querySources: (identifier: import("./types").SampleTypeIdentifier, filter?: import("./types").FilterForSamples) => Promise<readonly import("./specs/SourceProxy.nitro").SourceProxy[]>;
|
|
68
70
|
export declare const requestAuthorization: (toRequest: import("./specs/CoreModule.nitro").AuthDataTypes) => Promise<boolean>;
|
|
69
71
|
export declare const deleteObjects: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier, filter: import("./types").FilterForSamples) => Promise<number>;
|
|
70
|
-
export declare const saveCategorySample: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, value: import("./types").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata
|
|
71
|
-
export declare const saveCorrelationSample: (typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata
|
|
72
|
-
export declare const saveQuantitySample: (identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata
|
|
72
|
+
export declare const saveCategorySample: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, value: import("./types").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata?: import("./types").MetadataForCategoryIdentifier<T>) => Promise<import("./types").CategorySample | undefined>;
|
|
73
|
+
export declare const saveCorrelationSample: (typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").CorrelationSample | undefined>;
|
|
74
|
+
export declare const saveQuantitySample: (identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").QuantitySample | undefined>;
|
|
73
75
|
export declare const saveWorkoutSample: (workoutActivityType: import("./types").WorkoutActivityType, quantities: readonly import("./types").QuantitySampleForSaving[], startDate: Date, endDate: Date, totals?: import("./types").WorkoutTotals, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy>;
|
|
74
76
|
export declare const startWatchApp: (workoutConfiguration: import("./types").WorkoutConfiguration) => Promise<boolean>;
|
|
75
77
|
export declare const isProtectedDataAvailable: () => boolean;
|
|
76
78
|
export declare const queryStateOfMindSamples: (options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").StateOfMindSample[]>;
|
|
77
79
|
export declare const queryStateOfMindSamplesWithAnchor: (options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").StateOfMindSamplesWithAnchorResponse>;
|
|
78
|
-
export declare const saveStateOfMindSample: (date: Date, kind: import("./types").StateOfMindKind, valence: number, labels: readonly import("./types").StateOfMindLabel[], associations: readonly import("./types").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<
|
|
80
|
+
export declare const saveStateOfMindSample: (date: Date, kind: import("./types").StateOfMindKind, valence: number, labels: readonly import("./types").StateOfMindLabel[], associations: readonly import("./types").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").StateOfMindSample | undefined>;
|
|
79
81
|
export declare const isQuantityCompatibleWithUnit: (identifier: QuantityTypeIdentifier, unit: string) => boolean;
|
|
80
82
|
export declare const isObjectTypeAvailable: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => boolean;
|
|
81
83
|
export declare const isObjectTypeAvailableAsync: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier) => Promise<boolean>;
|
|
@@ -131,14 +133,16 @@ declare const _default: {
|
|
|
131
133
|
queryQuantitySamplesWithAnchor: (identifier: QuantityTypeIdentifier, options: import("./types").QueryOptionsWithAnchorAndUnit) => Promise<import("./types").QuantitySamplesWithAnchorResponse>;
|
|
132
134
|
queryStatisticsForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], options?: import("./types").StatisticsQueryOptions) => Promise<import("./types").QueryStatisticsResponse>;
|
|
133
135
|
queryStatisticsCollectionForQuantity: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], anchorDate: Date, intervalComponents: import("./types").IntervalComponents, options?: import("./types").StatisticsQueryOptions) => Promise<readonly import("./types").QueryStatisticsResponse[]>;
|
|
136
|
+
queryStatisticsForQuantitySeparateBySource: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], options?: import("./types").StatisticsQueryOptions) => Promise<import("./types").QueryStatisticsResponseFromSingleSource[]>;
|
|
137
|
+
queryStatisticsCollectionForQuantitySeparateBySource: (identifier: QuantityTypeIdentifier, statistics: readonly import("./types").StatisticsOptions[], anchorDate: Date, intervalComponents: import("./types").IntervalComponents, options?: import("./types").StatisticsQueryOptions) => Promise<readonly import("./types").QueryStatisticsResponseFromSingleSource[]>;
|
|
134
138
|
queryWorkoutSamples: (options: import("./types").WorkoutQueryOptions) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy[]>;
|
|
135
139
|
queryWorkoutSamplesWithAnchor: (options: import("./types").WorkoutQueryOptionsWithAnchor) => Promise<import("./types").QueryWorkoutSamplesWithAnchorResponse>;
|
|
136
140
|
querySources: (identifier: import("./types").SampleTypeIdentifier, filter?: import("./types").FilterForSamples) => Promise<readonly import("./specs/SourceProxy.nitro").SourceProxy[]>;
|
|
137
141
|
requestAuthorization: (toRequest: import("./specs/CoreModule.nitro").AuthDataTypes) => Promise<boolean>;
|
|
138
142
|
deleteObjects: (objectTypeIdentifier: import("./types").ObjectTypeIdentifier, filter: import("./types").FilterForSamples) => Promise<number>;
|
|
139
|
-
saveCategorySample: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, value: import("./types").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata
|
|
140
|
-
saveCorrelationSample: (typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata
|
|
141
|
-
saveQuantitySample: (identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata
|
|
143
|
+
saveCategorySample: <T extends import("./types").CategoryTypeIdentifier>(identifier: T, value: import("./types").CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata?: import("./types").MetadataForCategoryIdentifier<T>) => Promise<import("./types").CategorySample | undefined>;
|
|
144
|
+
saveCorrelationSample: (typeIdentifier: import("./types").CorrelationTypeIdentifier, samples: import("./types").SampleForSaving[], start: Date, end: Date, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").CorrelationSample | undefined>;
|
|
145
|
+
saveQuantitySample: (identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").QuantitySample | undefined>;
|
|
142
146
|
saveWorkoutSample: (workoutActivityType: import("./types").WorkoutActivityType, quantities: readonly import("./types").QuantitySampleForSaving[], startDate: Date, endDate: Date, totals?: import("./types").WorkoutTotals, metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./specs/WorkoutProxy.nitro").WorkoutProxy>;
|
|
143
147
|
subscribeToChanges: (identifier: import("./types").SampleTypeIdentifier, callback: (args: import("./types").OnChangeCallbackArgs) => void) => {
|
|
144
148
|
remove: () => boolean;
|
|
@@ -150,7 +154,7 @@ declare const _default: {
|
|
|
150
154
|
isProtectedDataAvailable: () => boolean;
|
|
151
155
|
queryStateOfMindSamples: (options: import("./types").QueryOptionsWithSortOrder) => Promise<readonly import("./types").StateOfMindSample[]>;
|
|
152
156
|
queryStateOfMindSamplesWithAnchor: (options: import("./types").QueryOptionsWithAnchor) => Promise<import("./types").StateOfMindSamplesWithAnchorResponse>;
|
|
153
|
-
saveStateOfMindSample: (date: Date, kind: import("./types").StateOfMindKind, valence: number, labels: readonly import("./types").StateOfMindLabel[], associations: readonly import("./types").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<
|
|
157
|
+
saveStateOfMindSample: (date: Date, kind: import("./types").StateOfMindKind, valence: number, labels: readonly import("./types").StateOfMindLabel[], associations: readonly import("./types").StateOfMindAssociation[], metadata?: import("react-native-nitro-modules").AnyMap) => Promise<import("./types").StateOfMindSample | undefined>;
|
|
154
158
|
requestMedicationsAuthorization: () => Promise<boolean>;
|
|
155
159
|
currentAppSource: () => import("./specs/SourceProxy.nitro").SourceProxy;
|
|
156
160
|
queryMedicationEventsWithAnchor: (options: import("./types").QueryOptionsWithAnchor) => Promise<import("./specs/MedicationModule.nitro").MedicationDoseEventsWithAnchorResponse>;
|
|
@@ -5,12 +5,12 @@ import type { QueryOptionsWithAnchor, QueryOptionsWithSortOrder } from '../types
|
|
|
5
5
|
export interface CategoryTypeModule extends HybridObject<{
|
|
6
6
|
ios: 'swift';
|
|
7
7
|
}> {
|
|
8
|
-
saveCategorySample(identifier: CategoryTypeIdentifier, value: CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata
|
|
8
|
+
saveCategorySample(identifier: CategoryTypeIdentifier, value: CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata?: AnyMap): Promise<CategorySample | undefined>;
|
|
9
9
|
queryCategorySamples(identifier: CategoryTypeIdentifier, options: QueryOptionsWithSortOrder): Promise<readonly CategorySample[]>;
|
|
10
10
|
queryCategorySamplesWithAnchor(identifier: CategoryTypeIdentifier, options: QueryOptionsWithAnchor): Promise<CategorySamplesWithAnchorResponse>;
|
|
11
11
|
}
|
|
12
12
|
export interface CategoryTypeModuleTyped {
|
|
13
|
-
saveCategorySample<T extends CategoryTypeIdentifier>(identifier: T, value: CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata
|
|
13
|
+
saveCategorySample<T extends CategoryTypeIdentifier>(identifier: T, value: CategoryValueForIdentifier, startDate: Date, endDate: Date, metadata?: MetadataForCategoryIdentifier<T>): Promise<CategorySample | undefined>;
|
|
14
14
|
queryCategorySamples<T extends CategoryTypeIdentifier>(identifier: T, options: QueryOptionsWithSortOrder): Promise<readonly CategorySampleTyped<T>[]>;
|
|
15
15
|
queryCategorySamplesWithAnchor<T extends CategoryTypeIdentifier>(identifier: T, options: QueryOptionsWithAnchor): Promise<CategorySamplesWithAnchorResponseTyped<T>>;
|
|
16
16
|
}
|
|
@@ -4,7 +4,7 @@ import type { CorrelationSample, CorrelationTypeIdentifier, QueryCorrelationSamp
|
|
|
4
4
|
export interface CorrelationTypeModule extends HybridObject<{
|
|
5
5
|
ios: 'swift';
|
|
6
6
|
}> {
|
|
7
|
-
saveCorrelationSample(typeIdentifier: CorrelationTypeIdentifier, samples: SampleForSaving[], start: Date, end: Date, metadata
|
|
7
|
+
saveCorrelationSample(typeIdentifier: CorrelationTypeIdentifier, samples: SampleForSaving[], start: Date, end: Date, metadata?: AnyMap): Promise<CorrelationSample | undefined>;
|
|
8
8
|
queryCorrelationSamples(typeIdentifier: CorrelationTypeIdentifier, options: QueryOptionsWithSortOrder): Promise<readonly CorrelationSample[]>;
|
|
9
9
|
queryCorrelationSamplesWithAnchor(typeIdentifier: CorrelationTypeIdentifier, options: QueryOptionsWithAnchor): Promise<QueryCorrelationSamplesWithAnchorResponse>;
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AnyMap, HybridObject } from 'react-native-nitro-modules';
|
|
2
2
|
import type { QuantitySample } from '../types/QuantitySample';
|
|
3
|
-
import type { AggregationStyle, IntervalComponents, QuantitySamplesWithAnchorResponse, QueryStatisticsResponse, StatisticsOptions, StatisticsQueryOptions } from '../types/QuantityType';
|
|
3
|
+
import type { AggregationStyle, IntervalComponents, QuantitySamplesWithAnchorResponse, QueryStatisticsResponse, QueryStatisticsResponseFromSingleSource, StatisticsOptions, StatisticsQueryOptions } from '../types/QuantityType';
|
|
4
4
|
import type { QuantityTypeIdentifier } from '../types/QuantityTypeIdentifier';
|
|
5
5
|
import type { QueryOptionsWithAnchorAndUnit, QueryOptionsWithSortOrderAndUnit } from '../types/QueryOptions';
|
|
6
6
|
export interface QuantityTypeModule extends HybridObject<{
|
|
@@ -8,9 +8,11 @@ export interface QuantityTypeModule extends HybridObject<{
|
|
|
8
8
|
}> {
|
|
9
9
|
isQuantityCompatibleWithUnit(identifier: QuantityTypeIdentifier, unit: string): boolean;
|
|
10
10
|
aggregationStyle(identifier: QuantityTypeIdentifier): AggregationStyle;
|
|
11
|
-
saveQuantitySample(identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata
|
|
11
|
+
saveQuantitySample(identifier: QuantityTypeIdentifier, unit: string, value: number, start: Date, end: Date, metadata?: AnyMap): Promise<QuantitySample | undefined>;
|
|
12
12
|
queryQuantitySamples(identifier: QuantityTypeIdentifier, options: QueryOptionsWithSortOrderAndUnit): Promise<readonly QuantitySample[]>;
|
|
13
13
|
queryStatisticsForQuantity(identifier: QuantityTypeIdentifier, statistics: readonly StatisticsOptions[], options?: StatisticsQueryOptions): Promise<QueryStatisticsResponse>;
|
|
14
14
|
queryStatisticsCollectionForQuantity(identifier: QuantityTypeIdentifier, statistics: readonly StatisticsOptions[], anchorDate: Date, intervalComponents: IntervalComponents, options?: StatisticsQueryOptions): Promise<readonly QueryStatisticsResponse[]>;
|
|
15
|
+
queryStatisticsForQuantitySeparateBySource(identifier: QuantityTypeIdentifier, statistics: readonly StatisticsOptions[], options?: StatisticsQueryOptions): Promise<QueryStatisticsResponseFromSingleSource[]>;
|
|
16
|
+
queryStatisticsCollectionForQuantitySeparateBySource(identifier: QuantityTypeIdentifier, statistics: readonly StatisticsOptions[], anchorDate: Date, intervalComponents: IntervalComponents, options?: StatisticsQueryOptions): Promise<readonly QueryStatisticsResponseFromSingleSource[]>;
|
|
15
17
|
queryQuantitySamplesWithAnchor(identifier: QuantityTypeIdentifier, options: QueryOptionsWithAnchorAndUnit): Promise<QuantitySamplesWithAnchorResponse>;
|
|
16
18
|
}
|
|
@@ -6,5 +6,5 @@ export interface StateOfMindModule extends HybridObject<{
|
|
|
6
6
|
}> {
|
|
7
7
|
queryStateOfMindSamples(options: QueryOptionsWithSortOrder): Promise<readonly StateOfMindSample[]>;
|
|
8
8
|
queryStateOfMindSamplesWithAnchor(options: QueryOptionsWithAnchor): Promise<StateOfMindSamplesWithAnchorResponse>;
|
|
9
|
-
saveStateOfMindSample(date: Date, kind: StateOfMindKind, valence: number, labels: readonly StateOfMindLabel[], associations: readonly StateOfMindAssociation[], metadata?: AnyMap): Promise<
|
|
9
|
+
saveStateOfMindSample(date: Date, kind: StateOfMindKind, valence: number, labels: readonly StateOfMindLabel[], associations: readonly StateOfMindAssociation[], metadata?: AnyMap): Promise<StateOfMindSample | undefined>;
|
|
10
10
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SourceProxy } from '../specs/SourceProxy.nitro';
|
|
1
2
|
import type { QuantitySample } from './QuantitySample';
|
|
2
3
|
import type { QuantityTypeIdentifier } from './QuantityTypeIdentifier';
|
|
3
4
|
import type { FilterForSamples } from './QueryOptions';
|
|
@@ -17,6 +18,10 @@ export interface QueryStatisticsResponse {
|
|
|
17
18
|
readonly duration?: Quantity;
|
|
18
19
|
readonly startDate?: Date;
|
|
19
20
|
readonly endDate?: Date;
|
|
21
|
+
readonly sources: SourceProxy[];
|
|
22
|
+
}
|
|
23
|
+
export interface QueryStatisticsResponseFromSingleSource extends Omit<QueryStatisticsResponse, 'sources'> {
|
|
24
|
+
readonly source: SourceProxy;
|
|
20
25
|
}
|
|
21
26
|
export declare enum AggregationStyle {
|
|
22
27
|
cumulative = 0,
|
|
@@ -59,6 +64,6 @@ export interface StatisticsQueryOptions {
|
|
|
59
64
|
/**
|
|
60
65
|
* @see {@link https://developer.apple.com/documentation/healthkit/hkstatisticsoptions Apple Docs }
|
|
61
66
|
*/
|
|
62
|
-
export type StatisticsOptions = 'cumulativeSum' | 'discreteAverage' | 'discreteMax' | 'discreteMin' | 'duration' | 'mostRecent'
|
|
67
|
+
export type StatisticsOptions = 'cumulativeSum' | 'discreteAverage' | 'discreteMax' | 'discreteMin' | 'duration' | 'mostRecent';
|
|
63
68
|
export type UnitForIdentifier<T extends QuantityTypeIdentifier = QuantityTypeIdentifier> = T extends 'QuantityTypeIdentifierBloodGlucose' ? BloodGlucoseUnit : T extends 'QuantityTypeIdentifierAppleExerciseTime' | 'QuantityTypeIdentifierAppleMoveTime' | 'QuantityTypeIdentifierAppleStandTime' ? TimeUnit : T extends 'QuantityTypeIdentifierActiveEnergyBurned' | 'QuantityTypeIdentifierBasalEnergyBurned' | 'QuantityTypeIdentifierDietaryEnergyConsumed' ? EnergyUnit : T extends 'QuantityTypeIdentifierDistanceCycling' | 'QuantityTypeIdentifierDistanceDownhillSnowSports' | 'QuantityTypeIdentifierDistanceSwimming' | 'QuantityTypeIdentifierDistanceWalkingRunning' | 'QuantityTypeIdentifierDistanceWheelchair' | 'QuantityTypeIdentifierSixMinuteWalkTestDistance' | 'QuantityTypeIdentifierWaistCircumference' ? LengthUnit : T extends 'QuantityTypeIdentifierBodyFatPercentage' | 'QuantityTypeIdentifierOxygenSaturation' | 'QuantityTypeIdentifierWalkingAsymmetryPercentage' | 'QuantityTypeIdentifierWalkingDoubleSupportPercentage' ? '%' : T extends 'QuantityTypeIdentifierBasalBodyTemperature' ? TemperatureUnit : T extends 'QuantityTypeIdentifierRunningSpeed' | 'QuantityTypeIdentifierStairAscentSpeed' | 'QuantityTypeIdentifierStairDescentSpeed' | 'QuantityTypeIdentifierWalkingSpeed' ? SpeedUnit<LengthUnit, TimeUnit> : T extends 'QuantityTypeIdentifierFlightsClimbed' | 'QuantityTypeIdentifierNumberOfAlcoholicBeverages' | 'QuantityTypeIdentifierNumberOfTimesFallen' | 'QuantityTypeIdentifierPushCount' | 'QuantityTypeIdentifierStepCount' | 'QuantityTypeIdentifierSwimmingStrokeCount' ? 'count' : T extends 'QuantityTypeIdentifierDietaryBiotin' | 'QuantityTypeIdentifierDietaryCaffeine' | 'QuantityTypeIdentifierDietaryCalcium' | 'QuantityTypeIdentifierDietaryCarbohydrates' | 'QuantityTypeIdentifierDietaryChloride' | 'QuantityTypeIdentifierDietaryCholesterol' | 'QuantityTypeIdentifierDietaryChromium' | 'QuantityTypeIdentifierDietaryCopper' | 'QuantityTypeIdentifierDietaryFatMonounsaturated' | 'QuantityTypeIdentifierDietaryFatPolyunsaturated' | 'QuantityTypeIdentifierDietaryFatSaturated' | 'QuantityTypeIdentifierDietaryFatTotal' | 'QuantityTypeIdentifierDietaryFiber' | 'QuantityTypeIdentifierDietaryFolate' | 'QuantityTypeIdentifierDietaryIodine' | 'QuantityTypeIdentifierDietaryIron' | 'QuantityTypeIdentifierDietaryMagnesium' | 'QuantityTypeIdentifierDietaryManganese' | 'QuantityTypeIdentifierDietaryMolybdenum' | 'QuantityTypeIdentifierDietaryNiacin' | 'QuantityTypeIdentifierDietaryPantothenicAcid' | 'QuantityTypeIdentifierDietaryPhosphorus' | 'QuantityTypeIdentifierDietaryPotassium' | 'QuantityTypeIdentifierDietaryProtein' | 'QuantityTypeIdentifierDietaryRiboflavin' | 'QuantityTypeIdentifierDietarySelenium' | 'QuantityTypeIdentifierDietarySodium' | 'QuantityTypeIdentifierDietarySugar' | 'QuantityTypeIdentifierDietaryThiamin' | 'QuantityTypeIdentifierDietaryVitaminA' | 'QuantityTypeIdentifierDietaryVitaminB6' | 'QuantityTypeIdentifierDietaryVitaminB12' | 'QuantityTypeIdentifierDietaryVitaminC' | 'QuantityTypeIdentifierDietaryVitaminD' | 'QuantityTypeIdentifierDietaryVitaminE' | 'QuantityTypeIdentifierDietaryVitaminK' | 'QuantityTypeIdentifierDietaryZinc' ? MassUnit : T extends 'QuantityTypeIdentifierDietaryWater' ? VolumeUnit : T extends 'QuantityTypeIdentifierInsulinDelivery' ? 'IU' : T extends 'QuantityTypeIdentifierHeartRate' | 'QuantityTypeIdentifierRestingHeartRate' | 'QuantityTypeIdentifierWalkingHeartRateAverage' ? CountPerTime<TimeUnit> : Unit;
|
|
64
69
|
export {};
|
|
@@ -24,22 +24,6 @@
|
|
|
24
24
|
|
|
25
25
|
namespace margelo::nitro::healthkit::bridge::swift {
|
|
26
26
|
|
|
27
|
-
// pragma MARK: std::function<void(bool /* result */)>
|
|
28
|
-
Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
29
|
-
auto swiftClosure = ReactNativeHealthkit::Func_void_bool::fromUnsafe(swiftClosureWrapper);
|
|
30
|
-
return [swiftClosure = std::move(swiftClosure)](bool result) mutable -> void {
|
|
31
|
-
swiftClosure.call(result);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
36
|
-
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
37
|
-
auto swiftClosure = ReactNativeHealthkit::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
|
|
38
|
-
return [swiftClosure = std::move(swiftClosure)](const std::exception_ptr& error) mutable -> void {
|
|
39
|
-
swiftClosure.call(error);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
27
|
// pragma MARK: std::shared_ptr<HybridSourceProxySpec>
|
|
44
28
|
std::shared_ptr<HybridSourceProxySpec> create_std__shared_ptr_HybridSourceProxySpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
45
29
|
ReactNativeHealthkit::HybridSourceProxySpec_cxx swiftPart = ReactNativeHealthkit::HybridSourceProxySpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
@@ -56,6 +40,22 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
56
40
|
return swiftPart.toUnsafe();
|
|
57
41
|
}
|
|
58
42
|
|
|
43
|
+
// pragma MARK: std::function<void(const std::optional<CategorySample>& /* result */)>
|
|
44
|
+
Func_void_std__optional_CategorySample_ create_Func_void_std__optional_CategorySample_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
45
|
+
auto swiftClosure = ReactNativeHealthkit::Func_void_std__optional_CategorySample_::fromUnsafe(swiftClosureWrapper);
|
|
46
|
+
return [swiftClosure = std::move(swiftClosure)](const std::optional<CategorySample>& result) mutable -> void {
|
|
47
|
+
swiftClosure.call(result);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
52
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
53
|
+
auto swiftClosure = ReactNativeHealthkit::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
|
|
54
|
+
return [swiftClosure = std::move(swiftClosure)](const std::exception_ptr& error) mutable -> void {
|
|
55
|
+
swiftClosure.call(error);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
59
|
// pragma MARK: std::function<void(const std::vector<CategorySample>& /* result */)>
|
|
60
60
|
Func_void_std__vector_CategorySample_ create_Func_void_std__vector_CategorySample_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
61
61
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_CategorySample_::fromUnsafe(swiftClosureWrapper);
|
|
@@ -160,6 +160,14 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
160
160
|
return swiftPart.toUnsafe();
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
// pragma MARK: std::function<void(bool /* result */)>
|
|
164
|
+
Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
165
|
+
auto swiftClosure = ReactNativeHealthkit::Func_void_bool::fromUnsafe(swiftClosureWrapper);
|
|
166
|
+
return [swiftClosure = std::move(swiftClosure)](bool result) mutable -> void {
|
|
167
|
+
swiftClosure.call(result);
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
|
|
163
171
|
// pragma MARK: std::function<void(const std::vector<IdentifierWithUnit>& /* result */)>
|
|
164
172
|
Func_void_std__vector_IdentifierWithUnit_ create_Func_void_std__vector_IdentifierWithUnit_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
165
173
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_IdentifierWithUnit_::fromUnsafe(swiftClosureWrapper);
|
|
@@ -224,6 +232,14 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
224
232
|
return swiftPart.toUnsafe();
|
|
225
233
|
}
|
|
226
234
|
|
|
235
|
+
// pragma MARK: std::function<void(const std::optional<CorrelationSample>& /* result */)>
|
|
236
|
+
Func_void_std__optional_CorrelationSample_ create_Func_void_std__optional_CorrelationSample_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
237
|
+
auto swiftClosure = ReactNativeHealthkit::Func_void_std__optional_CorrelationSample_::fromUnsafe(swiftClosureWrapper);
|
|
238
|
+
return [swiftClosure = std::move(swiftClosure)](const std::optional<CorrelationSample>& result) mutable -> void {
|
|
239
|
+
swiftClosure.call(result);
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
|
|
227
243
|
// pragma MARK: std::function<void(const std::vector<CorrelationSample>& /* result */)>
|
|
228
244
|
Func_void_std__vector_CorrelationSample_ create_Func_void_std__vector_CorrelationSample_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
229
245
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_CorrelationSample_::fromUnsafe(swiftClosureWrapper);
|
|
@@ -360,6 +376,14 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
360
376
|
return swiftPart.toUnsafe();
|
|
361
377
|
}
|
|
362
378
|
|
|
379
|
+
// pragma MARK: std::function<void(const std::optional<QuantitySample>& /* result */)>
|
|
380
|
+
Func_void_std__optional_QuantitySample_ create_Func_void_std__optional_QuantitySample_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
381
|
+
auto swiftClosure = ReactNativeHealthkit::Func_void_std__optional_QuantitySample_::fromUnsafe(swiftClosureWrapper);
|
|
382
|
+
return [swiftClosure = std::move(swiftClosure)](const std::optional<QuantitySample>& result) mutable -> void {
|
|
383
|
+
swiftClosure.call(result);
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
|
|
363
387
|
// pragma MARK: std::function<void(const std::vector<QuantitySample>& /* result */)>
|
|
364
388
|
Func_void_std__vector_QuantitySample_ create_Func_void_std__vector_QuantitySample_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
365
389
|
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_QuantitySample_::fromUnsafe(swiftClosureWrapper);
|
|
@@ -384,6 +408,14 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
384
408
|
};
|
|
385
409
|
}
|
|
386
410
|
|
|
411
|
+
// pragma MARK: std::function<void(const std::vector<QueryStatisticsResponseFromSingleSource>& /* result */)>
|
|
412
|
+
Func_void_std__vector_QueryStatisticsResponseFromSingleSource_ create_Func_void_std__vector_QueryStatisticsResponseFromSingleSource_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
413
|
+
auto swiftClosure = ReactNativeHealthkit::Func_void_std__vector_QueryStatisticsResponseFromSingleSource_::fromUnsafe(swiftClosureWrapper);
|
|
414
|
+
return [swiftClosure = std::move(swiftClosure)](const std::vector<QueryStatisticsResponseFromSingleSource>& result) mutable -> void {
|
|
415
|
+
swiftClosure.call(result);
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
|
|
387
419
|
// pragma MARK: std::function<void(const QuantitySamplesWithAnchorResponse& /* result */)>
|
|
388
420
|
Func_void_QuantitySamplesWithAnchorResponse create_Func_void_QuantitySamplesWithAnchorResponse(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
389
421
|
auto swiftClosure = ReactNativeHealthkit::Func_void_QuantitySamplesWithAnchorResponse::fromUnsafe(swiftClosureWrapper);
|
|
@@ -424,6 +456,14 @@ namespace margelo::nitro::healthkit::bridge::swift {
|
|
|
424
456
|
};
|
|
425
457
|
}
|
|
426
458
|
|
|
459
|
+
// pragma MARK: std::function<void(const std::optional<StateOfMindSample>& /* result */)>
|
|
460
|
+
Func_void_std__optional_StateOfMindSample_ create_Func_void_std__optional_StateOfMindSample_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
461
|
+
auto swiftClosure = ReactNativeHealthkit::Func_void_std__optional_StateOfMindSample_::fromUnsafe(swiftClosureWrapper);
|
|
462
|
+
return [swiftClosure = std::move(swiftClosure)](const std::optional<StateOfMindSample>& result) mutable -> void {
|
|
463
|
+
swiftClosure.call(result);
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
|
|
427
467
|
// pragma MARK: std::shared_ptr<HybridStateOfMindModuleSpec>
|
|
428
468
|
std::shared_ptr<HybridStateOfMindModuleSpec> create_std__shared_ptr_HybridStateOfMindModuleSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
429
469
|
ReactNativeHealthkit::HybridStateOfMindModuleSpec_cxx swiftPart = ReactNativeHealthkit::HybridStateOfMindModuleSpec_cxx::fromUnsafe(swiftUnsafePointer);
|