Skip to content

Commit

Permalink
Merge pull request #523 from slackapi/rel-v4.1.0
Browse files Browse the repository at this point in the history
Release v4.1.0
  • Loading branch information
aoberoi committed Mar 23, 2018
2 parents b3eabbf + 8f541d1 commit 3bed1fc
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/maintainers_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ script. These two commands should be run each time an API changes to keep the do
### Releasing

0. Update generated content
* Reference docs are updated using `npm run docs:jsdoc`, `npm run docs`
* Reference docs are updated using `npm run docs:jsdoc`, delete the `@property` tagged method aliases from
`support/jsdoc/@slack-client.js`, then `npm run docs`

1. Create the commit for the release:
* Bump the version number in adherence to [Semantic Versioning](http://semver.org/) in `package.json`.
Expand Down
12 changes: 12 additions & 0 deletions docs/_posts/2018-03-23-v4.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: changelog
---

- `IncomingWebhook.send()` works with both callbacks and Promises (#508) - thanks @clavin
- Completes type defintions for all `WebClient` method arguments (#512) - thanks @clavin
- Allows `files.upload` to work with Buffers (in addition to ReadableStreams) (#500) - thanks @KharitonOff
- Allows any WebClient methods argument to work with binary types (#519) - thanks @clavin and @aoberoi
- Fails when `WebClient.apiCall()` options don't look like the right type (#522) - thanks @aoberoi
- Fixes TypeScript compile errors in node >=6 <=8 related to `callbackify` (#518) - thanks @aoberoi
- Fixes mismatched parenthesis in RTMClient usage example documentation (#511) - thanks @parthsr
- Adds `examples` directory back to the repository (#520) - thanks @aoberoi
29 changes: 27 additions & 2 deletions docs/_reference/IncomingWebhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,40 @@ permalink: /reference/IncomingWebhook
A client for Slack's Incoming Webhooks

**Kind**: static class of [<code>@slack/client</code>](#module_@slack/client)

* [.IncomingWebhook](#module_@slack/client.IncomingWebhook)
* [.send(message)](#module_@slack/client.IncomingWebhook+send) ⇒ <code>Promise.&lt;module:@slack/client/dist/IncomingWebhook.IncomingWebhookResult&gt;</code>
* [.send(message, callback)](#module_@slack/client.IncomingWebhook+send)
* [.send(message, callback)](#module_@slack/client.IncomingWebhook+send)

<a name="module_@slack/client.IncomingWebhook+send"></a>

### incomingWebhook.send(message, callback)
### incomingWebhook.send(message) ⇒ <code>Promise.&lt;module:@slack/client/dist/IncomingWebhook.IncomingWebhookResult&gt;</code>
Send a notification to a conversation

**Kind**: instance method of [<code>IncomingWebhook</code>](#module_@slack/client.IncomingWebhook)

| Param | Type | Description |
| --- | --- | --- |
| message | <code>string</code> \| [<code>IncomingWebhookSendArguments</code>](#module_@slack/client.IncomingWebhookSendArguments) | the message (a simple string, or an object describing the message) |
| callback | [<code>IncomingWebhookResultCallback</code>](#module_@slack/client.IncomingWebhookResultCallback) | |

<a name="module_@slack/client.IncomingWebhook+send"></a>

### incomingWebhook.send(message, callback)
**Kind**: instance method of [<code>IncomingWebhook</code>](#module_@slack/client.IncomingWebhook)

| Param | Type |
| --- | --- |
| message | <code>string</code> \| [<code>IncomingWebhookSendArguments</code>](#module_@slack/client.IncomingWebhookSendArguments) |
| callback | [<code>IncomingWebhookResultCallback</code>](#module_@slack/client.IncomingWebhookResultCallback) |

<a name="module_@slack/client.IncomingWebhook+send"></a>

### incomingWebhook.send(message, callback)
**Kind**: instance method of [<code>IncomingWebhook</code>](#module_@slack/client.IncomingWebhook)

| Param | Type |
| --- | --- |
| message | <code>string</code> \| [<code>IncomingWebhookSendArguments</code>](#module_@slack/client.IncomingWebhookSendArguments) |
| callback | [<code>IncomingWebhookResultCallback</code>](#module_@slack/client.IncomingWebhookResultCallback) |

2 changes: 1 addition & 1 deletion docs/_reference/RTMClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ be sent or received.

| Param | Type |
| --- | --- |
| options | <code>module:@slack/client/dist/methods.TokenOverridable</code> \| <code>module:@slack/client/dist/methods.TokenOverridable</code> |
| options | <code>module:@slack/client/dist/methods.TokenOverridable</code> \| <code>module:@slack/client/dist/methods.LocaleAware</code> \| <code>module:@slack/client/dist/methods.__type</code> \| <code>module:@slack/client/dist/methods.TokenOverridable</code> \| <code>module:@slack/client/dist/methods.__type</code> |

<a name="module_@slack/client.RTMClient+subscribePresence"></a>

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@slack/client",
"version": "4.0.1",
"version": "4.1.0",
"description": "Slack Developer Kit - official clients for the Web API, RTM API, and Incoming Webhooks",
"author": "Slack Technologies, Inc.",
"license": "MIT",
Expand Down
38 changes: 38 additions & 0 deletions support/jsdoc/@slack-client-dist-IncomingWebhook.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* @module @slack/client/dist/IncomingWebhook
*/

/**
* @interface module:@slack/client/dist/IncomingWebhook.IncomingWebhookHTTPError
* @extends module:@slack/client.CodedError
* @property {"slackclient_incomingwebhook_http_error"} code
* @property {Error} original
*/
export class IncomingWebhookHTTPError {
}

/**
* @interface module:@slack/client/dist/IncomingWebhook.IncomingWebhookReadError
* @extends module:@slack/client.CodedError
* @property {"slackclient_incomingwebhook_read_error"} code
* @property {Error} original
*/
export class IncomingWebhookReadError {
}

/**
* @interface module:@slack/client/dist/IncomingWebhook.IncomingWebhookRequestError
* @extends module:@slack/client.CodedError
* @property {"slackclient_incomingwebhook_request_error"} code
* @property {Error} original
*/
export class IncomingWebhookRequestError {
}

/**
* @interface module:@slack/client/dist/IncomingWebhook.IncomingWebhookResult
* @property {string} text
*/
export class IncomingWebhookResult {
}

10 changes: 10 additions & 0 deletions support/jsdoc/@slack-client-dist-methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ export class AuxiliaryArguments {
export class CursorPaginationEnabled {
}

/**
* @interface module:@slack/client/dist/methods.Dialog
* @property {string} title
* @property {string} callback_id
* @property {Array<module:@slack/client/dist/methods.__type>} elements
* @property {string} [submit_label]
*/
export class Dialog {
}

/**
* @interface module:@slack/client/dist/methods.LinkUnfurls
*/
Expand Down
19 changes: 18 additions & 1 deletion support/jsdoc/@slack-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
* @property KeepAliveConfigError
* @property KeepAliveClientNotConnected
* @property KeepAliveInconsistentState
* @property IncomingWebhookRequestError
* @property IncomingWebhookReadError
* @property IncomingWebhookHTTPError
*/
export var ErrorCode
/**
Expand Down Expand Up @@ -46,6 +49,20 @@ export class IncomingWebhook {
/**
* Send a notification to a conversation
* @param {string | module:@slack/client.IncomingWebhookSendArguments} message the message (a simple string, or an object describing the message)
* @function module:@slack/client.IncomingWebhook#send
* @returns {Promise<module:@slack/client/dist/IncomingWebhook.IncomingWebhookResult>}
*/
send() {}

/**
* @param {string | module:@slack/client.IncomingWebhookSendArguments} message
* @param {module:@slack/client.IncomingWebhookResultCallback} callback
* @function module:@slack/client.IncomingWebhook#send
*/
send() {}

/**
* @param {string | module:@slack/client.IncomingWebhookSendArguments} message
* @param {module:@slack/client.IncomingWebhookResultCallback} callback
* @function module:@slack/client.IncomingWebhook#send
*/
Expand Down Expand Up @@ -215,7 +232,7 @@ Promise.
/**
* Begin an RTM session using the provided options. This method must be called before any messages can
* be sent or received.
* @param {module:@slack/client/dist/methods.TokenOverridable | module:@slack/client/dist/methods.TokenOverridable} options
* @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
*/
start() {}
Expand Down

0 comments on commit 3bed1fc

Please sign in to comment.