UNPKG

isatdatapro-microservices

Version:

A library for creating microservices to access Inmarsat's IsatData Pro satellite IoT system

2,981 lines (1,139 loc) 73.1 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Global</title> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <script src="scripts/jquery.min.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/bootstrap.min.css"> <link type="text/css" rel="stylesheet" href="styles/jaguar.css"> <script> var config = {"monospaceLinks":false,"cleverLinks":true,"default":{}}; </script> </head> <body> <div id="wrap" class="clearfix"> <div class="navigation"> <h3 class="applicationName"><a href="index.html"></a></h3> <div class="search"> <input id="search" type="text" class="form-control input-sm" placeholder="Search Documentations"> </div> <ul class="list"> <li class="item" data-name="ApiCallLog"> <span class="title"> <a href="ApiCallLog.html">ApiCallLog</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Field"> <span class="title"> <a href="Field.html">Field</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Mailbox"> <span class="title"> <a href="Mailbox.html">Mailbox</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="Mailbox#passwordGet"><a href="Mailbox.html#passwordGet">passwordGet</a></li> <li data-name="Mailbox#passwordSet"><a href="Mailbox.html#passwordSet">passwordSet</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Message"> <span class="title"> <a href="Message.html">Message</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="Message#getCodecMessageId"><a href="Message.html#getCodecMessageId">getCodecMessageId</a></li> <li data-name="Message#getCodecServiceId"><a href="Message.html#getCodecServiceId">getCodecServiceId</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="MessageForward"> <span class="title"> <a href="MessageForward.html">MessageForward</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="MessageForward#getStateName"><a href="MessageForward.html#getStateName">getStateName</a></li> <li data-name="MessageForward#getStateReason"><a href="MessageForward.html#getStateReason">getStateReason</a></li> <li data-name="MessageForward#submit"><a href="MessageForward.html#submit">submit</a></li> <li data-name="MessageForward#updateStatus"><a href="MessageForward.html#updateStatus">updateStatus</a></li> <li data-name="MessageForward#wakeupPeriodEnum"><a href="MessageForward.html#wakeupPeriodEnum">wakeupPeriodEnum</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="MessageReturn"> <span class="title"> <a href="MessageReturn.html">MessageReturn</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Mobile"> <span class="title"> <a href="Mobile.html">Mobile</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="module:repositories/azureCosmosRepository~DatabaseContext"> <span class="title"> <a href="module-repositories_azureCosmosRepository-DatabaseContext.html">module:repositories/azureCosmosRepository~DatabaseContext</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="module:repositories/azureCosmosRepository~DatabaseContext#close"><a href="module-repositories_azureCosmosRepository-DatabaseContext.html#close">close</a></li> <li data-name="module:repositories/azureCosmosRepository~DatabaseContext#delete"><a href="module-repositories_azureCosmosRepository-DatabaseContext.html#delete">delete</a></li> <li data-name="module:repositories/azureCosmosRepository~DatabaseContext#find"><a href="module-repositories_azureCosmosRepository-DatabaseContext.html#find">find</a></li> <li data-name="module:repositories/azureCosmosRepository~DatabaseContext#initialize"><a href="module-repositories_azureCosmosRepository-DatabaseContext.html#initialize">initialize</a></li> <li data-name="module:repositories/azureCosmosRepository~DatabaseContext#upsert"><a href="module-repositories_azureCosmosRepository-DatabaseContext.html#upsert">upsert</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="module:repositories/mysqlRepository~DatabaseContext"> <span class="title"> <a href="module-repositories_mysqlRepository-DatabaseContext.html">module:repositories/mysqlRepository~DatabaseContext</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="module:repositories/mysqlRepository~DatabaseContext#close"><a href="module-repositories_mysqlRepository-DatabaseContext.html#close">close</a></li> <li data-name="module:repositories/mysqlRepository~DatabaseContext#delete"><a href="module-repositories_mysqlRepository-DatabaseContext.html#delete">delete</a></li> <li data-name="module:repositories/mysqlRepository~DatabaseContext#find"><a href="module-repositories_mysqlRepository-DatabaseContext.html#find">find</a></li> <li data-name="module:repositories/mysqlRepository~DatabaseContext#initialize"><a href="module-repositories_mysqlRepository-DatabaseContext.html#initialize">initialize</a></li> <li data-name="module:repositories/mysqlRepository~DatabaseContext#upsert"><a href="module-repositories_mysqlRepository-DatabaseContext.html#upsert">upsert</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Payload"> <span class="title"> <a href="Payload.html">Payload</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="Payload#addField"><a href="Payload.html#addField">addField</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="SatelliteGateway"> <span class="title"> <a href="SatelliteGateway.html">SatelliteGateway</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> </ul> <ul class="events itemMembers"> </ul> </li> </ul> </div> <div class="main"> <h1 class="page-title" data-filename="global.html">Global</h1> <section> <header> <h2> </h2> </header> <article> <div class="container-overview"> <dl class="details"> </dl> </div> <h3 class="subsection-title">Methods</h3> <dl> <dt> <div class="nameContainer"> <h4 class="name" id="dbFilter"> dbFilter<span class="signature">(filter)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object}</span> </h4> <div class="tag-source"> infra/database/repositories/propertyConversion.js, line 156 </div> </div> </dt> <dd> <div class="description"> <p>Returns a database-compatible filter for queries</p> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>filter</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"> <p>A filter key/value set</p></td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> Object </td> <td class="description last">the database-compatible filter</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="decrypt"> decrypt<span class="signature">(text)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{string}</span> </h4> <div class="tag-source"> infra/encryption/index.js, line 33 </div> </div> </dt> <dd> <div class="description"> <p>Decrypts an AES-256 encrypted string</p> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>text</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"> <p>The text to decrypt</p></td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> string </td> <td class="description last">decrypted text (utf8)</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="encrypt"> encrypt<span class="signature">(text)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{string}</span> </h4> <div class="tag-source"> infra/encryption/index.js, line 14 </div> </div> </dt> <dd> <div class="description"> <p>Encrypts a string using AES-256</p> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>text</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"> <p>The text to encrypt</p></td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> string </td> <td class="description last">encrypted text (hex)</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="getHighwatermark"> <span class="type-signature ">async</span>getHighwatermark<span class="signature">(database, mailboxId, operation)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{object}</span> </h4> <div class="tag-source"> infra/database/utilities/getHighwatermark.js, line 16 </div> </div> </dt> <dd> <div class="description"> <p>Returns the high water mark from the most recent IDP Messaging API call</p> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>database</code></td> <td class="type"> <span class="param-type">DatabaseContext</span> </td> <td class="description last"> <p>The database client/connection</p></td> </tr> <tr> <td class="name"><code>mailboxId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"> <p>The mailbox id the operation was made against</p></td> </tr> <tr> <td class="name"><code>operation</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"> <p>The api operation</p></td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> object </td> <td class="description last">{ nextStartTimeUtc, [nextStartId] }</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="getMailboxes"> <span class="type-signature ">async</span>getMailboxes<span class="signature">(database, <span class="optional">satelliteGatewayName</span>, <span class="optional">mailboxId</span>)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="Mailbox.html">Mailbox</a>>|<a href="Mailbox.html">Mailbox</a>}</span> </h4> <div class="tag-source"> infra/database/utilities/getMailboxes.js, line 12 </div> </div> </dt> <dd> <div class="description"> <p>Returns a list of Mailbox entities in the database</p> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>database</code></td> <td class="type"> <span class="param-type">DatabaseContext</span> </td> <td class="description last"> <p>The database context/connection</p></td> </tr> <tr> <td class="name"><code>satelliteGatewayName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"> <span class="optional">optional</span> <p>Optional filter on message gateway system</p></td> </tr> <tr> <td class="name"><code>mailboxId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"> <span class="optional">optional</span> <p>Optional filter on mailbox ID</p></td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> Array.&lt;<a href="Mailbox.html">Mailbox</a>> | <a href="Mailbox.html">Mailbox</a> </td> <td class="description last">A list of Mailboxes or single if ID was specified</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="getMailboxGateway"> <span class="type-signature ">async</span>getMailboxGateway<span class="signature">(dbContext, mailbox)</span> </h4> <div class="tag-source"> infra/database/utilities/getMailboxGateway.js, line 10 </div> </div> </dt> <dd> <div class="description"> <p>Returns the message gateway system parameters for a given mailbox</p> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>dbContext</code></td> <td class="type"> <span class="param-type">DatabaseContext</span> </td> <td class="description last"> <p>The database context/connection</p></td> </tr> <tr> <td class="name"><code>mailbox</code></td> <td class="type"> <span class="param-type"><a href="Mailbox.html">Mailbox</a></span> </td> <td class="description last"> <p>A Mailbox entity</p></td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="getMobileMailbox"> <span class="type-signature ">async</span>getMobileMailbox<span class="signature">(database, mobileId)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Mailbox.html">Mailbox</a>}</span> </h4> <div class="tag-source"> infra/database/utilities/getMobileMailbox.js, line 12 </div> </div> </dt> <dd> <div class="description"> <p>Returns the Mailbox entity for a given Mobile</p> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>database</code></td> <td class="type"> <span class="param-type">DatabaseContext</span> </td> <td class="description last"> <p>The database context/connection</p></td> </tr> <tr> <td class="name"><code>mobileId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"> <p>The Mobile ID</p></td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> <a href="Mailbox.html">Mailbox</a> </td> <td class="description last"></td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="getStatusMailbox"> <span class="type-signature ">async</span>getStatusMailbox<span class="signature">(database, messageId)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Object}</span> </h4> <div class="tag-source"> infra/database/utilities/getStatusMailbox.js, line 14 </div> </div> </dt> <dd> <div class="description"> <p>Returns the Mailbox entity for a given Forward Message</p> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>database</code></td> <td class="type"> <span class="param-type">DatabaseContext</span> </td> <td class="description last"> <p>The database context/connection</p></td> </tr> <tr> <td class="name"><code>messageId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"> <p>The Mobile ID</p></td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Throws:</h5> <dl> <dt> <div class="param-desc"> <p>if messageId or mobileId not found in database</p> </div> </dt> <dt> <dl> <dt> Type </dt> <dd> <span class="param-type">Error</span> </dd> </dl> </dt> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> Object </td> <td class="description last">the Mailbox entity</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="handleApiFailure"> <span class="type-signature ">async</span>handleApiFailure<span class="signature">(err, database, satelliteGateway, <span class="optional">operation</span>)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{boolean}</span> </h4> <div class="tag-source"> infra/database/utilities/handleApiFailure.js, line 16 </div> </div> </dt> <dd> <div class="description"> <p>Determines if the error was an API timeout Emits event ApiOutage</p> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type">Error</span> </td> <td class="description last"> <p>The candidate error</p></td> </tr> <tr> <td class="name"><code>database</code></td> <td class="type"> <span class="param-type">DatabaseContext</span> </td> <td class="description last"> <p>The database to update</p></td> </tr> <tr> <td class="name"><code>satelliteGateway</code></td> <td class="type"> <span class="param-type"><a href="SatelliteGateway.html">SatelliteGateway</a></span> </td> <td class="description last"> <p>The SatelliteGateway entity</p></td> </tr> <tr> <td class="name"><code>operation</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"> <span class="optional">optional</span> <p>The API operation that failed</p></td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> boolean </td> <td class="description last">true if API endpoint is known unavailable</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="handleApiResponse"> <span class="type-signature ">async</span>handleApiResponse<span class="signature">(database, errorId, apiCallLog, satelliteGateway)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{boolean}</span> </h4> <div class="tag-source"> infra/database/utilities/handleApiResponse.js, line 16 </div> </div> </dt> <dd> <div class="description"> <p>Updates the ApiCallLog and MessageGateway based on IDP API response Emits ApiError</p> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>database</code></td> <td class="type"> <span class="param-type">DatabaseContext</span> </td> <td class="description last"> <p>The database context/connection</p></td> </tr> <tr> <td class="name"><code>errorId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"> <p>The error ID returned by the API call</p></td> </tr> <tr> <td class="name"><code>apiCallLog</code></td> <td class="type"> <span class="param-type"><a href="ApiCallLog.html">ApiCallLog</a></span> </td> <td class="description last"> <p>An ApiCallLog entity</p></td> </tr> <tr> <td class="name"><code>satelliteGateway</code></td> <td class="type"> <span class="param-type"><a href="SatelliteGateway.html">SatelliteGateway</a></span> </td> <td class="description last"> <p>A SatelliteGateway entity</p></td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> boolean </td> <td class="description last">true if the response had no errors</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="Model"> Model<span class="signature">(category)</span> </h4> <div class="tag-source"> infra/database/models/Model.js, line 10 </div> </div> </dt> <dd> <div class="description"> <p>Model Class prototype</p> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>category</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"> </td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="module:getEntity"> require("getEntity")<span class="signature">(category, <span class="optional">filter</span>)</span> </h4> <div class="tag-source"> services/getEntity.js, line 22 </div> </div> </dt> <dd> <div class="description"> <p>Retrieves all entity metadata for the given model and filter criteria</p> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>category</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"> <p>The category/type of the model</p></td> </tr> <tr> <td class="name"><code>filter</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"> <span class="optional">optional</span> <p>A set of filter criteria</p> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>include</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"> <span class="optional">optional</span> <p>Filters to include</p></td> </tr> <tr> <td class="name"><code>exclude</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"> <span class="optional">optional</span> <p>Filters to exclude</p></td> </tr> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"> <span class="optional">optional</span> <p>Additional options</p></td> </tr> <tr> <td class="name"><code>limit</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"> <span class="optional">optional</span> <p>Maximum quantity to return</p></td> </tr> <tr> <td class="name"><code>desc</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"> <span class="optional">optional</span> <p>Property name for sort descending</p></td> </tr> <tr> <td class="name"><code>asc</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"> <span class="optional">optional</span> <p>Property name for sort ascending</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="module:getForwardMessages"> require("getForwardMessages")<span class="signature">(mailboxId, messageIds)</span> </h4> <div class="tag-source"> services/getForwardMessages.js, line 26 </div> </div> </dt> <dd> <div class="description"> <p>Retrieves a specific list of messages by unique ID.</p> <p>Emits events:</p> <ul> <li><code>NewForwardMessage</code></li> <li><code>NewMobile</code></li> <li><code>ApiError</code></li> <li><code>ApiOutage</code></li> <li><code>ApiRecovery</code></li> </ul> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>mailboxId</code></td> <td class="type"> <span class="param-type">number</span> | <span class="param-type">string</span> </td> <td class="description last"> <p>The unique Mailbox ID to retrieve from</p></td> </tr> <tr> <td class="name"><code>messageIds</code></td> <td class="type"> <span class="param-type">Array.&lt;number></span> | <span class="param-type">number</span> </td> <td class="description last"> <p>Unique/list of message IDs to retrieve</p></td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="module:getForwardStatuses"> require("getForwardStatuses")<span class="signature">()</span> </h4> <div class="tag-source"> services/getForwardStatuses.js, line 24 </div> </div> </dt> <dd> <div class="description"> <p>Retrieves all outstanding forward message statuses from all Mailboxes.</p> <p>Emits events:</p> <ul> <li><code>ForwardMessageStateChange</code></li> <li><code>OtherClientForwardSubmission</code></li> <li><code>ApiError</code></li> <li><code>ApiOutage</code></li> <li><code>ApiRecovery</code></li> </ul> </div> <dl class="details"> </dl> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="module:getMobiles"> require("getMobiles")<span class="signature">(<span class="optional">satelliteGatewayName</span>, <span class="optional">mailboxId</span>)</span> </h4> <div class="tag-source"> services/getMobiles.js, line 21 </div> </div> </dt> <dd> <div class="description"> <p>Retrieves all Mobile metadata provisioned against a Mailbox</p> <p>Emits event: <code>NewMobile</code></p> </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>satelliteGatewayName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"> <span class="optional">optional</span> <p>Shorthand name of the network gateway</p></td> </tr> <tr> <td class="name"><code>mailboxId</code></td> <td class="type"