From fde80c7ebc72aae15b0c00676aa8326ab5b50f8d Mon Sep 17 00:00:00 2001 From: Ankur Oberoi Date: Fri, 24 Aug 2018 16:49:53 -0700 Subject: [PATCH] v4.5.0 --- docs/_posts/2018-08-24-v4.5.0.md | 12 ++++++++++++ docs/_reference/RTMClient.md | 8 ++++---- package.json | 2 +- support/jsdoc/@slack-client-dist-methods.js | 8 ++++++++ support/jsdoc/@slack-client.js | 2 ++ 5 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 docs/_posts/2018-08-24-v4.5.0.md diff --git a/docs/_posts/2018-08-24-v4.5.0.md b/docs/_posts/2018-08-24-v4.5.0.md new file mode 100644 index 000000000..26ad7c535 --- /dev/null +++ b/docs/_posts/2018-08-24-v4.5.0.md @@ -0,0 +1,12 @@ +--- +layout: changelog +--- + +## New Features + +- `RTMClient.start()` now returns a Promise that resolves with the data emitted with the `authenticated` event - thanks @clavin (#611) +- Adds the `state` property to the type definition of `Dialog` - thanks @DominikPalo (#619) + +## Bug Fixes + +- Fixes an issue where `RTMClient` did not emit the `"disconnected"` event when it fails to connect - thanks @clavin (#610) diff --git a/docs/_reference/RTMClient.md b/docs/_reference/RTMClient.md index 1c7c94fe2..fd97f021f 100644 --- a/docs/_reference/RTMClient.md +++ b/docs/_reference/RTMClient.md @@ -23,13 +23,13 @@ messages. * [.addOutgoingEvent(awaitReply, type, body)](#module_@slack/client.RTMClient+addOutgoingEvent) ⇒ Promise.<(void\|module:@slack/client.RTMCallResult)> * [.addOutgoingEvent(awaitReply, type, body)](#module_@slack/client.RTMClient+addOutgoingEvent) ⇒ [Promise.<RTMCallResult>](#module_@slack/client.RTMCallResult) * [.addOutgoingEvent(awaitReply, type, body)](#module_@slack/client.RTMClient+addOutgoingEvent) ⇒ Promise.<void> - * [.disconnect()](#module_@slack/client.RTMClient+disconnect) + * [.disconnect()](#module_@slack/client.RTMClient+disconnect) ⇒ Promise.<void> * [.send(type, body)](#module_@slack/client.RTMClient+send) ⇒ Promise.<number> * [.sendMessage(text, conversationId)](#module_@slack/client.RTMClient+sendMessage) ⇒ [Promise.<RTMCallResult>](#module_@slack/client.RTMCallResult) * [.sendMessage(text, conversationId, callback)](#module_@slack/client.RTMClient+sendMessage) * [.sendMessage(text, conversationId, callback)](#module_@slack/client.RTMClient+sendMessage) * [.sendTyping(conversationId)](#module_@slack/client.RTMClient+sendTyping) ⇒ Promise.<void> - * [.start(options)](#module_@slack/client.RTMClient+start) + * [.start(options)](#module_@slack/client.RTMClient+start) ⇒ [Promise.<WebAPICallResult>](#module_@slack/client.WebAPICallResult) * [.subscribePresence(userIds)](#module_@slack/client.RTMClient+subscribePresence) ⇒ Promise.<void> @@ -79,7 +79,7 @@ from the websocket. -### rtmClient.disconnect() +### rtmClient.disconnect() ⇒ Promise.<void> End an RTM session. After this method is called no messages will be sent or received unless you call start() again later. @@ -147,7 +147,7 @@ Sends a typing indicator to indicate that the user with `activeUserId` is typing -### rtmClient.start(options) +### rtmClient.start(options) ⇒ [Promise.<WebAPICallResult>](#module_@slack/client.WebAPICallResult) Begin an RTM session using the provided options. This method must be called before any messages can be sent or received. diff --git a/package.json b/package.json index 384f9bdc3..fa0c9d38d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@slack/client", - "version": "4.4.0", + "version": "4.5.0", "description": "Slack Developer Kit - official clients for the Web API, RTM API, and Incoming Webhooks", "author": "Slack Technologies, Inc.", "license": "MIT", diff --git a/support/jsdoc/@slack-client-dist-methods.js b/support/jsdoc/@slack-client-dist-methods.js index 72a2e4e67..272907f2c 100644 --- a/support/jsdoc/@slack-client-dist-methods.js +++ b/support/jsdoc/@slack-client-dist-methods.js @@ -57,6 +57,7 @@ export class CursorPaginationEnabled { * @property {Array} elements * @property {string} [submit_label] * @property {boolean} [notify_on_cancel] + * @property {string} [state] */ export class Dialog { } @@ -155,3 +156,10 @@ export class TokenOverridable { export class TraditionalPagingEnabled { } +/** + * @interface module:@slack/client/dist/methods.UserPerspectiveEnabled + * @property {string} [on_behalf_of] + */ +export class UserPerspectiveEnabled { +} + diff --git a/support/jsdoc/@slack-client.js b/support/jsdoc/@slack-client.js index b701d0ed9..abcb4661f 100644 --- a/support/jsdoc/@slack-client.js +++ b/support/jsdoc/@slack-client.js @@ -188,6 +188,7 @@ Promise. * End an RTM session. After this method is called no messages will be sent or received unless you call * start() again later. * @function module:@slack/client.RTMClient#disconnect + * @returns {Promise} */ disconnect() {} @@ -242,6 +243,7 @@ Promise. * be sent or received. * @param {module:@slack/client/dist/methods.TokenOverridable | module:@slack/client/dist/methods.LocaleAware | module:@slack/client/dist/methods.__type | module:@slack/client/dist/methods.TokenOverridable | module:@slack/client/dist/methods.__type} options * @function module:@slack/client.RTMClient#start + * @returns {Promise} */ start() {}