UNPKG

scv-connector-base

Version:
1,443 lines (325 loc) 18 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: VendorConnector</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: VendorConnector</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>VendorConnector<span class="signature">()</span><span class="type-signature"></span></h2> <div class="class-description">Class representing a VendorConnector</div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="VendorConnector"><span class="type-signature"></span>new VendorConnector<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="types.js.html">types.js</a>, <a href="types.js.html#line1021">line 1021</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="downloadLogs"><span class="type-signature"></span>downloadLogs<span class="signature">(logs)</span><span class="type-signature"></span></h4> <div class="description"> Triggers a browser download for Vendor Logs </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>logs</code></td> <td class="type"> <span class="param-type">Array.&lt;String></span> </td> <td class="description last">Array of log messages.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="types.js.html">types.js</a>, <a href="types.js.html#line1091">line 1091</a> </li></ul></dd> </dl> <h4 class="name" id="getAgentStatus"><span class="type-signature"></span>getAgentStatus<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="AgentStatusInfo.html">AgentStatusInfo</a>>}</span></h4> <div class="description"> Get agent status </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="types.js.html">types.js</a>, <a href="types.js.html#line1067">line 1067</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;<a href="AgentStatusInfo.html">AgentStatusInfo</a>></span> </dd> </dl> <h4 class="name" id="getTelephonyConnector"><span class="type-signature"></span>getTelephonyConnector<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="TelephonyConnector.html">TelephonyConnector</a>>}</span></h4> <div class="description"> Gets the telephonyConnector </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="types.js.html">types.js</a>, <a href="types.js.html#line1037">line 1037</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;<a href="TelephonyConnector.html">TelephonyConnector</a>></span> </dd> </dl> <h4 class="name" id="handleMessage"><span class="type-signature"></span>handleMessage<span class="signature">(message)</span><span class="type-signature"></span></h4> <div class="description"> Handle message from LWC/Aura component </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>message</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="types.js.html">types.js</a>, <a href="types.js.html#line1083">line 1083</a> </li></ul></dd> </dl> <h4 class="name" id="init"><span class="type-signature"></span>init<span class="signature">(connectorConfig)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="InitResult.html">InitResult</a>>}</span></h4> <div class="description"> Initialize the connector </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>connectorConfig</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="types.js.html">types.js</a>, <a href="types.js.html#line1028">line 1028</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;<a href="InitResult.html">InitResult</a>></span> </dd> </dl> <h4 class="name" id="logMessageToVendor"><span class="type-signature"></span>logMessageToVendor<span class="signature">(logLevel, message, payload)</span><span class="type-signature"></span></h4> <div class="description"> Sends the logs with a logLevel and payload to the vendor connector. Does a no-op, if not implemented. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>logLevel</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Log Level (INFO, WARN, ERROR)</td> </tr> <tr> <td class="name"><code>message</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Message to be logged</td> </tr> <tr> <td class="name"><code>payload</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last">An optional payload to be logged</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="types.js.html">types.js</a>, <a href="types.js.html#line1102">line 1102</a> </li></ul></dd> </dl> <h4 class="name" id="logout"><span class="type-signature"></span>logout<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="LogoutResult.html">LogoutResult</a>>}</span></h4> <div class="description"> Logout from Omni </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="types.js.html">types.js</a>, <a href="types.js.html#line1075">line 1075</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;<a href="LogoutResult.html">LogoutResult</a>></span> </dd> </dl> <h4 class="name" id="onAgentWorkEvent"><span class="type-signature"></span>onAgentWorkEvent<span class="signature">(agentWork)</span><span class="type-signature"></span></h4> <div class="description"> Sends non-voice agent work events to vendor such as work accepted, declined, etc </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>agentWork</code></td> <td class="type"> <span class="param-type"><a href="AgentWork.html">AgentWork</a></span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="types.js.html">types.js</a>, <a href="types.js.html#line1046">line 1046</a> </li></ul></dd> </dl> <h4 class="name" id="setAgentStatus"><span class="type-signature"></span>setAgentStatus<span class="signature">(agentStatus, statusInfo, enqueueNextState)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="GenericResult.html">GenericResult</a>>}</span></h4> <div class="description"> Set agent status </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>agentStatus</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>statusInfo</code></td> <td class="type"> <span class="param-type">StatusInfo</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>enqueueNextState</code></td> <td class="type"> <span class="param-type">Boolean</span> </td> <td class="description last">flag to determine if this status change request should be enqueued if neccessary</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="types.js.html">types.js</a>, <a href="types.js.html#line1058">line 1058</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise.&lt;<a href="GenericResult.html">GenericResult</a>></span> </dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ActiveCallsResult.html">ActiveCallsResult</a></li><li><a href="AgentConfig.html">AgentConfig</a></li><li><a href="AgentConfigResult.html">AgentConfigResult</a></li><li><a href="AgentStatusInfo.html">AgentStatusInfo</a></li><li><a href="AgentVendorStatusInfo.html">AgentVendorStatusInfo</a></li><li><a href="AgentWork.html">AgentWork</a></li><li><a href="AudioStats.html">AudioStats</a></li><li><a href="AudioStatsElement.html">AudioStatsElement</a></li><li><a href="CallInfo.html">CallInfo</a></li><li><a href="CallResult.html">CallResult</a></li><li><a href="CapabilitiesResult.html">CapabilitiesResult</a></li><li><a href="Contact.html">Contact</a></li><li><a href="CustomError.html">CustomError</a></li><li><a href="DialOptions.html">DialOptions</a></li><li><a href="GenericResult.html">GenericResult</a></li><li><a href="HangupResult.html">HangupResult</a></li><li><a href="HoldToggleResult.html">HoldToggleResult</a></li><li><a href="InitResult.html">InitResult</a></li><li><a href="LogoutResult.html">LogoutResult</a></li><li><a href="MuteToggleResult.html">MuteToggleResult</a></li><li><a href="ParticipantResult.html">ParticipantResult</a></li><li><a href="Phone.html">Phone</a></li><li><a href="PhoneCall.html">PhoneCall</a></li><li><a href="PhoneCallAttributes.html">PhoneCallAttributes</a></li><li><a href="PhoneContactsResult.html">PhoneContactsResult</a></li><li><a href="RecordingToggleResult.html">RecordingToggleResult</a></li><li><a href="ShowStorageAccessResult.html">ShowStorageAccessResult</a></li><li><a href="SignedRecordingUrlResult.html">SignedRecordingUrlResult</a></li><li><a href="StateChangeResult.html">StateChangeResult</a></li><li><a href="StatsInfo.html">StatsInfo</a></li><li><a href="SuperviseCallResult.html">SuperviseCallResult</a></li><li><a href="SupervisedCallInfo.html">SupervisedCallInfo</a></li><li><a href="SupervisorHangupResult.html">SupervisorHangupResult</a></li><li><a href="TelephonyConnector.html">TelephonyConnector</a></li><li><a href="VendorConnector.html">VendorConnector</a></li></ul><h3>Global</h3><ul><li><a href="global.html#CONNECTOR_CONFIG_EXCEPTION_FIELDS">CONNECTOR_CONFIG_EXCEPTION_FIELDS</a></li><li><a href="global.html#CONNECTOR_CONFIG_EXPOSED_FIELDS">CONNECTOR_CONFIG_EXPOSED_FIELDS</a></li><li><a href="global.html#CONNECTOR_CONFIG_EXPOSED_FIELDS_STARTSWITH">CONNECTOR_CONFIG_EXPOSED_FIELDS_STARTSWITH</a></li><li><a href="global.html#dispatchCustomError">dispatchCustomError</a></li><li><a href="global.html#dispatchError">dispatchError</a></li><li><a href="global.html#dispatchEvent">dispatchEvent</a></li><li><a href="global.html#dispatchEventLog">dispatchEventLog</a></li><li><a href="global.html#downloadData">downloadData</a></li><li><a href="global.html#downloadLogs">downloadLogs</a></li><li><a href="global.html#getErrorMessage">getErrorMessage</a></li><li><a href="global.html#getErrorType">getErrorType</a></li><li><a href="global.html#getLogs">getLogs</a></li><li><a href="global.html#initializeConnector">initializeConnector</a></li><li><a href="global.html#log">log</a></li><li><a href="global.html#publishError">publishError</a></li><li><a href="global.html#publishEvent">publishEvent</a></li><li><a href="global.html#publishLog">publishLog</a></li><li><a href="global.html#sanitizePayload">sanitizePayload</a></li><li><a href="global.html#setConnectorReady">setConnectorReady</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a> on Thu Jan 11 2024 12:54:29 GMT-0800 (Pacific Standard Time) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>