diff --git a/src/@ionic-native/plugins/health-kit/index.ts b/src/@ionic-native/plugins/health-kit/index.ts index aabd348e..58344ce7 100644 --- a/src/@ionic-native/plugins/health-kit/index.ts +++ b/src/@ionic-native/plugins/health-kit/index.ts @@ -1,127 +1,81 @@ -import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; import { Injectable } from '@angular/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; export interface HealthKitOptions { /** - * HKWorkoutActivityType constant - * Read more here: https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HKWorkout_Class/#//apple_ref/c/tdef/HKWorkoutActivityType - */ + * HKWorkoutActivityType constant + * Read more here: https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HKWorkout_Class/#//apple_ref/c/tdef/HKWorkoutActivityType + */ activityType?: string; /** - * 'hour', 'week', 'year' or 'day', default 'day' - */ + * 'hour', 'week', 'year' or 'day', default 'day' + */ aggregation?: string; - /** - * - */ amount?: number; /** - * specifies if the data returned by querySampleType() should be sorted by - * end date in ascending order, default is false - */ + * specifies if the data returned by querySampleType() should be sorted by + * end date in ascending order, default is false + */ ascending?: boolean; - /** - * - */ correlationType?: string; - /** - * - */ date?: any; - /** - * - */ distance?: number; /** - * probably useful with the former param - */ + * probably useful with the former param + */ distanceUnit?: string; /** - * in seconds, optional, use either this or endDate - */ + * in seconds, optional, use either this or endDate + */ duration?: number; - /** - * - */ endDate?: any; - /** - * - */ energy?: number; /** - * J|cal|kcal - */ + * J|cal|kcal + */ energyUnit?: string; - /** - * - */ extraData?: any; /** - * limits the maximum number of records returned by querySampleType() - */ + * limits the maximum number of records returned by querySampleType() + */ limit?: number; - /** - * - */ metadata?: any; - /** - * - */ quantityType?: string; - /** - * - */ + type?: string; + readTypes?: any; - /** - * - */ requestWritePermission?: boolean; - /** - * - */ samples?: any; - /** - * - */ sampleType?: string; - /** - * - */ startDate?: any; /** - * m|cm|mm|in|ft - */ + * m|cm|mm|in|ft + */ unit?: string; - /** - * - */ requestReadPermission?: boolean; - /** - * - */ writeTypes?: any; } @@ -153,168 +107,207 @@ export interface HealthKitOptions { }) @Injectable() export class HealthKit extends IonicNativePlugin { + /** + * Check if HealthKit is supported (iOS8+, not on iPad) + * @returns {Promise} + */ + @Cordova() + available(): Promise { + return; + } /** - * Check if HealthKit is supported (iOS8+, not on iPad) - * @returns {Promise} - */ + * Pass in a type and get back on of undetermined | denied | authorized + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - available(): Promise { return; } + checkAuthStatus(options: HealthKitOptions): Promise { + return; + } /** - * Pass in a type and get back on of undetermined | denied | authorized - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * Ask some or all permissions up front + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - checkAuthStatus(options: HealthKitOptions): Promise { return; } + requestAuthorization(options: HealthKitOptions): Promise { + return; + } /** - * Ask some or all permissions up front - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * Formatted as yyyy-MM-dd + * @returns {Promise} + */ @Cordova() - requestAuthorization(options: HealthKitOptions): Promise { return; } + readDateOfBirth(): Promise { + return; + } /** - * Formatted as yyyy-MM-dd - * @returns {Promise} - */ + * Output = male|female|other|unknown + * @returns {Promise} + */ @Cordova() - readDateOfBirth(): Promise { return; } + readGender(): Promise { + return; + } /** - * Output = male|female|other|unknown - * @returns {Promise} - */ + * Output = A+|A-|B+|B-|AB+|AB-|O+|O-|unknown + * @returns {Promise} + */ @Cordova() - readGender(): Promise { return; } + readBloodType(): Promise { + return; + } /** - * Output = A+|A-|B+|B-|AB+|AB-|O+|O-|unknown - * @returns {Promise} - */ + * Output = I|II|III|IV|V|VI|unknown + * @returns {Promise} + */ @Cordova() - readBloodType(): Promise { return; } + readFitzpatrickSkinType(): Promise { + return; + } /** - * Output = I|II|III|IV|V|VI|unknown - * @returns {Promise} - */ + * Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone) and amount + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - readFitzpatrickSkinType(): Promise { return; } + saveWeight(options: HealthKitOptions): Promise { + return; + } /** - * Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone) and amount - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone) + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - saveWeight(options: HealthKitOptions): Promise { return; } + readWeight(options: HealthKitOptions): Promise { + return; + } /** - * Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone) - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot) and amount + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - readWeight(options: HealthKitOptions): Promise { return; } + saveHeight(options: HealthKitOptions): Promise { + return; + } /** - * Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot) and amount - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot) + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - saveHeight(options: HealthKitOptions): Promise { return; } + readHeight(options: HealthKitOptions): Promise { + return; + } /** - * Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot) - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * no params yet, so this will return all workouts ever of any type + * @returns {Promise} + */ @Cordova() - readHeight(options: HealthKitOptions): Promise { return; } + findWorkouts(): Promise { + return; + } /** - * no params yet, so this will return all workouts ever of any type - * @returns {Promise} - */ + * + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - findWorkouts(): Promise { return; } + saveWorkout(options: HealthKitOptions): Promise { + return; + } /** - * - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - saveWorkout(options: HealthKitOptions): Promise { return; } + querySampleType(options: HealthKitOptions): Promise { + return; + } /** - * - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - querySampleType(options: HealthKitOptions): Promise { return; } + querySampleTypeAggregated(options: HealthKitOptions): Promise { + return; + } /** - * - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - querySampleTypeAggregated(options: HealthKitOptions): Promise { return; } + deleteSamples(options: HealthKitOptions): Promise { + return; + } /** - * - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - deleteSamples(options: HealthKitOptions): Promise { return; } + monitorSampleType(options: HealthKitOptions): Promise { + return; + } /** - * - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - monitorSampleType(options: HealthKitOptions): Promise { return; } + sumQuantityType(options: HealthKitOptions): Promise { + return; + } /** - * - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - sumQuantityType(options: HealthKitOptions): Promise { return; } + saveQuantitySample(options: HealthKitOptions): Promise { + return; + } /** - * - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - saveQuantitySample(options: HealthKitOptions): Promise { return; } + saveCorrelation(options: HealthKitOptions): Promise { + return; + } /** - * - * @param options {HealthKitOptions} - * @returns {Promise} - */ + * + * @param options {HealthKitOptions} + * @returns {Promise} + */ @Cordova() - saveCorrelation(options: HealthKitOptions): Promise { return; } - - /** - * - * @param options {HealthKitOptions} - * @returns {Promise} - */ - @Cordova() - queryCorrelationType(options: HealthKitOptions): Promise { return; } - - + queryCorrelationType(options: HealthKitOptions): Promise { + return; + } }