node-eventstore-client
Version:
A port of the EventStore .Net ClientAPI to Node.js
3,644 lines (963 loc) • 52.5 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: ProjectionsManager</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: ProjectionsManager</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>ProjectionsManager<span class="signature">(log, httpEndPoint, operationTimeout, rejectUnauthorized<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="ProjectionsManager"><span class="type-signature"></span>new ProjectionsManager<span class="signature">(log, httpEndPoint, operationTimeout, rejectUnauthorized<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
Creates a new instance of ProjectionsManager.
</div>
<h5>Parameters:</h5>
<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>log</code></td>
<td class="type">
<span class="param-type">Logger</span>
</td>
<td class="attributes">
</td>
<td class="description last">Instance of Logger to use for logging.</td>
</tr>
<tr>
<td class="name"><code>httpEndPoint</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last">HTTP endpoint of an Event Store server.</td>
</tr>
<tr>
<td class="name"><code>operationTimeout</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="description last">Operation timeout in milliseconds.</td>
</tr>
<tr>
<td class="name"><code>rejectUnauthorized</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">Reject authorized SSL certs (if using SSL) - set to false is using self-signed certs</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line12">line 12</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="abort"><span class="type-signature"></span>abort<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Disables a projection.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to disable a projection.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line45">line 45</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="createContinuous"><span class="type-signature"></span>createContinuous<span class="signature">(name, query, trackEmittedStreams, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Creates a one-time query.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>query</code></td>
<td class="type">
</td>
<td class="description last">The JavaScript source code for the query.</td>
</tr>
<tr>
<td class="name"><code>trackEmittedStreams</code></td>
<td class="type">
</td>
<td class="description last">Whether the streams emitted by this projection should be tracked.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to create a query.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line88">line 88</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="createOneTime"><span class="type-signature"></span>createOneTime<span class="signature">(query, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Creates a one-time query.
</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>query</code></td>
<td class="type">
</td>
<td class="description last">The JavaScript source code for the query.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to create a query.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line65">line 65</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="createTransient"><span class="type-signature"></span>createTransient<span class="signature">(name, query, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Creates a one-time query.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">A name for the query.</td>
</tr>
<tr>
<td class="name"><code>query</code></td>
<td class="type">
</td>
<td class="description last">The JavaScript source code for the query.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to create a query.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line76">line 76</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="delete"><span class="type-signature"></span>delete<span class="signature">(name, deleteEmittedStreams, deleteStateStream, deleteCheckpointStream, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Updates the definition of a query.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>deleteEmittedStreams</code></td>
<td class="type">
</td>
<td class="description last">Whether to delete the streams that were emitted by this projection.</td>
</tr>
<tr>
<td class="name"><code>deleteStateStream</code></td>
<td class="type">
</td>
<td class="description last">Where to delete the state stream for this projection</td>
</tr>
<tr>
<td class="name"><code>deleteCheckpointStream</code></td>
<td class="type">
</td>
<td class="description last">Where to delete the checkpoint stream for this projection</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to delete a projection.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line211">line 211</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="disable"><span class="type-signature"></span>disable<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Aborts and disables a projection without writing a checkpoint.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to disable a projection.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line35">line 35</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="enable"><span class="type-signature"></span>enable<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Enables a projection.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to enable a projection.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line25">line 25</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="getPartitionResult"><span class="type-signature"></span>getPartitionResult<span class="signature">(name, partitionId, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the state of a projection for a specified partition.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>partitionId</code></td>
<td class="type">
</td>
<td class="description last">The id of the partition.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line167">line 167</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing projection state.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="getPartitionState"><span class="type-signature"></span>getPartitionState<span class="signature">(name, partitionId, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the state of a projection for a specified partition.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>partitionId</code></td>
<td class="type">
</td>
<td class="description last">The id of the partition.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line146">line 146</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing projection state.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="getQuery"><span class="type-signature"></span>getQuery<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the status of a query.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the query.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line187">line 187</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing query status.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="getResult"><span class="type-signature"></span>getResult<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the state of a projection.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line156">line 156</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing projection state.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="getState"><span class="type-signature"></span>getState<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the state of a projection.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line135">line 135</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing projection state.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="getStatistics"><span class="type-signature"></span>getStatistics<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the statistics of a projection.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line177">line 177</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing projection statistics.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="getStatus"><span class="type-signature"></span>getStatus<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<string>}</span></h4>
<div class="description">
Gets the status of a projection.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line125">line 125</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String of JSON containing projection status.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<string></span>
</dd>
</dl>
<h4 class="name" id="listAll"><span class="type-signature"></span>listAll<span class="signature">(userCredentials)</span><span class="type-signature"> → {Promise.<Array.<ProjectionDetails>>}</span></h4>
<div class="description">
Lists the status of all projections.
</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>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line97">line 97</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<Array.<ProjectionDetails>></span>
</dd>
</dl>
<h4 class="name" id="listContinuous"><span class="type-signature"></span>listContinuous<span class="signature">(userCredentials)</span><span class="type-signature"> → {Promise.<Array.<ProjectionDetails>>}</span></h4>
<div class="description">
Lists the status of all continuous projections.
</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>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line115">line 115</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<Array.<ProjectionDetails>></span>
</dd>
</dl>
<h4 class="name" id="listOneTime"><span class="type-signature"></span>listOneTime<span class="signature">(userCredentials)</span><span class="type-signature"> → {Promise.<Array.<ProjectionDetails>>}</span></h4>
<div class="description">
Lists the status of all one-time projections.
</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>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line106">line 106</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<Array.<ProjectionDetails>></span>
</dd>
</dl>
<h4 class="name" id="reset"><span class="type-signature"></span>reset<span class="signature">(name, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Reset a projection. (This will re-emit events, streams that are written to from the projection will also be soft deleted)
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the projection.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for a user with permission to reset a projection.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line55">line 55</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
<h4 class="name" id="updateQuery"><span class="type-signature"></span>updateQuery<span class="signature">(name, query, userCredentials)</span><span class="type-signature"> → {Promise.<void>}</span></h4>
<div class="description">
Updates the definition of a query.
</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>name</code></td>
<td class="type">
</td>
<td class="description last">The name of the query.</td>
</tr>
<tr>
<td class="name"><code>query</code></td>
<td class="type">
</td>
<td class="description last">The JavaScript source code for the query.</td>
</tr>
<tr>
<td class="name"><code>userCredentials</code></td>
<td class="type">
</td>
<td class="description last">Credentials for the operation.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="projections_projectionsManager.js.html">projections/projectionsManager.js</a>, <a href="projections_projectionsManager.js.html#line198">line 198</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<void></span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="EventStore.html">EventStore</a></li><li><a href="EventStore.Client.html">Client</a></li><li><a href="EventStore.Client.Messages.html">Messages</a></li></ul><h3>Classes</h3><ul><li><a href="AllEventsSlice.html">AllEventsSlice</a></li><li><a href="ClusterDiscoverer.html">ClusterDiscoverer</a></li><li><a href="DeleteResult.html">DeleteResult</a></li><li><a href="EventReadResult.html">EventReadResult</a></li><li><a href="EventStore.Client.Messages.CheckpointReached.html">CheckpointReached</a></li><li><a href="EventStore.Client.Messages.ClientIdentified.html">ClientIdentified</a></li><li><a href="EventStore.Client.Messages.ConnectToPersistentSubscription.html">ConnectToPersistentSubscription</a></li><li><a href="EventStore.Client.Messages.CreatePersistentSubscription.html">CreatePersistentSubscription</a></li><li><a href="EventStore.Client.Messages.CreatePersistentSubscriptionCompleted.html">CreatePersistentSubscriptionCompleted</a></li><li><a href="EventStore.Client.Messages.DeletePersistentSubscription.html">DeletePersistentSubscription</a></li><li><a href="EventStore.Client.Messages.DeletePersistentSubscriptionCompleted.html">DeletePersistentSubscriptionCompleted</a></li><li><a href="EventStore.Client.Messages.DeleteStream.html">DeleteStream</a></li><li><a href="EventStore.Client.Messages.DeleteStreamCompleted.html">DeleteStreamCompleted</a></li><li><a href="EventStore.Client.Messages.EventRecord.html">EventRecord</a></li><li><a href="EventStore.Client.Messages.Filter.html">Filter</a></li><li><a href="EventStore.Client.Messages.FilteredReadAllEvents.html">FilteredReadAllEvents</a></li><li><a href="EventStore.Client.Messages.FilteredReadAllEventsCompleted.html">FilteredReadAllEventsCompleted</a></li><li><a href="EventStore.Client.Messages.FilteredSubscribeToStream.html">FilteredSubscribeToStream</a></li><li><a href="EventStore.Client.Messages.IdentifyClient.html">IdentifyClient</a></li><li><a href="EventStore.Client.Messages.NewEvent.html">NewEvent</a></li><li><a href="EventStore.Client.Messages.NotHandled.html">NotHandled</a></li><li><a href="EventStore.Client.Messages.NotHandled.LeaderInfo.html">LeaderInfo</a></li><li><a href="EventStore.Client.Messages.PersistentSubscriptionAckEvents.html">PersistentSubscriptionAckEvents</a></li><li><a href="EventStore.Client.Messages.PersistentSubscriptionConfirmation.html">PersistentSubscriptionConfirmation</a></li><li><a href="EventStore.Client.Messages.PersistentSubscriptionNakEvents.html">PersistentSubscriptionNakEvents</a></li><li><a href="EventStore.Client.Messages.PersistentSubscriptionStreamEventAppeared.html">PersistentSubscriptionStreamEventAppeared</a></li><li><a href="EventStore.Client.Messages.ReadAllEvents.html">ReadAllEvents</a></li><li><a href="EventStore.Client.Messages.ReadAllEventsCompleted.html">ReadAllEventsCompleted</a></li><li><a href="EventStore.Client.Messages.ReadEvent.html">ReadEvent</a></li><li><a href="EventStore.Client.Messages.ReadEventCompleted.html">ReadEventCompleted</a></li><li><a href="EventStore.Client.Messages.ReadStreamEvents.html">ReadStreamEvents</a></li><li><a href="EventStore.Client.Messages.ReadStreamEventsCompleted.html">ReadStreamEventsCompleted</a></li><li><a href="EventStore.Client.Messages.ResolvedEvent.html">ResolvedEvent</a></li><li><a href="EventStore.Client.Messages.ResolvedIndexedEvent.html">ResolvedIndexedEvent</a></li><li><a href="EventStore.Client.Messages.ScavengeDatabase.html">ScavengeDatabase</a></li><li><a href="EventStore.Client.Messages.ScavengeDatabaseResponse.html">ScavengeDatabaseResponse</a></li><li><a href="EventStore.Client.Messages.StreamEventAppeared.html">StreamEventAppeared</a></li><li><a href="EventStore.Client.Messages.SubscribeToStream.html">SubscribeToStream</a></li><li><a href="EventStore.Client.Messages.SubscriptionConfirmation.html">SubscriptionConfirmation</a></li><li><a href="EventStore.Client.Messages.SubscriptionDropped.html">SubscriptionDropped</a></li><li><a href="EventStore.Client.Messages.TransactionCommit.html">TransactionCommit</a></li><li><a href="EventStore.Client.Messages.TransactionCommitCompleted.html">TransactionCommitCompleted</a></li><li><a href="EventStore.Client.Messages.TransactionStart.html">TransactionStart</a></li><li><a href="EventStore.Client.Messages.TransactionStartCompleted.html">TransactionStartCompleted</a></li><li><a href="EventStore.Client.Messages.TransactionWrite.html">TransactionWrite</a></li><li><a href="EventStore.Client.Messages.TransactionWriteCompleted.html">TransactionWriteCompleted</a></li><li><a href="EventStore.Client.Messages.UnsubscribeFromStream.html">UnsubscribeFromStream</a></li><li><a href="EventStore.Client.Messages.UpdatePersistentSubscription.html">UpdatePersistentSubscription</a></li><li><a href="EventStore.Client.Messages.UpdatePersistentSubscriptionCompleted.html">UpdatePersistentSubscriptionCompleted</a></li><li><a href="EventStore.Client.Messages.WriteEvents.html">WriteEvents</a></li><li><a href="EventStore.Client.Messages.WriteEventsCompleted.html">WriteEventsCompleted</a></li><li><a href="EventStoreCatchUpSubscription.html">EventStoreCatchUpSubscription</a></li><li><a href="EventStoreNodeConnection.html">EventStoreNodeConnection</a></li><li><a href="EventStoreTransaction.html">EventStoreTransaction</a></li><li><a href="PersistentSubscriptionCreateResult.html">PersistentSubscriptionCreateResult</a></li><li><a href="PersistentSubscriptionDeleteResult.html">PersistentSubscriptionDeleteResult</a></li><li><a href="PersistentSubscriptionUpdateResult.html">PersistentSubscriptionUpdateResult</a></li><li><a href="Position.html">Position</a></li><li><a href="ProjectionsManager.html">ProjectionsManager</a></li><li><a href="RawStreamMetadataResult.html">RawStreamMetadataResult</a></li><li><a href="RecordedEvent.html">RecordedEvent</a></li><li><a href="ResolvedEvent.html">ResolvedEvent</a></li><li><a href="StreamEventsSlice.html">StreamEventsSlice</a></li><li><a href="UserCredentials.html">UserCredentials</a></li><li><a href="WriteResult.html">WriteResult</a></li></ul><h3>Interfaces</h3><ul><li><a href="EventStore.Client.Messages.ICheckpointReached.html">ICheckpointReached</a></li><li><a href="EventStore.Client.Messages.IClientIdentified.html">IClientIdentified</a></li><li><a href="EventStore.Client.Messages.IConnectToPersistentSubscription.html">IConnectToPersistentSubscription</a></li><li><a href="EventStore.Client.Messages.ICreatePersistentSubscription.html">ICreatePersistentSubscription</a></li><li><a href="EventStore.Client.Messages.ICreatePersistentSubscriptionCompleted.html">ICreatePersistentSubscriptionCompleted</a></li><li><a href="EventStore.Client.Messages.IDeletePersistentSubscription.html">IDeletePersistentSubscription</a></li><li><a href="EventStore.Client.Messages.IDeletePersistentSubscriptionCompleted.html">IDeletePersistentSubscriptionCompleted</a></li><li><a href="EventStore.Client.Messages.IDeleteStream.html">IDeleteStream</a></li><li><a href="EventStore.Client.Messages.IDeleteStreamCompleted.html">IDeleteStreamCompleted</a></li><li><a href="EventStore.Client.Messages.IEventRecord.html">IEventRecord</a></li><li><a href="EventStore.Client.Messages.IFilter.html">IFilter</a></li><li><a href="EventStore.Client.Messages.IFilteredReadAllEvents.html">IFilteredReadAllEvents</a></li><li><a href="EventStore.Client.Messages.IFilteredReadAllEventsCompleted.html">IFilteredReadAllEventsCompleted</a></li><li><a href="EventStore.Client.Messages.IFilteredSubscribeToStream.html">IFilteredSubscribeToStream</a></li><li><a href="EventStore.Client.Messages.IIdentifyClient.html">IIdentifyClient</a></li><li><a href="EventStore.Client.Messages.INewEvent.html">INewEvent</a></li><li><a href="EventStore.Client.Messages.INotHandled.html">INotHandled</a></li><li><a href="EventStore.Client.Messages.IPersistentSubscriptionAckEvents.html">IPersistentSubscriptionAckEvents</a></li><li><a href="EventStore.Client.Messages.IPersistentSubscriptionConfirmation.html">IPersistentSubscriptionConfirmation</a></li><li><a href="EventStore.Client.Messages.IPersistentSubscriptionNakEvents.html">IPersistentSubscriptionNakEvents</a></li><li><a href="EventStore.Client.Messages.IPersistentSubscriptionStreamEventAppeared.html">IPersistentSubscriptionStreamEventAppeared</a></li><li><a href="EventStore.Client.Messages.IReadAllEvents.html">IReadAllEvents</a></li><li><a href="EventStore.Client.Messages.IReadAllEventsCompleted.html">IReadAllEventsCompleted</a></li><li><a href="EventStore.Client.Messages.IReadEvent.html">IReadEvent</a></li><li><a href="EventStore.Client.Messages.IReadEventCompleted.html">IReadEventCompleted</a></li><li><a href="EventStore.Client.Messages.IReadStreamEvents.html">IReadStreamEvents</a></li><li><a href="EventStore.Client.Messages.IReadStreamEventsCompleted.html">IReadStreamEventsCompleted</a></li><li><a href="EventStore.Client.Messages.IRes