@kingstinct/react-native-healthkit 9.0.6 → 9.0.8
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 +18 -21
- package/ios/CharacteristicTypeModule.swift +36 -21
- package/ios/CorrelationTypeModule.swift +18 -18
- package/ios/HeartbeatSeriesModule.swift +32 -32
- package/ios/QuantityTypeModule.swift +56 -57
- package/ios/Serializers.swift +12 -16
- package/ios/StateOfMindModule.swift +17 -17
- package/ios/WorkoutsModule.swift +59 -110
- package/lib/commonjs/healthkit.js +225 -0
- package/lib/commonjs/hooks/useStatisticsForQuantity.js +1 -1
- package/lib/commonjs/index.js +6 -209
- package/lib/module/healthkit.js +203 -0
- package/lib/module/hooks/useStatisticsForQuantity.js +1 -1
- package/lib/module/index.js +3 -203
- package/lib/typescript/healthkit.d.ts +69 -0
- package/lib/typescript/{index.ios.d.ts → healthkit.ios.d.ts} +11 -11
- package/lib/typescript/hooks/useHealthkitAuthorization.d.ts +1 -1
- package/lib/typescript/index.d.ts +3 -69
- package/lib/typescript/specs/CategoryTypeModule.nitro.d.ts +1 -1
- package/lib/typescript/specs/CharacteristicTypeModule.nitro.d.ts +2 -2
- package/lib/typescript/specs/CoreModule.nitro.d.ts +3 -3
- package/lib/typescript/specs/WorkoutsModule.nitro.d.ts +3 -0
- package/lib/typescript/types/Shared.d.ts +3 -3
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.cpp +7 -48
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Bridge.hpp +54 -154
- package/nitrogen/generated/ios/ReactNativeHealthkit-Swift-Cxx-Umbrella.hpp +0 -14
- package/nitrogen/generated/ios/c++/HybridCharacteristicTypeModuleSpecSwift.hpp +3 -2
- package/nitrogen/generated/ios/swift/Func_void_std__optional_std__chrono__system_clock__time_point_.swift +52 -0
- package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridCharacteristicTypeModuleSpec_cxx.swift +23 -11
- package/nitrogen/generated/shared/c++/HybridCharacteristicTypeModuleSpec.hpp +3 -2
- package/package.json +2 -2
- package/src/healthkit.ts +422 -0
- package/src/hooks/useHealthkitAuthorization.ts +2 -2
- package/src/hooks/useStatisticsForQuantity.ts +1 -3
- package/src/index.ts +3 -419
- package/src/specs/CategoryTypeModule.nitro.ts +1 -1
- package/src/specs/CharacteristicTypeModule.nitro.ts +2 -2
- package/src/specs/CoreModule.nitro.ts +5 -5
- package/src/specs/WorkoutsModule.nitro.ts +3 -0
- package/src/test-setup.ts +0 -1
- package/src/types/QueryOptions.ts +3 -3
- package/src/types/Shared.ts +6 -8
- package/ios/WorkoutSessionModule.swift +0 -182
- package/lib/commonjs/specs/WorkoutSessionModule.nitro.js +0 -19
- package/lib/module/specs/WorkoutSessionModule.nitro.js +0 -16
- package/lib/typescript/specs/WorkoutSessionModule.nitro.d.ts +0 -47
- package/nitrogen/generated/ios/c++/HybridWorkoutSessionModuleSpecSwift.cpp +0 -11
- package/nitrogen/generated/ios/c++/HybridWorkoutSessionModuleSpecSwift.hpp +0 -107
- package/nitrogen/generated/ios/swift/Func_void_WorkoutEventType.swift +0 -46
- package/nitrogen/generated/ios/swift/Func_void_WorkoutSessionState_WorkoutSessionState_std__chrono__system_clock__time_point.swift +0 -46
- package/nitrogen/generated/ios/swift/Func_void_std__chrono__system_clock__time_point.swift +0 -46
- package/nitrogen/generated/ios/swift/Func_void_std__vector_RemoteSessionSharableData_.swift +0 -46
- package/nitrogen/generated/ios/swift/HybridWorkoutSessionModuleSpec.swift +0 -49
- package/nitrogen/generated/ios/swift/HybridWorkoutSessionModuleSpec_cxx.swift +0 -133
- package/nitrogen/generated/ios/swift/RemoteSessionSharableData.swift +0 -46
- package/nitrogen/generated/ios/swift/WorkoutSessionMirroringStartHandlerOptions.swift +0 -118
- package/nitrogen/generated/ios/swift/WorkoutSessionState.swift +0 -56
- package/nitrogen/generated/shared/c++/HybridWorkoutSessionModuleSpec.cpp +0 -22
- package/nitrogen/generated/shared/c++/HybridWorkoutSessionModuleSpec.hpp +0 -68
- package/nitrogen/generated/shared/c++/RemoteSessionSharableData.hpp +0 -75
- package/nitrogen/generated/shared/c++/WorkoutSessionMirroringStartHandlerOptions.hpp +0 -92
- package/nitrogen/generated/shared/c++/WorkoutSessionState.hpp +0 -68
- package/src/specs/WorkoutSessionModule.nitro.ts +0 -71
- /package/lib/commonjs/{index.ios.js → healthkit.ios.js} +0 -0
- /package/lib/module/{index.ios.js → healthkit.ios.js} +0 -0
- /package/src/{index.ios.ts → healthkit.ios.ts} +0 -0
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { AnyMap, HybridObject } from 'react-native-nitro-modules'
|
|
2
|
-
import type { WorkoutConfiguration } from '../types/WorkoutKit'
|
|
3
|
-
import type { WorkoutEventType } from '../types/Workouts'
|
|
4
|
-
|
|
5
|
-
export interface WorkoutSessionMirroringStartHandlerOptions {
|
|
6
|
-
onError(errorMessage: string): void
|
|
7
|
-
onStateChange(
|
|
8
|
-
toState: WorkoutSessionState,
|
|
9
|
-
fromState: WorkoutSessionState,
|
|
10
|
-
date: Date,
|
|
11
|
-
): void
|
|
12
|
-
onDataReceived(data: RemoteSessionSharableData[]): void
|
|
13
|
-
onEventReceived(type: WorkoutEventType): void
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface WorkoutSessionModule extends HybridObject<{ ios: 'swift' }> {
|
|
17
|
-
/**
|
|
18
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkhealthstore/1648358-startwatchapp Apple Docs }
|
|
19
|
-
*/
|
|
20
|
-
startWatchAppWithWorkoutConfiguration(
|
|
21
|
-
workoutConfiguration: WorkoutConfiguration,
|
|
22
|
-
): Promise<boolean>
|
|
23
|
-
|
|
24
|
-
workoutSessionMirroringStartHandler(
|
|
25
|
-
/*onError: (event: WorkoutErrorEvent) => void,
|
|
26
|
-
onStateChange: (event: WorkoutStateChangeEvent) => void,
|
|
27
|
-
onDataReceived: (event: WorkoutDataReceivedEvent) => void,
|
|
28
|
-
onEventReceived: (event: WorkoutEventReceivedEvent) => void,*/
|
|
29
|
-
options: WorkoutSessionMirroringStartHandlerOptions,
|
|
30
|
-
): boolean
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @see {@link https://developer.apple.com/documentation/healthkit/hkworkoutsessionstate Apple Docs }
|
|
35
|
-
*/
|
|
36
|
-
export enum WorkoutSessionState {
|
|
37
|
-
NotStarted = 1,
|
|
38
|
-
Running = 2,
|
|
39
|
-
Ended = 3,
|
|
40
|
-
Paused = 4,
|
|
41
|
-
Prepared = 5,
|
|
42
|
-
Stopped = 6,
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface WorkoutStateChangeEvent {
|
|
46
|
-
readonly toState: WorkoutSessionState
|
|
47
|
-
readonly fromState: WorkoutSessionState
|
|
48
|
-
readonly date: Date
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface WorkoutErrorEvent {
|
|
52
|
-
readonly error: string
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface RemoteSessionSharableData {
|
|
56
|
-
readonly type: string
|
|
57
|
-
readonly payload: AnyMap
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface WorkoutDataReceivedEvent {
|
|
61
|
-
readonly data: readonly RemoteSessionSharableData[]
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface WorkoutEventReceivedEvent {
|
|
65
|
-
readonly type: WorkoutEventType
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/*type OnRemoteWorkoutStateChangeCallback = ;
|
|
69
|
-
type OnRemoteWorkoutErrorCallback = (event: WorkoutErrorEvent) => void;
|
|
70
|
-
type OnRemoteWorkoutDataCallback = (event: WorkoutDataReceivedEvent) => void;
|
|
71
|
-
type OnRemoteWorkoutEventReceivedCallback = (event: WorkoutEventReceivedEvent) => void;*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|