-
Notifications
You must be signed in to change notification settings - Fork 662
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
types: add event payloads #1395
Comments
Hi @JMauroNeto, thank for writing in! Could you elaborate a bit more? I might not fully understand the issue you mention here.
You've selected web-api package in the description but are you talking about https://github.com/slackapi/node-slack-sdk/blob/%40slack/types%402.4.0/packages/types/src/index.ts#L42-L53 ? If so, the types package is not auto-generated. We are happy to improve it. The bolt-js project has a duplicated but more complete type definition https://github.com/slackapi/bolt-js/blob/main/src/types/view/index.ts Is this something similar to your own type definition? If you mean the ViewsXXX response types in web-api package, they have the properties that you mentioned correctly (only the too simple If we stop doing so, maintaining the types can be harder. Actually, before starting doing this, we didn't have any type definitions for the API responses. We are not planning to change this approach at least in the short term (if future maintainers want to change this, I'm totally fine with it, though). Thanks again for taking the time to write in here. |
Hey @seratch, thanks for your quick response. Sorry, I've checked the incorrect option, I was actually referring to the file that you mentioned, on @slack/types. And yes, my type definitions are more similar to the types on the bolt-js project. So, can we improve the node sdk, since we have this project as a reference? PS: Btw, I've been using [your types](https://github.com/seratch/seratch-slack-types) for a while, and helped me a lot, thanks again! |
Yes, we are happy to improve it. If you have time and interest, your pull requests are always welcome! If you are busy, this project's maintainers will improve it sometime soon.
Wow, I'm so glad to hear that (and a bit sorry about that I haven't been updating the package for a while 🙇 ) |
@seratch what do you think about trying to integrate https://github.com/seratch/seratch-slack-types into |
@filmaj That sounds great. Perhaps, we may need to manually adjust some parts of it as it's auto-generated, but merging good parts from it should be a good approach. Also, you may be interested in https://github.com/seratch/slack-web-api-client/tree/main/src/block-kit for Block Kit too. The Block Kit typing is more sophisticated than any others. |
@slack/types
Ooo nice! Absolutely interested! I have updated the title of this issue and assigned it to the 3.0 milestone for the |
Sorry, I left the project where I used to work with the types mentioned when I opened the issue. By the way, can I help with something? |
👋 Hi @JMauroNeto One thing perhaps that you can assist with: in your original submission you mentioned:
Do you have any types that you created that you found helpful for your projects? I'm trying to aggregate projects where devs are formalizing the types that are useful to them. I'd like to make improvements to the |
@slack/types
Edits
What about adding types for event payloads to the types package? This could be used to then help address a variety of issues across different packages (bolt, socket-mode, deno-sdk):
Original Message
Is really necessary to use the type generator instead of manually improve types? I've found out that the ModalView is missing some parameters, like
app_installed_team_id
,id
andstate
. About thestate
, on the places that have references to it, it is just a string, it could be so much better. Depending on your answer, I can help you with the types that I've created.Packages:
Select all that apply:
@slack/web-api
@slack/types
@slack/rtm-api
@slack/webhooks
@slack/oauth
@slack/socket-mode
The text was updated successfully, but these errors were encountered: