react-native-contacts 7.0.6 → 7.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ nodejs 19.2.0
@@ -1218,7 +1218,7 @@ public class ContactsManager extends ReactContextBaseJavaModule implements Activ
1218
1218
  */
1219
1219
  private String isPermissionGranted() {
1220
1220
  // return -1 for denied and 1
1221
- int res = getReactApplicationContext().checkCallingOrSelfPermission(PERMISSION_READ_CONTACTS);
1221
+ int res = getReactApplicationContext().checkSelfPermission(PERMISSION_READ_CONTACTS);
1222
1222
  return (res == PackageManager.PERMISSION_GRANTED) ? PERMISSION_AUTHORIZED : PERMISSION_DENIED;
1223
1223
  }
1224
1224
 
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export function getAll(): Promise<Contact[]>;
2
2
  export function getAllWithoutPhotos(): Promise<Contact[]>;
3
- export function getContactById(contactId: string): Promise<Contact>;
3
+ export function getContactById(contactId: string): Promise<Contact | null>;
4
4
  export function getCount(): Promise<number>;
5
5
  export function getPhotoForId(contactId: string): Promise<string>;
6
6
  export function addContact(contact: Partial<Contact>): Promise<Contact>;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rt2zz/react-native-contacts.git"
6
6
  },
7
- "version": "7.0.6",
7
+ "version": "7.0.7",
8
8
  "description": "React Native Contacts (android & ios)",
9
9
  "nativePackage": true,
10
10
  "keywords": [
package/foo.js DELETED
@@ -1 +0,0 @@
1
- console.log('hello')