UNPKG

synergia-jira-connector

Version:

Easy to use NodeJS wrapper for the Jira REST API.

1,410 lines (735 loc) 33.7 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: FilterClient</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: FilterClient</h1> <section> <header> <h2> FilterClient </h2> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="FilterClient"><span class="type-signature"></span>new FilterClient<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/filter'</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_filter.js.html">api/filter.js</a>, <a href="api_filter.js.html#line5">line 5</a> </li> </ul> </dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="createFilter"><span class="type-signature"></span>createFilter<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Creates a new filter, and returns newly created filter. Currently sets permissions just using the users default sharing permissions</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>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>expand</code></td> <td class="type"> <span class="param-type">Array</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>The parameters to expand.</p></td> </tr> <tr> <td class="name"><code>filter</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> </td> <td class="description last"><p>The filter to create. See <a href="https://docs.atlassian.com/jira/REST/latest/#d2e3347">https://docs.atlassian.com/jira/REST/latest/#d2e3347</a> </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 filter 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_filter.js.html">api/filter.js</a>, <a href="api_filter.js.html#line14">line 14</a> </li> </ul> </dd> </dl> <h4 class="name" id="deleteFilter"><span class="type-signature"></span>deleteFilter<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Delete a filter.</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>filterId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the filter 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"><p>Called when the filter has been deleted.</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_filter.js.html">api/filter.js</a>, <a href="api_filter.js.html#line76">line 76</a> </li> </ul> </dd> </dl> <h4 class="name" id="getDefaultShareScore"><span class="type-signature"></span>getDefaultShareScore<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Returns the default share scope of the logged-in user.</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"> </td> <td class="description last"><p>Ignored.</p></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> </td> <td class="description last"><p>Called when the default share scope has 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_filter.js.html">api/filter.js</a>, <a href="api_filter.js.html#line136">line 136</a> </li> </ul> </dd> </dl> <h4 class="name" id="getFavouriteFilters"><span class="type-signature"></span>getFavouriteFilters<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Returns the favourite filters of the logged-in user.</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"> </td> <td class="description last"><p>Ignored.</p></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> </td> <td class="description last"><p>Called when the list of favourites has 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_filter.js.html">api/filter.js</a>, <a href="api_filter.js.html#line177">line 177</a> </li> </ul> </dd> </dl> <h4 class="name" id="getFilter"><span class="type-signature"></span>getFilter<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Returns a filter given an id</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>filterId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the filter 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 filter has 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_filter.js.html">api/filter.js</a>, <a href="api_filter.js.html#line46">line 46</a> </li> </ul> </dd> </dl> <h4 class="name" id="getFilterColumns"><span class="type-signature"></span>getFilterColumns<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Returns the default columns for the given filter. Currently logged in user will be used as the user making such request.</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>filterId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the filter for which to retrieve columns.</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 columns 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_filter.js.html">api/filter.js</a>, <a href="api_filter.js.html#line90">line 90</a> </li> </ul> </dd> </dl> <h4 class="name" id="resetFilterColumns"><span class="type-signature"></span>resetFilterColumns<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Resets the columns for the given filter such that the filter no longer has its own column config.</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>filterId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the filter for which to reset columns.</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 columns have been reset.</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_filter.js.html">api/filter.js</a>, <a href="api_filter.js.html#line122">line 122</a> </li> </ul> </dd> </dl> <h4 class="name" id="setDefaultShareScope"><span class="type-signature"></span>setDefaultShareScope<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Sets the default share scope of the logged-in user.</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>scope</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The new default share scope. Available values are GLOBAL and PRIVATE.</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 default share scope has been set.</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_filter.js.html">api/filter.js</a>, <a href="api_filter.js.html#line155">line 155</a> </li> </ul> </dd> </dl> <h4 class="name" id="setFilterColumns"><span class="type-signature"></span>setFilterColumns<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Sets the default columns for the given filter</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>filterId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the filter for which to update columns.</p> </td> </tr> <tr> <td class="name"><code>columns</code></td> <td class="type"> <span class="param-type">Array</span> </td> <td class="description last"><p>The names of the new columns. See <a href="https://docs.atlassian.com/jira/REST/latest/#d2e3460">https://docs.atlassian.com/jira/REST/latest/#d2e3460</a> </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 columns have been set</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_filter.js.html">api/filter.js</a>, <a href="api_filter.js.html#line105">line 105</a> </li> </ul> </dd> </dl> <h4 class="name" id="updateFilter"><span class="type-signature"></span>updateFilter<span class="signature">(opts, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Updates an existing filter, and returns its new value.</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>filterId</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The id of the filter to update</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"><p>The new data for the filter. See <a href="https://docs.atlassian.com/jira/REST/latest/#d2e3401">https://docs.atlassian.com/jira/REST/latest/#d2e3401</a> </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 filter has been updated.</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_filter.js.html">api/filter.js</a>, <a href="api_filter.js.html#line60">line 60</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="ProjectCategoryClient.html">ProjectCategoryClient</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 Nov 10 2015 11:10:10 GMT-0600 (CST) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"></script> </body> </html>