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

Fix #382 Missing invite_requested event type #387

Merged
merged 3 commits into from
Feb 4, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/types/events/base-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export type SlackEvent =
| IMCreatedEvent
| IMHistoryChangedEvent
| IMOpenEvent
| InviteRequestedEvent
| LinkSharedEvent
| MemberJoinedChannelEvent
| MemberLeftChannelEvent
Expand Down Expand Up @@ -417,6 +418,26 @@ export interface IMOpenEvent extends StringIndexed {
channel: string;
}

export interface InviteRequestedEvent extends StringIndexed {
type: 'invite_requested';
invite_request: {
id: string;
email: string;
date_created: number;
requester_ids: string[];
channel_ids: string[];
invite_type: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are three specific strings the invite_type value can be: restricted, ultra_restricted, or full_member. source: https://api.slack.com/admins/inviting#events

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aoberoi Good catch! I just modified it to be more specific. 👍

real_name: string;
date_expire: number;
request_reason: string;
team: {
id: string;
name: string;
domain: string;
}
};
}

export interface LinkSharedEvent extends StringIndexed {
type: 'link_shared';
channel: string;
Expand Down