Skip to content

Commit

Permalink
fix(typescript): improve signatures and add url addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
mlecoq committed Jun 30, 2023
1 parent d82d41d commit 71c8a5c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ export function getAllWithoutPhotos(): Promise<Contact[]>;
export function getContactById(contactId: string): Promise<Contact>;
export function getCount(): Promise<number>;
export function getPhotoForId(contactId: string): Promise<string>;
export function addContact(contact: Contact): Promise<void>;
export function addContact(contact: Partial<Contact>): Promise<Contact>;
export function openContactForm(contact: Partial<Contact>): Promise<Contact>;
export function openExistingContact(contact: Contact): Promise<Contact>;
export function viewExistingContact(contact: { recordID: string }): Promise<Contact | void>
export function editExistingContact(contact: Contact): Promise<Contact>;
export function updateContact(contact: Contact): Promise<void>;
export function updateContact(contact: Partial<Contact> & {recordID: string}): Promise<void>;
export function deleteContact(contact: Contact): Promise<void>;
export function getContactsMatchingString(str: string): Promise<Contact[]>;
export function getContactsByPhoneNumber(phoneNumber: string): Promise<Contact[]>;
Expand Down Expand Up @@ -52,6 +52,11 @@ export interface Birthday {
year: number;
}

export interface UrlAddress {
url: string;
label: string;
}

export interface Contact {
recordID: string;
backTitle: string;
Expand All @@ -71,6 +76,7 @@ export interface Contact {
suffix: string;
department: string;
birthday: Birthday;
imAddresses: InstantMessageAddress[]
imAddresses: InstantMessageAddress[];
urlAddresses: UrlAddress[];
note: string;
}

0 comments on commit 71c8a5c

Please sign in to comment.