react-native-healthkit-bridge
Version:
A comprehensive React Native bridge for Apple HealthKit with TypeScript support, advanced authorization, and flexible data queries
42 lines (41 loc) • 1.4 kB
TypeScript
import type { TurboModule } from 'react-native';
export interface Spec extends TurboModule {
isHealthKitAvailable(callback: (error: string | null, isAvailable: boolean) => void): void;
checkAvailability(): Promise<boolean>;
requestAuthorization(): Promise<boolean>;
requestSelectiveAuthorization(readTypes: string[], writeTypes: string[]): Promise<boolean>;
getAuthorizationStatus(identifiers: string[]): Promise<Array<{
identifier: string;
status: string;
}>>;
getQuantitySamplesForDays(identifier: string, unit: string, days: number): Promise<Array<{
value: number;
startDate: string;
endDate: string;
uuid: string;
sourceRevision: any;
}>>;
getQuantitySamplesForRange(identifier: string, unit: string, startDate: string, endDate: string): Promise<Array<{
value: number;
startDate: string;
endDate: string;
uuid: string;
sourceRevision: any;
}>>;
getAvailableTypes(): Promise<Array<{
identifier: string;
name: string;
description: string;
category: string;
type: string;
}>>;
getTypeInfo(identifier: string): Promise<{
identifier: string;
name: string;
description: string;
category: string;
type: string;
}>;
}
declare const _default: Spec;
export default _default;