zdk.objc
|
Banafo Service Manager. More...
#import <ZDKBanafoManager.h>
Instance Methods | |
(id< ZDKResult >) | - start:basePath:clientID: |
Set up and Start the Banafo Service. More... | |
(id< ZDKResult >) | - stop |
Stops the Banafo Service. More... | |
(id< ZDKResult >) | - startAuthorization |
Starts Banafo Service authorization process. More... | |
(id< ZDKResult >) | - cancelAuthorization |
Cancels Banafo Service authorization process. More... | |
(id< ZDKResult >) | - setTokens:refreshToken: |
Set Banafo Service authorization tokens. More... | |
(id< ZDKResult >) | - cancelRequest: |
Cancels a Banafo Service request. More... | |
(id< ZDKResult >) | - setCallContact:contact: |
Updates contact information to a call. More... | |
(long int) | - listContacts: |
List contacts based on serch criterias. More... | |
(long int) | - listIntegrations |
List CRM integrations. More... | |
(long int) | - uploadRecording:filePathUtf8: |
Upload audio recording file to the Banafo server. More... | |
(id< ZDKBanafoContactSearchCriteria >) | - createContactSearchCriteria:provider:search:types:phone:nationalNumber:reverseLookup:region:start:limit:pageId: |
Creates a BanafoContactSearchCriteria object. More... | |
(id< ZDKBanafoContact >) | - createContact:remoteId:remoteProvider:displayName:firstName:middleName:lastName:type:url:company:emails:phones: |
Creates a BanafoContact object. More... | |
(id< ZDKBanafoCall >) | - createCall:summary:title:source:origin:startedAt:acceptedAt:finishedAt:type:localPhone:remotePhone:contact: |
Creates a BanafoCall object. More... | |
(id< ZDKRecordingStream >) | - createRecordingStream:type:fileName:languageCode: |
Creates a RecordingStream object. More... | |
(id< ZDKBanafoRecording >) | - createRecording:startedAt:finishedAt:banafoCallId:streams: |
Creates a BanafoRecording object. More... | |
(long int) | - forceCreateCallatServer: |
Force creates Banafo Call at the Banafo Service. More... | |
(long int) | - forceCreateRecordingatServer: |
Force creates Banafo Recording at the Banafo Service. More... | |
(long int) | - getProfile |
Get Banafo profile. More... | |
(long int) | - listTranscriptLanguages |
List Banafo transcript languages. More... | |
(void) | - addBanafoListener: |
Adds a new Banafo Service event listener. More... | |
(void) | - dropBanafoListener: |
Removes a specific already added Banafo Service event listener. More... | |
(NSString *) | - handlesDescription |
![]() | |
(long int) | - handle |
(void) | - initialize |
(void) | - releaseReference |
(NSString *) | - handlesDescription |
Banafo Service Manager.
- (void) addBanafoListener: | (id< ZDKBanafoEventsHandler >) | value |
Adds a new Banafo Service event listener.
All added listeners will be notified for each event.
[in] | value | The Banafo Service event listener to be added |
- (id< ZDKResult >) cancelAuthorization |
Cancels Banafo Service authorization process.
Cancels the Banafo Service authorization process.
To be able to cancel the authorization process the Banafo Service must be authorizing i.e. to be in 'BanafoServiceStateType::Ready' or 'BanafoServiceStateType::VerifyingAuthorizing' state.
- (id< ZDKResult >) cancelRequest: | (long int) | requestId |
Cancels a Banafo Service request.
Cancels an already running Banafo service request and discards any results that might be received. The request is destroyed.
[in] | requestId | The Banafo Service request handler that is going to be canceled. If invalid handler is provided the function will fail with 'ResultCode::NotFound'. |
- (id< ZDKBanafoCall >) createCall: | (NSString *_Nullable) | banafoId | |
summary: | (NSString *_Nullable) | summary | |
title: | (NSString *_Nullable) | title | |
source: | (NSString *) | source | |
origin: | (ZDKOriginType) | origin | |
startedAt: | (NSString *) | startedAt | |
acceptedAt: | (NSString *_Nullable) | acceptedAt | |
finishedAt: | (NSString *_Nullable) | finishedAt | |
type: | (NSString *) | type | |
localPhone: | (NSString *_Nullable) | localPhone | |
remotePhone: | (NSString *_Nullable) | remotePhone | |
contact: | (id< ZDKBanafoContact > _Nullable) | contact | |
Creates a BanafoCall object.
Creates a BanafoCall object
[in] | banafoId | See ZDKBanafoCall |
[in] | summary | See ZDKBanafoCall |
[in] | title | See ZDKBanafoCall |
[in] | source | See ZDKBanafoCall |
[in] | origin | See ZDKBanafoCall |
[in] | startedAt | See ZDKBanafoCall |
[in] | acceptedAt | See ZDKBanafoCall |
[in] | finishedAt | See ZDKBanafoCall |
[in] | type | See ZDKBanafoCall |
[in] | localPhone | See ZDKBanafoCall |
[in] | remotePhone | See ZDKBanafoCall |
[in] | contact | See ZDKBanafoCall |
- (id< ZDKBanafoContact >) createContact: | (NSString *_Nullable) | banafoId | |
remoteId: | (NSString *_Nullable) | remoteId | |
remoteProvider: | (NSString *_Nullable) | remoteProvider | |
displayName: | (NSString *_Nullable) | displayName | |
firstName: | (NSString *_Nullable) | firstName | |
middleName: | (NSString *_Nullable) | middleName | |
lastName: | (NSString *_Nullable) | lastName | |
type: | (ZDKContactType) | type | |
url: | (NSString *_Nullable) | url | |
company: | (NSString *_Nullable) | company | |
emails: | (NSArray *_Nullable) | emails | |
phones: | (NSArray *_Nullable) | phones | |
Creates a BanafoContact object.
Creates a BanafoContact object that can be used with setCallContact()
[in] | banafoId | See ZDKBanafoContact |
[in] | remoteId | See ZDKBanafoContact |
[in] | remoteProvider | See ZDKBanafoContact |
[in] | displayName | See ZDKBanafoContact |
[in] | firstName | See ZDKBanafoContact |
[in] | middleName | See ZDKBanafoContact |
[in] | lastName | See ZDKBanafoContact |
[in] | type | See ZDKBanafoContact |
[in] | url | See ZDKBanafoContact |
[in] | company | See ZDKBanafoContact |
[in] | emails | See ZDKBanafoContact |
[in] | phones | See ZDKBanafoContact |
- (id< ZDKBanafoContactSearchCriteria >) createContactSearchCriteria: | (NSString *_Nullable) | contactId | |
provider: | (NSString *_Nullable) | provider | |
search: | (NSString *_Nullable) | search | |
types: | (NSArray *_Nullable) | types | |
phone: | (NSString *_Nullable) | phone | |
nationalNumber: | (NSString *_Nullable) | nationalNumber | |
reverseLookup: | (BOOL) | reverseLookup | |
region: | (NSString *_Nullable) | region | |
start: | (int) | start | |
limit: | (int) | limit | |
pageId: | (NSString *_Nullable) | pageId | |
Creates a BanafoContactSearchCriteria object.
Creates a BanafoContactSearchCriteria object to be used for listContacts()
[in] | contactId | See ZDKBanafoContactSearchCriteria |
[in] | provider | See ZDKBanafoContactSearchCriteria |
[in] | search | See ZDKBanafoContactSearchCriteria |
[in] | types | See ZDKBanafoContactSearchCriteria |
[in] | phone | See ZDKBanafoContactSearchCriteria |
[in] | nationalNumber | See ZDKBanafoContactSearchCriteria |
[in] | reverseLookup | See ZDKBanafoContactSearchCriteria |
[in] | region | See ZDKBanafoContactSearchCriteria |
[in] | start | See ZDKBanafoContactSearchCriteria |
[in] | limit | See ZDKBanafoContactSearchCriteria |
[in] | pageId | See ZDKBanafoContactSearchCriteria |
- (id< ZDKBanafoRecording >) createRecording: | (NSString *_Nullable) | banafoId | |
startedAt: | (NSString *) | startedAt | |
finishedAt: | (NSString *_Nullable) | finishedAt | |
banafoCallId: | (NSString *) | banafoCallId | |
streams: | (NSArray *) | streams | |
Creates a BanafoRecording object.
Creates a BanafoRecording object
[in] | banafoId | See ZDKBanafoRecording |
[in] | startedAt | See ZDKBanafoRecording |
[in] | finishedAt | See ZDKBanafoRecording |
[in] | banafoCallId | See ZDKBanafoRecording |
[in] | streams | See ZDKBanafoRecording |
- (id< ZDKRecordingStream >) createRecordingStream: | (ZDKRecordingType) | origin | |
type: | (NSString *) | type | |
fileName: | (NSString *) | fileName | |
languageCode: | (NSString *_Nullable) | languageCode | |
Creates a RecordingStream object.
Creates a RecordingStream object
[in] | origin | See ZDKRecordingStream |
[in] | type | See ZDKRecordingStream |
[in] | fileName | See ZDKRecordingStream |
[in] | languageCode | See ZDKRecordingStream |
- (void) dropBanafoListener: | (id< ZDKBanafoEventsHandler >) | value |
Removes a specific already added Banafo Service event listener.
All added/left listeners will be notified for each event.
[in] | value | The Banafo Service event listener to be removed |
- (long int) forceCreateCallatServer: | (id< ZDKBanafoCall >) | call |
Force creates Banafo Call at the Banafo Service.
Manually creates call on the Banafo Server. In case 'ZDKBanafoCall::BanafoId()' is set, a request to update that already existing call, instead of creating a new one, will be made.
Upon completion the 'ZDKBanafoEventsHandler::OnEventState' callback will be invoked delivering the result of the request and the 'banafo call id' when creating new calls.
The ZDKBanafoCall::Origin()
, ZDKBanafoCall::Type()
, ZDKBanafoCall::Source()
and ZDKBanafoCall::StartedAt()
fields are MANDATORY! If any of them is missing, the function will return ZDKInvalidHandle
!
!!! Do not use for calls made through the ZDK as it will duplicate the calls on Banafo !!!
[in] | call | The call to be created at the Banafo Service |
- (long int) forceCreateRecordingatServer: | (id< ZDKBanafoRecording >) | recording |
Force creates Banafo Recording at the Banafo Service.
Manually creates call recording on the Banafo Server. In case 'ZDKBanafoRecording::BanafoId()' is set, a request to update that already existing recording, instead of creating a new one, will be made.
Upon completion the 'ZDKBanafoEventsHandler::OnEventState' callback will be invoked delivering the result of the request and the 'banafo recording id' when creating new recording. That ID can later be used to upload the actual file to the Banafo Server via uploadRecording().
The ZDKBanafoRecording::BanafoCallId()
field is MANDATORY! If missing, the function will return ZDKInvalidHandle
!
!!! Do not use for recordings made through the ZDK as it will duplicate them on Banafo !!!
[in] | recording | The recording to be created at the Banafo Service |
- (long int) getProfile |
Get Banafo profile.
Gets Banafo user profile information.
Upon completion the 'ZDKBanafoEventsHandler::OnProfile' callback will be invoked delivering the result of the request.
- (NSString *) handlesDescription |
Reimplemented from <ZDKZHandle>.
- (long int) listContacts: | (id< ZDKBanafoContactSearchCriteria >) | criteria |
List contacts based on serch criterias.
Provides a list of contacts that can come from local or external resources. In order to get local contacts the 'provider' should be set to "banafo". If no provider specified - contacts from all active external providers will be returned. By default the response will contain the maximum number of contacts as per the provider's limits per request.
For basic filtering use the search parameter, for filtering by phone number only using the 'phone' field might generate better results for depending on the providers.
In case a Reverse Lookup is desired, the ZDKBanafoContactSearchCriteria's 'ReverseLookup()' must be set to 'true', 'Region()' and 'Phone()' MUST be set while all other parameters will be discarded! In case they are empty strings, this function will fail and return 'ZDKInvalidHandle'.
Upon success, the zdkBanafoEventsHandler::OnContactList() will be invoked delivering the contacts.
[in] | criteria | The search criteria to be used for the contact listing. This is a required parameter and if empty/NULL is provided the function will and return 'ZDKInvalidHandle'. |
- (long int) listIntegrations |
List CRM integrations.
Provides a list of all active integrations for the authenticated user with a provider from the list.
Upon success, the 'ZDKBanafoEventsHandler::OnIntegrationsList will be invoked delivering the integrations.
- (long int) listTranscriptLanguages |
List Banafo transcript languages.
Lists Banafo transcript languages.
Upon completion the 'ZDKBanafoEventsHandler::OnTranscriptLanguageList' callback will be invoked delivering the result of the request.
- (id< ZDKResult >) setCallContact: | (NSString *) | banafoCallId | |
contact: | (id< ZDKBanafoContact >) | contact | |
Updates contact information to a call.
Updates contact information to a Banafo call.
[in] | banafoCallId | The Banafo call identifier. This is a required parameter and if empty string is provided the function will fail with 'ResultCode::InvalidArgument'. |
[in] | contact | The new contact data. This is a required parameter and if empty string is provided the function will fail with 'ResultCode::InvalidArgument'. |
- (id< ZDKResult >) setTokens: | (NSString *_Nullable) | accessToken | |
refreshToken: | (NSString *) | refreshToken | |
Set Banafo Service authorization tokens.
Sets the Banafo Service authorization tokens explicitly so there will be no need of authorization process to take place for this service before it is able to be used.
To be able to set tokens the Banafo Service must be in 'BanafoServiceStateType::Ready' state.
[in] | accessToken | The access token for the service. It can be left empty and a new access token will be obtained from the refresh token. |
[in] | refreshToken | The refresh token for the service. This is a required parameter and if empty string is provided the function will fail with 'ResultCode::InvalidArgument'. |
- (id< ZDKResult >) start: | (NSString *) | schemeAndAuthority | |
basePath: | (NSString *) | basePath | |
clientID: | (NSString *) | clientID | |
Set up and Start the Banafo Service.
Setup and start the Banafo Service that can be used to query data, upload files, etc to the Banafo Web Service.
Upon starting the Banafo Service it will automatically start getting its well known configuration from the Banafo Web service i.e. change state to 'BanafoServiceStateType::Configuring'.
[in] | schemeAndAuthority | The scheme and authority where the Banafo Service is located. This is a required parameter and if empty string is provided the function will fail with 'ResultCode::InvalidArgument'. |
[in] | basePath | The base path used for the Banafo Service. It doesn't change between requests. This is a required parameter and if empty string is provided the function will fail with 'ResultCode::InvalidArgument'. |
[in] | clientID | The client ID used by the Banafo Web Service to identify the application. The application must be registered in the Banafo Web service beforehand so that a client ID can be obtained. This is a required parameter and if empty string is provided the function will fail with 'ResultCode::InvalidArgument'. |
- (id< ZDKResult >) startAuthorization |
Starts Banafo Service authorization process.
Starts a Banafo Service authorization sequence. The authorization is done using OAuth2.0 device flow. To be able to start authorization process the Banafo Service must be in 'BanafoServiceStateType::Ready' state.
- (id< ZDKResult >) stop |
Stops the Banafo Service.
Stops the already started Banafo Service along all requests associated with it.
- (long int) uploadRecording: | (NSString *) | banaforRecordingId | |
filePathUtf8: | (NSString *) | filePathUtf8 | |
Upload audio recording file to the Banafo server.
Adds a multipart/form-data recording file upload as described by W3C here: https: and RFC 7578.
The advertised file name is retrieved from the passed 'filePathUtf8' by stripping the path itself.
The advertised mime type is retrieved from the passed 'filePathUtf8' by extracting the file extension. In case there is no file extension a 'audio/wav' mime is assumed.
[in] | banaforRecordingId | The Banafo file identifier received by the 'ZDKBanafoEventsHandler::OnEventState' callback once the call recording is started. This is a required parameter and if empty string is provided the function will fail and return 'ZDKInvalidHandle'. |
[in] | filePathUtf8 | Full pathname of the file to upload. The file must reside on the local system and must be accessible by the library. This is a required parameter and if empty string is provided the function will fail and return 'ZDKInvalidHandle'. |