-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathselectContact.d.ts
62 lines (53 loc) · 1.56 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
export function selectContact(textOptions? : TextOptions): Promise<Contact | null>;
export function selectContactPhone(textOptions? : TextOptions): Promise<ContactPhoneSelection | null>;
export function selectContactEmail(textOptions? : TextOptions): Promise<ContactEmailSelection | null>;
export function selectContactPostalAddress(textOptions? : TextOptions): 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
}
export interface TextOptions {
cancel: String,
selectPhone: String,
selectPostalAddress: String,
selectEmail: String,
errorNoPhoneNumbersTitle: String,
errorNoPhoneNumbersBody: String,
errorNoAddressTitle: String,
errorNoAddressBody: String,
errorNoEmailTitle: String,
errorNoEmailBody: String,
errorOpenTwice: String,
}