Contact
Extends:
Represents a contact. This class must not be directly instantiated. Instead, instances of this class are obtained by calling the ContactManager#createContact or ContactManager#getContacts methods of {ContactManager}
Events
update
is emitted every time the contact is updated.delete
is emitted when the contact is deleted.
Member Summary
Public Members | ||
public get |
Returns the address associated with the user represented by this contact |
|
public get |
avatar: * |
|
public set |
|
|
public get |
|
|
public set |
|
|
public get |
deviceId: * |
|
public set |
|
|
public get |
email: * |
|
public set |
|
|
public get |
emails: * |
|
public set |
|
|
public set |
Whether the contact is favorite |
|
public get |
favorite: * |
|
public get |
Contact unique identifier |
|
public get |
isEditable: * |
|
public get |
isErasable: * |
|
public get |
isWacUser: * |
|
public get |
Name associated with this contact |
|
public set |
Display name associated with this contact |
|
public set |
|
|
public get |
phone: * |
|
public set |
|
|
public get |
phones: * |
|
public get |
Presence associated with this contact |
|
public get |
Source name of the contact's source |
|
public set |
|
|
public get |
|
|
public set |
|
Method Summary
Public Methods | ||
public |
getWacUserAddress(): * |
|
public |
Removes the contact |
|
public |
toJSON(): {"id": *, "name": *, "source": *, "favorite": *, "phones": *, "unnormalizedPhones": *, "emails": *, "deviceId": *, "contactDeviceId": *, "isWacUser": *} Returns a JS object with the JSON serialization representation of this object |
Public Members
public get address: string: * source
Returns the address associated with the user represented by this contact
public get avatar: * source
public set avatar source
public get contactDeviceId: * source
public set contactDeviceId source
public get deviceId: * source
public set deviceId source
public get email: * source
public set email source
public get emails: * source
public set emails source
public get favorite: * source
public get isEditable: * source
public get isErasable: * source
public get isWacUser: * source
public set phone source
public get phone: * source
public set phones source
public get phones: * source
public set source source
public get unnormalizedPhones: * source
public set unnormalizedPhones source
Public Methods
public toJSON(): {"id": *, "name": *, "source": *, "favorite": *, "phones": *, "unnormalizedPhones": *, "emails": *, "deviceId": *, "contactDeviceId": *, "isWacUser": *} source
Returns a JS object with the JSON serialization representation of this object
Return:
{"id": *, "name": *, "source": *, "favorite": *, "phones": *, "unnormalizedPhones": *, "emails": *, "deviceId": *, "contactDeviceId": *, "isWacUser": *} |