Skip to content

Commit a6f6553

Browse files
authored
Merge pull request #764 from Ahmedhamed77/master
fix undeclared identifier 'CNAuthorizationStatusLimited'
2 parents 20aca6f + bc4ab8c commit a6f6553

File tree

4 files changed

+199
-175
lines changed

4 files changed

+199
-175
lines changed

index.d.ts

+81-55
Original file line numberDiff line numberDiff line change
@@ -4,91 +4,117 @@ export function getContactById(contactId: string): Promise<Contact | null>;
44
export function getCount(): Promise<number>;
55
export function getPhotoForId(contactId: string): Promise<string>;
66
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>;
810
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>;
1014
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>;
1218
export function deleteContact(contact: Contact): Promise<void>;
1319
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>;
1936
export function iosEnableNotesUsage(enabled: boolean): void;
2037

2138
export function getGroups(): Promise<Group[]>;
2239
export function getGroup(identifier: string): Promise<Group | null>;
2340
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>;
2955
export interface Group {
3056
identifier: string;
3157
name: string;
3258
}
3359
export interface EmailAddress {
34-
label: string;
35-
email: string;
60+
label: string;
61+
email: string;
3662
}
3763

3864
export interface PhoneNumber {
39-
label: string;
40-
number: string;
65+
label: string;
66+
number: string;
4167
}
4268

4369
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;
5480
}
5581

5682
export interface InstantMessageAddress {
57-
username: string;
58-
service: string;
83+
username: string;
84+
service: string;
5985
}
6086

6187
export interface Birthday {
62-
day: number;
63-
month: number;
64-
year?: number;
88+
day: number;
89+
month: number;
90+
year?: number;
6591
}
6692

6793
export interface UrlAddress {
68-
url: string;
69-
label: string;
94+
url: string;
95+
label: string;
7096
}
7197

7298
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;
94120
}

0 commit comments

Comments
 (0)