UNPKG

react-native-healthkit-bridge

Version:

A comprehensive React Native bridge for Apple HealthKit with TypeScript support, advanced authorization, and flexible data queries

16 lines (15 loc) 772 B
import { HealthKitRepository } from '../../domain/repositories/HealthKitRepository'; import { HealthKitQuantitySample } from '../../domain/entities/HealthKitSample'; export interface UseHealthKitConfig { repository: HealthKitRepository; } export declare function useHealthKit(config: UseHealthKitConfig): { isAvailable: boolean; isAuthorized: boolean; loading: boolean; error: string | null; requestAuthorization: (identifiers?: string[]) => Promise<boolean>; getQuantitySamplesForDays: (identifier: string, unit: string, days: number) => Promise<HealthKitQuantitySample[]>; getQuantitySamplesForRange: (identifier: string, unit: string, startDate: Date, endDate: Date) => Promise<HealthKitQuantitySample[]>; clearError: () => void; };