synergia-jira-connector
Version:
Easy to use NodeJS wrapper for the Jira REST API.
2,109 lines (1,068 loc) • 88.4 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: WorkflowSchemeClient</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: WorkflowSchemeClient</h1>
<section>
<header>
<h2>
WorkflowSchemeClient
</h2>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="WorkflowSchemeClient"><span class="type-signature"></span>new
WorkflowSchemeClient<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/workflowscheme'</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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line5">line 5</a>
</li>
</ul>
</dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="createDraft"><span class="type-signature"></span>createDraft<span class="signature">(opts, callback)</span><span
class="type-signature"></span></h4>
<div class="description">
<p>Create a draft for the passed scheme. The draft will be a copy of the state of the parent.</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>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>workflowSchemeId</code></td>
<td class="type">
</td>
<td class="description last"><p>The id of the workflow scheme.</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 draft 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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line83">line 83</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="createWorkflowScheme"><span class="type-signature"></span>createWorkflowScheme<span
class="signature">(opts, callback)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Create a new workflow scheme. The body contains a representation of the new scheme. Values not passed
are
assumed to be set to their defaults.</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>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>workflowScheme</code></td>
<td class="type">
</td>
<td class="description last"><p>See <a
href="https://docs.atlassian.com/jira/REST/latest/#d2e2196">https://docs.atlassian.com/jira/REST/latest/#d2e2196</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 workflow scheme 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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line13">line 13</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="deleteDraft"><span class="type-signature"></span>deleteDraft<span class="signature">(opts, callback)</span><span
class="type-signature"></span></h4>
<div class="description">
<p>Delete the passed draft workflow scheme.</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>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>workflowSchemeId</code></td>
<td class="type">
</td>
<td class="description last"><p>The id of the workflow scheme.</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 draft 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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line179">line 179</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="deleteDraftWorkflow"><span class="type-signature"></span>deleteDraftWorkflow<span
class="signature">(opts, callback)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Delete the passed workflow from the workflow draft scheme.</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>workflowSchemeId</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The id of the workflow scheme.</p></td>
</tr>
<tr>
<td class="name"><code>workflowName</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The name of the workflow.</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 workflow has been edited.</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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line433">line 433</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="deleteWorkflow"><span class="type-signature"></span>deleteWorkflow<span
class="signature">(opts, callback)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Delete the passed workflow from the workflow scheme.</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>workflowSchemeId</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The id of the workflow scheme.</p></td>
</tr>
<tr>
<td class="name"><code>workflowName</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The name of the workflow.</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 workflow has been edited.</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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line418">line 418</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="deleteWorkflowScheme"><span class="type-signature"></span>deleteWorkflowScheme<span
class="signature">(opts, callback)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Delete the passed workflow scheme.</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>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>workflowSchemeId</code></td>
<td class="type">
</td>
<td class="description last"><p>The id of the workflow scheme.</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 workflow scheme 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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line69">line 69</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="editDraft"><span class="type-signature"></span>editDraft<span class="signature">(opts, callback)</span><span
class="type-signature"></span></h4>
<div class="description">
<p>Update a draft workflow scheme. The draft will created if necessary. The body is a representation of
the
workflow scheme. Values not passed are assumed to indicate no change for that field.</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>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>workflowSchemeId</code></td>
<td class="type">
</td>
<td class="description last"><p>The id of the workflow scheme.</p></td>
</tr>
<tr>
<td class="name"><code>draft</code></td>
<td class="type">
</td>
<td class="description last"><p>See <a
href="https://docs.atlassian.com/jira/REST/latest/#d2e2575">https://docs.atlassian.com/jira/REST/latest/#d2e2575</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 draft has been edited.</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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line163">line 163</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="editDraftIssueType"><span class="type-signature"></span>editDraftIssueType<span
class="signature">(opts, callback)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Set the issue type mapping for the passed draft scheme.</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>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>workflowSchemeId</code></td>
<td class="type">
</td>
<td class="description last"><p>The id of the workflow scheme.</p></td>
</tr>
<tr>
<td class="name"><code>issueType</code></td>
<td class="type">
</td>
<td class="description last"><p>The issue type</p></td>
</tr>
<tr>
<td class="name"><code>workflow</code></td>
<td class="type">
</td>
<td class="description last"><p>The new workflow</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 issue type has been edited</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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line311">line 311</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="editDraftWorkflow"><span class="type-signature"></span>editDraftWorkflow<span
class="signature">(opts, callback)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Update the draft scheme to include the passed mapping. The body is a representation of the workflow
mapping.
Values not passed are assumed to indicate no change for that field.</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>workflowSchemeId</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The id of the workflow scheme.</p></td>
</tr>
<tr>
<td class="name"><code>workflowName</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The name of the workflow.</p></td>
</tr>
<tr>
<td class="name"><code>issueTypes</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="description last"><p>The new issue types to inclue in the workflow.
See <a href="https://docs.atlassian.com/jira/REST/latest/#d2e2670">https://docs.atlassian.com/jira/REST/latest/#d2e2670</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 workflow has been edited.</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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line397">line 397</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="editIssueType"><span class="type-signature"></span>editIssueType<span
class="signature">(opts, callback)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Set the issue type mapping for the passed scheme. The passed representation can have its
updateDraftIfNeeded
flag set to true to indicate that the draft should be created/updated when the actual scheme cannot
be edited.</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>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>workflowSchemeId</code></td>
<td class="type">
</td>
<td class="description last"><p>The id of the workflow scheme.</p></td>
</tr>
<tr>
<td class="name"><code>issueType</code></td>
<td class="type">
</td>
<td class="description last"><p>The issue type</p></td>
</tr>
<tr>
<td class="name"><code>workflow</code></td>
<td class="type">
</td>
<td class="description last"><p>The new workflow</p></td>
</tr>
<tr>
<td class="name"><code>updateDraftIfNeeded</code></td>
<td class="type">
</td>
<td class="description last"><p>when true will create and return a draft when the
workflow scheme cannot be
edited (e.g. when it is being used by a project).</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 issue type has been edited</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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line257">line 257</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="editWorkflow"><span class="type-signature"></span>editWorkflow<span class="signature">(opts, callback)</span><span
class="type-signature"></span></h4>
<div class="description">
<p>Update the scheme to include the passed mapping. The body is a representation of the workflow
mapping. Values
not passed are assumed to indicate no change for that field.</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>workflowSchemeId</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The id of the workflow scheme.</p></td>
</tr>
<tr>
<td class="name"><code>workflowName</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The name of the workflow.</p></td>
</tr>
<tr>
<td class="name"><code>issueTypes</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="description last"><p>The new issue types to inclue in the workflow.
See <a href="https://docs.atlassian.com/jira/REST/latest/#d2e2509">https://docs.atlassian.com/jira/REST/latest/#d2e2509</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 workflow has been edited.</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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line376">line 376</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="editWorkflowScheme"><span class="type-signature"></span>editWorkflowScheme<span
class="signature">(opts, callback)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Update the passed workflow scheme. The body of the request is a representation of the workflow
scheme. Values
not passed are assumed to indicate no change for that field. The passed representation can have its
updateDraftIfNeeded flag set to true to indicate that the draft should be created and/or updated
when the actual
scheme cannot be edited (e.g. when the scheme is being used by a project). Values not appearing the
body will
not be touched.</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>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>workflowSchemeId</code></td>
<td class="type">
</td>
<td class="description last"><p>The id of the workflow scheme.</p></td>
</tr>
<tr>
<td class="name"><code>workflowScheme</code></td>
<td class="type">
</td>
<td class="description last"><p>See <a
href="https://docs.atlassian.com/jira/REST/latest/#d2e2305">https://docs.atlassian.com/jira/REST/latest/#d2e2305</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 workflow scheme has been edited.</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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line34">line 34</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="getDefaultWorkflow"><span class="type-signature"></span>getDefaultWorkflow<span
class="signature">(opts, callback)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Get the default workflow from the passed workflow scheme.</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>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>workflowSchemeId</code></td>
<td class="type">
</td>
<td class="description last"><p>The id of the workflow scheme.</p></td>
</tr>
<tr>
<td class="name"><code>returnDraftIfExists</code></td>
<td class="type">
</td>
<td class="description last"><p>when true indicates that a scheme's draft, if it exists,
should be queried
instead of the scheme itself.</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 workflow is returned.</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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line97">line 97</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="getDraft"><span class="type-signature"></span>getDraft<span class="signature">(opts, callback)</span><span
class="type-signature"></span></h4>
<div class="description">
<p>Get the requested draft workflow scheme</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>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>workflowSchemeId</code></td>
<td class="type">
</td>
<td class="description last"><p>The id of the workflow scheme.</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 draft 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_workflowScheme.js.html">api/workflowScheme.js</a>, <a
href="api_workflowScheme.js.html#line149">line 149</a>
</li>
</ul>
</dd>
</dl>
<h4 class="name" id="getDraftDefaultWorkflow"><span
class="type-signature"></span>getDraftDefaultWorkflow<span class="signature">(opts, callback)</span><span
class="type-signature"></span></h4>
<div class="description">
<p>Get the default workflow from the passed draft workflow scheme</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>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>workflowSchemeId</code></td>
<td class="type">
</td>
<td class="description last"><p>The id of the workflow scheme.</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 workflow is returned.</p></td>
</tr>
</tbody>
</table>