UNPKG

@moxtradeveloper/cordova-plugin-moxo

Version:

Plugin for adding Moxtra services to Cordova/PhoneGap Apps.

4,409 lines (1,048 loc) 68.5 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Namespace: moxtra</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">Namespace: moxtra</h1> <section> <header> <h2>moxtra</h2> </header> <article> <div class="container-overview"> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line15">line 15</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".canAddUserInChat"><span class="type-signature">(static) </span>canAddUserInChat<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Set the callback when add user button in chat needs show/hide </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>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Would be invoked only when all pre-conditions satisfied. For example, the chat must be a group chat and current user has privilege to invite new member. And this callback MUST return a boolea value. Parameter like below: { "chat_id": id of the chat where add user button in }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line536">line 536</a> </li></ul></dd> </dl> <h4 class="name" id=".destroyMEPWindow"><span class="type-signature">(static) </span>destroyMEPWindow<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Destroy the MEP window. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line85">line 85</a> </li></ul></dd> </dl> <h4 class="name" id=".getLastActiveTimestamp"><span class="type-signature">(static) </span>getLastActiveTimestamp<span class="signature">(success, failure)</span><span class="type-signature"></span></h4> <div class="description"> Get current user's last active timestamp </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>success</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when get succeed, with an unix timestamp in milliseconds</td> </tr> <tr> <td class="name"><code>failure</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when get failed, with parameter like below: { "error_code":3 //error code "error_message": 'sdk not initialized' //Detail error message }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line523">line 523</a> </li></ul></dd> </dl> <h4 class="name" id=".getUnreadMessageCount"><span class="type-signature">(static) </span>getUnreadMessageCount<span class="signature">(success, failure)</span><span class="type-signature"></span></h4> <div class="description"> Get current user's unread messages count </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>success</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when get succeed, with an integer parameter which represents current unread messages count</td> </tr> <tr> <td class="name"><code>failure</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when get failed, with parameter like below: { "error_code":3 //error code "error_message": 'sdk not initialized' //Detail error message }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line323">line 323</a> </li></ul></dd> </dl> <h4 class="name" id=".getUnreadMessageCountWithOption"><span class="type-signature">(static) </span>getUnreadMessageCountWithOption<span class="signature">(options, success, failure)</span><span class="type-signature"></span></h4> <div class="description"> Listen current user's unread messages per type. </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>options</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">Additional options when get unread count message. Supported key-values list below: { "type": 5 //Which type of chat you intend to filter, 5 represents live chat, 6 represents service request. }</td> </tr> <tr> <td class="name"><code>success</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when get succeed, with an integer parameter which represents corresponding unread messages count</td> </tr> <tr> <td class="name"><code>failure</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when get failed, with parameter like below: { "error_code":3 //error code "error_message": 'sdk not initialized' //Detail error message }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line561">line 561</a> </li></ul></dd> </dl> <h4 class="name" id=".hideMEPWindow"><span class="type-signature">(static) </span>hideMEPWindow<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Hide MEP window </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line67">line 67</a> </li></ul></dd> </dl> <h4 class="name" id=".isLinked"><span class="type-signature">(static) </span>isLinked<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Request MEP link state. </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>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback that returns the MEP is linked or not, includes a boolean parameter.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line374">line 374</a> </li></ul></dd> </dl> <h4 class="name" id=".isMEPNotification"><span class="type-signature">(static) </span>isMEPNotification<span class="signature">(notificationPayload, callback)</span><span class="type-signature"></span></h4> <div class="description"> Verify notification is from MEP or not. </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>notificationPayload</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The notification payload with json string format.</td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback that returns the notification is from mep or not, includes a boolean parameter.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line342">line 342</a> </li></ul></dd> </dl> <h4 class="name" id=".joinMeet"><span class="type-signature">(static) </span>joinMeet<span class="signature">(sessionId, success, failure)</span><span class="type-signature"></span></h4> <div class="description"> Join a scheduled meeting as participant or start scheduled meeting as host. </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>sessionId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The meeting's session id, required.</td> </tr> <tr> <td class="name"><code>success</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when join succeed.</td> </tr> <tr> <td class="name"><code>failure</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when join failed, with parameter like below: { "error_code":5 //error code "error_message": 'object not found' //Detail error message }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line291">line 291</a> </li></ul></dd> </dl> <h4 class="name" id=".joinMeetAnonymously"><span class="type-signature">(static) </span>joinMeetAnonymously<span class="signature">(sessionId, options, success, failure)</span><span class="type-signature"></span></h4> <div class="description"> Join a meeting anonymously. </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>sessionId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The meeting's session id, required.</td> </tr> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">Additional options when join a meeting anonymously. If currently there is a logged in user, options will be ignored. Supported key-values list below: { "display_name": "Kate Bell" //String value, as your name when join meeting , optional. "email": "katebell@moxo.com" //String value, as your email when join meeting , optional. }</td> </tr> <tr> <td class="name"><code>success</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when join succeed.</td> </tr> <tr> <td class="name"><code>failure</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when join failed, with parameter like below: { "error_code":5 //error code "error_message": 'object not found' //Detail error message }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line310">line 310</a> </li></ul></dd> </dl> <h4 class="name" id=".linkWithAccessToken"><span class="type-signature">(static) </span>linkWithAccessToken<span class="signature">(accessToken, success, failure)</span><span class="type-signature"></span></h4> <div class="description"> Link MEP account with the access token. </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>accessToken</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">MEP login credential.</td> </tr> <tr> <td class="name"><code>success</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when link succeed.</td> </tr> <tr> <td class="name"><code>failure</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when link failed, with parameter like below: { "error_code":0 //error code "error_message": 'No network' //Detail error message }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line42">line 42</a> </li></ul></dd> </dl> <h4 class="name" id=".makeDivInteractive"><span class="type-signature">(static) </span>makeDivInteractive<span class="signature">(div)</span><span class="type-signature"></span></h4> <div class="description"> Make web element interactive when it is showing on MEP window </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>div</code></td> <td class="type"> <span class="param-type">HTMLDivElement</span> </td> <td class="description last">The element which needs to be interactive</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line163">line 163</a> </li></ul></dd> </dl> <h4 class="name" id=".makeDivNoninteractive"><span class="type-signature">(static) </span>makeDivNoninteractive<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Make web element noninteractive when it will be hidden or removed from MEP window. IMPORTANT: This method is required to be triggered as a pair with makeDivInteractive, otherwise touch event on screen will be unpredictable. </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line181">line 181</a> </li></ul></dd> </dl> <h4 class="name" id=".onAddMemberInChatClicked"><span class="type-signature">(static) </span>onAddMemberInChatClicked<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Set the callback when user clicked the add member button inside the chat. </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>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Would be invoked when user clicked the add button, with parameter like below: { "chat_id": id of the chat where call button clicked }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line458">line 458</a> </li></ul></dd> </dl> <h4 class="name" id=".onCallButtonClicked"><span class="type-signature">(static) </span>onCallButtonClicked<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Set the callback when user clicked the call button from timeline、calendar or chat </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>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Would be invoked when user clicked any call button from timeline、calendar or chat, with parameter like below: { "chat_id": id of the chat where call button clicked if is triggered from chat page "unique_ids": An array which includes all chat member's unique_id if is triggered from chat page }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line422">line 422</a> </li></ul></dd> </dl> <h4 class="name" id=".onCloseButtonClicked"><span class="type-signature">(static) </span>onCloseButtonClicked<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Set the callback when user clicked the close button on top left of MEP window. If not set, sdk will do nothing. </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>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Would be invoked when user clicked the close button.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line467">line 467</a> </li></ul></dd> </dl> <h4 class="name" id=".onInviteButtonInLiveMeetClicked"><span class="type-signature">(static) </span>onInviteButtonInLiveMeetClicked<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Set the callback when user clicked the invite button in live meet. If not set, the invite button will not show in live meet. </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>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Would be invoked when user clicked any invite button in live meet, with parameter like below: { "session_id": id of the meeting. }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line480">line 480</a> </li></ul></dd> </dl> <h4 class="name" id=".onJoinMeetButtonClicked"><span class="type-signature">(static) </span>onJoinMeetButtonClicked<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Set the callback when user clicked the join meeting button from timeline、calendar、 chat or ringer page </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>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Would be invoked when user clicked any join meeting button from timeline、calendar chat、or ringer page, with parameter like below: { "session_id": id of the meeting which user intend to join }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line409">line 409</a> </li></ul></dd> </dl> <h4 class="name" id=".onLogout"><span class="type-signature">(static) </span>onLogout<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Set the callback when user log out. Log out manually or kicked out by server, both cases will trigger the callback. </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>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Would be invoked when user get logout.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line397">line 397</a> </li></ul></dd> </dl> <h4 class="name" id=".onMeetEditButtonClicked"><span class="type-signature">(static) </span>onMeetEditButtonClicked<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Set the callback when user clicked the edit button of meeting </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>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Would be invoked when user clicked edit button of specific meeting, with parameter like below: { "session_id": id of the meeting which user intend to view }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line446">line 446</a> </li></ul></dd> </dl> <h4 class="name" id=".onMeetViewButtonClicked"><span class="type-signature">(static) </span>onMeetViewButtonClicked<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Set the callback when user clicked the view button of meeting </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>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Would be invoked when user clicked view button of specific meeting, with parameter like below: { "session_id": id of the meeting which user intend to view }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line434">line 434</a> </li></ul></dd> </dl> <h4 class="name" id=".onUnreadMessageCountUpdated"><span class="type-signature">(static) </span>onUnreadMessageCountUpdated<span class="signature">(callback)</span><span class="type-signature"></span></h4> <div class="description"> Set the callback when unread messages count updated </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>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Would be invoked when user unread messages count updated, with an integer parameter which represents unread messages count post update</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line489">line 489</a> </li></ul></dd> </dl> <h4 class="name" id=".openChat"><span class="type-signature">(static) </span>openChat<span class="signature">(chatID, feedSequence, success, failure)</span><span class="type-signature"></span></h4> <div class="description"> Open chat with chat ID and scroll to the specified feed if present. </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>chatID</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The chat to open.</td> </tr> <tr> <td class="name"><code>feedSequence</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The sequence of the scrolling target feed.</td> </tr> <tr> <td class="name"><code>success</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when open succeed.</td> </tr> <tr> <td class="name"><code>failure</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when open failed, with parameter like below: { "error_code":4 //error code "error_message": 'no network' //Detail error message }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line198">line 198</a> </li></ul></dd> </dl> <h4 class="name" id=".openLiveChat"><span class="type-signature">(static) </span>openLiveChat<span class="signature">(reserved, success, failure)</span><span class="type-signature"></span></h4> <div class="description"> Show client live chat page Note: This function only works for client user since internal user doesn't have live chat. </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>reserved</code></td> <td class="type"> <span class="param-type">options</span> </td> <td class="description last">Reserved parameter, you could pass null for now.</td> </tr> <tr> <td class="name"><code>success</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when show succeed</td> </tr> <tr> <td class="name"><code>failure</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when show failed, with parameter like below: { "error_code":4 //error code "error_message": 'no network' //Detail error message }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line213">line 213</a> </li></ul></dd> </dl> <h4 class="name" id=".openServiceRequest"><span class="type-signature">(static) </span>openServiceRequest<span class="signature">(success, failure)</span><span class="type-signature"></span></h4> <div class="description"> Show client service reqeusts page Note: This function only works for client user since internal user doesn't have service reqeusts. </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>success</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when show succeed</td> </tr> <tr> <td class="name"><code>failure</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when show failed, with parameter like below: { "error_code":4 //error code "error_message": 'no network' //Detail error message }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line227">line 227</a> </li></ul></dd> </dl> <h4 class="name" id=".parseRemoteNotification"><span class="type-signature">(static) </span>parseRemoteNotification<span class="signature">(notificationPayload, success, failure)</span><span class="type-signature"></span></h4> <div class="description"> Parse the notification to extract related info. </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>notificationPayload</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The notification payload in json string format.</td> </tr> <tr> <td class="name"><code>success</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when parsing succeed, with parameter like below: { //For chat: "chat_id": "CBPErkesrtOeFfURA6gusJAD" "feed_sequence": 191 //For meet: "session_id": "255576178" }</td> </tr> <tr> <td class="name"><code>failure</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when parsing failed, with parameter like below: { "error_code": 0 "error_message": "No network" //Detail error message }</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line365">line 365</a> </li></ul></dd> </dl> <h4 class="name" id=".registerNotification"><span class="type-signature">(static) </span>registerNotification<span class="signature">(deviceToken)</span><span class="type-signature"></span></h4> <div class="description"> Register your device token for push notification </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>deviceToken</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The device token.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="moxtra.js.html">moxtra.js</a>, <a href="moxtra.js.html#line332">line 332</a> </li></ul></dd> </dl> <h4 class="name" id=".scheduleMeet"><span class="type-signature">(static) </span>scheduleMeet<span class="signature">(topic, uniqueIds, chatId, options, success, failure)</span><span class="type-signature"></span></h4> <div class="description"> Start a meet with specific topic and members. Meeting screen will show up once meeting started succeed </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>topic</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">The meeting's topic, required</td> </tr> <tr> <td class="name"><code>uniqueIds</code></td> <td class="type"> <span class="param-type">array</span> </td> <td class="description last">Unique id array of meeting members you intended to invite,optional</td> </tr> <tr> <td class="name"><code>chatId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Id of the chat where you want to place meeting related messages,optional.</td> </tr> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="description last">Additional options when schedule a meeting. Supported key-values list below: { "start_time": "1584693257208" //String value, planning meeting start time, required. "end_time": "1584693557208" //String value, Planning meeting end time, required. }</td> </tr> <tr> <td class="name"><code>success</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when start succeed, with parameter like below: { "session_id":"745831" //meeting session id }</td> </tr> <tr> <td class="name"><code>failure</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Callback invoked when schedule failed, with parameter like below: { "error_code":4 //error code "error_message": 'no network' //Detail error message }</td> </tr> </tbody> </table> <dl class="details">