Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@perfood/capacitor-healthkit

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@perfood/capacitor-healthkit

Capacitor plugin to read data from and write data to Apple Health

  • 2.0.0-alpha.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
90
increased by20%
Maintainers
3
Weekly downloads
 
Created
Source

@perfood/capacitor-healthkit v2

This is a complete re-write of the original plugin and still work in progress. v2 will have a complete new API and some new features. By far not everything has been implemented yet. You can test the most recent release of v2 by installing @perfood/capacitor-healthkit@next.

Install

npm install @perfood/capacitor-healthkit@next
npx cap sync

API

requestAuthorization(...)

requestAuthorization(options: RequestAuthorizationOptions) => Promise<void>
ParamType
optionsRequestAuthorizationOptions

isAvailable()

isAvailable() => Promise<void>

getAuthorizationStatus(...)

getAuthorizationStatus(options: GetAuthorizationStatusOptions) => Promise<{ status: AuthorizationStatus; }>
ParamType
optionsGetAuthorizationStatusOptions

Returns: Promise<{ status: AuthorizationStatus; }>


getStatisticsCollection(...)

getStatisticsCollection(options: StatisticsCollectionOptions) => Promise<StatisticsCollectionOutput>
ParamType
optionsStatisticsCollectionOptions

Returns: Promise<StatisticsCollectionOutput>


getBodyMassEntries(...)

getBodyMassEntries(options: BodyMassQueryOptions) => Promise<BodyMassQueryOutput>
ParamType
optionsBodyMassQueryOptions

Returns: Promise<BodyMassQueryOutput>


getWorkouts(...)

getWorkouts(options: WorkoutsQueryOptions) => Promise<WorkoutsQueryOutput>
ParamType
optionsWorkoutsQueryOptions

Returns: Promise<WorkoutsQueryOutput>


Interfaces

RequestAuthorizationOptions
PropType
allstring[]
readstring[]
writestring[]
GetAuthorizationStatusOptions
PropType
sampleTypestring
StatisticsCollectionOutput
PropType
data{ startDate: string; endDate: string; value: number; }[]
StatisticsCollectionOptions
PropType
startDatestring
endDatestring
anchorDatestring
intervalStatisticsCollectionQueryInterval
quantityTypeSampleNameQuantityType
StatisticsCollectionQueryInterval
PropType
unit'second' | 'minute' | 'hour' | 'day' | 'month' | 'year'
valuenumber
BodyMassQueryOutput
PropType
data{ date: string; value: number; unit: string; uuid: string; sourceName: string; sourceBundleId: string; }[]
BodyMassQueryOptions
PropType
startDatestring
endDatestring
limitnumber
WorkoutsQueryOutput
PropType
data{ uuid: string; startDate: string; endDate: string; duration: number; device?: HealthKitDevice; source: string; sourceBundleId: string; workoutActivityType: string; workoutActivityTypeId: number; totalEnergyBurned?: number; totalDistance?: number; totalFlightsClimbed?: number; totalSwimmingStrokeCount?: number; }[]
HealthKitDevice
PropType
namestring
modelstring
manufacturerstring
hardwareVersionstring
softwareVersionstring
firmwareVersionstring
localIdentifierstring
udiDeviceIdentifierstring
WorkoutsQueryOptions
PropType
startDatestring
endDatestring
limitnumber

Type Aliases

AuthorizationStatus

'notDetermined' | 'sharingDenied' | 'sharingAuthorized'

QuantityType

'stepCount'

Keywords

FAQs

Package last updated on 07 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc