From 9b75fd0c21605e1fca94a772da756442665e9c01 Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Thu, 30 Jan 2020 12:31:50 +0900 Subject: [PATCH 1/2] Fix #382 Missing invite_requested event type --- src/types/events/base-events.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/types/events/base-events.ts b/src/types/events/base-events.ts index a60009495..ef57c5b88 100644 --- a/src/types/events/base-events.ts +++ b/src/types/events/base-events.ts @@ -45,6 +45,7 @@ export type SlackEvent = | IMCreatedEvent | IMHistoryChangedEvent | IMOpenEvent + | InviteRequestedEvent | LinkSharedEvent | MemberJoinedChannelEvent | MemberLeftChannelEvent @@ -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; + 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; From 8c63cc7bd584aec847fb0a4349ec2b32333eef1f Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Tue, 4 Feb 2020 00:13:45 +0900 Subject: [PATCH 2/2] Make invite_type in InviteRequestedEvent more specific --- src/types/events/base-events.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/events/base-events.ts b/src/types/events/base-events.ts index ef57c5b88..2d35cd663 100644 --- a/src/types/events/base-events.ts +++ b/src/types/events/base-events.ts @@ -426,7 +426,7 @@ export interface InviteRequestedEvent extends StringIndexed { date_created: number; requester_ids: string[]; channel_ids: string[]; - invite_type: string; + invite_type: 'restricted' | 'ultra_restricted' | 'full_member'; real_name: string; date_expire: number; request_reason: string;