cordova-plugin-contacts-x
Advanced tools
Comparing version 1.0.0 to 1.1.0
# Changelog | ||
## 1.1.0 | ||
- Fields can be specified (**Breaking**: phoneNumbers disabled by default) | ||
- emails field added | ||
## 1.0.0 | ||
- Initial Release |
{ | ||
"name": "cordova-plugin-contacts-x", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Cordova Plugins for managing contacts", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -35,2 +35,4 @@ # ContactsX Cordova Plugin | ||
- [find](#find) | ||
- [Objects](#objects) | ||
- [ContactXEmail](#contactxemail) | ||
- [Changelog](#changelog) | ||
@@ -47,2 +49,3 @@ | ||
- **ios** `>= 9` | ||
- **android** `>= 22` | ||
@@ -156,3 +159,3 @@ ## Android | ||
Find Contacts | ||
Find Contacts by given options. If you don't set a field to true, it is not included or empty in the result | ||
@@ -163,2 +166,10 @@ ### Parameters: | ||
- Error Callback | ||
- Options: | ||
- fields: | ||
- displayName (boolean) - *Android only, default: true* | ||
- firstName (boolean) - *default: true* | ||
- middleName (boolean) - *default: true* | ||
- familyName (boolean) - *default: true* | ||
- phoneNumbers (boolean) | ||
- emails (boolean) | ||
@@ -182,5 +193,13 @@ ```js | ||
- phoneNumbers (string[]) | ||
- emails ([ContactXEmail](#contactxemail)[]) | ||
# Objects | ||
## ContactXEmail | ||
- id (string) | ||
- type (string) | ||
- value (string) | ||
# Changelog | ||
The full Changelog is available [here](CHANGELOG.md) |
/// <reference path="./interfaces/error.d.ts" /> | ||
/// <reference path="./interfaces/find-options.d.ts" /> | ||
/// <reference path="./interfaces/permission-result.d.ts" /> | ||
@@ -21,4 +22,5 @@ /// <reference path="./interfaces/ContactX.d.ts" /> | ||
* @param error | ||
* @param options | ||
*/ | ||
static find(success: (result: ContactX[]) => void, error: (error: ContactXError) => void); | ||
static find(success: (result: ContactX[]) => void, error: (error: ContactXError) => void, options?: FindOptions); | ||
@@ -25,0 +27,0 @@ /** |
declare module 'cordova-plugin-contacts-x' { | ||
interface ContactXEmail { | ||
id: string; | ||
/** | ||
* type of the mail | ||
*/ | ||
type: string; | ||
/** | ||
* the mail itself | ||
*/ | ||
value: string; | ||
} | ||
interface ContactX { | ||
@@ -31,3 +45,8 @@ id: string; | ||
phoneNumbers: string[]; | ||
/** | ||
* unformatted emails of the contact | ||
*/ | ||
emails: ContactXEmail[]; | ||
} | ||
} |
@@ -10,3 +10,3 @@ var plugin = function () { | ||
ContactsX.find = function (success, failure) { | ||
ContactsX.find = function (success, failure, options) { | ||
var plu = plugin(); | ||
@@ -13,0 +13,0 @@ return plu.find.apply(plu, arguments); |
@@ -11,4 +11,4 @@ var exec = require('cordova/exec'); | ||
find: function (success, error) { | ||
exec(success, error, 'ContactsX', 'find', []); | ||
find: function (success, error, options) { | ||
exec(success, error, 'ContactsX', 'find', [options]); | ||
}, | ||
@@ -15,0 +15,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36821
22
154
201