add CallLogObject interface
This commit is contained in:
parent
61c0ecfa4f
commit
5e40f3412a
@ -1,5 +1,11 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
|
export interface CallLogObject {
|
||||||
|
name: string;
|
||||||
|
value: string;
|
||||||
|
operator: '==' | '!=' | '>' | '>=' | '<' | '<=';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Call Log
|
* @name Call Log
|
||||||
@ -13,7 +19,9 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
*
|
*
|
||||||
* constructor(private callLog: CallLog) { }
|
* constructor(private callLog: CallLog) { }
|
||||||
*
|
*
|
||||||
* ...
|
* ````
|
||||||
|
* @interfaces
|
||||||
|
* CallLogObject
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Plugin({
|
@Plugin({
|
||||||
@ -25,16 +33,15 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CallLog extends IonicNativePlugin {
|
export class CallLog extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function return the call logs
|
* This function return the call logs
|
||||||
* @param filters {object[]} array of object to filter the query
|
* @param filters {CallLogObject[]} array of object to filter the query
|
||||||
* Object must respect this structure {'name':'...', 'value': '...', 'operator': '=='}
|
|
||||||
* (see https://github.com/creacore-team/cordova-plugin-calllog for more details)
|
|
||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
getCallLog(filters: object[]): Promise<any> { return; }
|
getCallLog(filters: CallLogObject[]): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check permission
|
* Check permission
|
||||||
@ -43,7 +50,9 @@ export class CallLog extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
hasReadPermission(): Promise<any> { return; }
|
hasReadPermission(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request permission
|
* Request permission
|
||||||
@ -52,5 +61,7 @@ export class CallLog extends IonicNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
platforms: ['Android']
|
platforms: ['Android']
|
||||||
})
|
})
|
||||||
requestReadPermission(): Promise<any> { return; }
|
requestReadPermission(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user