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

Strong type api method responses #509

Closed
4 of 9 tasks
bilby91 opened this issue Mar 15, 2018 · 5 comments
Closed
4 of 9 tasks

Strong type api method responses #509

bilby91 opened this issue Mar 15, 2018 · 5 comments
Labels
area:typescript issues that specifically impact using the package from typescript projects enhancement M-T: A feature request for new functionality

Comments

@bilby91
Copy link

bilby91 commented Mar 15, 2018

Description

Hello, I'm continuing my migration for botbuilder-slack to the new 4.x release. Today I realized that the responses from method calls are not type dependent on the method invocation, response type for every api call is Promise<WebAPICallResult>. Is there any plan to support strong typed responses ? I can work on this with my previous typings.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.
@aoberoi
Copy link
Contributor

aoberoi commented Mar 15, 2018

@bilby91 I’m glad to see your migration continue!

We’re having a discussion about a few different ways to get richer types in another issue. Specifically, I mentioned exactly what you’re asking for in point (4) in this comment. I’d really appreciate your participation in that discussion so we can potentially come up with the steps to get there and divide the work.

@aoberoi aoberoi added enhancement M-T: A feature request for new functionality area:typescript issues that specifically impact using the package from typescript projects labels Mar 15, 2018
@aoberoi aoberoi mentioned this issue Jul 25, 2018
9 tasks
@bilby91
Copy link
Author

bilby91 commented Jan 28, 2020

Hello @aoberoi !!

I've been looking into the issues and PRs and it seems that there has been some progress on response typings :)

Are they complete by this moment ?

@stevengill
Copy link
Member

There is a PR open currently adding typing for web api responses. #1078. We are hoping to land these changes in the next few months.

@jonocairns
Copy link

jonocairns commented Feb 15, 2021

Is the main reasoning here that the API runs at it's own version - thus the package version can not really guarantee the responses are absolutely correct? These types would still be really handy to have imo as it's better than nothing (even if they're just the latest API version)!

@seratch seratch added this to the [email protected] milestone Apr 30, 2021
@seratch
Copy link
Member

seratch commented Apr 30, 2021

Let me closet this issue as #1188 added response types.

The pre-released version 6.2.0-rc.0 including the response types is already available: https://www.npmjs.com/package/@slack/web-api/v/6.2.0-rc.0

We are going to release v6.2.0 before long!

@seratch seratch closed this as completed Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:typescript issues that specifically impact using the package from typescript projects enhancement M-T: A feature request for new functionality
Projects
None yet
Development

No branches or pull requests

5 participants