Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix file upload - consider metadata options by creating form data #500

Merged
merged 30 commits into from
Mar 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e58136b
update node/npm and reinstall packages
aoberoi Mar 14, 2018
5feaa6b
add unit tests for WebClient without a token
aoberoi Mar 14, 2018
e6580bb
adds typings-tester, and failing test for WebClient without token
aoberoi Mar 14, 2018
70b2d74
lintstaged ignores test typescript
aoberoi Mar 14, 2018
99db715
allow WebClient token to be undefined, fixes #482
aoberoi Mar 14, 2018
93d8350
allow integration test cases to take up to 4s before timing out
aoberoi Mar 14, 2018
73dea90
fix file upload - consider metadata options by creating form data, re…
KharitonOff Mar 14, 2018
8e4d4ee
fix unregular build failure
KharitonOff Mar 14, 2018
9d0801c
remove nyc from integration tests, it broke codecov
aoberoi Mar 14, 2018
805dd6f
Merge pull request #499 from aoberoi/webclient-no-token
aoberoi Mar 14, 2018
5ce84bb
exports method argument types, fixes #483
aoberoi Mar 14, 2018
dee4b03
Merge pull request #502 from aoberoi/export-method-argument-types
aoberoi Mar 14, 2018
7f8e5b7
more tightly specifies OAuthAccessArguments and OAuthTokenArguments, …
aoberoi Mar 14, 2018
8e4da08
removes pjson and directly requires package.json, fixes #478
aoberoi Mar 14, 2018
945439a
Merge pull request #504 from aoberoi/remove-pjson
aoberoi Mar 14, 2018
501b0af
update for boolean flag quirk
aoberoi Mar 14, 2018
6902c4e
Merge pull request #503 from aoberoi/oauth-argument-types
aoberoi Mar 14, 2018
8ce3b61
v4.0.1
aoberoi Mar 14, 2018
a206c3e
Merge pull request #506 from slackapi/rel-v4.0.1
aoberoi Mar 15, 2018
e96b059
add assertion for filename
KharitonOff Mar 15, 2018
ba661a7
put forEach statement in one line
KharitonOff Mar 15, 2018
45c7702
fix file upload - consider metadata options by creating form data, re…
KharitonOff Mar 14, 2018
c1d65b5
fix unregular build failure
KharitonOff Mar 14, 2018
bb58541
add assertion for filename
KharitonOff Mar 15, 2018
e7bbd38
put forEach statement in one line
KharitonOff Mar 15, 2018
f5596ba
resolve merge conflict
KharitonOff Mar 15, 2018
b0a7d94
resolve merge conflict
KharitonOff Mar 15, 2018
1899050
increase test timeout in order to avoid unexpected build failure
KharitonOff Mar 15, 2018
6de72b3
increase mocha tests timeout to 10 sec
KharitonOff Mar 16, 2018
7c89cac
remove check for options in file attribute, remove unit test
KharitonOff Mar 20, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"*.ts": ["tslint --project . --fix", "git add"]
"linters": {
"*.ts": ["tslint --project . --fix", "git add"]
},
"ignore": ["test/**/*.ts"]
}
11 changes: 6 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"typescript.tsdk": "./node_modules/typescript/lib",
"editor.rulers": [
120
]
}
"typescript.tsdk": "./node_modules/typescript/lib",
"editor.rulers": [
120
],
"editor.tabSize": 2,
}
12 changes: 12 additions & 0 deletions docs/_posts/2018-03-14-v4.0.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: changelog
---

- Fixes crash in projects where `"name"` or `"version"` were not defined in the `package.json` file (#478) - thanks @wilhelmklopp @clavin @aoberoi
- Fixes `IncomingWebhook.send()` to parse the response as text instead of JSON (#477) - thanks @aoberoi
- Allows `IncomingWebhook` to be initialized without defaults (#479) - thanks @aoberoi
- Allows `WebClient` to be initialized without a `token` in TypeScript (#482) - thanks @aoberoi
- Allows unspecificed arguments to be used with `WebClient` method aliases and `apiCall()` (#484) - thanks @clavin
- Exports method argument types as top level exports in the type declarations (#483) - thanks @aoberoi
- Fixes inaccurate property type for `as_user` in `ChatPostMessageArguments` (#475) - thanks @harveyr
- Improves the `OAuthAccessArguments` and `OAuthTokenArguments` types (#481) - thanks @aoberoi
23 changes: 12 additions & 11 deletions docs/_reference/WebClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ A client for Slack's Web API
This client provides an alias for each [Web API method](https://api.slack.com/methods). Each method is
a convenience wrapper for calling the [WebClient#apiCall](WebClient#apiCall) method using the method name as the first parameter.

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

| Name | Type | Description |
| --- | --- | --- |
| [token] | <code>string</code> | Authentication and authorization token for accessing Slack Web API (usually begins with `xoxp`, `xoxb`, or `xoxa`) |
| [slackApiUrl] | <code>string</code> | The base URL for reaching Slack's Web API. Consider changing this value for testing purposes. |


* [.WebClient](#module_@slack/client.WebClient) ⇐ <code>EventEmitter</code>
* [.apiCall(method, options)](#module_@slack/client.WebClient+apiCall) ⇒ [<code>Promise.&lt;WebAPICallResult&gt;</code>](#module_@slack/client.WebAPICallResult)
* [.apiCall(method, options, callback)](#module_@slack/client.WebClient+apiCall)
Expand All @@ -27,7 +28,7 @@ a convenience wrapper for calling the [WebClient#apiCall](WebClient#apiCall) met
### webClient.apiCall(method, options) ⇒ [<code>Promise.&lt;WebAPICallResult&gt;</code>](#module_@slack/client.WebAPICallResult)
Generic method for calling a Web API method

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

| Param | Type | Description |
| --- | --- | --- |
Expand All @@ -37,22 +38,22 @@ Generic method for calling a Web API method
<a name="module_@slack/client.WebClient+apiCall"></a>

### webClient.apiCall(method, options, callback)
**Kind**: instance method of [<code>WebClient</code>](#module_@slack/client.WebClient)
**Kind**: instance method of [<code>WebClient</code>](#module_@slack/client.WebClient)

| Param | Type |
| --- | --- |
| method | <code>string</code> |
| options | [<code>WebAPICallOptions</code>](#module_@slack/client.WebAPICallOptions) |
| callback | [<code>WebAPIResultCallback</code>](#module_@slack/client.WebAPIResultCallback) |
| method | <code>string</code> |
| options | [<code>WebAPICallOptions</code>](#module_@slack/client.WebAPICallOptions) |
| callback | [<code>WebAPIResultCallback</code>](#module_@slack/client.WebAPIResultCallback) |

<a name="module_@slack/client.WebClient+apiCall"></a>

### webClient.apiCall(method, options, callback)
**Kind**: instance method of [<code>WebClient</code>](#module_@slack/client.WebClient)
**Kind**: instance method of [<code>WebClient</code>](#module_@slack/client.WebClient)

| Param | Type |
| --- | --- |
| method | <code>string</code> |
| options | [<code>WebAPICallOptions</code>](#module_@slack/client.WebAPICallOptions) |
| callback | [<code>WebAPIResultCallback</code>](#module_@slack/client.WebAPIResultCallback) |
| method | <code>string</code> |
| options | [<code>WebAPICallOptions</code>](#module_@slack/client.WebAPICallOptions) |
| callback | [<code>WebAPIResultCallback</code>](#module_@slack/client.WebAPIResultCallback) |

Loading