1
0
mirror of synced 2024-11-29 15:26:03 +03:00

Deploy retailcrm/mg-bot-api-client-js to github.com/retailcrm/mg-bot-api-client-js.git:gh-pages

This commit is contained in:
Deployment Bot (from Travis CI) 2020-08-24 08:19:58 +00:00
parent f2f05951c1
commit 1167541736
5 changed files with 754 additions and 16 deletions

View File

@ -439,7 +439,7 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li> <dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line93">line 93</a> <a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line108">line 108</a>
</li></ul></dd> </li></ul></dd>
@ -609,7 +609,7 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li> <dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line185">line 185</a> <a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line200">line 200</a>
</li></ul></dd> </li></ul></dd>
@ -779,7 +779,7 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li> <dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line128">line 128</a> <a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line143">line 143</a>
</li></ul></dd> </li></ul></dd>
@ -972,7 +972,7 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li> <dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line170">line 170</a> <a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line185">line 185</a>
</li></ul></dd> </li></ul></dd>
@ -1165,7 +1165,347 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li> <dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line144">line 144</a> <a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line159">line 159</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise</span>
</dd>
</dl>
<h4 class="name" id=".filesUpload"><span class="type-signature">(static) </span>filesUpload<span class="signature">(data)</span><span class="type-signature"> &rarr; {Promise}</span></h4>
<div class="description">
Upload file
</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>data</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Binary data</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line251">line 251</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise</span>
</dd>
</dl>
<h4 class="name" id=".filesUploadByUrl"><span class="type-signature">(static) </span>filesUploadByUrl<span class="signature">(url)</span><span class="type-signature"> &rarr; {Promise}</span></h4>
<div class="description">
Upload file by url
</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>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">File url address</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line263">line 263</a>
</li></ul></dd> </li></ul></dd>
@ -1800,7 +2140,7 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li> <dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line158">line 158</a> <a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line173">line 173</a>
</li></ul></dd> </li></ul></dd>
@ -2164,6 +2504,176 @@
<h4 class="name" id=".getFile"><span class="type-signature">(static) </span>getFile<span class="signature">(file_id)</span><span class="type-signature"> &rarr; {Promise}</span></h4>
<div class="description">
Get file information
</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>file_id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">File identifier</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line235">line 235</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise</span>
</dd>
</dl>
<h4 class="name" id=".getMembers"><span class="type-signature">(static) </span>getMembers<span class="signature">(params)</span><span class="type-signature"> &rarr; {Promise}</span></h4> <h4 class="name" id=".getMembers"><span class="type-signature">(static) </span>getMembers<span class="signature">(params)</span><span class="type-signature"> &rarr; {Promise}</span></h4>
@ -2420,7 +2930,7 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li> <dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line117">line 117</a> <a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line132">line 132</a>
</li></ul></dd> </li></ul></dd>
@ -2575,7 +3085,7 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li> <dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line209">line 209</a> <a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line224">line 224</a>
</li></ul></dd> </li></ul></dd>
@ -2730,7 +3240,7 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li> <dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line220">line 220</a> <a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line278">line 278</a>
</li></ul></dd> </li></ul></dd>
@ -2900,7 +3410,7 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li> <dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line199">line 199</a> <a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line214">line 214</a>
</li></ul></dd> </li></ul></dd>
@ -3055,7 +3565,7 @@
<dt class="tag-source">Source:</dt> <dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li> <dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line107">line 107</a> <a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line122">line 122</a>
</li></ul></dd> </li></ul></dd>
@ -3109,6 +3619,176 @@
<h4 class="name" id=".unassignDialog"><span class="type-signature">(static) </span>unassignDialog<span class="signature">(dialog_id)</span><span class="type-signature"> &rarr; {Promise}</span></h4>
<div class="description">
Unassign dialog
</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>dialog_id</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">Dialog id</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="v1_client.js.html">v1/client.js</a>, <a href="v1_client.js.html#line93">line 93</a>
</li></ul></dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<span class="param-type">Error</span>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise</span>
</dd>
</dl>
</article> </article>
</section> </section>
@ -3125,7 +3805,7 @@
<br class="clear"> <br class="clear">
<footer> <footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Tue Aug 18 2020 14:41:55 GMT+0000 (Coordinated Universal Time) Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Mon Aug 24 2020 08:19:52 GMT+0000 (Coordinated Universal Time)
</footer> </footer>
<script> prettyPrint(); </script> <script> prettyPrint(); </script>

View File

@ -254,7 +254,7 @@ export const msgTypeImage = 'image';
<br class="clear"> <br class="clear">
<footer> <footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Tue Aug 18 2020 14:41:55 GMT+0000 (Coordinated Universal Time) Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Mon Aug 24 2020 08:19:52 GMT+0000 (Coordinated Universal Time)
</footer> </footer>
<script> prettyPrint(); </script> <script> prettyPrint(); </script>

View File

@ -2122,7 +2122,7 @@
<br class="clear"> <br class="clear">
<footer> <footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Tue Aug 18 2020 14:41:55 GMT+0000 (Coordinated Universal Time) Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Mon Aug 24 2020 08:19:52 GMT+0000 (Coordinated Universal Time)
</footer> </footer>
<script> prettyPrint(); </script> <script> prettyPrint(); </script>

View File

@ -146,7 +146,7 @@ ws.on('message', function (content) {
<br class="clear"> <br class="clear">
<footer> <footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Tue Aug 18 2020 14:41:55 GMT+0000 (Coordinated Universal Time) Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Mon Aug 24 2020 08:19:52 GMT+0000 (Coordinated Universal Time)
</footer> </footer>
<script> prettyPrint(); </script> <script> prettyPrint(); </script>

View File

@ -111,6 +111,21 @@ export default class Client {
return this._request.patch(this._version + '/dialogs/'+ dialog_id + '/assign', dialog); return this._request.patch(this._version + '/dialogs/'+ dialog_id + '/assign', dialog);
}; };
/**
* Unassign dialog
* @param {Number} dialog_id - Dialog id
* @returns {Promise}
* @throws {Error}
* @memberOf Client
*/
unassignDialog(dialog_id) {
if (!dialog_id) {
throw new Error('Parameter `dialog_id` is required');
}
return this._request.patch(this._version + '/dialogs/'+ dialog_id + '/unassign', {});
}
/** /**
* Close dialog * Close dialog
* @param {Number} dialog_id - Dialog id * @param {Number} dialog_id - Dialog id
@ -238,6 +253,49 @@ export default class Client {
return this._request.get(this._version + '/users', params); return this._request.get(this._version + '/users', params);
}; };
/**
* Get file information
* @param {string} file_id - File identifier
* @returns {Promise}
* @throws {Error}
* @memberOf Client
*/
getFile(file_id) {
if (!file_id) {
throw new Error('Parameter `file_id` is required');
}
return this._request.get(this._version + '/files/' + file_id)
}
/**
* Upload file
*
* @param {string} data - Binary data
* @returns {Promise}
* @throws {Error}
* @memberOf Client
*/
filesUpload(data) {
return this._request.post(this._version + '/files/upload', data, false);
}
/**
* Upload file by url
*
* @param {string} url - File url address
* @returns {Promise}
* @throws {Error}
* @memberOf Client
*/
filesUploadByUrl(url) {
if (!url) {
throw new Error('Parameter `url` is required');
}
return this._request.post(this._version + '/files/upload_by_url', {url})
}
/** /**
* Get websocket url * Get websocket url
* @param {array&lt;string>} events - Array of strings with websocket events * @param {array&lt;string>} events - Array of strings with websocket events
@ -283,7 +341,7 @@ export default class Client {
<br class="clear"> <br class="clear">
<footer> <footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Tue Aug 18 2020 14:41:55 GMT+0000 (Coordinated Universal Time) Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Mon Aug 24 2020 08:19:52 GMT+0000 (Coordinated Universal Time)
</footer> </footer>
<script> prettyPrint(); </script> <script> prettyPrint(); </script>