@@ -4,91 +4,117 @@ 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 > ;
7
- export function openContactForm ( contact : Partial < Contact > ) : Promise < Contact | null > ;
7
+ export function openContactForm (
8
+ contact : Partial < Contact >
9
+ ) : Promise < Contact | null > ;
8
10
export function openExistingContact ( contact : Contact ) : Promise < Contact > ;
9
- export function viewExistingContact ( contact : { recordID : string } ) : Promise < Contact | void >
11
+ export function viewExistingContact ( contact : {
12
+ recordID : string ;
13
+ } ) : Promise < Contact | void > ;
10
14
export function editExistingContact ( contact : Contact ) : Promise < Contact > ;
11
- export function updateContact ( contact : Partial < Contact > & { recordID : string } ) : Promise < void > ;
15
+ export function updateContact (
16
+ contact : Partial < Contact > & { recordID : string }
17
+ ) : Promise < void > ;
12
18
export function deleteContact ( contact : Contact ) : Promise < void > ;
13
19
export function getContactsMatchingString ( str : string ) : Promise < Contact [ ] > ;
14
- export function getContactsByPhoneNumber ( phoneNumber : string ) : Promise < Contact [ ] > ;
15
- export function getContactsByEmailAddress ( emailAddress : string ) : Promise < Contact [ ] > ;
16
- export function checkPermission ( ) : Promise < 'authorized' | 'denied' | 'undefined' > ;
17
- export function requestPermission ( ) : Promise < 'authorized' | 'denied' | 'undefined' > ;
18
- export function writePhotoToPath ( contactId : string , file : string ) : Promise < boolean > ;
20
+ export function getContactsByPhoneNumber (
21
+ phoneNumber : string
22
+ ) : Promise < Contact [ ] > ;
23
+ export function getContactsByEmailAddress (
24
+ emailAddress : string
25
+ ) : Promise < Contact [ ] > ;
26
+ export function checkPermission ( ) : Promise <
27
+ "authorized" | "denied" | "undefined"
28
+ > ;
29
+ export function requestPermission ( ) : Promise <
30
+ "authorized" | "denied" | "undefined"
31
+ > ;
32
+ export function writePhotoToPath (
33
+ contactId : string ,
34
+ file : string
35
+ ) : Promise < boolean > ;
19
36
export function iosEnableNotesUsage ( enabled : boolean ) : void ;
20
37
21
38
export function getGroups ( ) : Promise < Group [ ] > ;
22
39
export function getGroup ( identifier : string ) : Promise < Group | null > ;
23
40
export function deleteGroup ( identifier : string ) : Promise < boolean > ;
24
- export function updateGroup ( identifier : string , groupData : Pick < Group , 'name' > ) : Promise < Group > ;
25
- export function addGroup ( group : Pick < Group , 'name' > ) : Promise < Group > ;
26
- export function contactsInGroup ( identifier : string ) : Promise < Contact [ ] > ;
27
- export function addContactsToGroup ( groupIdentifier : string , contactIdentifiers : string [ ] ) : Promise < boolean > ;
28
- export function removeContactsFromGroup ( groupIdentifier : string , contactIdentifiers : string [ ] ) : Promise < boolean > ;
41
+ export function updateGroup (
42
+ identifier : string ,
43
+ groupData : Pick < Group , "name" >
44
+ ) : Promise < Group > ;
45
+ export function addGroup ( group : Pick < Group , "name" > ) : Promise < Group > ;
46
+ export function contactsInGroup ( identifier : string ) : Promise < Contact [ ] > ;
47
+ export function addContactsToGroup (
48
+ groupIdentifier : string ,
49
+ contactIdentifiers : string [ ]
50
+ ) : Promise < boolean > ;
51
+ export function removeContactsFromGroup (
52
+ groupIdentifier : string ,
53
+ contactIdentifiers : string [ ]
54
+ ) : Promise < boolean > ;
29
55
export interface Group {
30
56
identifier : string ;
31
57
name : string ;
32
58
}
33
59
export interface EmailAddress {
34
- label : string ;
35
- email : string ;
60
+ label : string ;
61
+ email : string ;
36
62
}
37
63
38
64
export interface PhoneNumber {
39
- label : string ;
40
- number : string ;
65
+ label : string ;
66
+ number : string ;
41
67
}
42
68
43
69
export interface PostalAddress {
44
- label : string ;
45
- formattedAddress : string ;
46
- street : string ;
47
- pobox : string ;
48
- neighborhood : string ;
49
- city : string ;
50
- region : string ;
51
- state : string ;
52
- postCode : string ;
53
- country : string ;
70
+ label : string ;
71
+ formattedAddress : string ;
72
+ street : string ;
73
+ pobox : string ;
74
+ neighborhood : string ;
75
+ city : string ;
76
+ region : string ;
77
+ state : string ;
78
+ postCode : string ;
79
+ country : string ;
54
80
}
55
81
56
82
export interface InstantMessageAddress {
57
- username : string ;
58
- service : string ;
83
+ username : string ;
84
+ service : string ;
59
85
}
60
86
61
87
export interface Birthday {
62
- day : number ;
63
- month : number ;
64
- year ?: number ;
88
+ day : number ;
89
+ month : number ;
90
+ year ?: number ;
65
91
}
66
92
67
93
export interface UrlAddress {
68
- url : string ;
69
- label : string ;
94
+ url : string ;
95
+ label : string ;
70
96
}
71
97
72
98
export interface Contact {
73
- recordID : string ;
74
- backTitle : string ;
75
- company : string | null ;
76
- emailAddresses : EmailAddress [ ] ;
77
- displayName : string | null ;
78
- familyName : string ;
79
- givenName : string | null ;
80
- middleName : string ;
81
- jobTitle : string | null ;
82
- phoneNumbers : PhoneNumber [ ] ;
83
- hasThumbnail : boolean ;
84
- thumbnailPath : string ;
85
- isStarred : boolean ;
86
- postalAddresses : PostalAddress [ ] ;
87
- prefix : string | null ;
88
- suffix : string | null ;
89
- department : string | null ;
90
- birthday ?: Birthday ;
91
- imAddresses : InstantMessageAddress [ ] ;
92
- urlAddresses : UrlAddress [ ] ;
93
- note : string | null ;
99
+ recordID : string ;
100
+ backTitle : string ;
101
+ company : string | null ;
102
+ emailAddresses : EmailAddress [ ] ;
103
+ displayName : string | null ;
104
+ familyName : string ;
105
+ givenName : string | null ;
106
+ middleName : string ;
107
+ jobTitle : string | null ;
108
+ phoneNumbers : PhoneNumber [ ] ;
109
+ hasThumbnail : boolean ;
110
+ thumbnailPath : string ;
111
+ isStarred : boolean ;
112
+ postalAddresses : PostalAddress [ ] ;
113
+ prefix : string | null ;
114
+ suffix : string | null ;
115
+ department : string | null ;
116
+ birthday ?: Birthday ;
117
+ imAddresses : InstantMessageAddress [ ] ;
118
+ urlAddresses : UrlAddress [ ] ;
119
+ note : string | null ;
94
120
}
0 commit comments