From 1167541736640d33c407302a875fd063f512c9a6 Mon Sep 17 00:00:00 2001 From: "Deployment Bot (from Travis CI)" Date: Mon, 24 Aug 2020 08:19:58 +0000 Subject: [PATCH] Deploy retailcrm/mg-bot-api-client-js to github.com/retailcrm/mg-bot-api-client-js.git:gh-pages --- Client.html | 704 +++++++++++++++++++++++++++++++++++++++++++++- consts.js.html | 2 +- global.html | 2 +- index.html | 2 +- v1_client.js.html | 60 +++- 5 files changed, 754 insertions(+), 16 deletions(-) diff --git a/Client.html b/Client.html index b770e98..d205073 100644 --- a/Client.html +++ b/Client.html @@ -439,7 +439,7 @@
Source:
@@ -609,7 +609,7 @@
Source:
@@ -779,7 +779,7 @@
Source:
@@ -972,7 +972,7 @@
Source:
@@ -1165,7 +1165,347 @@
Source:
+ + + + + + + + + + + + + + + + + + + + + +
Throws:
+ + + +
+ + +Error + + + +
+ + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + + + + + +

(static) filesUpload(data) → {Promise}

+ + + + + + +
+ Upload file +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
data + + +string + + + + Binary data
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Throws:
+ + + +
+ + +Error + + + +
+ + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + + + + + +

(static) filesUploadByUrl(url) → {Promise}

+ + + + + + +
+ Upload file by url +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
url + + +string + + + + File url address
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -1800,7 +2140,7 @@
Source:
@@ -2164,6 +2504,176 @@ +

(static) getFile(file_id) → {Promise}

+ + + + + + +
+ Get file information +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
file_id + + +string + + + + File identifier
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Throws:
+ + + +
+ + +Error + + + +
+ + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + + + + + +

(static) getMembers(params) → {Promise}

@@ -2420,7 +2930,7 @@
Source:
@@ -2575,7 +3085,7 @@
Source:
@@ -2730,7 +3240,7 @@
Source:
@@ -2900,7 +3410,7 @@
Source:
@@ -3055,7 +3565,7 @@
Source:
@@ -3104,6 +3614,176 @@ + + + + + +

(static) unassignDialog(dialog_id) → {Promise}

+ + + + + + +
+ Unassign dialog +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
dialog_id + + +Number + + + + Dialog id
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + +
Throws:
+ + + +
+ + +Error + + + +
+ + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise + + +
+
+ + + + + + + + @@ -3125,7 +3805,7 @@
- Documentation generated by JSDoc 3.6.5 on Tue Aug 18 2020 14:41:55 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.5 on Mon Aug 24 2020 08:19:52 GMT+0000 (Coordinated Universal Time)
diff --git a/consts.js.html b/consts.js.html index b9a15a8..193595c 100644 --- a/consts.js.html +++ b/consts.js.html @@ -254,7 +254,7 @@ export const msgTypeImage = 'image';
- Documentation generated by JSDoc 3.6.5 on Tue Aug 18 2020 14:41:55 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.5 on Mon Aug 24 2020 08:19:52 GMT+0000 (Coordinated Universal Time)
diff --git a/global.html b/global.html index ef654af..87e479a 100644 --- a/global.html +++ b/global.html @@ -2122,7 +2122,7 @@
- Documentation generated by JSDoc 3.6.5 on Tue Aug 18 2020 14:41:55 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.5 on Mon Aug 24 2020 08:19:52 GMT+0000 (Coordinated Universal Time)
diff --git a/index.html b/index.html index e7f2d64..9b69302 100644 --- a/index.html +++ b/index.html @@ -146,7 +146,7 @@ ws.on('message', function (content) {
- Documentation generated by JSDoc 3.6.5 on Tue Aug 18 2020 14:41:55 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.5 on Mon Aug 24 2020 08:19:52 GMT+0000 (Coordinated Universal Time)
diff --git a/v1_client.js.html b/v1_client.js.html index 1e85f8c..76e0030 100644 --- a/v1_client.js.html +++ b/v1_client.js.html @@ -111,6 +111,21 @@ export default class Client { 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 * @param {Number} dialog_id - Dialog id @@ -238,6 +253,49 @@ export default class Client { 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 * @param {array<string>} events - Array of strings with websocket events @@ -283,7 +341,7 @@ export default class Client {
- Documentation generated by JSDoc 3.6.5 on Tue Aug 18 2020 14:41:55 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.5 on Mon Aug 24 2020 08:19:52 GMT+0000 (Coordinated Universal Time)