forked from streem/react-native-select-contact
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathselectContact.d.ts
48 lines (40 loc) · 1.1 KB
/
selectContact.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
export function selectContact(): Promise<Contact | null>;
export function selectContactPhone(): Promise<ContactPhoneSelection | null>;
export function selectContactEmail(): Promise<ContactEmailSelection | null>;
export function selectContactPostalAddress(): Promise<ContactPostalAddressSelection | null>;
export interface PhoneEntry {
number: string,
type: string
}
export interface EmailEntry {
address: string,
type: string
}
export interface AddressEntry {
formattedAddress: string, // android only
type: string, // android only
street: string,
city: string,
state: string,
postalCode: string,
isoCountryCode: string
}
export interface Contact {
recordId: string,
name: string,
phones: PhoneEntry[],
emails: EmailEntry[],
postalAddresses: AddressEntry[]
}
export interface ContactPhoneSelection {
contact: Contact,
selectedPhone: PhoneEntry
}
export interface ContactEmailSelection {
contact: Contact,
selectedEmail: EmailEntry
}
export interface ContactPostalAddressSelection {
contact: Contact,
selectedAddress: AddressEntry
}