-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing event data types (#1332)
- Loading branch information
Showing
14 changed files
with
280 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
slack-api-model/src/main/java/com/slack/api/model/connect/ConnectRequestActor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.slack.api.model.connect; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class ConnectRequestActor { | ||
private String id; | ||
private String name; | ||
@SerializedName("is_bot") | ||
private boolean bot; | ||
private String teamId; | ||
private String timezone; | ||
private String realName; | ||
private String displayName; | ||
} |
20 changes: 20 additions & 0 deletions
20
slack-api-model/src/main/java/com/slack/api/model/event/AppDeletedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.slack.api.model.event; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* https://api.slack.com/events/app_deleted | ||
*/ | ||
@Data | ||
public class AppDeletedEvent implements Event { | ||
|
||
public static final String TYPE_NAME = "app_deleted"; | ||
|
||
private final String type = TYPE_NAME; | ||
private String appId; | ||
private String appName; | ||
private String appOwnerId; | ||
private String teamId; | ||
private String teamDomain; | ||
private String eventTs; | ||
} |
21 changes: 21 additions & 0 deletions
21
slack-api-model/src/main/java/com/slack/api/model/event/AppInstalledEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.slack.api.model.event; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* https://api.slack.com/events/app_installed | ||
*/ | ||
@Data | ||
public class AppInstalledEvent implements Event { | ||
|
||
public static final String TYPE_NAME = "app_installed"; | ||
|
||
private final String type = TYPE_NAME; | ||
private String appId; | ||
private String appName; | ||
private String appOwnerId; | ||
private String user_id; | ||
private String teamId; | ||
private String teamDomain; | ||
private String eventTs; | ||
} |
21 changes: 21 additions & 0 deletions
21
slack-api-model/src/main/java/com/slack/api/model/event/AppUninstalledTeamEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.slack.api.model.event; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* https://api.slack.com/events/app_uninstalled_team | ||
*/ | ||
@Data | ||
public class AppUninstalledTeamEvent implements Event { | ||
|
||
public static final String TYPE_NAME = "app_uninstalled_team"; | ||
|
||
private final String type = TYPE_NAME; | ||
private String appId; | ||
private String appName; | ||
private String appOwnerId; | ||
private String user_id; | ||
private String teamId; | ||
private String teamDomain; | ||
private String eventTs; | ||
} |
37 changes: 37 additions & 0 deletions
37
...-api-model/src/main/java/com/slack/api/model/event/SharedChannelInviteRequestedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.slack.api.model.event; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import com.slack.api.model.connect.ConnectRequestActor; | ||
import com.slack.api.model.connect.ConnectTeam; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* https://api.slack.com/events/shared_channel_invite_requested | ||
*/ | ||
@Data | ||
public class SharedChannelInviteRequestedEvent implements Event { | ||
|
||
public static final String TYPE_NAME = "shared_channel_invite_requested"; | ||
|
||
private final String type = TYPE_NAME; | ||
private ConnectRequestActor actor; | ||
private String channelId; | ||
private String eventType; | ||
private String channelName; | ||
private String channelType; | ||
private List<TargetUser> targetUsers; | ||
private List<ConnectTeam> teamsInChannel; | ||
@SerializedName("is_external_limited") | ||
private boolean externalLimited; | ||
private Integer channelDateCreated; | ||
private Integer channelMessageLatestCountedTimestamp; | ||
private String eventTs; | ||
|
||
@Data | ||
public static class TargetUser { | ||
private String email; | ||
private String inviteId; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...app-backend/src/main/java/com/slack/api/app_backend/events/handler/AppDeletedHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.slack.api.app_backend.events.handler; | ||
|
||
import com.slack.api.app_backend.events.EventHandler; | ||
import com.slack.api.app_backend.events.payload.AppDeletedPayload; | ||
import com.slack.api.model.event.AppDeletedEvent; | ||
|
||
public abstract class AppDeletedHandler extends EventHandler<AppDeletedPayload> { | ||
|
||
@Override | ||
public String getEventType() { | ||
return AppDeletedEvent.TYPE_NAME; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...p-backend/src/main/java/com/slack/api/app_backend/events/handler/AppInstalledHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.slack.api.app_backend.events.handler; | ||
|
||
import com.slack.api.app_backend.events.EventHandler; | ||
import com.slack.api.app_backend.events.payload.AppInstalledPayload; | ||
import com.slack.api.model.event.AppInstalledEvent; | ||
|
||
public abstract class AppInstalledHandler extends EventHandler<AppInstalledPayload> { | ||
|
||
@Override | ||
public String getEventType() { | ||
return AppInstalledEvent.TYPE_NAME; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...end/src/main/java/com/slack/api/app_backend/events/handler/AppUninstalledTeamHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.slack.api.app_backend.events.handler; | ||
|
||
import com.slack.api.app_backend.events.EventHandler; | ||
import com.slack.api.app_backend.events.payload.AppUninstalledTeamPayload; | ||
import com.slack.api.model.event.AppUninstalledTeamEvent; | ||
|
||
public abstract class AppUninstalledTeamHandler extends EventHandler<AppUninstalledTeamPayload> { | ||
|
||
@Override | ||
public String getEventType() { | ||
return AppUninstalledTeamEvent.TYPE_NAME; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...ckend/src/main/java/com/slack/api/app_backend/events/handler/FunctionExecutedHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.slack.api.app_backend.events.handler; | ||
|
||
import com.slack.api.app_backend.events.EventHandler; | ||
import com.slack.api.app_backend.events.payload.FunctionExecutedPayload; | ||
import com.slack.api.model.event.FunctionExecutedEvent; | ||
|
||
public abstract class FunctionExecutedHandler extends EventHandler<FunctionExecutedPayload> { | ||
|
||
@Override | ||
public String getEventType() { | ||
return FunctionExecutedEvent.TYPE_NAME; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...in/java/com/slack/api/app_backend/events/handler/SharedChannelInviteRequestedHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.slack.api.app_backend.events.handler; | ||
|
||
import com.slack.api.app_backend.events.EventHandler; | ||
import com.slack.api.app_backend.events.payload.SharedChannelInviteRequestedPayload; | ||
import com.slack.api.model.event.SharedChannelInviteRequestedEvent; | ||
|
||
public abstract class SharedChannelInviteRequestedHandler extends EventHandler<SharedChannelInviteRequestedPayload> { | ||
|
||
@Override | ||
public String getEventType() { | ||
return SharedChannelInviteRequestedEvent.TYPE_NAME; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...app-backend/src/main/java/com/slack/api/app_backend/events/payload/AppDeletedPayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.slack.api.app_backend.events.payload; | ||
|
||
import com.slack.api.model.event.AppDeletedEvent; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
public class AppDeletedPayload implements EventsApiPayload<AppDeletedEvent> { | ||
|
||
private String token; | ||
private String enterpriseId; | ||
private String teamId; | ||
private String apiAppId; | ||
private String type; | ||
private List<String> authedUsers; | ||
private List<String> authedTeams; | ||
private List<Authorization> authorizations; | ||
private boolean isExtSharedChannel; | ||
private String eventId; | ||
private Integer eventTime; | ||
private String eventContext; | ||
|
||
private AppDeletedEvent event; | ||
} |
25 changes: 25 additions & 0 deletions
25
...p-backend/src/main/java/com/slack/api/app_backend/events/payload/AppInstalledPayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.slack.api.app_backend.events.payload; | ||
|
||
import com.slack.api.model.event.AppInstalledEvent; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
public class AppInstalledPayload implements EventsApiPayload<AppInstalledEvent> { | ||
|
||
private String token; | ||
private String enterpriseId; | ||
private String teamId; | ||
private String apiAppId; | ||
private String type; | ||
private List<String> authedUsers; | ||
private List<String> authedTeams; | ||
private List<Authorization> authorizations; | ||
private boolean isExtSharedChannel; | ||
private String eventId; | ||
private Integer eventTime; | ||
private String eventContext; | ||
|
||
private AppInstalledEvent event; | ||
} |
25 changes: 25 additions & 0 deletions
25
...end/src/main/java/com/slack/api/app_backend/events/payload/AppUninstalledTeamPayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.slack.api.app_backend.events.payload; | ||
|
||
import com.slack.api.model.event.AppUninstalledTeamEvent; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
public class AppUninstalledTeamPayload implements EventsApiPayload<AppUninstalledTeamEvent> { | ||
|
||
private String token; | ||
private String enterpriseId; | ||
private String teamId; | ||
private String apiAppId; | ||
private String type; | ||
private List<String> authedUsers; | ||
private List<String> authedTeams; | ||
private List<Authorization> authorizations; | ||
private boolean isExtSharedChannel; | ||
private String eventId; | ||
private Integer eventTime; | ||
private String eventContext; | ||
|
||
private AppUninstalledTeamEvent event; | ||
} |
25 changes: 25 additions & 0 deletions
25
...in/java/com/slack/api/app_backend/events/payload/SharedChannelInviteRequestedPayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.slack.api.app_backend.events.payload; | ||
|
||
import com.slack.api.model.event.SharedChannelInviteRequestedEvent; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
public class SharedChannelInviteRequestedPayload implements EventsApiPayload<SharedChannelInviteRequestedEvent> { | ||
|
||
private String token; | ||
private String enterpriseId; | ||
private String teamId; | ||
private String apiAppId; | ||
private String type; | ||
private List<String> authedUsers; | ||
private List<String> authedTeams; | ||
private List<Authorization> authorizations; | ||
private boolean isExtSharedChannel; | ||
private String eventId; | ||
private Integer eventTime; | ||
private String eventContext; | ||
|
||
private SharedChannelInviteRequestedEvent event; | ||
} |