UNPKG

synergia-jira-connector

Version:

Easy to use NodeJS wrapper for the Jira REST API.

1,802 lines (907 loc) 42.3 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: ScreensClient</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: ScreensClient</h1> <section> <header> <h2> ScreensClient </h2> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="ScreensClient"><span class="type-signature"></span>new ScreensClient<span class="signature">(jiraClient)</span><span class="type-signature"></span></h4> <div class="description"> <p>Used to access Jira REST endpoints in '/rest/api/2/screens'</p> </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>jiraClient</code></td> <td class="type"> <span class="param-type"><a href="JiraClient.html">JiraClient</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="api_screens.js.html">api/screens.js</a>, <a href="api_screens.js.html#line5">line 5</a> </li> </ul> </dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="addFieldToDefaultTab"><span class="type-signature"></span>addFieldToDefaultTab<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Adds field or custom field to the default tab</p> </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>opts</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>The request options sent to the Jira API.</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>fieldId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The id of the field to add to the default tab.</p></td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> </td> <td class="description last"><p>Called when the tab has been moved.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"> <ul class="dummy"> <li> <a href="api_screens.js.html">api/screens.js</a>, <a href="api_screens.js.html#line173">line 173</a> </li> </ul> </dd> </dl> <h4 class="name" id="addFieldToTab"><span class="type-signature"></span>addFieldToTab<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Adds field to the given tab</p> </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>opts</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>The request options sent to the Jira API</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>screenId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the screen containing the tab.</p></td> </tr> <tr> <td class="name"><code>tabId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>the id of the tab to which the fields will be added.</p> </td> </tr> <tr> <td class="name"><code>fieldId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The field to add</p></td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> </td> <td class="description last"><p>Called when the fields have been added to the tab.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"> <ul class="dummy"> <li> <a href="api_screens.js.html">api/screens.js</a>, <a href="api_screens.js.html#line88">line 88</a> </li> </ul> </dd> </dl> <h4 class="name" id="createTab"><span class="type-signature"></span>createTab<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Creates tab for given screen</p> </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>opts</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>The request options sent to Jira</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>screenId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the screen in which to create a tab.</p></td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The name of the tab to add. Minimum required to create a tab.</p></td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> </td> <td class="description last"><p>Called when the tab has been created.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"> <ul class="dummy"> <li> <a href="api_screens.js.html">api/screens.js</a>, <a href="api_screens.js.html#line42">line 42</a> </li> </ul> </dd> </dl> <h4 class="name" id="deleteTab"><span class="type-signature"></span>deleteTab<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Deletes the given tab from the given screen.</p> </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>opts</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>The request options sent to the jira API</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>screenId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the screen containing the tab to delete.</p> </td> </tr> <tr> <td class="name"><code>tabId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the tab to delete</p></td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> </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="api_screens.js.html">api/screens.js</a>, <a href="api_screens.js.html#line73">line 73</a> </li> </ul> </dd> </dl> <h4 class="name" id="getAvailableFields"><span class="type-signature"></span>getAvailableFields<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Gets available fields for screen. i.e ones that haven't already been added.</p> </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>opts</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>The request options sent to Jira</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>screenId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the screen to retrieve.</p></td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> </td> <td class="description last"><p>Called when the available fields have been retrieved</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"> <ul class="dummy"> <li> <a href="api_screens.js.html">api/screens.js</a>, <a href="api_screens.js.html#line14">line 14</a> </li> </ul> </dd> </dl> <h4 class="name" id="getFieldsInTab"><span class="type-signature"></span>getFieldsInTab<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Gets all fields for a given tab.</p> </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>opts</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>The request options sent to the Jira API</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>screenId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the screen containing the tab.</p></td> </tr> <tr> <td class="name"><code>tabId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>the id of the tab for which to retrieve fields.</p></td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> </td> <td class="description last"><p>Called when the fields have been retrieved.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"> <ul class="dummy"> <li> <a href="api_screens.js.html">api/screens.js</a>, <a href="api_screens.js.html#line104">line 104</a> </li> </ul> </dd> </dl> <h4 class="name" id="getTabs"><span class="type-signature"></span>getTabs<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Returns a list of all tabs for the given screen.</p> </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>opts</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>The request options sent to Jira</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>screenId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the screen to retrieve.</p></td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> </td> <td class="description last"><p>Called when the tabs have been retrieved.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"> <ul class="dummy"> <li> <a href="api_screens.js.html">api/screens.js</a>, <a href="api_screens.js.html#line28">line 28</a> </li> </ul> </dd> </dl> <h4 class="name" id="moveFieldOnTab"><span class="type-signature"></span>moveFieldOnTab<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Move the given field on the given tab</p> </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>opts</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>The request options sent to the Jira API</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>screenId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the screen containing the tab.</p></td> </tr> <tr> <td class="name"><code>tabId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>the id of the tab containing the field.</p></td> </tr> <tr> <td class="name"><code>fieldId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The id of the field to remove from the tab.</p></td> </tr> <tr> <td class="name"><code>newPosition</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The position to which the field should be moved. May be one of:</p> <ul> <li>Earlier</li> <li>Later</li> <li>First</li> <li>Last</li> </ul> </td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> </td> <td class="description last"><p>Called when the field has been removed.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"> <ul class="dummy"> <li> <a href="api_screens.js.html">api/screens.js</a>, <a href="api_screens.js.html#line135">line 135</a> </li> </ul> </dd> </dl> <h4 class="name" id="moveTabPosition"><span class="type-signature"></span>moveTabPosition<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Moves tab position</p> </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>opts</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>The request options sent to the Jira API.</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>screenId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the screen containing the tab.</p></td> </tr> <tr> <td class="name"><code>tabId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>the id of the tab to move.</p></td> </tr> <tr> <td class="name"><code>newPosition</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The new (zero-indexed) position of the tab.</p></td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> </td> <td class="description last"><p>Called when the tab has been moved.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"> <ul class="dummy"> <li> <a href="api_screens.js.html">api/screens.js</a>, <a href="api_screens.js.html#line157">line 157</a> </li> </ul> </dd> </dl> <h4 class="name" id="removeFieldFromTab"><span class="type-signature"></span>removeFieldFromTab<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Remove the given field from the given tab.</p> </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>opts</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>The request options sent to the Jira API</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>screenId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the screen containing the tab.</p></td> </tr> <tr> <td class="name"><code>tabId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>the id of the tab from which to remove the field.</p> </td> </tr> <tr> <td class="name"><code>fieldId</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The id of the field to remove from the tab.</p></td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> </td> <td class="description last"><p>Called when the field has been removed.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"> <ul class="dummy"> <li> <a href="api_screens.js.html">api/screens.js</a>, <a href="api_screens.js.html#line119">line 119</a> </li> </ul> </dd> </dl> <h4 class="name" id="renameTab"><span class="type-signature"></span>renameTab<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Renames the given tab on the given screen.</p> </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>opts</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>The request options sent to the jira API</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>screenId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the screen containing the tab to rename.</p> </td> </tr> <tr> <td class="name"><code>tabId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the tab to rename</p></td> </tr> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The new name of the tab.</p></td> </tr> </tbody> </table> </td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> </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="api_screens.js.html">api/screens.js</a>, <a href="api_screens.js.html#line57">line 57</a> </li> </ul> </dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2> <h3>Classes</h3> <ul> <li><a href="ApplicationPropertiesClient.html">ApplicationPropertiesClient</a></li> <li><a href="AttachmentClient.html">AttachmentClient</a></li> <li><a href="AuditingClient.html">AuditingClient</a></li> <li><a href="AvatarClient.html">AvatarClient</a></li> <li><a href="CommentClient.html">CommentClient</a></li> <li><a href="ComponentClient.html">ComponentClient</a></li> <li><a href="CustomFieldOptionClient.html">CustomFieldOptionClient</a></li> <li><a href="DashboardClient.html">DashboardClient</a></li> <li><a href="FieldClient.html">FieldClient</a></li> <li><a href="FilterClient.html">FilterClient</a></li> <li><a href="GroupClient.html">GroupClient</a></li> <li><a href="GroupsClient.html">GroupsClient</a></li> <li><a href="GroupUserPickerClient.html">GroupUserPickerClient</a></li> <li><a href="IssueClient.html">IssueClient</a></li> <li><a href="IssueLinkClient.html">IssueLinkClient</a></li> <li><a href="IssueLinkTypeClient.html">IssueLinkTypeClient</a></li> <li><a href="IssueTypeClient.html">IssueTypeClient</a></li> <li><a href="JiraClient.html">JiraClient</a></li> <li><a href="JqlClient.html">JqlClient</a></li> <li><a href="LicenseRoleClient.html">LicenseRoleClient</a></li> <li><a href="LicenseValidatorClient.html">LicenseValidatorClient</a></li> <li><a href="MyPermissionsClient.html">MyPermissionsClient</a></li> <li><a href="MyPreferencesClient.html">MyPreferencesClient</a></li> <li><a href="MyselfClient.html">MyselfClient</a></li> <li><a href="PasswordClient.html">PasswordClient</a></li> <li><a href="PriorityClient.html">PriorityClient</a></li> <li><a href="ProjectClient.html">ProjectClient</a></li> <li><a href="ProjectValidateClient.html">ProjectValidateClient</a></li> <li><a href="ReindexClient.html">ReindexClient</a></li> <li><a href="ResolutionClient.html">ResolutionClient</a></li> <li><a href="ScreensClient.html">ScreensClient</a></li> <li><a href="SearchClient.html">SearchClient</a></li> <li><a href="SecurityLevelClient.html">SecurityLevelClient</a></li> <li><a href="ServerInfoClient.html">ServerInfoClient</a></li> <li><a href="SettingsClient.html">SettingsClient</a></li> <li><a href="StatusCategoryClient.html">StatusCategoryClient</a></li> <li><a href="StatusClient.html">StatusClient</a></li> <li><a href="UserClient.html">UserClient</a></li> <li><a href="VersionClient.html">VersionClient</a></li> <li><a href="WorkflowClient.html">WorkflowClient</a></li> <li><a href="WorkflowSchemeClient.html">WorkflowSchemeClient</a></li> </ul> <h3>Namespaces</h3> <ul> <li><a href="OauthUtil.html">OauthUtil</a></li> </ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha13</a> on Tue Sep 22 2015 13:08:44 GMT-0500 (CDT) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"></script> </body> </html>