capacitor-rook-sdk
v0.3.3
Published
Extract and sync information of Health Connect and Apple Health
Downloads
57
Maintainers
Readme
capacitor-rook-sdk
Extract and sync information of Health Connect and Apple Health
Install
npm install capacitor-rook-sdk
npx cap sync
API
addListener(EventNames, ...)
addListener('io.tryrook.background.appleHealth.errors', ...)
- Interfaces
- Type Aliases
addListener(EventNames, ...)
addListener(eventName: EventNames, callback: (info: any) => void) => Promise<PluginListenerHandle>
| Param | Type |
| --------------- | ------------------------------------------------- |
| eventName
| EventNames |
| callback
| (info: any) => void |
Returns: Promise<PluginListenerHandle>
addListener('io.tryrook.background.appleHealth.errors', ...)
addListener(eventName: AppleEventNames, callback: (info: any) => void) => Promise<PluginListenerHandle>
| Param | Type |
| --------------- | ------------------------------------------------------- |
| eventName
| 'io.tryrook.background.appleHealth.errors' |
| callback
| (info: any) => void |
Returns: Promise<PluginListenerHandle>
Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove
| () => Promise<void> |
Type Aliases
EventNames
'io.tryrook.permissions.android' | 'io.tryrook.permissions.healthConnect'
AppleEventNames
'io.tryrook.background.appleHealth.errors'
InitRookProps
{ environment: Environment; clientUUID: string; password: string; enableBackgroundSync: boolean; enableEventsBackgroundSync: boolean; enableLogs?: boolean; }
Environment
'production' | 'sandbox'
BoolResult
{ result: boolean; }
UpdateUserIdProps
{ userId: string; }
UserIdResult
{ userId: string; }
RevokeDataSourceProps
{ dataSource: DataSourceRevoke }
DataSourceRevoke
'Garmin' | 'Oura' | 'Polar' | 'Fitbit' | 'Withings' | 'Whoop'
CheckAvailabilityResult
{ result: CheckAvailabilityResponse; }
CheckAvailabilityResponse
'INSTALLED' | 'NOT_INSTALLED' | 'NOT_SUPPORTED'
RequestPermissionsStatusResult
{ result: RequestPermissionsStatus; }
RequestPermissionsStatus
'REQUEST_SENT' | 'ALREADY_GRANTED'
ConfigurationDoOnEndProps
{ doOnEnd: ConfigurationDoOnEnd; }
ConfigurationDoOnEnd
'oldest' | 'latest' | 'nothing'
ShouldSyncProps
{ type: HealthDataType; date: string; }
HealthDataType
'SLEEP_SUMMARY' | 'PHYSICAL_SUMMARY' | 'BODY_SUMMARY' | 'PHYSICAL_EVENT' | 'BLOOD_GLUCOSE_BODY_EVENT' | 'BLOOD_PRESSURE_BODY_EVENT' | 'BODY_METRICS_EVENT' | 'HEART_RATE_BODY_EVENT' | 'HEART_RATE_PHYSICAL_EVENT' | 'HYDRATION_BODY_EVENT' | 'NUTRITION_BODY_EVENT' | 'OXYGENATION_BODY_EVENT' | 'OXYGENATION_PHYSICAL_EVENT' | 'TEMPERATURE_BODY_EVENT'
DateProps
{ date: string; }
StepsResult
{ stepCount: number; }
DataSourceProps
{ redirectURL?: string; }
ResultDataSource
{ result: DataSource[]; }
DataSource
{ name: string; authorizationURL: string; imageUrl: string; description: string; connected: boolean; }