1 | // @flow
|
2 |
|
3 | import {
|
4 | NativeModules,
|
5 | } from 'react-native';
|
6 |
|
7 | type FieldType = 'phoneNumbers' | 'emails' | 'addresses';
|
8 |
|
9 | export async function getContactsAsync(fields: FieldType[] = []) {
|
10 | return await NativeModules.ExponentContacts.getContactsAsync(fields);
|
11 | }
|
12 |
|
13 | export const PHONE_NUMBERS = 'phoneNumbers';
|
14 | export const EMAILS = 'emails';
|
15 | export const ADDRESSES = 'addresses';
|