Constructor
-
new Contacts(contactsService)
-
Parameters:
Name Type Description contactsService
AvayaCustomerServices.Services.Contacts.ContactsService
Methods
-
addOnContactsAvailableCallback(callback)
-
Adds a callback that is executed when contacts service is available
Parameters:
Name Type Description callback
AvayaCustomerServices.Services.Contacts.Contacts~onContactsAvailable
-
addOnContactsSearchCompletedCallback(callback)
-
Adds a callback that is executed when a contacts search completes
Parameters:
Name Type Description callback
AvayaCustomerServices.Services.Contacts.Contacts~onContactsSearchCompleted
-
addOnContactsSearchFailedCallback(callback)
-
Adds a callback that is executed when a contacts search fails
Parameters:
Name Type Description callback
AvayaCustomerServices.Services.Contacts.Contacts~onContactsSearchFailed
-
addOnContactsSearchResultsUpdatedCallback(callback)
-
Adds a callback that is executed when a contacts search returns results
Parameters:
Name Type Description callback
AvayaCustomerServices.Services.Contacts.Contacts~onContactsSearchResultsUpdated
-
addOnContactsUnavailableCallback(callback)
-
Adds a callback that is executed when contacts service is unavailable
Parameters:
Name Type Description callback
AvayaCustomerServices.Services.Contacts.Contacts~onContactsUnavailable
-
cancelSearch() → {AvayaCustomerServices.Base.Promise}
-
Cancels the currently active search
Returns:
{ AvayaCustomerServices.Base.Promise }
-
isContactsServiceAvailable() → {Boolean}
-
Checks if the contacts service is currently available
Returns:
{ Boolean }true if the contacts service is available, otherwise false
-
removeCallbacks() → {AvayaCustomerServices.Base.Promise}
-
Remove callbacks and stop contacts service
Returns:
{ AvayaCustomerServices.Base.Promise }
-
search(searchString, maxResults) → {AvayaCustomerServices.Base.Promise}
-
Searches for the contacts with given request parameters.
Parameters:
Name Type Description searchString
string Object describing the search parameters.
maxResults
number the maximum number of results desired
Returns:
{ AvayaCustomerServices.Base.Promise }a promise which resolves to the ID of the search
Type Definitions
-
onContactsAvailable()
-
Callback function to be invoked when contact service is available.
-
onContactsSearchCompleted(searchId, contacts)
-
Callback function to be invoked when a contact search completes
Parameters:
Name Type Description searchId
String The ID of the search which completed
contacts
Object A map of the contacts returned
-
onContactsSearchFailed(searchId, error)
-
Callback function to be invoked when a contact search fails
Parameters:
Name Type Description searchId
String The ID of the search which failed
error
Object The details of the problem which occurred
-
onContactsSearchResultsUpdated(searchId, searchUpdate)
-
Callback function to be invoked when contact search returns results
Parameters:
Name Type Description searchId
String The ID of the search which returned these results
searchUpdate
ContactSearchUpdateMessage The information about what was updated
-
onContactsUnavailable()
-
Callback function to be invoked when contact service is unavailable.