Export types for the objects returned from making requests
The export of types of the objects returned when making requests would be incredibly useful. This would significantly enhance the developer experience by:
- preventing incorrect key accesses
- and other invalid operations on the type of an object or value inside the object
- enhancing IDE intellisense
- integration with linters and static type checkers
I guess you could implement this manually, though it would be amazing if the Slack API did this for you.
Category (place an x in each of the [ ])
- [x] slack_sdk.web.WebClient (sync/async) (Web API client)
- [ ] slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
- [ ] slack_sdk.models (UI component builders)
- [ ] slack_sdk.oauth (OAuth Flow Utilities)
- [ ] slack_sdk.socket_mode (Socket Mode client)
- [ ] slack_sdk.audit_logs (Audit Logs API client)
- [ ] slack_sdk.scim (SCIM API client)
- [ ] slack_sdk.rtm (RTM client)
- [ ] slack_sdk.signature (Request Signature Verifier)
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
Hi @intercepted16, thanks for the suggestion!
Indeed, enhancing the response data types would be greatly helpful for developers. However, the Slack API does not provide open API specs or something similar, so manually crafting response types could be challenging (considering our team capacity and priorities).
I'll keep this issue open for receiving feedback from others; however, we won't be able to take action in the foreseeable future. It'd be appreciated if you could understand this.
@seratch what would your opinion if I'll implement this (manually at this point) and will open a PR adding this?