fix(health-kit): add missing checkAuthStatus param (#2544)
* Fix checkAuthStatus * Update index.ts * Update index.ts
This commit is contained in:
parent
f62a123a34
commit
956e644fa4
@ -1,5 +1,5 @@
|
|||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
export interface HealthKitOptions {
|
export interface HealthKitOptions {
|
||||||
/**
|
/**
|
||||||
@ -13,9 +13,6 @@ export interface HealthKitOptions {
|
|||||||
*/
|
*/
|
||||||
aggregation?: string;
|
aggregation?: string;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
amount?: number;
|
amount?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -24,19 +21,10 @@ export interface HealthKitOptions {
|
|||||||
*/
|
*/
|
||||||
ascending?: boolean;
|
ascending?: boolean;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
correlationType?: string;
|
correlationType?: string;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
date?: any;
|
date?: any;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
distance?: number;
|
distance?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,14 +37,8 @@ export interface HealthKitOptions {
|
|||||||
*/
|
*/
|
||||||
duration?: number;
|
duration?: number;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
endDate?: any;
|
endDate?: any;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
energy?: number;
|
energy?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -64,9 +46,6 @@ export interface HealthKitOptions {
|
|||||||
*/
|
*/
|
||||||
energyUnit?: string;
|
energyUnit?: string;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
extraData?: any;
|
extraData?: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -74,39 +53,20 @@ export interface HealthKitOptions {
|
|||||||
*/
|
*/
|
||||||
limit?: number;
|
limit?: number;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
metadata?: any;
|
metadata?: any;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
quantityType?: string;
|
quantityType?: string;
|
||||||
|
|
||||||
/**
|
type?: string;
|
||||||
*
|
|
||||||
*/
|
|
||||||
readTypes?: any;
|
readTypes?: any;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
requestWritePermission?: boolean;
|
requestWritePermission?: boolean;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
samples?: any;
|
samples?: any;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
sampleType?: string;
|
sampleType?: string;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
startDate?: any;
|
startDate?: any;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -114,14 +74,8 @@ export interface HealthKitOptions {
|
|||||||
*/
|
*/
|
||||||
unit?: string;
|
unit?: string;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
requestReadPermission?: boolean;
|
requestReadPermission?: boolean;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
writeTypes?: any;
|
writeTypes?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,13 +107,14 @@ export interface HealthKitOptions {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class HealthKit extends IonicNativePlugin {
|
export class HealthKit extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if HealthKit is supported (iOS8+, not on iPad)
|
* Check if HealthKit is supported (iOS8+, not on iPad)
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
available(): Promise<any> { return; }
|
available(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pass in a type and get back on of undetermined | denied | authorized
|
* Pass in a type and get back on of undetermined | denied | authorized
|
||||||
@ -167,7 +122,9 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
checkAuthStatus(options: HealthKitOptions): Promise<any> { return; }
|
checkAuthStatus(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ask some or all permissions up front
|
* Ask some or all permissions up front
|
||||||
@ -175,35 +132,45 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestAuthorization(options: HealthKitOptions): Promise<any> { return; }
|
requestAuthorization(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Formatted as yyyy-MM-dd
|
* Formatted as yyyy-MM-dd
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
readDateOfBirth(): Promise<any> { return; }
|
readDateOfBirth(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output = male|female|other|unknown
|
* Output = male|female|other|unknown
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
readGender(): Promise<any> { return; }
|
readGender(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output = A+|A-|B+|B-|AB+|AB-|O+|O-|unknown
|
* Output = A+|A-|B+|B-|AB+|AB-|O+|O-|unknown
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
readBloodType(): Promise<any> { return; }
|
readBloodType(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output = I|II|III|IV|V|VI|unknown
|
* Output = I|II|III|IV|V|VI|unknown
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
readFitzpatrickSkinType(): Promise<any> { return; }
|
readFitzpatrickSkinType(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone) and amount
|
* Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone) and amount
|
||||||
@ -211,7 +178,9 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
saveWeight(options: HealthKitOptions): Promise<any> { return; }
|
saveWeight(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone)
|
* Pass in unit (g=gram, kg=kilogram, oz=ounce, lb=pound, st=stone)
|
||||||
@ -219,7 +188,9 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
readWeight(options: HealthKitOptions): Promise<any> { return; }
|
readWeight(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot) and amount
|
* Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot) and amount
|
||||||
@ -227,7 +198,9 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
saveHeight(options: HealthKitOptions): Promise<any> { return; }
|
saveHeight(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot)
|
* Pass in unit (mm=millimeter, cm=centimeter, m=meter, in=inch, ft=foot)
|
||||||
@ -235,14 +208,18 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
readHeight(options: HealthKitOptions): Promise<any> { return; }
|
readHeight(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* no params yet, so this will return all workouts ever of any type
|
* no params yet, so this will return all workouts ever of any type
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
findWorkouts(): Promise<any> { return; }
|
findWorkouts(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -250,7 +227,9 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
saveWorkout(options: HealthKitOptions): Promise<any> { return; }
|
saveWorkout(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -258,7 +237,9 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
querySampleType(options: HealthKitOptions): Promise<any> { return; }
|
querySampleType(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -266,7 +247,9 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
querySampleTypeAggregated(options: HealthKitOptions): Promise<any> { return; }
|
querySampleTypeAggregated(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -274,7 +257,9 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
deleteSamples(options: HealthKitOptions): Promise<any> { return; }
|
deleteSamples(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -282,7 +267,9 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
monitorSampleType(options: HealthKitOptions): Promise<any> { return; }
|
monitorSampleType(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -290,7 +277,9 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
sumQuantityType(options: HealthKitOptions): Promise<any> { return; }
|
sumQuantityType(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -298,7 +287,9 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
saveQuantitySample(options: HealthKitOptions): Promise<any> { return; }
|
saveQuantitySample(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -306,7 +297,9 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
saveCorrelation(options: HealthKitOptions): Promise<any> { return; }
|
saveCorrelation(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -314,7 +307,7 @@ export class HealthKit extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
queryCorrelationType(options: HealthKitOptions): Promise<any> { return; }
|
queryCorrelationType(options: HealthKitOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user