-
Notifications
You must be signed in to change notification settings - Fork 399
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
Make API response types more specific utilizing the types in web-api 6.2 #915
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments for reviewers
@@ -46,7 +46,7 @@ | |||
"@slack/oauth": "^2.0.0", | |||
"@slack/socket-mode": "^1.0.0", | |||
"@slack/types": "^2.0.0", | |||
"@slack/web-api": "^6.0.0", | |||
"@slack/web-api": "^6.2.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this PR require the latest version of the package.
src/receivers/SocketModeReceiver.ts
Outdated
@@ -148,6 +148,8 @@ export default class SocketModeReceiver implements Receiver { | |||
|
|||
public start(): Promise<void | WebAPICallResult> { | |||
// start socket mode client | |||
// TODO: We can update the returned type from WebAPICallResult to AppsConnectionsOpenResponse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine to hold off merging this PR until this TODO fix if others think we should do so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to hold off on merging the PR. What's blocking us from updating the returned type to AppsConnectionsOpenResponse
?
Edit: Oh, I just finished reviewing slackapi/node-slack-sdk#1234 and noticed it updates AppsConnectionsOpenResponse
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will update this part after releasing @slack/[email protected]
- slackapi/node-slack-sdk#1239
Codecov Report
@@ Coverage Diff @@
## main #915 +/- ##
=======================================
Coverage 66.19% 66.19%
=======================================
Files 13 13
Lines 1207 1207
Branches 356 356
=======================================
Hits 799 799
Misses 338 338
Partials 70 70
Continue to review full report at Codecov.
|
src/receivers/SocketModeReceiver.ts
Outdated
@@ -148,6 +148,8 @@ export default class SocketModeReceiver implements Receiver { | |||
|
|||
public start(): Promise<void | WebAPICallResult> { | |||
// start socket mode client | |||
// TODO: We can update the returned type from WebAPICallResult to AppsConnectionsOpenResponse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to hold off on merging the PR. What's blocking us from updating the returned type to AppsConnectionsOpenResponse
?
Edit: Oh, I just finished reviewing slackapi/node-slack-sdk#1234 and noticed it updates AppsConnectionsOpenResponse
.
1b50377
to
1ff444e
Compare
Summary
This pull request updates a few parts of this library to utilize the newly introduced more specific API response types. As all the new types inherit
WebAPICallResult
interface, these change are backward-compatible.Requirements (place an
x
in each[ ]
)