UNPKG

scv-connector-base

Version:
794 lines (184 loc) 9.74 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Module: baseConnector</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">Module: baseConnector</h1> <section> <header> </header> <article> <div class="container-overview"> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".initializeConnector"><span class="type-signature">(static) </span>initializeConnector<span class="signature">(connector)</span><span class="type-signature"></span></h4> <div class="description"> Initialize a vendor 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>connector</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Vendor connector function to initialize</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="baseConnector.js.html">baseConnector.js</a>, <a href="baseConnector.js.html#line393">line 393</a> </li></ul></dd> </dl> <h4 class="name" id=".publishEvent"><span class="type-signature">(static) </span>publishEvent<span class="signature">(eventType, payload)</span><span class="type-signature"></span></h4> <div class="description"> Publish an event to Sfdc </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>eventType</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Event type to publish. Has to be one of EVENT_TYPE</td> </tr> <tr> <td class="name"><code>payload</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">Payload for the event. Has to be a result class associated with the EVENT_TYPE</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="baseConnector.js.html">baseConnector.js</a>, <a href="baseConnector.js.html#line403">line 403</a> </li></ul></dd> </dl> <h4 class="name" id="~dispatchError"><span class="type-signature">(inner) </span>dispatchError<span class="signature">(errorType, error)</span><span class="type-signature"></span></h4> <div class="description"> Dispatch a telephony integration error to Salesforce </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>errorType</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Error Type, i.e. constants.ErrorType.MICROPHONE_NOT_SHARED</td> </tr> <tr> <td class="name"><code>error</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">Error object representing the error</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="baseConnector.js.html">baseConnector.js</a>, <a href="baseConnector.js.html#line31">line 31</a> </li></ul></dd> </dl> <h4 class="name" id="~dispatchEvent"><span class="type-signature">(inner) </span>dispatchEvent<span class="signature">(EventType, Payload)</span><span class="type-signature"></span></h4> <div class="description"> Dispatch a telephony event to Salesforce </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>EventType</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">event type, i.e. constants.EVENT_TYPE.CALL_STARTED</td> </tr> <tr> <td class="name"><code>Payload</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last">event payload</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="baseConnector.js.html">baseConnector.js</a>, <a href="baseConnector.js.html#line42">line 42</a> </li></ul></dd> </dl> <h4 class="name" id="~setConnectorReady"><span class="type-signature">(async, inner) </span>setConnectorReady<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Notify Salesforce that the connector is ready </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="baseConnector.js.html">baseConnector.js</a>, <a href="baseConnector.js.html#line49">line 49</a> </li></ul></dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-baseConnector.html">baseConnector</a></li><li><a href="module-types.html">types</a></li></ul><h3>Classes</h3><ul><li><a href="module-types.ActiveCallsResult.html">ActiveCallsResult</a></li><li><a href="module-types.CallInfo.html">CallInfo</a></li><li><a href="module-types.CallResult.html">CallResult</a></li><li><a href="module-types.CapabilitiesResult.html">CapabilitiesResult</a></li><li><a href="module-types.ConferenceResult.html">ConferenceResult</a></li><li><a href="module-types.Contact.html">Contact</a></li><li><a href="module-types.GenericResult.html">GenericResult</a></li><li><a href="module-types.HoldToggleResult.html">HoldToggleResult</a></li><li><a href="module-types.InitResult.html">InitResult</a></li><li><a href="module-types.MuteToggleResult.html">MuteToggleResult</a></li><li><a href="module-types.ParticipantRemovedResult.html">ParticipantRemovedResult</a></li><li><a href="module-types.ParticipantResult.html">ParticipantResult</a></li><li><a href="module-types.PhoneCall.html">PhoneCall</a></li><li><a href="module-types.PhoneCallAttributes.html">PhoneCallAttributes</a></li><li><a href="module-types.PhoneContactsResult.html">PhoneContactsResult</a></li><li><a href="module-types.RecordingToggleResult.html">RecordingToggleResult</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a> on Fri Oct 30 2020 16:29:16 GMT-0700 (Pacific Daylight Time) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>