Add missing Events API payload types#2155
Conversation
| name: string; | ||
| } | ||
| export interface SharedChannelInviteAccepted { | ||
| export interface SharedChannelInviteAcceptedEvent { |
There was a problem hiding this comment.
For consisteny, renaming all the ones that do not have "Event" suffix
| display_name: string; | ||
| }; | ||
| channel_id: string; | ||
| event_type: 'slack#/events/shared_channel_invite_requested'; |
There was a problem hiding this comment.
I've tested all aboev app_ events but I haven't checked how this goes not on automation platform. This may be nullable or optional.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2155 +/- ##
=======================================
Coverage 82.00% 82.00%
=======================================
Files 18 18
Lines 1539 1539
Branches 442 442
=======================================
Hits 1262 1262
Misses 179 179
Partials 98 98 ☔ View full report in Codecov by Sentry. |
filmaj
left a comment
There was a problem hiding this comment.
LGTM but I left one request re: comment and deprecation for the backwards compatible types, as we inch towards bolt v4.
| accepting_user: SharedChannelUserItem; | ||
| event_ts: string; | ||
| } | ||
| // for backward-compatibility |
There was a problem hiding this comment.
Thank you for doing this!
For my own future hints, esp since I would like to release bolt v4 this year, I add a "TODO (breaking change)" comment in areas for deprecation. Also might be useful to add a JSdoc to signify deprecation and what to move to; this would be raised up to the developer in their IDE at author-time.
| // for backward-compatibility | |
| // TODO: (breaking change) for backward-compatibility; remove non-Event-suffix type in next major version. | |
| /** | |
| * @deprecated Will be removed in next major version. Use the `SharedChannelInviteApprovedEvent` interface instead. | |
| */ |
Could we add a similar comment next to each inconsistently-named backwards-compatible type in this PR?
There was a problem hiding this comment.
Thanks! I will update the comments tomorrow in my timezone!
There was a problem hiding this comment.
@filmaj Updated the comments. Can you check again and mege this PR if it's fine tomorrow?
Summary
This pull request adds a few Events API payloads to the types. See also: slackapi/java-slack-sdk#1332
Requirements (place an
xin each[ ])