From 8be1e14059d7362a69e055df337265e6681c787b Mon Sep 17 00:00:00 2001 From: Elaine Vegeris Date: Thu, 18 Sep 2025 23:00:47 -0400 Subject: [PATCH 1/6] Add work objects support --- .../test_with_remote_apis/EventsApiTest.java | 7 + .../java/samples/AssistantInteractionApp.java | 2 +- docs/english/guides/ai-apps.md | 2 +- docs/japanese/guides/assistants.md | 2 +- json-logs/samples/api/chat.unfurl.json | 12 +- json-logs/samples/api/conversations.list.json | 4 +- .../samples/api/entity.presentDetails.json | 12 + json-logs/samples/api/users.info.json | 7 +- .../slack/api/methods/AsyncMethodsClient.java | 11 + .../java/com/slack/api/methods/Methods.java | 18 +- .../com/slack/api/methods/MethodsClient.java | 1689 ++++++++---- .../slack/api/methods/RequestFormBuilder.java | 143 +- .../methods/impl/AsyncMethodsClientImpl.java | 12 + .../api/methods/impl/MethodsClientImpl.java | 12 + .../request/chat/ChatUnfurlRequest.java | 12 + .../entity/EntityPresentDetailsRequest.java | 101 + .../chat/ChatPostMessageResponse.java | 2 + .../response/chat/ChatUnfurlResponse.java | 3 +- .../entity/EntityPresentDetailsResponse.java | 20 + .../FieldValidationTest.java | 8 +- .../methods/chat_Test.java | 2300 +++++++++-------- .../java/com/slack/api/model/Attachment.java | 1 + .../com/slack/api/model/EntityMetadata.java | 373 +++ .../api/model/ErrorResponseMetadata.java | 1 + .../java/com/slack/api/model/Message.java | 4 + .../event/EntityDetailsRequestedEvent.java | 38 + .../EntityDetailsRequestedEventTest.java | 51 + .../EntityDetailsRequestedHandler.java | 14 + .../EntityDetailsRequestedPayload.java | 25 + 29 files changed, 3300 insertions(+), 1586 deletions(-) create mode 100644 json-logs/samples/api/entity.presentDetails.json create mode 100644 slack-api-client/src/main/java/com/slack/api/methods/request/entity/EntityPresentDetailsRequest.java create mode 100644 slack-api-client/src/main/java/com/slack/api/methods/response/entity/EntityPresentDetailsResponse.java create mode 100644 slack-api-model/src/main/java/com/slack/api/model/EntityMetadata.java create mode 100644 slack-api-model/src/main/java/com/slack/api/model/event/EntityDetailsRequestedEvent.java create mode 100644 slack-api-model/src/test/java/test_locally/api/model/event/EntityDetailsRequestedEventTest.java create mode 100644 slack-app-backend/src/main/java/com/slack/api/app_backend/events/handler/EntityDetailsRequestedHandler.java create mode 100644 slack-app-backend/src/main/java/com/slack/api/app_backend/events/payload/EntityDetailsRequestedPayload.java diff --git a/bolt-jakarta-servlet/src/test/java/test_with_remote_apis/EventsApiTest.java b/bolt-jakarta-servlet/src/test/java/test_with_remote_apis/EventsApiTest.java index 4aa82ac5e..84f0d4408 100644 --- a/bolt-jakarta-servlet/src/test/java/test_with_remote_apis/EventsApiTest.java +++ b/bolt-jakarta-servlet/src/test/java/test_with_remote_apis/EventsApiTest.java @@ -143,6 +143,7 @@ public static class ChannelTestState { private boolean channelUnarchive; private boolean appMention; private boolean linkShared; + private boolean entityDetailsRequested; private boolean message; private boolean reactionAdded; private boolean reactionRemoved; @@ -263,6 +264,12 @@ public void publicChannelsAndInteractions() throws Exception { return ctx.ack(); }); + // entity_details_requested + app.event(EntityDetailsRequestedEvent.class, (req, ctx) -> { + state.setEntityDetailsRequested(true); + return ctx.ack(); + }); + // message app.event(MessageEvent.class, (req, ctx) -> { state.setMessage(true); diff --git a/bolt-socket-mode/src/test/java/samples/AssistantInteractionApp.java b/bolt-socket-mode/src/test/java/samples/AssistantInteractionApp.java index e205883da..78efbc3f8 100644 --- a/bolt-socket-mode/src/test/java/samples/AssistantInteractionApp.java +++ b/bolt-socket-mode/src/test/java/samples/AssistantInteractionApp.java @@ -55,7 +55,7 @@ public static void main(String[] args) throws Exception { .channel(req.getPayload().getChannel().getId()) .threadTs(req.getPayload().getMessage().getThreadTs()) .text("OK, I will generate numbers for you!") - .metadata(new Message.Metadata("assistant-generate-numbers", eventPayload)) + .metadata(Message.Metadata.builder().eventType("assistant-generate-numbers").eventPayload(eventPayload).build()) ); } catch (Exception e) { ctx.logger.error("Failed to post a bot message: {e}", e); diff --git a/docs/english/guides/ai-apps.md b/docs/english/guides/ai-apps.md index 6e230aa9e..92c654f0d 100644 --- a/docs/english/guides/ai-apps.md +++ b/docs/english/guides/ai-apps.md @@ -128,7 +128,7 @@ app.blockAction("assistant-generate-numbers", (req, ctx) -> { .channel(req.getPayload().getChannel().getId()) .threadTs(req.getPayload().getMessage().getThreadTs()) .text("OK, I will generate numbers for you!") - .metadata(new Message.Metadata("assistant-generate-numbers", eventPayload)) + .metadata(Message.Metadata.builder().eventType("assistant-generate-numbers").eventPayload(eventPayload).build()) ); } catch (Exception e) { ctx.logger.error("Failed to post a bot message: {e}", e); diff --git a/docs/japanese/guides/assistants.md b/docs/japanese/guides/assistants.md index 40dba7a92..52b34776b 100644 --- a/docs/japanese/guides/assistants.md +++ b/docs/japanese/guides/assistants.md @@ -105,7 +105,7 @@ app.blockAction("assistant-generate-numbers", (req, ctx) -> { .channel(req.getPayload().getChannel().getId()) .threadTs(req.getPayload().getMessage().getThreadTs()) .text("OK, I will generate numbers for you!") - .metadata(new Message.Metadata("assistant-generate-numbers", eventPayload)) + .metadata(Message.Metadata.builder().eventType("assistant-generate-numbers").eventPayload(eventPayload).build()) ); } catch (Exception e) { ctx.logger.error("Failed to post a bot message: {e}", e); diff --git a/json-logs/samples/api/chat.unfurl.json b/json-logs/samples/api/chat.unfurl.json index 1b3fc766f..75c8f52de 100644 --- a/json-logs/samples/api/chat.unfurl.json +++ b/json-logs/samples/api/chat.unfurl.json @@ -2,5 +2,15 @@ "ok": false, "error": "", "needed": "", - "provided": "" + "provided": "", + "callstack": "", + "warning": "", + "response_metadata": { + "messages": [ + "" + ], + "warnings": [ + "" + ] + } } \ No newline at end of file diff --git a/json-logs/samples/api/conversations.list.json b/json-logs/samples/api/conversations.list.json index 3d9aea9f8..3190331a7 100644 --- a/json-logs/samples/api/conversations.list.json +++ b/json-logs/samples/api/conversations.list.json @@ -115,5 +115,7 @@ }, "error": "", "needed": "", - "provided": "" + "provided": "", + "arg": "", + "callstack": "" } \ No newline at end of file diff --git a/json-logs/samples/api/entity.presentDetails.json b/json-logs/samples/api/entity.presentDetails.json new file mode 100644 index 000000000..0a3316f86 --- /dev/null +++ b/json-logs/samples/api/entity.presentDetails.json @@ -0,0 +1,12 @@ +{ + "ok": false, + "warning": "", + "error": "", + "needed": "", + "provided": "", + "response_metadata": { + "messages": [ + "" + ] + } +} \ No newline at end of file diff --git a/json-logs/samples/api/users.info.json b/json-logs/samples/api/users.info.json index ffbe4b438..0cf1924cc 100644 --- a/json-logs/samples/api/users.info.json +++ b/json-logs/samples/api/users.info.json @@ -79,7 +79,12 @@ "who_can_share_contact_card": "", "is_workflow_bot": false, "is_invited_user": false, - "is_connector_bot": false + "is_connector_bot": false, + "teams": [ + "T00000000" + ], + "enterprise_id": "E00000000", + "enterprise_name": "" }, "error": "", "needed": "", diff --git a/slack-api-client/src/main/java/com/slack/api/methods/AsyncMethodsClient.java b/slack-api-client/src/main/java/com/slack/api/methods/AsyncMethodsClient.java index 888c9c88c..d7bde48d0 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/AsyncMethodsClient.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/AsyncMethodsClient.java @@ -76,6 +76,7 @@ import com.slack.api.methods.request.dialog.DialogOpenRequest; import com.slack.api.methods.request.dnd.*; import com.slack.api.methods.request.emoji.EmojiListRequest; +import com.slack.api.methods.request.entity.EntityPresentDetailsRequest; import com.slack.api.methods.request.files.*; import com.slack.api.methods.request.files.remote.*; import com.slack.api.methods.request.functions.FunctionsCompleteErrorRequest; @@ -197,6 +198,7 @@ import com.slack.api.methods.response.dialog.DialogOpenResponse; import com.slack.api.methods.response.dnd.*; import com.slack.api.methods.response.emoji.EmojiListResponse; +import com.slack.api.methods.response.entity.EntityPresentDetailsResponse; import com.slack.api.methods.response.files.*; import com.slack.api.methods.response.files.remote.*; import com.slack.api.methods.response.functions.FunctionsCompleteErrorResponse; @@ -244,6 +246,7 @@ import com.slack.api.methods.response.workflows.WorkflowsStepFailedResponse; import com.slack.api.methods.response.workflows.WorkflowsUpdateStepResponse; +import java.io.IOException; import java.util.concurrent.CompletableFuture; /** @@ -1565,4 +1568,12 @@ CompletableFuture CompletableFuture workflowsUpdateStep(RequestConfigurator req); + // ------------------------------ + // work object entities + // ------------------------------ + + CompletableFuture entityPresentDetails(EntityPresentDetailsRequest req); + + CompletableFuture entityPresentDetails(RequestConfigurator req); + } diff --git a/slack-api-client/src/main/java/com/slack/api/methods/Methods.java b/slack-api-client/src/main/java/com/slack/api/methods/Methods.java index 4d66b803b..0dad97b18 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/Methods.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/Methods.java @@ -216,7 +216,7 @@ private Methods() { public static final String ADMIN_WORKFLOWS_COLLABORATORS_REMOVE = "admin.workflows.collaborators.remove"; public static final String ADMIN_WORKFLOWS_PERMISSIONS_LOOKUP = "admin.workflows.permissions.lookup"; public static final String ADMIN_WORKFLOWS_SEARCH = "admin.workflows.search"; - public static final String ADMIN_WORKFLOWS_UNPUBLISH = "admin.workflows.unpublish"; + public static final String ADMIN_WORKFLOWS_UNPUBLISH = "admin.workflows.unpublish"; // ------------------------------ // api @@ -247,7 +247,6 @@ private Methods() { public static final String APPS_MANIFEST_VALIDATE = "apps.manifest.validate"; public static final String TOOLING_TOKENS_ROTATE = "tooling.tokens.rotate"; - // ------------------------------ // apps.event.authorizations // ------------------------------ @@ -261,7 +260,8 @@ private Methods() { // Developer preview has ended // This feature was exclusive to our workspace apps developer preview. // The preview has now ended, but fan-favorite features such as token rotation - // and the Conversations API will become available to classic Slack apps over the coming months. + // and the Conversations API will become available to classic Slack apps over + // the coming months. @Deprecated public static final String APPS_PERMISSIONS_INFO = "apps.permissions.info"; @@ -453,6 +453,12 @@ private Methods() { public static final String EMOJI_LIST = "emoji.list"; + // ------------------------------ + // entity + // ------------------------------ + + public static final String ENTITY_PRESENT_DETAILS = "entity.presentDetails"; + // ------------------------------ // files.comments // ------------------------------ @@ -725,4 +731,10 @@ private Methods() { public static final String WORKFLOWS_STEP_COMPLETED = "workflows.stepCompleted"; public static final String WORKFLOWS_STEP_FAILED = "workflows.stepFailed"; public static final String WORKFLOWS_UPDATE_STEP = "workflows.updateStep"; + + // ------------------------------ + // work object entities + // ------------------------------ + + public static final String ENTITY_PRESENT_DETAILSs = "entity.presentDetails"; } diff --git a/slack-api-client/src/main/java/com/slack/api/methods/MethodsClient.java b/slack-api-client/src/main/java/com/slack/api/methods/MethodsClient.java index b8288f2cc..5a0999722 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/MethodsClient.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/MethodsClient.java @@ -83,6 +83,7 @@ import com.slack.api.methods.request.dialog.DialogOpenRequest; import com.slack.api.methods.request.dnd.*; import com.slack.api.methods.request.emoji.EmojiListRequest; +import com.slack.api.methods.request.entity.EntityPresentDetailsRequest; import com.slack.api.methods.request.files.*; import com.slack.api.methods.request.files.comments.FilesCommentsAddRequest; import com.slack.api.methods.request.files.comments.FilesCommentsDeleteRequest; @@ -270,6 +271,7 @@ import com.slack.api.methods.response.workflows.WorkflowsStepCompletedResponse; import com.slack.api.methods.response.workflows.WorkflowsStepFailedResponse; import com.slack.api.methods.response.workflows.WorkflowsUpdateStepResponse; +import com.slack.api.methods.response.entity.EntityPresentDetailsResponse; import com.slack.api.util.http.SlackHttpClient; import okhttp3.FormBody; import okhttp3.MultipartBody; @@ -294,7 +296,7 @@ public interface MethodsClient { void setEndpointUrlPrefix(String endpointUrlPrefix); // ---------------------------------------------- - // OkHttp layer methods + // OkHttp layer methods // ---------------------------------------------- Response runPostForm( @@ -312,7 +314,7 @@ Response runPostMultipart( String token) throws IOException; // ---------------------------------------------- - // Methods to send requests and parse responses + // Methods to send requests and parse responses // ---------------------------------------------- T postFormAndParseResponse( @@ -336,9 +338,12 @@ T postFormWithAuthorizationHeaderAndParseRespon // admin.analytics // ------------------------------ - AdminAnalyticsGetFileResponse adminAnalyticsGetFile(AdminAnalyticsGetFileRequest req) throws IOException, SlackApiException; + AdminAnalyticsGetFileResponse adminAnalyticsGetFile(AdminAnalyticsGetFileRequest req) + throws IOException, SlackApiException; - AdminAnalyticsGetFileResponse adminAnalyticsGetFile(RequestConfigurator req) throws IOException, SlackApiException; + AdminAnalyticsGetFileResponse adminAnalyticsGetFile( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.apps @@ -346,183 +351,298 @@ T postFormWithAuthorizationHeaderAndParseRespon AdminAppsApproveResponse adminAppsApprove(AdminAppsApproveRequest req) throws IOException, SlackApiException; - AdminAppsApproveResponse adminAppsApprove(RequestConfigurator req) throws IOException, SlackApiException; + AdminAppsApproveResponse adminAppsApprove( + RequestConfigurator req) + throws IOException, SlackApiException; AdminAppsRestrictResponse adminAppsRestrict(AdminAppsRestrictRequest req) throws IOException, SlackApiException; - AdminAppsRestrictResponse adminAppsRestrict(RequestConfigurator req) throws IOException, SlackApiException; + AdminAppsRestrictResponse adminAppsRestrict( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminAppsApprovedListResponse adminAppsApprovedList(AdminAppsApprovedListRequest req) throws IOException, SlackApiException; + AdminAppsApprovedListResponse adminAppsApprovedList(AdminAppsApprovedListRequest req) + throws IOException, SlackApiException; - AdminAppsApprovedListResponse adminAppsApprovedList(RequestConfigurator req) throws IOException, SlackApiException; + AdminAppsApprovedListResponse adminAppsApprovedList( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminAppsRestrictedListResponse adminAppsRestrictedList(AdminAppsRestrictedListRequest req) throws IOException, SlackApiException; + AdminAppsRestrictedListResponse adminAppsRestrictedList(AdminAppsRestrictedListRequest req) + throws IOException, SlackApiException; - AdminAppsRestrictedListResponse adminAppsRestrictedList(RequestConfigurator req) throws IOException, SlackApiException; + AdminAppsRestrictedListResponse adminAppsRestrictedList( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminAppsClearResolutionResponse adminAppsClearResolution(AdminAppsClearResolutionRequest req) throws IOException, SlackApiException; + AdminAppsClearResolutionResponse adminAppsClearResolution(AdminAppsClearResolutionRequest req) + throws IOException, SlackApiException; - AdminAppsClearResolutionResponse adminAppsClearResolution(RequestConfigurator req) throws IOException, SlackApiException; + AdminAppsClearResolutionResponse adminAppsClearResolution( + RequestConfigurator req) + throws IOException, SlackApiException; AdminAppsUninstallResponse adminAppsUninstall(AdminAppsUninstallRequest req) throws IOException, SlackApiException; - AdminAppsUninstallResponse adminAppsUninstall(RequestConfigurator req) throws IOException, SlackApiException; + AdminAppsUninstallResponse adminAppsUninstall( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminAppsActivitiesListResponse adminAppsActivitiesList(AdminAppsActivitiesListRequest req) throws IOException, SlackApiException; + AdminAppsActivitiesListResponse adminAppsActivitiesList(AdminAppsActivitiesListRequest req) + throws IOException, SlackApiException; - AdminAppsActivitiesListResponse adminAppsActivitiesList(RequestConfigurator req) throws IOException, SlackApiException; + AdminAppsActivitiesListResponse adminAppsActivitiesList( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminAppsConfigLookupResponse adminAppsConfigLookup(AdminAppsConfigLookupRequest req) throws IOException, SlackApiException; + AdminAppsConfigLookupResponse adminAppsConfigLookup(AdminAppsConfigLookupRequest req) + throws IOException, SlackApiException; - AdminAppsConfigLookupResponse adminAppsConfigLookup(RequestConfigurator req) throws IOException, SlackApiException; + AdminAppsConfigLookupResponse adminAppsConfigLookup( + RequestConfigurator req) + throws IOException, SlackApiException; AdminAppsConfigSetResponse adminAppsConfigSet(AdminAppsConfigSetRequest req) throws IOException, SlackApiException; - AdminAppsConfigSetResponse adminAppsConfigSet(RequestConfigurator req) throws IOException, SlackApiException; + AdminAppsConfigSetResponse adminAppsConfigSet( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.apps.requests // ------------------------------ - AdminAppsRequestsCancelResponse adminAppsRequestsCancel(AdminAppsRequestsCancelRequest req) throws IOException, SlackApiException; + AdminAppsRequestsCancelResponse adminAppsRequestsCancel(AdminAppsRequestsCancelRequest req) + throws IOException, SlackApiException; - AdminAppsRequestsCancelResponse adminAppsRequestsCancel(RequestConfigurator req) throws IOException, SlackApiException; + AdminAppsRequestsCancelResponse adminAppsRequestsCancel( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminAppsRequestsListResponse adminAppsRequestsList(AdminAppsRequestsListRequest req) throws IOException, SlackApiException; + AdminAppsRequestsListResponse adminAppsRequestsList(AdminAppsRequestsListRequest req) + throws IOException, SlackApiException; - AdminAppsRequestsListResponse adminAppsRequestsList(RequestConfigurator req) throws IOException, SlackApiException; + AdminAppsRequestsListResponse adminAppsRequestsList( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.auth.policy // ------------------------------ - AdminAuthPolicyAssignEntitiesResponse adminAuthPolicyAssignEntities(AdminAuthPolicyAssignEntitiesRequest req) throws IOException, SlackApiException; + AdminAuthPolicyAssignEntitiesResponse adminAuthPolicyAssignEntities(AdminAuthPolicyAssignEntitiesRequest req) + throws IOException, SlackApiException; - AdminAuthPolicyAssignEntitiesResponse adminAuthPolicyAssignEntities(RequestConfigurator req) throws IOException, SlackApiException; + AdminAuthPolicyAssignEntitiesResponse adminAuthPolicyAssignEntities( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminAuthPolicyGetEntitiesResponse adminAuthPolicyGetEntities(AdminAuthPolicyGetEntitiesRequest req) throws IOException, SlackApiException; + AdminAuthPolicyGetEntitiesResponse adminAuthPolicyGetEntities(AdminAuthPolicyGetEntitiesRequest req) + throws IOException, SlackApiException; - AdminAuthPolicyGetEntitiesResponse adminAuthPolicyGetEntities(RequestConfigurator req) throws IOException, SlackApiException; + AdminAuthPolicyGetEntitiesResponse adminAuthPolicyGetEntities( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminAuthPolicyRemoveEntitiesResponse adminAuthPolicyRemoveEntities(AdminAuthPolicyRemoveEntitiesRequest req) throws IOException, SlackApiException; + AdminAuthPolicyRemoveEntitiesResponse adminAuthPolicyRemoveEntities(AdminAuthPolicyRemoveEntitiesRequest req) + throws IOException, SlackApiException; - AdminAuthPolicyRemoveEntitiesResponse adminAuthPolicyRemoveEntities(RequestConfigurator req) throws IOException, SlackApiException; + AdminAuthPolicyRemoveEntitiesResponse adminAuthPolicyRemoveEntities( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.barriers // ------------------------------ - AdminBarriersCreateResponse adminBarriersCreate(AdminBarriersCreateRequest req) throws IOException, SlackApiException; + AdminBarriersCreateResponse adminBarriersCreate(AdminBarriersCreateRequest req) + throws IOException, SlackApiException; - AdminBarriersCreateResponse adminBarriersCreate(RequestConfigurator req) throws IOException, SlackApiException; + AdminBarriersCreateResponse adminBarriersCreate( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminBarriersDeleteResponse adminBarriersDelete(AdminBarriersDeleteRequest req) throws IOException, SlackApiException; + AdminBarriersDeleteResponse adminBarriersDelete(AdminBarriersDeleteRequest req) + throws IOException, SlackApiException; - AdminBarriersDeleteResponse adminBarriersDelete(RequestConfigurator req) throws IOException, SlackApiException; + AdminBarriersDeleteResponse adminBarriersDelete( + RequestConfigurator req) + throws IOException, SlackApiException; AdminBarriersListResponse adminBarriersList(AdminBarriersListRequest req) throws IOException, SlackApiException; - AdminBarriersListResponse adminBarriersList(RequestConfigurator req) throws IOException, SlackApiException; + AdminBarriersListResponse adminBarriersList( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminBarriersUpdateResponse adminBarriersUpdate(AdminBarriersUpdateRequest req) throws IOException, SlackApiException; + AdminBarriersUpdateResponse adminBarriersUpdate(AdminBarriersUpdateRequest req) + throws IOException, SlackApiException; - AdminBarriersUpdateResponse adminBarriersUpdate(RequestConfigurator req) throws IOException, SlackApiException; + AdminBarriersUpdateResponse adminBarriersUpdate( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.conversations // ------------------------------ - AdminConversationsSetTeamsResponse adminConversationsSetTeams(AdminConversationsSetTeamsRequest req) throws IOException, SlackApiException; + AdminConversationsSetTeamsResponse adminConversationsSetTeams(AdminConversationsSetTeamsRequest req) + throws IOException, SlackApiException; - AdminConversationsSetTeamsResponse adminConversationsSetTeams(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsSetTeamsResponse adminConversationsSetTeams( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsArchiveResponse adminConversationsArchive(AdminConversationsArchiveRequest req) throws IOException, SlackApiException; + AdminConversationsArchiveResponse adminConversationsArchive(AdminConversationsArchiveRequest req) + throws IOException, SlackApiException; - AdminConversationsArchiveResponse adminConversationsArchive(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsArchiveResponse adminConversationsArchive( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsConvertToPrivateResponse adminConversationsConvertToPrivate(AdminConversationsConvertToPrivateRequest req) throws IOException, SlackApiException; + AdminConversationsConvertToPrivateResponse adminConversationsConvertToPrivate( + AdminConversationsConvertToPrivateRequest req) throws IOException, SlackApiException; - AdminConversationsConvertToPrivateResponse adminConversationsConvertToPrivate(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsConvertToPrivateResponse adminConversationsConvertToPrivate( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsCreateResponse adminConversationsCreate(AdminConversationsCreateRequest req) throws IOException, SlackApiException; + AdminConversationsCreateResponse adminConversationsCreate(AdminConversationsCreateRequest req) + throws IOException, SlackApiException; - AdminConversationsCreateResponse adminConversationsCreate(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsCreateResponse adminConversationsCreate( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsDeleteResponse adminConversationsDelete(AdminConversationsDeleteRequest req) throws IOException, SlackApiException; + AdminConversationsDeleteResponse adminConversationsDelete(AdminConversationsDeleteRequest req) + throws IOException, SlackApiException; - AdminConversationsDeleteResponse adminConversationsDelete(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsDeleteResponse adminConversationsDelete( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsDisconnectSharedResponse adminConversationsDisconnectShared(AdminConversationsDisconnectSharedRequest req) throws IOException, SlackApiException; + AdminConversationsDisconnectSharedResponse adminConversationsDisconnectShared( + AdminConversationsDisconnectSharedRequest req) throws IOException, SlackApiException; - AdminConversationsDisconnectSharedResponse adminConversationsDisconnectShared(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsDisconnectSharedResponse adminConversationsDisconnectShared( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsGetConversationPrefsResponse adminConversationsGetConversationPrefs(AdminConversationsGetConversationPrefsRequest req) throws IOException, SlackApiException; + AdminConversationsGetConversationPrefsResponse adminConversationsGetConversationPrefs( + AdminConversationsGetConversationPrefsRequest req) throws IOException, SlackApiException; - AdminConversationsGetConversationPrefsResponse adminConversationsGetConversationPrefs(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsGetConversationPrefsResponse adminConversationsGetConversationPrefs( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsGetTeamsResponse adminConversationsGetTeams(AdminConversationsGetTeamsRequest req) throws IOException, SlackApiException; + AdminConversationsGetTeamsResponse adminConversationsGetTeams(AdminConversationsGetTeamsRequest req) + throws IOException, SlackApiException; - AdminConversationsGetTeamsResponse adminConversationsGetTeams(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsGetTeamsResponse adminConversationsGetTeams( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsInviteResponse adminConversationsInvite(AdminConversationsInviteRequest req) throws IOException, SlackApiException; + AdminConversationsInviteResponse adminConversationsInvite(AdminConversationsInviteRequest req) + throws IOException, SlackApiException; - AdminConversationsInviteResponse adminConversationsInvite(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsInviteResponse adminConversationsInvite( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsRenameResponse adminConversationsRename(AdminConversationsRenameRequest req) throws IOException, SlackApiException; + AdminConversationsRenameResponse adminConversationsRename(AdminConversationsRenameRequest req) + throws IOException, SlackApiException; - AdminConversationsRenameResponse adminConversationsRename(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsRenameResponse adminConversationsRename( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsSearchResponse adminConversationsSearch(AdminConversationsSearchRequest req) throws IOException, SlackApiException; + AdminConversationsSearchResponse adminConversationsSearch(AdminConversationsSearchRequest req) + throws IOException, SlackApiException; - AdminConversationsSearchResponse adminConversationsSearch(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsSearchResponse adminConversationsSearch( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsSetConversationPrefsResponse adminConversationsSetConversationPrefs(AdminConversationsSetConversationPrefsRequest req) throws IOException, SlackApiException; + AdminConversationsSetConversationPrefsResponse adminConversationsSetConversationPrefs( + AdminConversationsSetConversationPrefsRequest req) throws IOException, SlackApiException; - AdminConversationsSetConversationPrefsResponse adminConversationsSetConversationPrefs(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsSetConversationPrefsResponse adminConversationsSetConversationPrefs( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsUnarchiveResponse adminConversationsUnarchive(AdminConversationsUnarchiveRequest req) throws IOException, SlackApiException; + AdminConversationsUnarchiveResponse adminConversationsUnarchive(AdminConversationsUnarchiveRequest req) + throws IOException, SlackApiException; - AdminConversationsUnarchiveResponse adminConversationsUnarchive(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsUnarchiveResponse adminConversationsUnarchive( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsGetCustomRetentionResponse adminConversationsGetCustomRetention(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsGetCustomRetentionResponse adminConversationsGetCustomRetention( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsGetCustomRetentionResponse adminConversationsGetCustomRetention(AdminConversationsGetCustomRetentionRequest req) throws IOException, SlackApiException; + AdminConversationsGetCustomRetentionResponse adminConversationsGetCustomRetention( + AdminConversationsGetCustomRetentionRequest req) throws IOException, SlackApiException; - AdminConversationsRemoveCustomRetentionResponse adminConversationsRemoveCustomRetention(AdminConversationsRemoveCustomRetentionRequest req) throws IOException, SlackApiException; + AdminConversationsRemoveCustomRetentionResponse adminConversationsRemoveCustomRetention( + AdminConversationsRemoveCustomRetentionRequest req) throws IOException, SlackApiException; - AdminConversationsRemoveCustomRetentionResponse adminConversationsRemoveCustomRetention(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsRemoveCustomRetentionResponse adminConversationsRemoveCustomRetention( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsSetCustomRetentionResponse adminConversationsSetCustomRetention(AdminConversationsSetCustomRetentionRequest req) throws IOException, SlackApiException; + AdminConversationsSetCustomRetentionResponse adminConversationsSetCustomRetention( + AdminConversationsSetCustomRetentionRequest req) throws IOException, SlackApiException; - AdminConversationsSetCustomRetentionResponse adminConversationsSetCustomRetention(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsSetCustomRetentionResponse adminConversationsSetCustomRetention( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsBulkArchiveResponse adminConversationsBulkArchive(AdminConversationsBulkArchiveRequest req) throws IOException, SlackApiException; + AdminConversationsBulkArchiveResponse adminConversationsBulkArchive(AdminConversationsBulkArchiveRequest req) + throws IOException, SlackApiException; - AdminConversationsBulkArchiveResponse adminConversationsBulkArchive(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsBulkArchiveResponse adminConversationsBulkArchive( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsBulkDeleteResponse adminConversationsBulkDelete(AdminConversationsBulkDeleteRequest req) throws IOException, SlackApiException; + AdminConversationsBulkDeleteResponse adminConversationsBulkDelete(AdminConversationsBulkDeleteRequest req) + throws IOException, SlackApiException; - AdminConversationsBulkDeleteResponse adminConversationsBulkDelete(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsBulkDeleteResponse adminConversationsBulkDelete( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsBulkMoveResponse adminConversationsBulkMove(AdminConversationsBulkMoveRequest req) throws IOException, SlackApiException; + AdminConversationsBulkMoveResponse adminConversationsBulkMove(AdminConversationsBulkMoveRequest req) + throws IOException, SlackApiException; - AdminConversationsBulkMoveResponse adminConversationsBulkMove(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsBulkMoveResponse adminConversationsBulkMove( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsConvertToPublicResponse adminConversationsConvertToPublic(AdminConversationsConvertToPublicRequest req) throws IOException, SlackApiException; + AdminConversationsConvertToPublicResponse adminConversationsConvertToPublic( + AdminConversationsConvertToPublicRequest req) throws IOException, SlackApiException; - AdminConversationsConvertToPublicResponse adminConversationsConvertToPublic(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsConvertToPublicResponse adminConversationsConvertToPublic( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminConversationsLookupResponse adminConversationsLookup(AdminConversationsLookupRequest req) throws IOException, SlackApiException; + AdminConversationsLookupResponse adminConversationsLookup(AdminConversationsLookupRequest req) + throws IOException, SlackApiException; - AdminConversationsLookupResponse adminConversationsLookup(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsLookupResponse adminConversationsLookup( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.conversations.ekm // ------------------------------ - AdminConversationsEkmListOriginalConnectedChannelInfoResponse adminConversationsEkmListOriginalConnectedChannelInfo(AdminConversationsEkmListOriginalConnectedChannelInfoRequest req) throws IOException, SlackApiException; + AdminConversationsEkmListOriginalConnectedChannelInfoResponse adminConversationsEkmListOriginalConnectedChannelInfo( + AdminConversationsEkmListOriginalConnectedChannelInfoRequest req) throws IOException, SlackApiException; - AdminConversationsEkmListOriginalConnectedChannelInfoResponse adminConversationsEkmListOriginalConnectedChannelInfo(RequestConfigurator req) throws IOException, SlackApiException; + AdminConversationsEkmListOriginalConnectedChannelInfoResponse adminConversationsEkmListOriginalConnectedChannelInfo( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.conversations.restrictAccess @@ -586,23 +706,31 @@ AdminConversationsWhitelistListGroupsLinkedToChannelResponse adminConversationsW AdminEmojiAddResponse adminEmojiAdd(AdminEmojiAddRequest req) throws IOException, SlackApiException; - AdminEmojiAddResponse adminEmojiAdd(RequestConfigurator req) throws IOException, SlackApiException; + AdminEmojiAddResponse adminEmojiAdd(RequestConfigurator req) + throws IOException, SlackApiException; AdminEmojiAddAliasResponse adminEmojiAddAlias(AdminEmojiAddAliasRequest req) throws IOException, SlackApiException; - AdminEmojiAddAliasResponse adminEmojiAddAlias(RequestConfigurator req) throws IOException, SlackApiException; + AdminEmojiAddAliasResponse adminEmojiAddAlias( + RequestConfigurator req) + throws IOException, SlackApiException; AdminEmojiListResponse adminEmojiList(AdminEmojiListRequest req) throws IOException, SlackApiException; - AdminEmojiListResponse adminEmojiList(RequestConfigurator req) throws IOException, SlackApiException; + AdminEmojiListResponse adminEmojiList(RequestConfigurator req) + throws IOException, SlackApiException; AdminEmojiRemoveResponse adminEmojiRemove(AdminEmojiRemoveRequest req) throws IOException, SlackApiException; - AdminEmojiRemoveResponse adminEmojiRemove(RequestConfigurator req) throws IOException, SlackApiException; + AdminEmojiRemoveResponse adminEmojiRemove( + RequestConfigurator req) + throws IOException, SlackApiException; AdminEmojiRenameResponse adminEmojiRename(AdminEmojiRenameRequest req) throws IOException, SlackApiException; - AdminEmojiRenameResponse adminEmojiRename(RequestConfigurator req) throws IOException, SlackApiException; + AdminEmojiRenameResponse adminEmojiRename( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.functions @@ -610,63 +738,98 @@ AdminConversationsWhitelistListGroupsLinkedToChannelResponse adminConversationsW AdminFunctionsListResponse adminFunctionsList(AdminFunctionsListRequest req) throws IOException, SlackApiException; - AdminFunctionsListResponse adminFunctionsList(RequestConfigurator req) throws IOException, SlackApiException; + AdminFunctionsListResponse adminFunctionsList( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminFunctionsPermissionsLookupResponse adminFunctionsPermissionsLookup(AdminFunctionsPermissionsLookupRequest req) throws IOException, SlackApiException; + AdminFunctionsPermissionsLookupResponse adminFunctionsPermissionsLookup(AdminFunctionsPermissionsLookupRequest req) + throws IOException, SlackApiException; - AdminFunctionsPermissionsLookupResponse adminFunctionsPermissionsLookup(RequestConfigurator req) throws IOException, SlackApiException; + AdminFunctionsPermissionsLookupResponse adminFunctionsPermissionsLookup( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminFunctionsPermissionsSetResponse adminFunctionsPermissionsSet(AdminFunctionsPermissionsSetRequest req) throws IOException, SlackApiException; + AdminFunctionsPermissionsSetResponse adminFunctionsPermissionsSet(AdminFunctionsPermissionsSetRequest req) + throws IOException, SlackApiException; - AdminFunctionsPermissionsSetResponse adminFunctionsPermissionsSet(RequestConfigurator req) throws IOException, SlackApiException; + AdminFunctionsPermissionsSetResponse adminFunctionsPermissionsSet( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.inviteRequests // ------------------------------ - AdminInviteRequestsApproveResponse adminInviteRequestsApprove(AdminInviteRequestsApproveRequest req) throws IOException, SlackApiException; + AdminInviteRequestsApproveResponse adminInviteRequestsApprove(AdminInviteRequestsApproveRequest req) + throws IOException, SlackApiException; - AdminInviteRequestsApproveResponse adminInviteRequestsApprove(RequestConfigurator req) throws IOException, SlackApiException; + AdminInviteRequestsApproveResponse adminInviteRequestsApprove( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminInviteRequestsDenyResponse adminInviteRequestsDeny(AdminInviteRequestsDenyRequest req) throws IOException, SlackApiException; + AdminInviteRequestsDenyResponse adminInviteRequestsDeny(AdminInviteRequestsDenyRequest req) + throws IOException, SlackApiException; - AdminInviteRequestsDenyResponse adminInviteRequestsDeny(RequestConfigurator req) throws IOException, SlackApiException; + AdminInviteRequestsDenyResponse adminInviteRequestsDeny( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminInviteRequestsListResponse adminInviteRequestsList(AdminInviteRequestsListRequest req) throws IOException, SlackApiException; + AdminInviteRequestsListResponse adminInviteRequestsList(AdminInviteRequestsListRequest req) + throws IOException, SlackApiException; - AdminInviteRequestsListResponse adminInviteRequestsList(RequestConfigurator req) throws IOException, SlackApiException; + AdminInviteRequestsListResponse adminInviteRequestsList( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminInviteRequestsApprovedListResponse adminInviteRequestsApprovedList(AdminInviteRequestsApprovedListRequest req) throws IOException, SlackApiException; + AdminInviteRequestsApprovedListResponse adminInviteRequestsApprovedList(AdminInviteRequestsApprovedListRequest req) + throws IOException, SlackApiException; - AdminInviteRequestsApprovedListResponse adminInviteRequestsApprovedList(RequestConfigurator req) throws IOException, SlackApiException; + AdminInviteRequestsApprovedListResponse adminInviteRequestsApprovedList( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminInviteRequestsDeniedListResponse adminInviteRequestsDeniedList(AdminInviteRequestsDeniedListRequest req) throws IOException, SlackApiException; + AdminInviteRequestsDeniedListResponse adminInviteRequestsDeniedList(AdminInviteRequestsDeniedListRequest req) + throws IOException, SlackApiException; - AdminInviteRequestsDeniedListResponse adminInviteRequestsDeniedList(RequestConfigurator req) throws IOException, SlackApiException; + AdminInviteRequestsDeniedListResponse adminInviteRequestsDeniedList( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.roles // ------------------------------ - AdminRolesListAssignmentsResponse adminRolesListAssignments(AdminRolesListAssignmentsRequest req) throws IOException, SlackApiException; + AdminRolesListAssignmentsResponse adminRolesListAssignments(AdminRolesListAssignmentsRequest req) + throws IOException, SlackApiException; - AdminRolesListAssignmentsResponse adminRolesListAssignments(RequestConfigurator req) throws IOException, SlackApiException; + AdminRolesListAssignmentsResponse adminRolesListAssignments( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminRolesAddAssignmentsResponse adminRolesAddAssignments(AdminRolesAddAssignmentsRequest req) throws IOException, SlackApiException; + AdminRolesAddAssignmentsResponse adminRolesAddAssignments(AdminRolesAddAssignmentsRequest req) + throws IOException, SlackApiException; - AdminRolesAddAssignmentsResponse adminRolesAddAssignments(RequestConfigurator req) throws IOException, SlackApiException; + AdminRolesAddAssignmentsResponse adminRolesAddAssignments( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminRolesRemoveAssignmentsResponse adminRolesRemoveAssignments(AdminRolesRemoveAssignmentsRequest req) throws IOException, SlackApiException; + AdminRolesRemoveAssignmentsResponse adminRolesRemoveAssignments(AdminRolesRemoveAssignmentsRequest req) + throws IOException, SlackApiException; - AdminRolesRemoveAssignmentsResponse adminRolesRemoveAssignments(RequestConfigurator req) throws IOException, SlackApiException; + AdminRolesRemoveAssignmentsResponse adminRolesRemoveAssignments( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.teams.admins // ------------------------------ - AdminTeamsAdminsListResponse adminTeamsAdminsList(AdminTeamsAdminsListRequest req) throws IOException, SlackApiException; + AdminTeamsAdminsListResponse adminTeamsAdminsList(AdminTeamsAdminsListRequest req) + throws IOException, SlackApiException; - AdminTeamsAdminsListResponse adminTeamsAdminsList(RequestConfigurator req) throws IOException, SlackApiException; + AdminTeamsAdminsListResponse adminTeamsAdminsList( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.teams @@ -674,71 +837,99 @@ AdminConversationsWhitelistListGroupsLinkedToChannelResponse adminConversationsW AdminTeamsCreateResponse adminTeamsCreate(AdminTeamsCreateRequest req) throws IOException, SlackApiException; - AdminTeamsCreateResponse adminTeamsCreate(RequestConfigurator req) throws IOException, SlackApiException; + AdminTeamsCreateResponse adminTeamsCreate( + RequestConfigurator req) + throws IOException, SlackApiException; AdminTeamsListResponse adminTeamsList(AdminTeamsListRequest req) throws IOException, SlackApiException; - AdminTeamsListResponse adminTeamsList(RequestConfigurator req) throws IOException, SlackApiException; + AdminTeamsListResponse adminTeamsList(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.teams.owners // ------------------------------ - AdminTeamsOwnersListResponse adminTeamsOwnersList(AdminTeamsOwnersListRequest req) throws IOException, SlackApiException; + AdminTeamsOwnersListResponse adminTeamsOwnersList(AdminTeamsOwnersListRequest req) + throws IOException, SlackApiException; - AdminTeamsOwnersListResponse adminTeamsOwnersList(RequestConfigurator req) throws IOException, SlackApiException; + AdminTeamsOwnersListResponse adminTeamsOwnersList( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.teams.settings // ------------------------------ - AdminTeamsSettingsInfoResponse adminTeamsSettingsInfo(AdminTeamsSettingsInfoRequest req) throws IOException, SlackApiException; + AdminTeamsSettingsInfoResponse adminTeamsSettingsInfo(AdminTeamsSettingsInfoRequest req) + throws IOException, SlackApiException; - AdminTeamsSettingsInfoResponse adminTeamsSettingsInfo(RequestConfigurator req) throws IOException, SlackApiException; + AdminTeamsSettingsInfoResponse adminTeamsSettingsInfo( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminTeamsSettingsSetDefaultChannelsResponse adminTeamsSettingsSetDefaultChannels(AdminTeamsSettingsSetDefaultChannelsRequest req) throws IOException, SlackApiException; + AdminTeamsSettingsSetDefaultChannelsResponse adminTeamsSettingsSetDefaultChannels( + AdminTeamsSettingsSetDefaultChannelsRequest req) throws IOException, SlackApiException; - AdminTeamsSettingsSetDefaultChannelsResponse adminTeamsSettingsSetDefaultChannels(RequestConfigurator req) throws IOException, SlackApiException; + AdminTeamsSettingsSetDefaultChannelsResponse adminTeamsSettingsSetDefaultChannels( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminTeamsSettingsSetDescriptionResponse adminTeamsSettingsSetDescription(AdminTeamsSettingsSetDescriptionRequest req) throws IOException, SlackApiException; + AdminTeamsSettingsSetDescriptionResponse adminTeamsSettingsSetDescription( + AdminTeamsSettingsSetDescriptionRequest req) throws IOException, SlackApiException; - AdminTeamsSettingsSetDescriptionResponse adminTeamsSettingsSetDescription(RequestConfigurator req) throws IOException, SlackApiException; + AdminTeamsSettingsSetDescriptionResponse adminTeamsSettingsSetDescription( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminTeamsSettingsSetDiscoverabilityResponse adminTeamsSettingsSetDiscoverability(AdminTeamsSettingsSetDiscoverabilityRequest req) throws IOException, SlackApiException; + AdminTeamsSettingsSetDiscoverabilityResponse adminTeamsSettingsSetDiscoverability( + AdminTeamsSettingsSetDiscoverabilityRequest req) throws IOException, SlackApiException; - AdminTeamsSettingsSetDiscoverabilityResponse adminTeamsSettingsSetDiscoverability(RequestConfigurator req) throws IOException, SlackApiException; + AdminTeamsSettingsSetDiscoverabilityResponse adminTeamsSettingsSetDiscoverability( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminTeamsSettingsSetIconResponse adminTeamsSettingsSetIcon(AdminTeamsSettingsSetIconRequest req) throws IOException, SlackApiException; + AdminTeamsSettingsSetIconResponse adminTeamsSettingsSetIcon(AdminTeamsSettingsSetIconRequest req) + throws IOException, SlackApiException; - AdminTeamsSettingsSetIconResponse adminTeamsSettingsSetIcon(RequestConfigurator req) throws IOException, SlackApiException; + AdminTeamsSettingsSetIconResponse adminTeamsSettingsSetIcon( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminTeamsSettingsSetNameResponse adminTeamsSettingsSetName(AdminTeamsSettingsSetNameRequest req) throws IOException, SlackApiException; + AdminTeamsSettingsSetNameResponse adminTeamsSettingsSetName(AdminTeamsSettingsSetNameRequest req) + throws IOException, SlackApiException; - AdminTeamsSettingsSetNameResponse adminTeamsSettingsSetName(RequestConfigurator req) throws IOException, SlackApiException; + AdminTeamsSettingsSetNameResponse adminTeamsSettingsSetName( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.usergroups // ------------------------------ - AdminUsergroupsAddChannelsResponse adminUsergroupsAddChannels(AdminUsergroupsAddChannelsRequest req) throws IOException, SlackApiException; + AdminUsergroupsAddChannelsResponse adminUsergroupsAddChannels(AdminUsergroupsAddChannelsRequest req) + throws IOException, SlackApiException; AdminUsergroupsAddChannelsResponse adminUsergroupsAddChannels( RequestConfigurator req) throws IOException, SlackApiException; - AdminUsergroupsAddTeamsResponse adminUsergroupsAddTeams(AdminUsergroupsAddTeamsRequest req) throws IOException, SlackApiException; + AdminUsergroupsAddTeamsResponse adminUsergroupsAddTeams(AdminUsergroupsAddTeamsRequest req) + throws IOException, SlackApiException; AdminUsergroupsAddTeamsResponse adminUsergroupsAddTeams( RequestConfigurator req) throws IOException, SlackApiException; - AdminUsergroupsListChannelsResponse adminUsergroupsListChannels(AdminUsergroupsListChannelsRequest req) throws IOException, SlackApiException; + AdminUsergroupsListChannelsResponse adminUsergroupsListChannels(AdminUsergroupsListChannelsRequest req) + throws IOException, SlackApiException; AdminUsergroupsListChannelsResponse adminUsergroupsListChannels( RequestConfigurator req) throws IOException, SlackApiException; - AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels(AdminUsergroupsRemoveChannelsRequest req) throws IOException, SlackApiException; + AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels(AdminUsergroupsRemoveChannelsRequest req) + throws IOException, SlackApiException; AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( RequestConfigurator req) @@ -750,99 +941,155 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( AdminUsersAssignResponse adminUsersAssign(AdminUsersAssignRequest req) throws IOException, SlackApiException; - AdminUsersAssignResponse adminUsersAssign(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersAssignResponse adminUsersAssign( + RequestConfigurator req) + throws IOException, SlackApiException; AdminUsersInviteResponse adminUsersInvite(AdminUsersInviteRequest req) throws IOException, SlackApiException; - AdminUsersInviteResponse adminUsersInvite(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersInviteResponse adminUsersInvite( + RequestConfigurator req) + throws IOException, SlackApiException; AdminUsersListResponse adminUsersList(AdminUsersListRequest req) throws IOException, SlackApiException; - AdminUsersListResponse adminUsersList(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersListResponse adminUsersList(RequestConfigurator req) + throws IOException, SlackApiException; AdminUsersRemoveResponse adminUsersRemove(AdminUsersRemoveRequest req) throws IOException, SlackApiException; - AdminUsersRemoveResponse adminUsersRemove(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersRemoveResponse adminUsersRemove( + RequestConfigurator req) + throws IOException, SlackApiException; AdminUsersSetAdminResponse adminUsersSetAdmin(AdminUsersSetAdminRequest req) throws IOException, SlackApiException; - AdminUsersSetAdminResponse adminUsersSetAdmin(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersSetAdminResponse adminUsersSetAdmin( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminUsersSetExpirationResponse adminUsersSetExpiration(AdminUsersSetExpirationRequest req) throws IOException, SlackApiException; + AdminUsersSetExpirationResponse adminUsersSetExpiration(AdminUsersSetExpirationRequest req) + throws IOException, SlackApiException; - AdminUsersSetExpirationResponse adminUsersSetExpiration(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersSetExpirationResponse adminUsersSetExpiration( + RequestConfigurator req) + throws IOException, SlackApiException; AdminUsersSetOwnerResponse adminUsersSetOwner(AdminUsersSetOwnerRequest req) throws IOException, SlackApiException; - AdminUsersSetOwnerResponse adminUsersSetOwner(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersSetOwnerResponse adminUsersSetOwner( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminUsersSetRegularResponse adminUsersSetRegular(AdminUsersSetRegularRequest req) throws IOException, SlackApiException; + AdminUsersSetRegularResponse adminUsersSetRegular(AdminUsersSetRegularRequest req) + throws IOException, SlackApiException; - AdminUsersSetRegularResponse adminUsersSetRegular(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersSetRegularResponse adminUsersSetRegular( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.users.session // ------------------------------ - AdminUsersSessionInvalidateResponse adminUsersSessionInvalidate(AdminUsersSessionInvalidateRequest req) throws IOException, SlackApiException; + AdminUsersSessionInvalidateResponse adminUsersSessionInvalidate(AdminUsersSessionInvalidateRequest req) + throws IOException, SlackApiException; - AdminUsersSessionInvalidateResponse adminUsersSessionInvalidate(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersSessionInvalidateResponse adminUsersSessionInvalidate( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminUsersSessionListResponse adminUsersSessionList(AdminUsersSessionListRequest req) throws IOException, SlackApiException; + AdminUsersSessionListResponse adminUsersSessionList(AdminUsersSessionListRequest req) + throws IOException, SlackApiException; - AdminUsersSessionListResponse adminUsersSessionList(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersSessionListResponse adminUsersSessionList( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminUsersSessionResetResponse adminUsersSessionReset(AdminUsersSessionResetRequest req) throws IOException, SlackApiException; + AdminUsersSessionResetResponse adminUsersSessionReset(AdminUsersSessionResetRequest req) + throws IOException, SlackApiException; - AdminUsersSessionResetResponse adminUsersSessionReset(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersSessionResetResponse adminUsersSessionReset( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminUsersSessionResetBulkResponse adminUsersSessionResetBulk(AdminUsersSessionResetBulkRequest req) throws IOException, SlackApiException; + AdminUsersSessionResetBulkResponse adminUsersSessionResetBulk(AdminUsersSessionResetBulkRequest req) + throws IOException, SlackApiException; - AdminUsersSessionResetBulkResponse adminUsersSessionResetBulk(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersSessionResetBulkResponse adminUsersSessionResetBulk( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminUsersSessionGetSettingsResponse adminUsersSessionGetSettings(AdminUsersSessionGetSettingsRequest req) throws IOException, SlackApiException; + AdminUsersSessionGetSettingsResponse adminUsersSessionGetSettings(AdminUsersSessionGetSettingsRequest req) + throws IOException, SlackApiException; - AdminUsersSessionGetSettingsResponse adminUsersSessionGetSettings(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersSessionGetSettingsResponse adminUsersSessionGetSettings( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminUsersSessionSetSettingsResponse adminUsersSessionSetSettings(AdminUsersSessionSetSettingsRequest req) throws IOException, SlackApiException; + AdminUsersSessionSetSettingsResponse adminUsersSessionSetSettings(AdminUsersSessionSetSettingsRequest req) + throws IOException, SlackApiException; - AdminUsersSessionSetSettingsResponse adminUsersSessionSetSettings(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersSessionSetSettingsResponse adminUsersSessionSetSettings( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminUsersSessionClearSettingsResponse adminUsersSessionClearSettings(AdminUsersSessionClearSettingsRequest req) throws IOException, SlackApiException; + AdminUsersSessionClearSettingsResponse adminUsersSessionClearSettings(AdminUsersSessionClearSettingsRequest req) + throws IOException, SlackApiException; - AdminUsersSessionClearSettingsResponse adminUsersSessionClearSettings(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersSessionClearSettingsResponse adminUsersSessionClearSettings( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.users.unsupportedVersions // ------------------------------ - AdminUsersUnsupportedVersionsExportResponse adminUsersUnsupportedVersionsExport(AdminUsersUnsupportedVersionsExportRequest req) throws IOException, SlackApiException; + AdminUsersUnsupportedVersionsExportResponse adminUsersUnsupportedVersionsExport( + AdminUsersUnsupportedVersionsExportRequest req) throws IOException, SlackApiException; - AdminUsersUnsupportedVersionsExportResponse adminUsersUnsupportedVersionsExport(RequestConfigurator req) throws IOException, SlackApiException; + AdminUsersUnsupportedVersionsExportResponse adminUsersUnsupportedVersionsExport( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // admin.workflows // ------------------------------ - AdminWorkflowsCollaboratorsAddResponse adminWorkflowsCollaboratorsAdd(AdminWorkflowsCollaboratorsAddRequest req) throws IOException, SlackApiException; + AdminWorkflowsCollaboratorsAddResponse adminWorkflowsCollaboratorsAdd(AdminWorkflowsCollaboratorsAddRequest req) + throws IOException, SlackApiException; - AdminWorkflowsCollaboratorsAddResponse adminWorkflowsCollaboratorsAdd(RequestConfigurator req) throws IOException, SlackApiException; + AdminWorkflowsCollaboratorsAddResponse adminWorkflowsCollaboratorsAdd( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminWorkflowsCollaboratorsRemoveResponse adminWorkflowsCollaboratorsRemove(AdminWorkflowsCollaboratorsRemoveRequest req) throws IOException, SlackApiException; + AdminWorkflowsCollaboratorsRemoveResponse adminWorkflowsCollaboratorsRemove( + AdminWorkflowsCollaboratorsRemoveRequest req) throws IOException, SlackApiException; - AdminWorkflowsCollaboratorsRemoveResponse adminWorkflowsCollaboratorsRemove(RequestConfigurator req) throws IOException, SlackApiException; + AdminWorkflowsCollaboratorsRemoveResponse adminWorkflowsCollaboratorsRemove( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminWorkflowsPermissionsLookupResponse adminWorkflowsPermissionsLookup(AdminWorkflowsPermissionsLookupRequest req) throws IOException, SlackApiException; + AdminWorkflowsPermissionsLookupResponse adminWorkflowsPermissionsLookup(AdminWorkflowsPermissionsLookupRequest req) + throws IOException, SlackApiException; - AdminWorkflowsPermissionsLookupResponse adminWorkflowsPermissionsLookup(RequestConfigurator req) throws IOException, SlackApiException; + AdminWorkflowsPermissionsLookupResponse adminWorkflowsPermissionsLookup( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminWorkflowsSearchResponse adminWorkflowsSearch(AdminWorkflowsSearchRequest req) throws IOException, SlackApiException; + AdminWorkflowsSearchResponse adminWorkflowsSearch(AdminWorkflowsSearchRequest req) + throws IOException, SlackApiException; - AdminWorkflowsSearchResponse adminWorkflowsSearch(RequestConfigurator req) throws IOException, SlackApiException; + AdminWorkflowsSearchResponse adminWorkflowsSearch( + RequestConfigurator req) + throws IOException, SlackApiException; - AdminWorkflowsUnpublishResponse adminWorkflowsUnpublish(AdminWorkflowsUnpublishRequest req) throws IOException, SlackApiException; + AdminWorkflowsUnpublishResponse adminWorkflowsUnpublish(AdminWorkflowsUnpublishRequest req) + throws IOException, SlackApiException; - AdminWorkflowsUnpublishResponse adminWorkflowsUnpublish(RequestConfigurator req) throws IOException, SlackApiException; + AdminWorkflowsUnpublishResponse adminWorkflowsUnpublish( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // api @@ -850,7 +1097,8 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( ApiTestResponse apiTest(ApiTestRequest req) throws IOException, SlackApiException; - ApiTestResponse apiTest(RequestConfigurator req) throws IOException, SlackApiException; + ApiTestResponse apiTest(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // apps @@ -858,23 +1106,30 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( AppsUninstallResponse appsUninstall(AppsUninstallRequest req) throws IOException, SlackApiException; - AppsUninstallResponse appsUninstall(RequestConfigurator req) throws IOException, SlackApiException; + AppsUninstallResponse appsUninstall(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // apps.connections // ------------------------------ - AppsConnectionsOpenResponse appsConnectionsOpen(AppsConnectionsOpenRequest req) throws IOException, SlackApiException; + AppsConnectionsOpenResponse appsConnectionsOpen(AppsConnectionsOpenRequest req) + throws IOException, SlackApiException; - AppsConnectionsOpenResponse appsConnectionsOpen(RequestConfigurator req) throws IOException, SlackApiException; + AppsConnectionsOpenResponse appsConnectionsOpen( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // apps.event.authorizations // ------------------------------ - AppsEventAuthorizationsListResponse appsEventAuthorizationsList(AppsEventAuthorizationsListRequest req) throws IOException, SlackApiException; + AppsEventAuthorizationsListResponse appsEventAuthorizationsList(AppsEventAuthorizationsListRequest req) + throws IOException, SlackApiException; - AppsEventAuthorizationsListResponse appsEventAuthorizationsList(RequestConfigurator req) throws IOException, SlackApiException; + AppsEventAuthorizationsListResponse appsEventAuthorizationsList( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // apps.manifest @@ -882,24 +1137,34 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( AppsManifestCreateResponse appsManifestCreate(AppsManifestCreateRequest req) throws IOException, SlackApiException; - AppsManifestCreateResponse appsManifestCreate(RequestConfigurator req) throws IOException, SlackApiException; - + AppsManifestCreateResponse appsManifestCreate( + RequestConfigurator req) + throws IOException, SlackApiException; AppsManifestDeleteResponse appsManifestDelete(AppsManifestDeleteRequest req) throws IOException, SlackApiException; - AppsManifestDeleteResponse appsManifestDelete(RequestConfigurator req) throws IOException, SlackApiException; + AppsManifestDeleteResponse appsManifestDelete( + RequestConfigurator req) + throws IOException, SlackApiException; AppsManifestExportResponse appsManifestExport(AppsManifestExportRequest req) throws IOException, SlackApiException; - AppsManifestExportResponse appsManifestExport(RequestConfigurator req) throws IOException, SlackApiException; + AppsManifestExportResponse appsManifestExport( + RequestConfigurator req) + throws IOException, SlackApiException; AppsManifestUpdateResponse appsManifestUpdate(AppsManifestUpdateRequest req) throws IOException, SlackApiException; - AppsManifestUpdateResponse appsManifestUpdate(RequestConfigurator req) throws IOException, SlackApiException; + AppsManifestUpdateResponse appsManifestUpdate( + RequestConfigurator req) + throws IOException, SlackApiException; - AppsManifestValidateResponse appsManifestValidate(AppsManifestValidateRequest req) throws IOException, SlackApiException; + AppsManifestValidateResponse appsManifestValidate(AppsManifestValidateRequest req) + throws IOException, SlackApiException; - AppsManifestValidateResponse appsManifestValidate(RequestConfigurator req) throws IOException, SlackApiException; + AppsManifestValidateResponse appsManifestValidate( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // apps.permissions @@ -908,30 +1173,40 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( // Developer preview has ended // This feature was exclusive to our workspace apps developer preview. // The preview has now ended, but fan-favorite features such as token rotation - // and the Conversations API will become available to classic Slack apps over the coming months. + // and the Conversations API will become available to classic Slack apps over + // the coming months. @Deprecated - AppsPermissionsInfoResponse appsPermissionsInfo(AppsPermissionsInfoRequest req) throws IOException, SlackApiException; + AppsPermissionsInfoResponse appsPermissionsInfo(AppsPermissionsInfoRequest req) + throws IOException, SlackApiException; // Developer preview has ended // This feature was exclusive to our workspace apps developer preview. // The preview has now ended, but fan-favorite features such as token rotation - // and the Conversations API will become available to classic Slack apps over the coming months. + // and the Conversations API will become available to classic Slack apps over + // the coming months. @Deprecated - AppsPermissionsInfoResponse appsPermissionsInfo(RequestConfigurator req) throws IOException, SlackApiException; + AppsPermissionsInfoResponse appsPermissionsInfo( + RequestConfigurator req) + throws IOException, SlackApiException; // Developer preview has ended // This feature was exclusive to our workspace apps developer preview. // The preview has now ended, but fan-favorite features such as token rotation - // and the Conversations API will become available to classic Slack apps over the coming months. + // and the Conversations API will become available to classic Slack apps over + // the coming months. @Deprecated - AppsPermissionsRequestResponse appsPermissionsRequest(AppsPermissionsRequestRequest req) throws IOException, SlackApiException; + AppsPermissionsRequestResponse appsPermissionsRequest(AppsPermissionsRequestRequest req) + throws IOException, SlackApiException; // Developer preview has ended // This feature was exclusive to our workspace apps developer preview. // The preview has now ended, but fan-favorite features such as token rotation - // and the Conversations API will become available to classic Slack apps over the coming months. + // and the Conversations API will become available to classic Slack apps over + // the coming months. @Deprecated - AppsPermissionsRequestResponse appsPermissionsRequest(RequestConfigurator req) throws IOException, SlackApiException; + AppsPermissionsRequestResponse appsPermissionsRequest( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // apps.permissions.resources @@ -940,9 +1215,11 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( // Developer preview has ended // This feature was exclusive to our workspace apps developer preview. // The preview has now ended, but fan-favorite features such as token rotation - // and the Conversations API will become available to classic Slack apps over the coming months. + // and the Conversations API will become available to classic Slack apps over + // the coming months. @Deprecated - AppsPermissionsResourcesListResponse appsPermissionsResourcesList(AppsPermissionsResourcesListRequest req) throws IOException, SlackApiException; + AppsPermissionsResourcesListResponse appsPermissionsResourcesList(AppsPermissionsResourcesListRequest req) + throws IOException, SlackApiException; // ------------------------------ // apps.permissions.scopes @@ -951,9 +1228,11 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( // Developer preview has ended // This feature was exclusive to our workspace apps developer preview. // The preview has now ended, but fan-favorite features such as token rotation - // and the Conversations API will become available to classic Slack apps over the coming months. + // and the Conversations API will become available to classic Slack apps over + // the coming months. @Deprecated - AppsPermissionsScopesListResponse appsPermissionsScopesList(AppsPermissionsScopesListRequest req) throws IOException, SlackApiException; + AppsPermissionsScopesListResponse appsPermissionsScopesList(AppsPermissionsScopesListRequest req) + throws IOException, SlackApiException; // ------------------------------ // apps.permissions.users @@ -962,32 +1241,45 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( // Developer preview has ended // This feature was exclusive to our workspace apps developer preview. // The preview has now ended, but fan-favorite features such as token rotation - // and the Conversations API will become available to classic Slack apps over the coming months. + // and the Conversations API will become available to classic Slack apps over + // the coming months. @Deprecated - AppsPermissionsUsersListResponse appsPermissionsUsersList(AppsPermissionsUsersListRequest req) throws IOException, SlackApiException; + AppsPermissionsUsersListResponse appsPermissionsUsersList(AppsPermissionsUsersListRequest req) + throws IOException, SlackApiException; // Developer preview has ended // This feature was exclusive to our workspace apps developer preview. // The preview has now ended, but fan-favorite features such as token rotation - // and the Conversations API will become available to classic Slack apps over the coming months. + // and the Conversations API will become available to classic Slack apps over + // the coming months. @Deprecated - AppsPermissionsUsersRequestResponse appsPermissionsUsersRequest(AppsPermissionsUsersRequestRequest req) throws IOException, SlackApiException; + AppsPermissionsUsersRequestResponse appsPermissionsUsersRequest(AppsPermissionsUsersRequestRequest req) + throws IOException, SlackApiException; // ------------------------------ // assistant.threads // ------------------------------ - AssistantThreadsSetStatusResponse assistantThreadsSetStatus(AssistantThreadsSetStatusRequest req) throws IOException, SlackApiException; + AssistantThreadsSetStatusResponse assistantThreadsSetStatus(AssistantThreadsSetStatusRequest req) + throws IOException, SlackApiException; - AssistantThreadsSetStatusResponse assistantThreadsSetStatus(RequestConfigurator req) throws IOException, SlackApiException; + AssistantThreadsSetStatusResponse assistantThreadsSetStatus( + RequestConfigurator req) + throws IOException, SlackApiException; - AssistantThreadsSetSuggestedPromptsResponse assistantThreadsSetSuggestedPrompts(AssistantThreadsSetSuggestedPromptsRequest req) throws IOException, SlackApiException; + AssistantThreadsSetSuggestedPromptsResponse assistantThreadsSetSuggestedPrompts( + AssistantThreadsSetSuggestedPromptsRequest req) throws IOException, SlackApiException; - AssistantThreadsSetSuggestedPromptsResponse assistantThreadsSetSuggestedPrompts(RequestConfigurator req) throws IOException, SlackApiException; + AssistantThreadsSetSuggestedPromptsResponse assistantThreadsSetSuggestedPrompts( + RequestConfigurator req) + throws IOException, SlackApiException; - AssistantThreadsSetTitleResponse assistantThreadsSetTitle(AssistantThreadsSetTitleRequest req) throws IOException, SlackApiException; + AssistantThreadsSetTitleResponse assistantThreadsSetTitle(AssistantThreadsSetTitleRequest req) + throws IOException, SlackApiException; - AssistantThreadsSetTitleResponse assistantThreadsSetTitle(RequestConfigurator req) throws IOException, SlackApiException; + AssistantThreadsSetTitleResponse assistantThreadsSetTitle( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // auth @@ -995,11 +1287,13 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( AuthRevokeResponse authRevoke(AuthRevokeRequest req) throws IOException, SlackApiException; - AuthRevokeResponse authRevoke(RequestConfigurator req) throws IOException, SlackApiException; + AuthRevokeResponse authRevoke(RequestConfigurator req) + throws IOException, SlackApiException; AuthTestResponse authTest(AuthTestRequest req) throws IOException, SlackApiException; - AuthTestResponse authTest(RequestConfigurator req) throws IOException, SlackApiException; + AuthTestResponse authTest(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // auth.teams @@ -1007,7 +1301,8 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( AuthTeamsListResponse authTeamsList(AuthTeamsListRequest req) throws IOException, SlackApiException; - AuthTeamsListResponse authTeamsList(RequestConfigurator req) throws IOException, SlackApiException; + AuthTeamsListResponse authTeamsList(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // bookmarks @@ -1015,19 +1310,24 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( BookmarksAddResponse bookmarksAdd(BookmarksAddRequest req) throws IOException, SlackApiException; - BookmarksAddResponse bookmarksAdd(RequestConfigurator req) throws IOException, SlackApiException; + BookmarksAddResponse bookmarksAdd(RequestConfigurator req) + throws IOException, SlackApiException; BookmarksEditResponse bookmarksEdit(BookmarksEditRequest req) throws IOException, SlackApiException; - BookmarksEditResponse bookmarksEdit(RequestConfigurator req) throws IOException, SlackApiException; + BookmarksEditResponse bookmarksEdit(RequestConfigurator req) + throws IOException, SlackApiException; BookmarksListResponse bookmarksList(BookmarksListRequest req) throws IOException, SlackApiException; - BookmarksListResponse bookmarksList(RequestConfigurator req) throws IOException, SlackApiException; + BookmarksListResponse bookmarksList(RequestConfigurator req) + throws IOException, SlackApiException; BookmarksRemoveResponse bookmarksRemove(BookmarksRemoveRequest req) throws IOException, SlackApiException; - BookmarksRemoveResponse bookmarksRemove(RequestConfigurator req) throws IOException, SlackApiException; + BookmarksRemoveResponse bookmarksRemove( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // bots @@ -1035,7 +1335,8 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( BotsInfoResponse botsInfo(BotsInfoRequest req) throws IOException, SlackApiException; - BotsInfoResponse botsInfo(RequestConfigurator req) throws IOException, SlackApiException; + BotsInfoResponse botsInfo(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // canvases @@ -1043,27 +1344,38 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( CanvasesCreateResponse canvasesCreate(CanvasesCreateRequest req) throws IOException, SlackApiException; - CanvasesCreateResponse canvasesCreate(RequestConfigurator req) throws IOException, SlackApiException; + CanvasesCreateResponse canvasesCreate(RequestConfigurator req) + throws IOException, SlackApiException; CanvasesEditResponse canvasesEdit(CanvasesEditRequest req) throws IOException, SlackApiException; - CanvasesEditResponse canvasesEdit(RequestConfigurator req) throws IOException, SlackApiException; + CanvasesEditResponse canvasesEdit(RequestConfigurator req) + throws IOException, SlackApiException; CanvasesDeleteResponse canvasesDelete(CanvasesDeleteRequest req) throws IOException, SlackApiException; - CanvasesDeleteResponse canvasesDelete(RequestConfigurator req) throws IOException, SlackApiException; + CanvasesDeleteResponse canvasesDelete(RequestConfigurator req) + throws IOException, SlackApiException; CanvasesAccessSetResponse canvasesAccessSet(CanvasesAccessSetRequest req) throws IOException, SlackApiException; - CanvasesAccessSetResponse canvasesAccessSet(RequestConfigurator req) throws IOException, SlackApiException; + CanvasesAccessSetResponse canvasesAccessSet( + RequestConfigurator req) + throws IOException, SlackApiException; - CanvasesAccessDeleteResponse canvasesAccessDelete(CanvasesAccessDeleteRequest req) throws IOException, SlackApiException; + CanvasesAccessDeleteResponse canvasesAccessDelete(CanvasesAccessDeleteRequest req) + throws IOException, SlackApiException; - CanvasesAccessDeleteResponse canvasesAccessDelete(RequestConfigurator req) throws IOException, SlackApiException; + CanvasesAccessDeleteResponse canvasesAccessDelete( + RequestConfigurator req) + throws IOException, SlackApiException; - CanvasesSectionsLookupResponse canvasesSectionsLookup(CanvasesSectionsLookupRequest req) throws IOException, SlackApiException; + CanvasesSectionsLookupResponse canvasesSectionsLookup(CanvasesSectionsLookupRequest req) + throws IOException, SlackApiException; - CanvasesSectionsLookupResponse canvasesSectionsLookup(RequestConfigurator req) throws IOException, SlackApiException; + CanvasesSectionsLookupResponse canvasesSectionsLookup( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // calls @@ -1071,155 +1383,186 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( CallsAddResponse callsAdd(CallsAddRequest req) throws IOException, SlackApiException; - CallsAddResponse callsAdd(RequestConfigurator req) throws IOException, SlackApiException; + CallsAddResponse callsAdd(RequestConfigurator req) + throws IOException, SlackApiException; CallsEndResponse callsEnd(CallsEndRequest req) throws IOException, SlackApiException; - CallsEndResponse callsEnd(RequestConfigurator req) throws IOException, SlackApiException; + CallsEndResponse callsEnd(RequestConfigurator req) + throws IOException, SlackApiException; CallsInfoResponse callsInfo(CallsInfoRequest req) throws IOException, SlackApiException; - CallsInfoResponse callsInfo(RequestConfigurator req) throws IOException, SlackApiException; + CallsInfoResponse callsInfo(RequestConfigurator req) + throws IOException, SlackApiException; CallsUpdateResponse callsUpdate(CallsUpdateRequest req) throws IOException, SlackApiException; - CallsUpdateResponse callsUpdate(RequestConfigurator req) throws IOException, SlackApiException; + CallsUpdateResponse callsUpdate(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // calls.participants // ------------------------------ - CallsParticipantsAddResponse callsParticipantsAdd(CallsParticipantsAddRequest req) throws IOException, SlackApiException; + CallsParticipantsAddResponse callsParticipantsAdd(CallsParticipantsAddRequest req) + throws IOException, SlackApiException; - CallsParticipantsAddResponse callsParticipantsAdd(RequestConfigurator req) throws IOException, SlackApiException; + CallsParticipantsAddResponse callsParticipantsAdd( + RequestConfigurator req) + throws IOException, SlackApiException; - CallsParticipantsRemoveResponse callsParticipantsRemove(CallsParticipantsRemoveRequest req) throws IOException, SlackApiException; + CallsParticipantsRemoveResponse callsParticipantsRemove(CallsParticipantsRemoveRequest req) + throws IOException, SlackApiException; - CallsParticipantsRemoveResponse callsParticipantsRemove(RequestConfigurator req) throws IOException, SlackApiException; + CallsParticipantsRemoveResponse callsParticipantsRemove( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // channels // ------------------------------ @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsArchiveResponse channelsArchive(ChannelsArchiveRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsArchiveResponse channelsArchive(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsArchiveResponse channelsArchive( + RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsCreateResponse channelsCreate(ChannelsCreateRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsCreateResponse channelsCreate(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsCreateResponse channelsCreate(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsHistoryResponse channelsHistory(ChannelsHistoryRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsHistoryResponse channelsHistory(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsHistoryResponse channelsHistory( + RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsRepliesResponse channelsReplies(ChannelsRepliesRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsRepliesResponse channelsReplies(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsRepliesResponse channelsReplies( + RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsInfoResponse channelsInfo(ChannelsInfoRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsInfoResponse channelsInfo(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsInfoResponse channelsInfo(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsListResponse channelsList(ChannelsListRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsListResponse channelsList(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsListResponse channelsList(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsInviteResponse channelsInvite(ChannelsInviteRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsInviteResponse channelsInvite(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsInviteResponse channelsInvite(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsJoinResponse channelsJoin(ChannelsJoinRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsJoinResponse channelsJoin(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsJoinResponse channelsJoin(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsKickResponse channelsKick(ChannelsKickRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsKickResponse channelsKick(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsKickResponse channelsKick(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsLeaveResponse channelsLeave(ChannelsLeaveRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsLeaveResponse channelsLeave(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsLeaveResponse channelsLeave(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsMarkResponse channelsMark(ChannelsMarkRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsMarkResponse channelsMark(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsMarkResponse channelsMark(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsRenameResponse channelsRename(ChannelsRenameRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsRenameResponse channelsRename(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsRenameResponse channelsRename(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsSetPurposeResponse channelsSetPurpose(ChannelsSetPurposeRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsSetPurposeResponse channelsSetPurpose(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsSetPurposeResponse channelsSetPurpose( + RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsSetTopicResponse channelsSetTopic(ChannelsSetTopicRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsSetTopicResponse channelsSetTopic(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsSetTopicResponse channelsSetTopic( + RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ChannelsUnarchiveResponse channelsUnarchive(ChannelsUnarchiveRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ChannelsUnarchiveResponse channelsUnarchive(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ChannelsUnarchiveResponse channelsUnarchive( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // chat @@ -1227,166 +1570,261 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( ChatGetPermalinkResponse chatGetPermalink(ChatGetPermalinkRequest req) throws IOException, SlackApiException; - ChatGetPermalinkResponse chatGetPermalink(RequestConfigurator req) throws IOException, SlackApiException; + ChatGetPermalinkResponse chatGetPermalink( + RequestConfigurator req) + throws IOException, SlackApiException; ChatDeleteResponse chatDelete(ChatDeleteRequest req) throws IOException, SlackApiException; - ChatDeleteResponse chatDelete(RequestConfigurator req) throws IOException, SlackApiException; + ChatDeleteResponse chatDelete(RequestConfigurator req) + throws IOException, SlackApiException; - ChatDeleteScheduledMessageResponse chatDeleteScheduledMessage(ChatDeleteScheduledMessageRequest req) throws IOException, SlackApiException; + ChatDeleteScheduledMessageResponse chatDeleteScheduledMessage(ChatDeleteScheduledMessageRequest req) + throws IOException, SlackApiException; - ChatDeleteScheduledMessageResponse chatDeleteScheduledMessage(RequestConfigurator req) throws IOException, SlackApiException; + ChatDeleteScheduledMessageResponse chatDeleteScheduledMessage( + RequestConfigurator req) + throws IOException, SlackApiException; ChatMeMessageResponse chatMeMessage(ChatMeMessageRequest req) throws IOException, SlackApiException; - ChatMeMessageResponse chatMeMessage(RequestConfigurator req) throws IOException, SlackApiException; + ChatMeMessageResponse chatMeMessage(RequestConfigurator req) + throws IOException, SlackApiException; ChatPostEphemeralResponse chatPostEphemeral(ChatPostEphemeralRequest req) throws IOException, SlackApiException; - ChatPostEphemeralResponse chatPostEphemeral(RequestConfigurator req) throws IOException, SlackApiException; + ChatPostEphemeralResponse chatPostEphemeral( + RequestConfigurator req) + throws IOException, SlackApiException; ChatPostMessageResponse chatPostMessage(ChatPostMessageRequest req) throws IOException, SlackApiException; - ChatPostMessageResponse chatPostMessage(RequestConfigurator req) throws IOException, SlackApiException; + ChatPostMessageResponse chatPostMessage( + RequestConfigurator req) + throws IOException, SlackApiException; - ChatScheduleMessageResponse chatScheduleMessage(ChatScheduleMessageRequest req) throws IOException, SlackApiException; + ChatScheduleMessageResponse chatScheduleMessage(ChatScheduleMessageRequest req) + throws IOException, SlackApiException; - ChatScheduleMessageResponse chatScheduleMessage(RequestConfigurator req) throws IOException, SlackApiException; + ChatScheduleMessageResponse chatScheduleMessage( + RequestConfigurator req) + throws IOException, SlackApiException; ChatUpdateResponse chatUpdate(ChatUpdateRequest req) throws IOException, SlackApiException; - ChatUpdateResponse chatUpdate(RequestConfigurator req) throws IOException, SlackApiException; + ChatUpdateResponse chatUpdate(RequestConfigurator req) + throws IOException, SlackApiException; ChatUnfurlResponse chatUnfurl(ChatUnfurlRequest req) throws IOException, SlackApiException; - ChatUnfurlResponse chatUnfurl(RequestConfigurator req) throws IOException, SlackApiException; + ChatUnfurlResponse chatUnfurl(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // chat.scheduledMessages // ------------------------------ - ChatScheduledMessagesListResponse chatScheduledMessagesList(ChatScheduledMessagesListRequest req) throws IOException, SlackApiException; + ChatScheduledMessagesListResponse chatScheduledMessagesList(ChatScheduledMessagesListRequest req) + throws IOException, SlackApiException; - ChatScheduledMessagesListResponse chatScheduledMessagesList(RequestConfigurator req) throws IOException, SlackApiException; + ChatScheduledMessagesListResponse chatScheduledMessagesList( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // conversations // ------------------------------ - ConversationsArchiveResponse conversationsArchive(ConversationsArchiveRequest req) throws IOException, SlackApiException; + ConversationsArchiveResponse conversationsArchive(ConversationsArchiveRequest req) + throws IOException, SlackApiException; - ConversationsArchiveResponse conversationsArchive(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsArchiveResponse conversationsArchive( + RequestConfigurator req) + throws IOException, SlackApiException; ConversationsCloseResponse conversationsClose(ConversationsCloseRequest req) throws IOException, SlackApiException; - ConversationsCloseResponse conversationsClose(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsCloseResponse conversationsClose( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsCreateResponse conversationsCreate(ConversationsCreateRequest req) throws IOException, SlackApiException; + ConversationsCreateResponse conversationsCreate(ConversationsCreateRequest req) + throws IOException, SlackApiException; - ConversationsCreateResponse conversationsCreate(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsCreateResponse conversationsCreate( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsHistoryResponse conversationsHistory(ConversationsHistoryRequest req) throws IOException, SlackApiException; + ConversationsHistoryResponse conversationsHistory(ConversationsHistoryRequest req) + throws IOException, SlackApiException; - ConversationsHistoryResponse conversationsHistory(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsHistoryResponse conversationsHistory( + RequestConfigurator req) + throws IOException, SlackApiException; ConversationsInfoResponse conversationsInfo(ConversationsInfoRequest req) throws IOException, SlackApiException; - ConversationsInfoResponse conversationsInfo(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsInfoResponse conversationsInfo( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsInviteResponse conversationsInvite(ConversationsInviteRequest req) throws IOException, SlackApiException; + ConversationsInviteResponse conversationsInvite(ConversationsInviteRequest req) + throws IOException, SlackApiException; - ConversationsInviteResponse conversationsInvite(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsInviteResponse conversationsInvite( + RequestConfigurator req) + throws IOException, SlackApiException; ConversationsJoinResponse conversationsJoin(ConversationsJoinRequest req) throws IOException, SlackApiException; - ConversationsJoinResponse conversationsJoin(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsJoinResponse conversationsJoin( + RequestConfigurator req) + throws IOException, SlackApiException; ConversationsKickResponse conversationsKick(ConversationsKickRequest req) throws IOException, SlackApiException; - ConversationsKickResponse conversationsKick(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsKickResponse conversationsKick( + RequestConfigurator req) + throws IOException, SlackApiException; ConversationsLeaveResponse conversationsLeave(ConversationsLeaveRequest req) throws IOException, SlackApiException; - ConversationsLeaveResponse conversationsLeave(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsLeaveResponse conversationsLeave( + RequestConfigurator req) + throws IOException, SlackApiException; ConversationsListResponse conversationsList(ConversationsListRequest req) throws IOException, SlackApiException; - ConversationsListResponse conversationsList(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsListResponse conversationsList( + RequestConfigurator req) + throws IOException, SlackApiException; ConversationsMarkResponse conversationsMark(ConversationsMarkRequest req) throws IOException, SlackApiException; - ConversationsMarkResponse conversationsMark(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsMarkResponse conversationsMark( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsMembersResponse conversationsMembers(ConversationsMembersRequest req) throws IOException, SlackApiException; + ConversationsMembersResponse conversationsMembers(ConversationsMembersRequest req) + throws IOException, SlackApiException; - ConversationsMembersResponse conversationsMembers(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsMembersResponse conversationsMembers( + RequestConfigurator req) + throws IOException, SlackApiException; ConversationsOpenResponse conversationsOpen(ConversationsOpenRequest req) throws IOException, SlackApiException; - ConversationsOpenResponse conversationsOpen(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsOpenResponse conversationsOpen( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsRenameResponse conversationsRename(ConversationsRenameRequest req) throws IOException, SlackApiException; + ConversationsRenameResponse conversationsRename(ConversationsRenameRequest req) + throws IOException, SlackApiException; - ConversationsRenameResponse conversationsRename(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsRenameResponse conversationsRename( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsRepliesResponse conversationsReplies(ConversationsRepliesRequest req) throws IOException, SlackApiException; + ConversationsRepliesResponse conversationsReplies(ConversationsRepliesRequest req) + throws IOException, SlackApiException; - ConversationsRepliesResponse conversationsReplies(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsRepliesResponse conversationsReplies( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsSetPurposeResponse conversationsSetPurpose(ConversationsSetPurposeRequest req) throws IOException, SlackApiException; + ConversationsSetPurposeResponse conversationsSetPurpose(ConversationsSetPurposeRequest req) + throws IOException, SlackApiException; - ConversationsSetPurposeResponse conversationsSetPurpose(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsSetPurposeResponse conversationsSetPurpose( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsSetTopicResponse conversationsSetTopic(ConversationsSetTopicRequest req) throws IOException, SlackApiException; + ConversationsSetTopicResponse conversationsSetTopic(ConversationsSetTopicRequest req) + throws IOException, SlackApiException; - ConversationsSetTopicResponse conversationsSetTopic(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsSetTopicResponse conversationsSetTopic( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsUnarchiveResponse conversationsUnarchive(ConversationsUnarchiveRequest req) throws IOException, SlackApiException; + ConversationsUnarchiveResponse conversationsUnarchive(ConversationsUnarchiveRequest req) + throws IOException, SlackApiException; - ConversationsUnarchiveResponse conversationsUnarchive(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsUnarchiveResponse conversationsUnarchive( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsExternalInvitePermissionsSetResponse conversationsExternalInvitePermissionsSet(ConversationsExternalInvitePermissionsSetRequest req) throws IOException, SlackApiException; + ConversationsExternalInvitePermissionsSetResponse conversationsExternalInvitePermissionsSet( + ConversationsExternalInvitePermissionsSetRequest req) throws IOException, SlackApiException; - ConversationsExternalInvitePermissionsSetResponse conversationsExternalInvitePermissionsSet(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsExternalInvitePermissionsSetResponse conversationsExternalInvitePermissionsSet( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------- // Slack Connect - ConversationsInviteSharedResponse conversationsInviteShared(ConversationsInviteSharedRequest req) throws IOException, SlackApiException; + ConversationsInviteSharedResponse conversationsInviteShared(ConversationsInviteSharedRequest req) + throws IOException, SlackApiException; - ConversationsInviteSharedResponse conversationsInviteShared(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsInviteSharedResponse conversationsInviteShared( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsAcceptSharedInviteResponse conversationsAcceptSharedInvite(ConversationsAcceptSharedInviteRequest req) throws IOException, SlackApiException; + ConversationsAcceptSharedInviteResponse conversationsAcceptSharedInvite(ConversationsAcceptSharedInviteRequest req) + throws IOException, SlackApiException; - ConversationsAcceptSharedInviteResponse conversationsAcceptSharedInvite(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsAcceptSharedInviteResponse conversationsAcceptSharedInvite( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsApproveSharedInviteResponse conversationsApproveSharedInvite(ConversationsApproveSharedInviteRequest req) throws IOException, SlackApiException; + ConversationsApproveSharedInviteResponse conversationsApproveSharedInvite( + ConversationsApproveSharedInviteRequest req) throws IOException, SlackApiException; - ConversationsApproveSharedInviteResponse conversationsApproveSharedInvite(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsApproveSharedInviteResponse conversationsApproveSharedInvite( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsDeclineSharedInviteResponse conversationsDeclineSharedInvite(ConversationsDeclineSharedInviteRequest req) throws IOException, SlackApiException; + ConversationsDeclineSharedInviteResponse conversationsDeclineSharedInvite( + ConversationsDeclineSharedInviteRequest req) throws IOException, SlackApiException; - ConversationsDeclineSharedInviteResponse conversationsDeclineSharedInvite(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsDeclineSharedInviteResponse conversationsDeclineSharedInvite( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsListConnectInvitesResponse conversationsListConnectInvites(ConversationsListConnectInvitesRequest req) throws IOException, SlackApiException; + ConversationsListConnectInvitesResponse conversationsListConnectInvites(ConversationsListConnectInvitesRequest req) + throws IOException, SlackApiException; - ConversationsListConnectInvitesResponse conversationsListConnectInvites(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsListConnectInvitesResponse conversationsListConnectInvites( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsCanvasesCreateResponse conversationsCanvasesCreate(ConversationsCanvasesCreateRequest req) throws IOException, SlackApiException; + ConversationsCanvasesCreateResponse conversationsCanvasesCreate(ConversationsCanvasesCreateRequest req) + throws IOException, SlackApiException; - ConversationsCanvasesCreateResponse conversationsCanvasesCreate(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsCanvasesCreateResponse conversationsCanvasesCreate( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsRequestSharedInviteApproveResponse conversationsRequestSharedInviteApprove(ConversationsRequestSharedInviteApproveRequest req) throws IOException, SlackApiException; + ConversationsRequestSharedInviteApproveResponse conversationsRequestSharedInviteApprove( + ConversationsRequestSharedInviteApproveRequest req) throws IOException, SlackApiException; - ConversationsRequestSharedInviteApproveResponse conversationsRequestSharedInviteApprove(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsRequestSharedInviteApproveResponse conversationsRequestSharedInviteApprove( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsRequestSharedInviteDenyResponse conversationsRequestSharedInviteDeny(ConversationsRequestSharedInviteDenyRequest req) throws IOException, SlackApiException; + ConversationsRequestSharedInviteDenyResponse conversationsRequestSharedInviteDeny( + ConversationsRequestSharedInviteDenyRequest req) throws IOException, SlackApiException; - ConversationsRequestSharedInviteDenyResponse conversationsRequestSharedInviteDeny(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsRequestSharedInviteDenyResponse conversationsRequestSharedInviteDeny( + RequestConfigurator req) + throws IOException, SlackApiException; - ConversationsRequestSharedInviteListResponse conversationsRequestSharedInviteList(ConversationsRequestSharedInviteListRequest req) throws IOException, SlackApiException; + ConversationsRequestSharedInviteListResponse conversationsRequestSharedInviteList( + ConversationsRequestSharedInviteListRequest req) throws IOException, SlackApiException; - ConversationsRequestSharedInviteListResponse conversationsRequestSharedInviteList(RequestConfigurator req) throws IOException, SlackApiException; + ConversationsRequestSharedInviteListResponse conversationsRequestSharedInviteList( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // dialog @@ -1394,7 +1832,8 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( DialogOpenResponse dialogOpen(DialogOpenRequest req) throws IOException, SlackApiException; - DialogOpenResponse dialogOpen(RequestConfigurator req) throws IOException, SlackApiException; + DialogOpenResponse dialogOpen(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // dnd @@ -1402,23 +1841,28 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( DndEndDndResponse dndEndDnd(DndEndDndRequest req) throws IOException, SlackApiException; - DndEndDndResponse dndEndDnd(RequestConfigurator req) throws IOException, SlackApiException; + DndEndDndResponse dndEndDnd(RequestConfigurator req) + throws IOException, SlackApiException; DndEndSnoozeResponse dndEndSnooze(DndEndSnoozeRequest req) throws IOException, SlackApiException; - DndEndSnoozeResponse dndEndSnooze(RequestConfigurator req) throws IOException, SlackApiException; + DndEndSnoozeResponse dndEndSnooze(RequestConfigurator req) + throws IOException, SlackApiException; DndInfoResponse dndInfo(DndInfoRequest req) throws IOException, SlackApiException; - DndInfoResponse dndInfo(RequestConfigurator req) throws IOException, SlackApiException; + DndInfoResponse dndInfo(RequestConfigurator req) + throws IOException, SlackApiException; DndSetSnoozeResponse dndSetSnooze(DndSetSnoozeRequest req) throws IOException, SlackApiException; - DndSetSnoozeResponse dndSetSnooze(RequestConfigurator req) throws IOException, SlackApiException; + DndSetSnoozeResponse dndSetSnooze(RequestConfigurator req) + throws IOException, SlackApiException; DndTeamInfoResponse dndTeamInfo(DndTeamInfoRequest req) throws IOException, SlackApiException; - DndTeamInfoResponse dndTeamInfo(RequestConfigurator req) throws IOException, SlackApiException; + DndTeamInfoResponse dndTeamInfo(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // emoji @@ -1426,7 +1870,8 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( EmojiListResponse emojiList(EmojiListRequest req) throws IOException, SlackApiException; - EmojiListResponse emojiList(RequestConfigurator req) throws IOException, SlackApiException; + EmojiListResponse emojiList(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // files @@ -1434,43 +1879,61 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( FilesDeleteResponse filesDelete(FilesDeleteRequest req) throws IOException, SlackApiException; - FilesDeleteResponse filesDelete(RequestConfigurator req) throws IOException, SlackApiException; + FilesDeleteResponse filesDelete(RequestConfigurator req) + throws IOException, SlackApiException; FilesInfoResponse filesInfo(FilesInfoRequest req) throws IOException, SlackApiException; - FilesInfoResponse filesInfo(RequestConfigurator req) throws IOException, SlackApiException; + FilesInfoResponse filesInfo(RequestConfigurator req) + throws IOException, SlackApiException; FilesListResponse filesList(FilesListRequest req) throws IOException, SlackApiException; - FilesListResponse filesList(RequestConfigurator req) throws IOException, SlackApiException; + FilesListResponse filesList(RequestConfigurator req) + throws IOException, SlackApiException; - FilesRevokePublicURLResponse filesRevokePublicURL(FilesRevokePublicURLRequest req) throws IOException, SlackApiException; + FilesRevokePublicURLResponse filesRevokePublicURL(FilesRevokePublicURLRequest req) + throws IOException, SlackApiException; - FilesRevokePublicURLResponse filesRevokePublicURL(RequestConfigurator req) throws IOException, SlackApiException; + FilesRevokePublicURLResponse filesRevokePublicURL( + RequestConfigurator req) + throws IOException, SlackApiException; - FilesSharedPublicURLResponse filesSharedPublicURL(FilesSharedPublicURLRequest req) throws IOException, SlackApiException; + FilesSharedPublicURLResponse filesSharedPublicURL(FilesSharedPublicURLRequest req) + throws IOException, SlackApiException; - FilesSharedPublicURLResponse filesSharedPublicURL(RequestConfigurator req) throws IOException, SlackApiException; + FilesSharedPublicURLResponse filesSharedPublicURL( + RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay + // https://docs.slack.dev/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay FilesUploadResponse filesUpload(FilesUploadRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay - FilesUploadResponse filesUpload(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay + FilesUploadResponse filesUpload(RequestConfigurator req) + throws IOException, SlackApiException; - FilesGetUploadURLExternalResponse filesGetUploadURLExternal(FilesGetUploadURLExternalRequest req) throws IOException, SlackApiException; + FilesGetUploadURLExternalResponse filesGetUploadURLExternal(FilesGetUploadURLExternalRequest req) + throws IOException, SlackApiException; - FilesGetUploadURLExternalResponse filesGetUploadURLExternal(RequestConfigurator req) throws IOException, SlackApiException; + FilesGetUploadURLExternalResponse filesGetUploadURLExternal( + RequestConfigurator req) + throws IOException, SlackApiException; - FilesCompleteUploadExternalResponse filesCompleteUploadExternal(FilesCompleteUploadExternalRequest req) throws IOException, SlackApiException; + FilesCompleteUploadExternalResponse filesCompleteUploadExternal(FilesCompleteUploadExternalRequest req) + throws IOException, SlackApiException; - FilesCompleteUploadExternalResponse filesCompleteUploadExternal(RequestConfigurator req) throws IOException, SlackApiException; + FilesCompleteUploadExternalResponse filesCompleteUploadExternal( + RequestConfigurator req) + throws IOException, SlackApiException; - FilesUploadV2Response filesUploadV2(FilesUploadV2Request req) throws IOException, SlackApiException, SlackFilesUploadV2Exception; + FilesUploadV2Response filesUploadV2(FilesUploadV2Request req) + throws IOException, SlackApiException, SlackFilesUploadV2Exception; - FilesUploadV2Response filesUploadV2(RequestConfigurator req) throws IOException, SlackApiException, SlackFilesUploadV2Exception; + FilesUploadV2Response filesUploadV2(RequestConfigurator req) + throws IOException, SlackApiException, SlackFilesUploadV2Exception; // ------------------------------ // files.comments @@ -1482,7 +1945,8 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( // https://docs.slack.dev/changelog/2018-05-file-threads-soon-tread @Deprecated - FilesCommentsDeleteResponse filesCommentsDelete(FilesCommentsDeleteRequest req) throws IOException, SlackApiException; + FilesCommentsDeleteResponse filesCommentsDelete(FilesCommentsDeleteRequest req) + throws IOException, SlackApiException; // https://docs.slack.dev/changelog/2018-05-file-threads-soon-tread @Deprecated @@ -1494,227 +1958,269 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( FilesRemoteAddResponse filesRemoteAdd(FilesRemoteAddRequest req) throws IOException, SlackApiException; - FilesRemoteAddResponse filesRemoteAdd(RequestConfigurator req) throws IOException, SlackApiException; + FilesRemoteAddResponse filesRemoteAdd(RequestConfigurator req) + throws IOException, SlackApiException; FilesRemoteInfoResponse filesRemoteInfo(FilesRemoteInfoRequest req) throws IOException, SlackApiException; - FilesRemoteInfoResponse filesRemoteInfo(RequestConfigurator req) throws IOException, SlackApiException; + FilesRemoteInfoResponse filesRemoteInfo( + RequestConfigurator req) + throws IOException, SlackApiException; FilesRemoteListResponse filesRemoteList(FilesRemoteListRequest req) throws IOException, SlackApiException; - FilesRemoteListResponse filesRemoteList(RequestConfigurator req) throws IOException, SlackApiException; + FilesRemoteListResponse filesRemoteList( + RequestConfigurator req) + throws IOException, SlackApiException; FilesRemoteRemoveResponse filesRemoteRemove(FilesRemoteRemoveRequest req) throws IOException, SlackApiException; - FilesRemoteRemoveResponse filesRemoteRemove(RequestConfigurator req) throws IOException, SlackApiException; + FilesRemoteRemoveResponse filesRemoteRemove( + RequestConfigurator req) + throws IOException, SlackApiException; FilesRemoteShareResponse filesRemoteShare(FilesRemoteShareRequest req) throws IOException, SlackApiException; - FilesRemoteShareResponse filesRemoteShare(RequestConfigurator req) throws IOException, SlackApiException; + FilesRemoteShareResponse filesRemoteShare( + RequestConfigurator req) + throws IOException, SlackApiException; FilesRemoteUpdateResponse filesRemoteUpdate(FilesRemoteUpdateRequest req) throws IOException, SlackApiException; - FilesRemoteUpdateResponse filesRemoteUpdate(RequestConfigurator req) throws IOException, SlackApiException; + FilesRemoteUpdateResponse filesRemoteUpdate( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // functions // ------------------------------ - FunctionsCompleteSuccessResponse functionsCompleteSuccess(FunctionsCompleteSuccessRequest req) throws IOException, SlackApiException; + FunctionsCompleteSuccessResponse functionsCompleteSuccess(FunctionsCompleteSuccessRequest req) + throws IOException, SlackApiException; - FunctionsCompleteSuccessResponse functionsCompleteSuccess(RequestConfigurator req) throws IOException, SlackApiException; + FunctionsCompleteSuccessResponse functionsCompleteSuccess( + RequestConfigurator req) + throws IOException, SlackApiException; - FunctionsCompleteErrorResponse functionsCompleteError(FunctionsCompleteErrorRequest req) throws IOException, SlackApiException; + FunctionsCompleteErrorResponse functionsCompleteError(FunctionsCompleteErrorRequest req) + throws IOException, SlackApiException; - FunctionsCompleteErrorResponse functionsCompleteError(RequestConfigurator req) throws IOException, SlackApiException; + FunctionsCompleteErrorResponse functionsCompleteError( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // groups // ------------------------------ @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsArchiveResponse groupsArchive(GroupsArchiveRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsArchiveResponse groupsArchive(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsArchiveResponse groupsArchive(RequestConfigurator req) + throws IOException, SlackApiException; // https://github.com/slackapi/slack-api-specs/issues/12 @Deprecated GroupsCloseResponse groupsClose(GroupsCloseRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsCreateChildResponse groupsCreateChild(GroupsCreateChildRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsCreateChildResponse groupsCreateChild(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsCreateChildResponse groupsCreateChild( + RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsCreateResponse groupsCreate(GroupsCreateRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsCreateResponse groupsCreate(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsCreateResponse groupsCreate(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsHistoryResponse groupsHistory(GroupsHistoryRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsHistoryResponse groupsHistory(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsHistoryResponse groupsHistory(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsInfoResponse groupsInfo(GroupsInfoRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsInfoResponse groupsInfo(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsInfoResponse groupsInfo(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsInviteResponse groupsInvite(GroupsInviteRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsInviteResponse groupsInvite(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsInviteResponse groupsInvite(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsKickResponse groupsKick(GroupsKickRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsKickResponse groupsKick(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsKickResponse groupsKick(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsLeaveResponse groupsLeave(GroupsLeaveRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsLeaveResponse groupsLeave(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsLeaveResponse groupsLeave(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsListResponse groupsList(GroupsListRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsListResponse groupsList(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsListResponse groupsList(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsMarkResponse groupsMark(GroupsMarkRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsMarkResponse groupsMark(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsMarkResponse groupsMark(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsOpenResponse groupsOpen(GroupsOpenRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsOpenResponse groupsOpen(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsOpenResponse groupsOpen(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsRenameResponse groupsRename(GroupsRenameRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsRenameResponse groupsRename(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsRenameResponse groupsRename(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsSetPurposeResponse groupsSetPurpose(GroupsSetPurposeRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsSetPurposeResponse groupsSetPurpose(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsSetPurposeResponse groupsSetPurpose( + RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsSetTopicResponse groupsSetTopic(GroupsSetTopicRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsSetTopicResponse groupsSetTopic(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsSetTopicResponse groupsSetTopic(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsUnarchiveResponse groupsUnarchive(GroupsUnarchiveRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsUnarchiveResponse groupsUnarchive(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsUnarchiveResponse groupsUnarchive( + RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api GroupsRepliesResponse groupsReplies(GroupsRepliesRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - GroupsRepliesResponse groupsReplies(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + GroupsRepliesResponse groupsReplies(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // im // ------------------------------ @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ImCloseResponse imClose(ImCloseRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ImCloseResponse imClose(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ImCloseResponse imClose(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api-api ImHistoryResponse imHistory(ImHistoryRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ImHistoryResponse imHistory(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ImHistoryResponse imHistory(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ImListResponse imList(ImListRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ImListResponse imList(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ImListResponse imList(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ImMarkResponse imMark(ImMarkRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ImMarkResponse imMark(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ImMarkResponse imMark(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ImOpenResponse imOpen(ImOpenRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ImOpenResponse imOpen(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ImOpenResponse imOpen(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api ImRepliesResponse imReplies(ImRepliesRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - ImRepliesResponse imReplies(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + ImRepliesResponse imReplies(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // migration @@ -1722,59 +2228,67 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( MigrationExchangeResponse migrationExchange(MigrationExchangeRequest req) throws IOException, SlackApiException; - MigrationExchangeResponse migrationExchange(RequestConfigurator req) throws IOException, SlackApiException; + MigrationExchangeResponse migrationExchange( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // mpim // ------------------------------ @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api MpimCloseResponse mpimClose(MpimCloseRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - MpimCloseResponse mpimClose(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + MpimCloseResponse mpimClose(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api MpimHistoryResponse mpimHistory(MpimHistoryRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - MpimHistoryResponse mpimHistory(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + MpimHistoryResponse mpimHistory(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api MpimListResponse mpimList(MpimListRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - MpimListResponse mpimList(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + MpimListResponse mpimList(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api MpimRepliesResponse mpimReplies(MpimRepliesRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - MpimRepliesResponse mpimReplies(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + MpimRepliesResponse mpimReplies(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api MpimMarkResponse mpimMark(MpimMarkRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - MpimMarkResponse mpimMark(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + MpimMarkResponse mpimMark(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api MpimOpenResponse mpimOpen(MpimOpenRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api - MpimOpenResponse mpimOpen(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2020-01-deprecating-antecedents-to-the-conversations-api + MpimOpenResponse mpimOpen(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // oauth @@ -1782,19 +2296,24 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( OAuthAccessResponse oauthAccess(OAuthAccessRequest req) throws IOException, SlackApiException; - OAuthAccessResponse oauthAccess(RequestConfigurator req) throws IOException, SlackApiException; + OAuthAccessResponse oauthAccess(RequestConfigurator req) + throws IOException, SlackApiException; OAuthV2AccessResponse oauthV2Access(OAuthV2AccessRequest req) throws IOException, SlackApiException; - OAuthV2AccessResponse oauthV2Access(RequestConfigurator req) throws IOException, SlackApiException; + OAuthV2AccessResponse oauthV2Access(RequestConfigurator req) + throws IOException, SlackApiException; OAuthV2ExchangeResponse oauthV2Exchange(OAuthV2ExchangeRequest req) throws IOException, SlackApiException; - OAuthV2ExchangeResponse oauthV2Exchange(RequestConfigurator req) throws IOException, SlackApiException; + OAuthV2ExchangeResponse oauthV2Exchange( + RequestConfigurator req) + throws IOException, SlackApiException; OAuthTokenResponse oauthToken(OAuthTokenRequest req) throws IOException, SlackApiException; - OAuthTokenResponse oauthToken(RequestConfigurator req) throws IOException, SlackApiException; + OAuthTokenResponse oauthToken(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // openid.connect @@ -1802,11 +2321,16 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( OpenIDConnectTokenResponse openIDConnectToken(OpenIDConnectTokenRequest req) throws IOException, SlackApiException; - OpenIDConnectTokenResponse openIDConnectToken(RequestConfigurator req) throws IOException, SlackApiException; + OpenIDConnectTokenResponse openIDConnectToken( + RequestConfigurator req) + throws IOException, SlackApiException; - OpenIDConnectUserInfoResponse openIDConnectUserInfo(OpenIDConnectUserInfoRequest req) throws IOException, SlackApiException; + OpenIDConnectUserInfoResponse openIDConnectUserInfo(OpenIDConnectUserInfoRequest req) + throws IOException, SlackApiException; - OpenIDConnectUserInfoResponse openIDConnectUserInfo(RequestConfigurator req) throws IOException, SlackApiException; + OpenIDConnectUserInfoResponse openIDConnectUserInfo( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // pins @@ -1814,15 +2338,18 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( PinsAddResponse pinsAdd(PinsAddRequest req) throws IOException, SlackApiException; - PinsAddResponse pinsAdd(RequestConfigurator req) throws IOException, SlackApiException; + PinsAddResponse pinsAdd(RequestConfigurator req) + throws IOException, SlackApiException; PinsListResponse pinsList(PinsListRequest req) throws IOException, SlackApiException; - PinsListResponse pinsList(RequestConfigurator req) throws IOException, SlackApiException; + PinsListResponse pinsList(RequestConfigurator req) + throws IOException, SlackApiException; PinsRemoveResponse pinsRemove(PinsRemoveRequest req) throws IOException, SlackApiException; - PinsRemoveResponse pinsRemove(RequestConfigurator req) throws IOException, SlackApiException; + PinsRemoveResponse pinsRemove(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // reactions @@ -1830,19 +2357,24 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( ReactionsAddResponse reactionsAdd(ReactionsAddRequest req) throws IOException, SlackApiException; - ReactionsAddResponse reactionsAdd(RequestConfigurator req) throws IOException, SlackApiException; + ReactionsAddResponse reactionsAdd(RequestConfigurator req) + throws IOException, SlackApiException; ReactionsGetResponse reactionsGet(ReactionsGetRequest req) throws IOException, SlackApiException; - ReactionsGetResponse reactionsGet(RequestConfigurator req) throws IOException, SlackApiException; + ReactionsGetResponse reactionsGet(RequestConfigurator req) + throws IOException, SlackApiException; ReactionsListResponse reactionsList(ReactionsListRequest req) throws IOException, SlackApiException; - ReactionsListResponse reactionsList(RequestConfigurator req) throws IOException, SlackApiException; + ReactionsListResponse reactionsList(RequestConfigurator req) + throws IOException, SlackApiException; ReactionsRemoveResponse reactionsRemove(ReactionsRemoveRequest req) throws IOException, SlackApiException; - ReactionsRemoveResponse reactionsRemove(RequestConfigurator req) throws IOException, SlackApiException; + ReactionsRemoveResponse reactionsRemove( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // reminders @@ -1850,41 +2382,50 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( RemindersAddResponse remindersAdd(RemindersAddRequest req) throws IOException, SlackApiException; - RemindersAddResponse remindersAdd(RequestConfigurator req) throws IOException, SlackApiException; + RemindersAddResponse remindersAdd(RequestConfigurator req) + throws IOException, SlackApiException; RemindersCompleteResponse remindersComplete(RemindersCompleteRequest req) throws IOException, SlackApiException; - RemindersCompleteResponse remindersComplete(RequestConfigurator req) throws IOException, SlackApiException; + RemindersCompleteResponse remindersComplete( + RequestConfigurator req) + throws IOException, SlackApiException; RemindersDeleteResponse remindersDelete(RemindersDeleteRequest req) throws IOException, SlackApiException; - RemindersDeleteResponse remindersDelete(RequestConfigurator req) throws IOException, SlackApiException; + RemindersDeleteResponse remindersDelete( + RequestConfigurator req) + throws IOException, SlackApiException; RemindersInfoResponse remindersInfo(RemindersInfoRequest req) throws IOException, SlackApiException; - RemindersInfoResponse remindersInfo(RequestConfigurator req) throws IOException, SlackApiException; + RemindersInfoResponse remindersInfo(RequestConfigurator req) + throws IOException, SlackApiException; RemindersListResponse remindersList(RemindersListRequest req) throws IOException, SlackApiException; - RemindersListResponse remindersList(RequestConfigurator req) throws IOException, SlackApiException; + RemindersListResponse remindersList(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // rtm // ------------------------------ @Deprecated - // https://docs.slack.dev/changelog/2024-09-legacy-custom-bots-classic-apps-deprecation + // https://docs.slack.dev/changelog/2024-09-legacy-custom-bots-classic-apps-deprecation RTMConnectResponse rtmConnect(RTMConnectRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2024-09-legacy-custom-bots-classic-apps-deprecation - RTMConnectResponse rtmConnect(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2024-09-legacy-custom-bots-classic-apps-deprecation + RTMConnectResponse rtmConnect(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated RTMStartResponse rtmStart(RTMStartRequest req) throws IOException, SlackApiException; @Deprecated - RTMStartResponse rtmStart(RequestConfigurator req) throws IOException, SlackApiException; + RTMStartResponse rtmStart(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // search @@ -1892,43 +2433,49 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( SearchAllResponse searchAll(SearchAllRequest req) throws IOException, SlackApiException; - SearchAllResponse searchAll(RequestConfigurator req) throws IOException, SlackApiException; + SearchAllResponse searchAll(RequestConfigurator req) + throws IOException, SlackApiException; SearchMessagesResponse searchMessages(SearchMessagesRequest req) throws IOException, SlackApiException; - SearchMessagesResponse searchMessages(RequestConfigurator req) throws IOException, SlackApiException; + SearchMessagesResponse searchMessages(RequestConfigurator req) + throws IOException, SlackApiException; SearchFilesResponse searchFiles(SearchFilesRequest req) throws IOException, SlackApiException; - SearchFilesResponse searchFiles(RequestConfigurator req) throws IOException, SlackApiException; + SearchFilesResponse searchFiles(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // stars // ------------------------------ @Deprecated - // https://docs.slack.dev/changelog/2023-07-its-later-already-for-stars-and-reminders + // https://docs.slack.dev/changelog/2023-07-its-later-already-for-stars-and-reminders StarsAddResponse starsAdd(StarsAddRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2023-07-its-later-already-for-stars-and-reminders - StarsAddResponse starsAdd(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2023-07-its-later-already-for-stars-and-reminders + StarsAddResponse starsAdd(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2023-07-its-later-already-for-stars-and-reminders + // https://docs.slack.dev/changelog/2023-07-its-later-already-for-stars-and-reminders StarsListResponse starsList(StarsListRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2023-07-its-later-already-for-stars-and-reminders - StarsListResponse starsList(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2023-07-its-later-already-for-stars-and-reminders + StarsListResponse starsList(RequestConfigurator req) + throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2023-07-its-later-already-for-stars-and-reminders + // https://docs.slack.dev/changelog/2023-07-its-later-already-for-stars-and-reminders StarsRemoveResponse starsRemove(StarsRemoveRequest req) throws IOException, SlackApiException; @Deprecated - // https://docs.slack.dev/changelog/2023-07-its-later-already-for-stars-and-reminders - StarsRemoveResponse starsRemove(RequestConfigurator req) throws IOException, SlackApiException; + // https://docs.slack.dev/changelog/2023-07-its-later-already-for-stars-and-reminders + StarsRemoveResponse starsRemove(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // team @@ -1936,47 +2483,69 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( TeamAccessLogsResponse teamAccessLogs(TeamAccessLogsRequest req) throws IOException, SlackApiException; - TeamAccessLogsResponse teamAccessLogs(RequestConfigurator req) throws IOException, SlackApiException; + TeamAccessLogsResponse teamAccessLogs(RequestConfigurator req) + throws IOException, SlackApiException; TeamBillableInfoResponse teamBillableInfo(TeamBillableInfoRequest req) throws IOException, SlackApiException; - TeamBillableInfoResponse teamBillableInfo(RequestConfigurator req) throws IOException, SlackApiException; + TeamBillableInfoResponse teamBillableInfo( + RequestConfigurator req) + throws IOException, SlackApiException; TeamInfoResponse teamInfo(TeamInfoRequest req) throws IOException, SlackApiException; - TeamInfoResponse teamInfo(RequestConfigurator req) throws IOException, SlackApiException; + TeamInfoResponse teamInfo(RequestConfigurator req) + throws IOException, SlackApiException; - TeamIntegrationLogsResponse teamIntegrationLogs(TeamIntegrationLogsRequest req) throws IOException, SlackApiException; + TeamIntegrationLogsResponse teamIntegrationLogs(TeamIntegrationLogsRequest req) + throws IOException, SlackApiException; - TeamIntegrationLogsResponse teamIntegrationLogs(RequestConfigurator req) throws IOException, SlackApiException; + TeamIntegrationLogsResponse teamIntegrationLogs( + RequestConfigurator req) + throws IOException, SlackApiException; TeamProfileGetResponse teamProfileGet(TeamProfileGetRequest req) throws IOException, SlackApiException; - TeamProfileGetResponse teamProfileGet(RequestConfigurator req) throws IOException, SlackApiException; + TeamProfileGetResponse teamProfileGet(RequestConfigurator req) + throws IOException, SlackApiException; TeamBillingInfoResponse teamBillingInfo(TeamBillingInfoRequest req) throws IOException, SlackApiException; - TeamBillingInfoResponse teamBillingInfo(RequestConfigurator req) throws IOException, SlackApiException; + TeamBillingInfoResponse teamBillingInfo( + RequestConfigurator req) + throws IOException, SlackApiException; - TeamPreferencesListResponse teamPreferencesList(TeamPreferencesListRequest req) throws IOException, SlackApiException; + TeamPreferencesListResponse teamPreferencesList(TeamPreferencesListRequest req) + throws IOException, SlackApiException; - TeamPreferencesListResponse teamPreferencesList(RequestConfigurator req) throws IOException, SlackApiException; + TeamPreferencesListResponse teamPreferencesList( + RequestConfigurator req) + throws IOException, SlackApiException; - TeamExternalTeamsListResponse teamExternalTeamsList(TeamExternalTeamsListRequest req) throws IOException, SlackApiException; + TeamExternalTeamsListResponse teamExternalTeamsList(TeamExternalTeamsListRequest req) + throws IOException, SlackApiException; - TeamExternalTeamsListResponse teamExternalTeamsList(RequestConfigurator req) throws IOException, SlackApiException; + TeamExternalTeamsListResponse teamExternalTeamsList( + RequestConfigurator req) + throws IOException, SlackApiException; - TeamExternalTeamsDisconnectResponse teamExternalTeamsDisconnect(TeamExternalTeamsDisconnectRequest req) throws IOException, SlackApiException; + TeamExternalTeamsDisconnectResponse teamExternalTeamsDisconnect(TeamExternalTeamsDisconnectRequest req) + throws IOException, SlackApiException; - TeamExternalTeamsDisconnectResponse teamExternalTeamsDisconnect(RequestConfigurator req) throws IOException, SlackApiException; + TeamExternalTeamsDisconnectResponse teamExternalTeamsDisconnect( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // tooling.tokens // ------------------------------ - ToolingTokensRotateResponse toolingTokensRotate(ToolingTokensRotateRequest req) throws IOException, SlackApiException; + ToolingTokensRotateResponse toolingTokensRotate(ToolingTokensRotateRequest req) + throws IOException, SlackApiException; - ToolingTokensRotateResponse toolingTokensRotate(RequestConfigurator req) throws IOException, SlackApiException; + ToolingTokensRotateResponse toolingTokensRotate( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // usergroups @@ -1984,31 +2553,46 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( UsergroupsCreateResponse usergroupsCreate(UsergroupsCreateRequest req) throws IOException, SlackApiException; - UsergroupsCreateResponse usergroupsCreate(RequestConfigurator req) throws IOException, SlackApiException; + UsergroupsCreateResponse usergroupsCreate( + RequestConfigurator req) + throws IOException, SlackApiException; UsergroupsDisableResponse usergroupsDisable(UsergroupsDisableRequest req) throws IOException, SlackApiException; - UsergroupsDisableResponse usergroupsDisable(RequestConfigurator req) throws IOException, SlackApiException; + UsergroupsDisableResponse usergroupsDisable( + RequestConfigurator req) + throws IOException, SlackApiException; UsergroupsEnableResponse usergroupsEnable(UsergroupsEnableRequest req) throws IOException, SlackApiException; - UsergroupsEnableResponse usergroupsEnable(RequestConfigurator req) throws IOException, SlackApiException; + UsergroupsEnableResponse usergroupsEnable( + RequestConfigurator req) + throws IOException, SlackApiException; UsergroupsListResponse usergroupsList(UsergroupsListRequest req) throws IOException, SlackApiException; - UsergroupsListResponse usergroupsList(RequestConfigurator req) throws IOException, SlackApiException; + UsergroupsListResponse usergroupsList(RequestConfigurator req) + throws IOException, SlackApiException; UsergroupsUpdateResponse usergroupsUpdate(UsergroupsUpdateRequest req) throws IOException, SlackApiException; - UsergroupsUpdateResponse usergroupsUpdate(RequestConfigurator req) throws IOException, SlackApiException; + UsergroupsUpdateResponse usergroupsUpdate( + RequestConfigurator req) + throws IOException, SlackApiException; - UsergroupsUsersListResponse usergroupsUsersList(UsergroupsUsersListRequest req) throws IOException, SlackApiException; + UsergroupsUsersListResponse usergroupsUsersList(UsergroupsUsersListRequest req) + throws IOException, SlackApiException; - UsergroupsUsersListResponse usergroupsUsersList(RequestConfigurator req) throws IOException, SlackApiException; + UsergroupsUsersListResponse usergroupsUsersList( + RequestConfigurator req) + throws IOException, SlackApiException; - UsergroupsUsersUpdateResponse usergroupsUsersUpdate(UsergroupsUsersUpdateRequest req) throws IOException, SlackApiException; + UsergroupsUsersUpdateResponse usergroupsUsersUpdate(UsergroupsUsersUpdateRequest req) + throws IOException, SlackApiException; - UsergroupsUsersUpdateResponse usergroupsUsersUpdate(RequestConfigurator req) throws IOException, SlackApiException; + UsergroupsUsersUpdateResponse usergroupsUsersUpdate( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // users @@ -2016,47 +2600,65 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( UsersConversationsResponse usersConversations(UsersConversationsRequest req) throws IOException, SlackApiException; - UsersConversationsResponse usersConversations(RequestConfigurator req) throws IOException, SlackApiException; + UsersConversationsResponse usersConversations( + RequestConfigurator req) + throws IOException, SlackApiException; UsersDeletePhotoResponse usersDeletePhoto(UsersDeletePhotoRequest req) throws IOException, SlackApiException; - UsersDeletePhotoResponse usersDeletePhoto(RequestConfigurator req) throws IOException, SlackApiException; + UsersDeletePhotoResponse usersDeletePhoto( + RequestConfigurator req) + throws IOException, SlackApiException; UsersGetPresenceResponse usersGetPresence(UsersGetPresenceRequest req) throws IOException, SlackApiException; - UsersGetPresenceResponse usersGetPresence(RequestConfigurator req) throws IOException, SlackApiException; + UsersGetPresenceResponse usersGetPresence( + RequestConfigurator req) + throws IOException, SlackApiException; UsersIdentityResponse usersIdentity(UsersIdentityRequest req) throws IOException, SlackApiException; - UsersIdentityResponse usersIdentity(RequestConfigurator req) throws IOException, SlackApiException; + UsersIdentityResponse usersIdentity(RequestConfigurator req) + throws IOException, SlackApiException; UsersInfoResponse usersInfo(UsersInfoRequest req) throws IOException, SlackApiException; - UsersInfoResponse usersInfo(RequestConfigurator req) throws IOException, SlackApiException; + UsersInfoResponse usersInfo(RequestConfigurator req) + throws IOException, SlackApiException; UsersListResponse usersList(UsersListRequest req) throws IOException, SlackApiException; - UsersListResponse usersList(RequestConfigurator req) throws IOException, SlackApiException; + UsersListResponse usersList(RequestConfigurator req) + throws IOException, SlackApiException; UsersLookupByEmailResponse usersLookupByEmail(UsersLookupByEmailRequest req) throws IOException, SlackApiException; - UsersLookupByEmailResponse usersLookupByEmail(RequestConfigurator req) throws IOException, SlackApiException; + UsersLookupByEmailResponse usersLookupByEmail( + RequestConfigurator req) + throws IOException, SlackApiException; UsersSetActiveResponse usersSetActive(UsersSetActiveRequest req) throws IOException, SlackApiException; - UsersSetActiveResponse usersSetActive(RequestConfigurator req) throws IOException, SlackApiException; + UsersSetActiveResponse usersSetActive(RequestConfigurator req) + throws IOException, SlackApiException; UsersSetPhotoResponse usersSetPhoto(UsersSetPhotoRequest req) throws IOException, SlackApiException; - UsersSetPhotoResponse usersSetPhoto(RequestConfigurator req) throws IOException, SlackApiException; + UsersSetPhotoResponse usersSetPhoto(RequestConfigurator req) + throws IOException, SlackApiException; UsersSetPresenceResponse usersSetPresence(UsersSetPresenceRequest req) throws IOException, SlackApiException; - UsersSetPresenceResponse usersSetPresence(RequestConfigurator req) throws IOException, SlackApiException; + UsersSetPresenceResponse usersSetPresence( + RequestConfigurator req) + throws IOException, SlackApiException; - UsersDiscoverableContactsLookupResponse usersDiscoverableContactsLookup(UsersDiscoverableContactsLookupRequest req) throws IOException, SlackApiException; + UsersDiscoverableContactsLookupResponse usersDiscoverableContactsLookup(UsersDiscoverableContactsLookupRequest req) + throws IOException, SlackApiException; - UsersDiscoverableContactsLookupResponse usersDiscoverableContactsLookup(RequestConfigurator req) throws IOException, SlackApiException; + UsersDiscoverableContactsLookupResponse usersDiscoverableContactsLookup( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // users.profile @@ -2064,11 +2666,15 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( UsersProfileGetResponse usersProfileGet(UsersProfileGetRequest req) throws IOException, SlackApiException; - UsersProfileGetResponse usersProfileGet(RequestConfigurator req) throws IOException, SlackApiException; + UsersProfileGetResponse usersProfileGet( + RequestConfigurator req) + throws IOException, SlackApiException; UsersProfileSetResponse usersProfileSet(UsersProfileSetRequest req) throws IOException, SlackApiException; - UsersProfileSetResponse usersProfileSet(RequestConfigurator req) throws IOException, SlackApiException; + UsersProfileSetResponse usersProfileSet( + RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // views @@ -2076,34 +2682,57 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels( ViewsOpenResponse viewsOpen(ViewsOpenRequest req) throws IOException, SlackApiException; - ViewsOpenResponse viewsOpen(RequestConfigurator req) throws IOException, SlackApiException; + ViewsOpenResponse viewsOpen(RequestConfigurator req) + throws IOException, SlackApiException; ViewsPushResponse viewsPush(ViewsPushRequest req) throws IOException, SlackApiException; - ViewsPushResponse viewsPush(RequestConfigurator req) throws IOException, SlackApiException; + ViewsPushResponse viewsPush(RequestConfigurator req) + throws IOException, SlackApiException; ViewsUpdateResponse viewsUpdate(ViewsUpdateRequest req) throws IOException, SlackApiException; - ViewsUpdateResponse viewsUpdate(RequestConfigurator req) throws IOException, SlackApiException; + ViewsUpdateResponse viewsUpdate(RequestConfigurator req) + throws IOException, SlackApiException; ViewsPublishResponse viewsPublish(ViewsPublishRequest req) throws IOException, SlackApiException; - ViewsPublishResponse viewsPublish(RequestConfigurator req) throws IOException, SlackApiException; + ViewsPublishResponse viewsPublish(RequestConfigurator req) + throws IOException, SlackApiException; // ------------------------------ // workflows // ------------------------------ - WorkflowsStepCompletedResponse workflowsStepCompleted(WorkflowsStepCompletedRequest req) throws IOException, SlackApiException; + WorkflowsStepCompletedResponse workflowsStepCompleted(WorkflowsStepCompletedRequest req) + throws IOException, SlackApiException; + + WorkflowsStepCompletedResponse workflowsStepCompleted( + RequestConfigurator req) + throws IOException, SlackApiException; - WorkflowsStepCompletedResponse workflowsStepCompleted(RequestConfigurator req) throws IOException, SlackApiException; + WorkflowsStepFailedResponse workflowsStepFailed(WorkflowsStepFailedRequest req) + throws IOException, SlackApiException; + + WorkflowsStepFailedResponse workflowsStepFailed( + RequestConfigurator req) + throws IOException, SlackApiException; - WorkflowsStepFailedResponse workflowsStepFailed(WorkflowsStepFailedRequest req) throws IOException, SlackApiException; + WorkflowsUpdateStepResponse workflowsUpdateStep(WorkflowsUpdateStepRequest req) + throws IOException, SlackApiException; - WorkflowsStepFailedResponse workflowsStepFailed(RequestConfigurator req) throws IOException, SlackApiException; + WorkflowsUpdateStepResponse workflowsUpdateStep( + RequestConfigurator req) + throws IOException, SlackApiException; - WorkflowsUpdateStepResponse workflowsUpdateStep(WorkflowsUpdateStepRequest req) throws IOException, SlackApiException; + // ------------------------------ + // work object entities + // ------------------------------ - WorkflowsUpdateStepResponse workflowsUpdateStep(RequestConfigurator req) throws IOException, SlackApiException; + EntityPresentDetailsResponse entityPresentDetails(EntityPresentDetailsRequest req) + throws IOException, SlackApiException; + EntityPresentDetailsResponse entityPresentDetails( + RequestConfigurator req) + throws IOException, SlackApiException; } diff --git a/slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java b/slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java index ded83836b..912b8df27 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java @@ -1,6 +1,7 @@ package com.slack.api.methods; import com.google.gson.Gson; +import com.google.gson.JsonElement; import com.slack.api.methods.request.admin.analytics.AdminAnalyticsGetFileRequest; import com.slack.api.methods.request.admin.apps.*; import com.slack.api.methods.request.admin.auth.policy.AdminAuthPolicyAssignEntitiesRequest; @@ -74,6 +75,7 @@ import com.slack.api.methods.request.canvases.sections.CanvasesSectionsLookupRequest; import com.slack.api.methods.request.channels.*; import com.slack.api.methods.request.chat.*; +import com.slack.api.methods.request.chat.ChatUnfurlRequest.UnfurlMetadata; import com.slack.api.methods.request.chat.scheduled_messages.ChatScheduledMessagesListRequest; import com.slack.api.methods.request.conversations.*; import com.slack.api.methods.request.conversations.canvases.ConversationsCanvasesCreateRequest; @@ -83,6 +85,7 @@ import com.slack.api.methods.request.dialog.DialogOpenRequest; import com.slack.api.methods.request.dnd.*; import com.slack.api.methods.request.emoji.EmojiListRequest; +import com.slack.api.methods.request.entity.EntityPresentDetailsRequest; import com.slack.api.methods.request.files.*; import com.slack.api.methods.request.files.comments.FilesCommentsAddRequest; import com.slack.api.methods.request.files.comments.FilesCommentsDeleteRequest; @@ -136,6 +139,9 @@ import com.slack.api.model.Attachment; import com.slack.api.model.ConversationType; import com.slack.api.model.canvas.CanvasDocumentContent; +import com.slack.api.model.EntityMetadata; +import com.slack.api.model.EntityMetadata.EntityPayload; +import com.slack.api.model.Message; import com.slack.api.util.json.GsonFactory; import lombok.extern.slf4j.Slf4j; import okhttp3.FormBody; @@ -367,7 +373,8 @@ public static FormBody.Builder toForm(AdminAuthPolicyRemoveEntitiesRequest req) public static FormBody.Builder toForm(AdminBarriersCreateRequest req) { FormBody.Builder form = new FormBody.Builder(); if (req.getBarrieredFromUsergroupIds() != null) { - setIfNotNull("barriered_from_usergroup_ids", req.getBarrieredFromUsergroupIds().stream().collect(joining(",")), form); + setIfNotNull("barriered_from_usergroup_ids", + req.getBarrieredFromUsergroupIds().stream().collect(joining(",")), form); } setIfNotNull("primary_usergroup_id", req.getPrimaryUsergroupId(), form); if (req.getRestrictedSubjects() != null) { @@ -393,7 +400,8 @@ public static FormBody.Builder toForm(AdminBarriersUpdateRequest req) { FormBody.Builder form = new FormBody.Builder(); setIfNotNull("barrier_id", req.getBarrierId(), form); if (req.getBarrieredFromUsergroupIds() != null) { - setIfNotNull("barriered_from_usergroup_ids", req.getBarrieredFromUsergroupIds().stream().collect(joining(",")), form); + setIfNotNull("barriered_from_usergroup_ids", + req.getBarrieredFromUsergroupIds().stream().collect(joining(",")), form); } setIfNotNull("primary_usergroup_id", req.getPrimaryUsergroupId(), form); if (req.getRestrictedSubjects() != null) { @@ -687,7 +695,6 @@ public static FormBody.Builder toForm(AdminFunctionsPermissionsLookupRequest req return form; } - public static FormBody.Builder toForm(AdminFunctionsPermissionsSetRequest req) { FormBody.Builder form = new FormBody.Builder(); setIfNotNull("visibility", req.getVisibility(), form); @@ -1483,8 +1490,7 @@ public static FormBody.Builder toForm(ChatScheduleMessageRequest req) { "chat.scheduleMessage", req.getText(), req.getAttachments(), - req.getAttachmentsAsString() - ); + req.getAttachmentsAsString()); FormBody.Builder form = new FormBody.Builder(); setIfNotNull("channel", req.getChannel(), form); setIfNotNull("post_at", req.getPostAt(), form); @@ -1538,8 +1544,7 @@ public static FormBody.Builder toForm(ChatPostEphemeralRequest req) { "chat.postEphemeral", req.getText(), req.getAttachments(), - req.getAttachmentsAsString() - ); + req.getAttachmentsAsString()); FormBody.Builder form = new FormBody.Builder(); setIfNotNull("channel", req.getChannel(), form); setIfNotNull("text", req.getText(), form); @@ -1576,8 +1581,7 @@ public static FormBody.Builder toForm(ChatPostMessageRequest req) { "chat.postMessage", req.getText(), req.getAttachments(), - req.getAttachmentsAsString() - ); + req.getAttachmentsAsString()); FormBody.Builder form = new FormBody.Builder(); setIfNotNull("channel", req.getChannel(), form); setIfNotNull("thread_ts", req.getThreadTs(), form); @@ -1589,8 +1593,17 @@ public static FormBody.Builder toForm(ChatPostMessageRequest req) { if (req.getMetadataAsString() != null) { form.add("metadata", req.getMetadataAsString()); } else if (req.getMetadata() != null) { - String json = GSON.toJson(req.getMetadata()); - form.add("metadata", json); + Message.Metadata metadata = req.getMetadata(); + if (req.getMetadata().getEntities() == null) { + String json = GSON.toJson(metadata); + form.add("metadata", json); + } else { + EntityMetadata[] entities = metadata.getEntities(); + entities = prepareEntities(metadata.getEntities()); + metadata.setEntities(entities); + String json = GSON.toJson(req.getMetadata()); + form.add("metadata", json); + } } if (req.getBlocksAsString() != null) { form.add("blocks", req.getBlocksAsString()); @@ -1624,8 +1637,7 @@ public static FormBody.Builder toForm(ChatUpdateRequest req) { "chat.update", req.getText(), req.getAttachments(), - req.getAttachmentsAsString() - ); + req.getAttachmentsAsString()); FormBody.Builder form = new FormBody.Builder(); setIfNotNull("ts", req.getTs(), form); setIfNotNull("channel", req.getChannel(), form); @@ -1673,6 +1685,17 @@ public static FormBody.Builder toForm(ChatUnfurlRequest req) { String json = getJsonWithGsonAnonymInnerClassHandling(req.getUnfurls()); setIfNotNull("unfurls", json, form); } + if (req.getRawMetadata() != null) { + setIfNotNull("metadata", req.getRawMetadata(), form); + } else if (req.getMetadata() != null) { + ChatUnfurlRequest.UnfurlMetadata metadata = req.getMetadata(); + + EntityMetadata[] entities = prepareEntities(metadata.getEntities()); + metadata.setEntities(entities); + + String json = GSON.toJson(metadata, ChatUnfurlRequest.UnfurlMetadata.class); + setIfNotNull("metadata", json, form); + } setIfNotNull("user_auth_required", req.isUserAuthRequired(), form); setIfNotNull("user_auth_message", req.getUserAuthMessage(), form); if (req.getRawUserAuthBlocks() != null) { @@ -2126,11 +2149,14 @@ public static MultipartBody.Builder toMultipartBody(FilesRemoteAddRequest req) { setIfNotNull("title", req.getTitle(), form); setIfNotNull("filetype", req.getFiletype(), form); if (req.getIndexableFileContents() != null) { - RequestBody indexableFileContents = RequestBody.create(req.getFiletype() != null ? MediaType.parse(req.getFiletype()) : null, req.getIndexableFileContents()); + RequestBody indexableFileContents = RequestBody.create( + req.getFiletype() != null ? MediaType.parse(req.getFiletype()) : null, + req.getIndexableFileContents()); form.addFormDataPart("indexable_file_contents", req.getTitle(), indexableFileContents); } if (req.getPreviewImage() != null) { - RequestBody previewImage = RequestBody.create(req.getFiletype() != null ? MediaType.parse(req.getFiletype()) : null, req.getPreviewImage()); + RequestBody previewImage = RequestBody.create( + req.getFiletype() != null ? MediaType.parse(req.getFiletype()) : null, req.getPreviewImage()); form.addFormDataPart("preview_image", req.getTitle(), previewImage); } return form; @@ -2179,11 +2205,14 @@ public static MultipartBody.Builder toMultipartBody(FilesRemoteUpdateRequest req setIfNotNull("title", req.getTitle(), form); setIfNotNull("filetype", req.getFiletype(), form); if (req.getIndexableFileContents() != null) { - RequestBody indexableFileContents = RequestBody.create(req.getFiletype() != null ? MediaType.parse(req.getFiletype()) : null, req.getIndexableFileContents()); + RequestBody indexableFileContents = RequestBody.create( + req.getFiletype() != null ? MediaType.parse(req.getFiletype()) : null, + req.getIndexableFileContents()); form.addFormDataPart("indexable_file_contents", null, indexableFileContents); } if (req.getPreviewImage() != null) { - RequestBody previewImage = RequestBody.create(req.getFiletype() != null ? MediaType.parse(req.getFiletype()) : null, req.getPreviewImage()); + RequestBody previewImage = RequestBody.create( + req.getFiletype() != null ? MediaType.parse(req.getFiletype()) : null, req.getPreviewImage()); form.addFormDataPart("preview_image", null, previewImage); } return form; @@ -2701,7 +2730,8 @@ public static FormBody.Builder toForm(TeamExternalTeamsListRequest req) { setIfNotNull("connection_status_filter", req.getConnectionStatusFilter(), form); setIfNotNull("limit", req.getLimit(), form); if (req.getSlackConnectPrefFilter() != null) { - setIfNotNull("slack_connect_pref_filter", req.getSlackConnectPrefFilter().stream().collect(joining(",")), form); + setIfNotNull("slack_connect_pref_filter", req.getSlackConnectPrefFilter().stream().collect(joining(",")), + form); } setIfNotNull("sort_direction", req.getSortDirection(), form); setIfNotNull("sort_field", req.getSortField(), form); @@ -2999,15 +3029,36 @@ public static FormBody.Builder toForm(WorkflowsUpdateStepRequest req) { return form; } + public static FormBody.Builder toForm(EntityPresentDetailsRequest req) { + FormBody.Builder form = new FormBody.Builder(); + + setIfNotNull("trigger_id", req.getTriggerId(), form); + + if (req.getRawMetadata() != null) { + setIfNotNull("metadata", req.getRawMetadata(), form); + } else if (req.getMetadata() != null) { + EntityMetadata metadata = req.getMetadata(); + metadata = prepareEntityMetadata(metadata); + String json = GSON.toJson(metadata, EntityMetadata.class); + setIfNotNull("metadata", json, form); + } + + setIfNotNull("user_auth_required", req.isUserAuthRequired(), form); + + setIfNotNull("user_auth_url", req.getUserAuthUrl(), form); + + setIfNotNull("error", req.getError(), form); + + return form; + } + // ---------------------------------------------------------------------------------- // internal methods // ---------------------------------------------------------------------------------- - private static final String TEXT_WARN_MESSAGE_TEMPLATE = - "The top-level `text` argument is missing in the request payload for a {} call - It's a best practice to always provide a `text` argument when posting a message. The `text` is used in places where the content cannot be rendered such as: system push notifications, assistive technology such as screen readers, etc."; + private static final String TEXT_WARN_MESSAGE_TEMPLATE = "The top-level `text` argument is missing in the request payload for a {} call - It's a best practice to always provide a `text` argument when posting a message. The `text` is used in places where the content cannot be rendered such as: system push notifications, assistive technology such as screen readers, etc."; - private static final String FALLBACK_WARN_MESSAGE_TEMPLATE = - "Additionally, the attachment-level `fallback` argument is missing in the request payload for a {} call - To avoid this warning, it is recommended to always provide a top-level `text` argument when posting a message. Alternatively, you can provide an attachment-level `fallback` argument, though this is now considered a legacy field (see https://docs.slack.dev/legacy/legacy-messaging/legacy-secondary-message-attachments#legacy_fields for more details)."; + private static final String FALLBACK_WARN_MESSAGE_TEMPLATE = "Additionally, the attachment-level `fallback` argument is missing in the request payload for a {} call - To avoid this warning, it is recommended to always provide a top-level `text` argument when posting a message. Alternatively, you can provide an attachment-level `fallback` argument, though this is now considered a legacy field (see https://docs.slack.dev/legacy/legacy-messaging/legacy-secondary-message-attachments#legacy_fields for more details)."; private static final String GSON_ANONYM_INNER_CLASS_INIT_OUTPUT = "null"; @@ -3038,8 +3089,7 @@ private static void warnIfEitherTextOrAttachmentFallbackIsMissing( // when attachments exist, the top-level text is not always required warnIfAttachmentWithoutFallbackDetected( endpointName, - Arrays.asList(GSON.fromJson(attachmentsAsString, Attachment[].class)) - ); + Arrays.asList(GSON.fromJson(attachmentsAsString, Attachment[].class))); } else { // when attachments do not exist, the top-level text is always required if (text == null || text.trim().isEmpty()) { @@ -3070,7 +3120,8 @@ private static void setIfNotNull(String name, Object value, MultipartBody.Builde } } - // Workarounds to solve GSON not handling anonymous inner class object initialization + // Workarounds to solve GSON not handling anonymous inner class object + // initialization // https://github.com/google/gson/issues/2023 private static String getJsonWithGsonAnonymInnerClassHandling(Map stringTMap) { String json = GSON.toJson(stringTMap); @@ -3082,4 +3133,46 @@ private static String getJsonWithGsonAnonymInnerClassHandling(List tList) return GSON_ANONYM_INNER_CLASS_INIT_OUTPUT.equals(json) ? GSON.toJson(new ArrayList<>(tList)) : json; } + private static EntityMetadata[] prepareEntities(EntityMetadata[] entities) { + List updatedEntities = new ArrayList(); + for (EntityMetadata entity : entities) { + entity = prepareEntityMetadata(entity); + updatedEntities.add(entity); + } + EntityMetadata[] entityArray = new EntityMetadata[updatedEntities.size()]; + entityArray = updatedEntities.toArray(entityArray); + + return entityArray; + } + + private static EntityMetadata prepareEntityMetadata(EntityMetadata entity) { + if (entity.getEntityPayload().getFileFields() != null) { + String json = GSON.toJson(entity.getEntityPayload().getFileFields(), + EntityPayload.FileFields.class); + JsonElement fields = GSON.fromJson(json, JsonElement.class); + entity.getEntityPayload().setFields(fields); + entity.getEntityPayload().setFileFields(null); + } else if (entity.getEntityPayload().getTaskFields() != null) { + String json = GSON.toJson(entity.getEntityPayload().getTaskFields(), + EntityPayload.TaskFields.class); + JsonElement fields = GSON.fromJson(json, JsonElement.class); + entity.getEntityPayload().setFields(fields); + entity.getEntityPayload().setTaskFields(null); + } else if (entity.getEntityPayload().getIncidentFields() != null) { + String json = GSON.toJson(entity.getEntityPayload().getIncidentFields(), + EntityPayload.IncidentFields.class); + JsonElement fields = GSON.fromJson(json, JsonElement.class); + entity.getEntityPayload().setFields(fields); + entity.getEntityPayload().setIncidentFields(null); + } else if (entity.getEntityPayload().getContentItemFields() != null) { + String json = GSON.toJson(entity.getEntityPayload().getContentItemFields(), + EntityPayload.ContentItemFields.class); + JsonElement fields = GSON.fromJson(json, JsonElement.class); + entity.getEntityPayload().setFields(fields); + entity.getEntityPayload().setContentItemFields(null); + } + + return entity; + } + } diff --git a/slack-api-client/src/main/java/com/slack/api/methods/impl/AsyncMethodsClientImpl.java b/slack-api-client/src/main/java/com/slack/api/methods/impl/AsyncMethodsClientImpl.java index b15432db5..2b5a2f0eb 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/impl/AsyncMethodsClientImpl.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/impl/AsyncMethodsClientImpl.java @@ -23,6 +23,7 @@ import com.slack.api.methods.request.admin.conversations.whitelist.AdminConversationsWhitelistListGroupsLinkedToChannelRequest; import com.slack.api.methods.request.admin.conversations.whitelist.AdminConversationsWhitelistRemoveRequest; import com.slack.api.methods.request.admin.emoji.*; +import com.slack.api.methods.request.entity.EntityPresentDetailsRequest; import com.slack.api.methods.request.admin.functions.AdminFunctionsListRequest; import com.slack.api.methods.request.admin.functions.AdminFunctionsPermissionsLookupRequest; import com.slack.api.methods.request.admin.functions.AdminFunctionsPermissionsSetRequest; @@ -144,6 +145,7 @@ import com.slack.api.methods.response.admin.conversations.whitelist.AdminConversationsWhitelistListGroupsLinkedToChannelResponse; import com.slack.api.methods.response.admin.conversations.whitelist.AdminConversationsWhitelistRemoveResponse; import com.slack.api.methods.response.admin.emoji.*; +import com.slack.api.methods.response.entity.EntityPresentDetailsResponse; import com.slack.api.methods.response.admin.functions.AdminFunctionsListResponse; import com.slack.api.methods.response.admin.functions.AdminFunctionsPermissionsLookupResponse; import com.slack.api.methods.response.admin.functions.AdminFunctionsPermissionsSetResponse; @@ -2873,4 +2875,14 @@ public CompletableFuture workflowsUpdateStep(Reques return workflowsUpdateStep(req.configure(WorkflowsUpdateStepRequest.builder()).build()); } + @Override + public CompletableFuture entityPresentDetails(EntityPresentDetailsRequest req) { + return executor.execute(ENTITY_PRESENT_DETAILS, toMap(req), () -> methods.entityPresentDetails(req)); + } + + @Override + public CompletableFuture entityPresentDetails(RequestConfigurator req) { + return entityPresentDetails(req.configure(EntityPresentDetailsRequest.builder()).build()); + } + } diff --git a/slack-api-client/src/main/java/com/slack/api/methods/impl/MethodsClientImpl.java b/slack-api-client/src/main/java/com/slack/api/methods/impl/MethodsClientImpl.java index b2b1944ec..ba5321e8b 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/impl/MethodsClientImpl.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/impl/MethodsClientImpl.java @@ -85,6 +85,7 @@ import com.slack.api.methods.request.dialog.DialogOpenRequest; import com.slack.api.methods.request.dnd.*; import com.slack.api.methods.request.emoji.EmojiListRequest; +import com.slack.api.methods.request.entity.EntityPresentDetailsRequest; import com.slack.api.methods.request.files.*; import com.slack.api.methods.request.files.comments.FilesCommentsAddRequest; import com.slack.api.methods.request.files.comments.FilesCommentsDeleteRequest; @@ -219,6 +220,7 @@ import com.slack.api.methods.response.dialog.DialogOpenResponse; import com.slack.api.methods.response.dnd.*; import com.slack.api.methods.response.emoji.EmojiListResponse; +import com.slack.api.methods.response.entity.EntityPresentDetailsResponse; import com.slack.api.methods.response.files.*; import com.slack.api.methods.response.files.comments.FilesCommentsAddResponse; import com.slack.api.methods.response.files.comments.FilesCommentsDeleteResponse; @@ -3566,6 +3568,16 @@ public WorkflowsUpdateStepResponse workflowsUpdateStep(RequestConfigurator req) throws IOException, SlackApiException { + return entityPresentDetails(req.configure(EntityPresentDetailsRequest.builder()).build()); + } + // ---------------------------------------------- // OkHttp layer methods // ---------------------------------------------- diff --git a/slack-api-client/src/main/java/com/slack/api/methods/request/chat/ChatUnfurlRequest.java b/slack-api-client/src/main/java/com/slack/api/methods/request/chat/ChatUnfurlRequest.java index 0b55b5e7f..b0b6812a3 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/request/chat/ChatUnfurlRequest.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/request/chat/ChatUnfurlRequest.java @@ -3,6 +3,7 @@ import com.slack.api.methods.SlackApiRequest; import com.slack.api.model.Action; import com.slack.api.model.Field; +import com.slack.api.model.EntityMetadata; import com.slack.api.model.block.LayoutBlock; import com.slack.api.model.block.composition.PlainTextObject; import lombok.AllArgsConstructor; @@ -75,6 +76,17 @@ public class ChatUnfurlRequest implements SlackApiRequest { // https://docs.slack.dev/changelog/2021-08-changes-to-unfurls private String source; + private String rawMetadata; + private UnfurlMetadata metadata; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class UnfurlMetadata { + private EntityMetadata[] entities; + } + // https://docs.slack.dev/messaging/unfurling-links-in-messages @Data @Builder diff --git a/slack-api-client/src/main/java/com/slack/api/methods/request/entity/EntityPresentDetailsRequest.java b/slack-api-client/src/main/java/com/slack/api/methods/request/entity/EntityPresentDetailsRequest.java new file mode 100644 index 000000000..68c8b655c --- /dev/null +++ b/slack-api-client/src/main/java/com/slack/api/methods/request/entity/EntityPresentDetailsRequest.java @@ -0,0 +1,101 @@ +package com.slack.api.methods.request.entity; + +import com.slack.api.methods.SlackApiRequest; +import com.slack.api.model.EntityMetadata; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * https://docs.slack.dev/reference/methods/entity.presentDetails + */ +@Data +@Builder +public class EntityPresentDetailsRequest implements SlackApiRequest { + + /** + * Authentication token. + */ + private String token; + + /** + * JSON object containing the data that will be displayed in the flexpane for + * the entity. + */ + private String rawMetadata; + private EntityMetadata metadata; + + /** + * A reference to the original user action that initated the request. + * Find this value in the event payload of the `entity_details_requested` event. + */ + private String triggerId; + + /** + * Set to true to indicate that the user must authenticate to view the full the + * flexpane data. + */ + private boolean userAuthRequired; + + /** + * Send users to this custom URL where they will complete authentication in your + * app if required. Value should be properly URL-encoded. + */ + private String userAuthUrl; + + /** + * Error indicating why the flexpane details cannot be provided. + */ + private Error error; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class Error { + /** + * Standardized error status + */ + private String status; + /** + * Used when status is 'custom' to provide a specific message to the client + */ + private String customMessage; + /** + * Format of the message + */ + private String messageFormat; + /** + * Used when status is 'custom' to provide a specific title to the client + */ + private String customTitle; + /** + * An action button to be shown in case of a specific error + */ + private ActionButton[] actions; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class ActionButton { + private String text; + private String actionId; + private String value; + private String style; + private String url; + private String accessibilityLabel; + private ButtonProcessingState processingState; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class ButtonProcessingState { + private Boolean enabled; + private String interstitialText; + } + } + } +} diff --git a/slack-api-client/src/main/java/com/slack/api/methods/response/chat/ChatPostMessageResponse.java b/slack-api-client/src/main/java/com/slack/api/methods/response/chat/ChatPostMessageResponse.java index 5e4d51865..2becdc692 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/response/chat/ChatPostMessageResponse.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/response/chat/ChatPostMessageResponse.java @@ -29,4 +29,6 @@ public class ChatPostMessageResponse implements SlackApiTextResponse { private String channel; private String ts; private Message message; + + private String callstack; } \ No newline at end of file diff --git a/slack-api-client/src/main/java/com/slack/api/methods/response/chat/ChatUnfurlResponse.java b/slack-api-client/src/main/java/com/slack/api/methods/response/chat/ChatUnfurlResponse.java index 0b6c522f6..a3466850c 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/response/chat/ChatUnfurlResponse.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/response/chat/ChatUnfurlResponse.java @@ -15,5 +15,6 @@ public class ChatUnfurlResponse implements SlackApiTextResponse { private String needed; private String provided; private transient Map> httpResponseHeaders; - + private String callstack; + private Object response_metadata; } diff --git a/slack-api-client/src/main/java/com/slack/api/methods/response/entity/EntityPresentDetailsResponse.java b/slack-api-client/src/main/java/com/slack/api/methods/response/entity/EntityPresentDetailsResponse.java new file mode 100644 index 000000000..c7d09dfb7 --- /dev/null +++ b/slack-api-client/src/main/java/com/slack/api/methods/response/entity/EntityPresentDetailsResponse.java @@ -0,0 +1,20 @@ +package com.slack.api.methods.response.entity; + +import com.slack.api.methods.SlackApiTextResponse; +import lombok.Data; + +import java.util.List; +import java.util.Map; + +@Data +public class EntityPresentDetailsResponse implements SlackApiTextResponse { + + private boolean ok; + private String warning; + private String error; + private String needed; + private String provided; + private transient Map> httpResponseHeaders; + private String callstack; + private Object response_metadata; +} diff --git a/slack-api-client/src/test/java/test_locally/api/methods_admin_api/FieldValidationTest.java b/slack-api-client/src/test/java/test_locally/api/methods_admin_api/FieldValidationTest.java index 1497333b4..ee8df0748 100644 --- a/slack-api-client/src/test/java/test_locally/api/methods_admin_api/FieldValidationTest.java +++ b/slack-api-client/src/test/java/test_locally/api/methods_admin_api/FieldValidationTest.java @@ -442,12 +442,12 @@ public void adminEmoji() throws Exception { { AdminEmojiAddResponse obj = parse(prefix + "add", AdminEmojiAddResponse.class); verifyIfAllGettersReturnNonNull(obj); - verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages"); + //verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages"); // TODO } { AdminEmojiAddAliasResponse obj = parse(prefix + "addAlias", AdminEmojiAddAliasResponse.class); verifyIfAllGettersReturnNonNull(obj); - verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages"); + //verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages"); } { AdminEmojiListResponse obj = parse(prefix + "list", AdminEmojiListResponse.class); @@ -456,12 +456,12 @@ public void adminEmoji() throws Exception { { AdminEmojiRemoveResponse obj = parse(prefix + "remove", AdminEmojiRemoveResponse.class); verifyIfAllGettersReturnNonNull(obj); - verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages"); + //verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages"); } { AdminEmojiRenameResponse obj = parse(prefix + "rename", AdminEmojiRenameResponse.class); verifyIfAllGettersReturnNonNull(obj); - verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages"); + //verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages"); } } diff --git a/slack-api-client/src/test/java/test_with_remote_apis/methods/chat_Test.java b/slack-api-client/src/test/java/test_with_remote_apis/methods/chat_Test.java index 85a8b3755..b640b3e7c 100644 --- a/slack-api-client/src/test/java/test_with_remote_apis/methods/chat_Test.java +++ b/slack-api-client/src/test/java/test_with_remote_apis/methods/chat_Test.java @@ -4,6 +4,7 @@ import com.slack.api.methods.SlackApiException; import com.slack.api.methods.request.chat.ChatPostMessageRequest; import com.slack.api.methods.request.chat.ChatUnfurlRequest; +import com.slack.api.methods.request.chat.ChatUnfurlRequest.UnfurlMetadata; import com.slack.api.methods.request.chat.ChatUpdateRequest; import com.slack.api.methods.response.chat.*; import com.slack.api.methods.response.chat.scheduled_messages.ChatScheduledMessagesListResponse; @@ -13,6 +14,9 @@ import com.slack.api.methods.response.files.FilesUploadResponse; import com.slack.api.methods.response.files.FilesUploadV2Response; import com.slack.api.model.*; +import com.slack.api.model.EntityMetadata.EntityPayload.FileFields; +import com.slack.api.model.EntityMetadata.EntityPayload.IncidentFields; +import com.slack.api.model.EntityMetadata.EntityPayload; import com.slack.api.model.block.DividerBlock; import com.slack.api.model.block.LayoutBlock; import com.slack.api.model.block.SectionBlock; @@ -43,1026 +47,1288 @@ @Slf4j public class chat_Test { - String botToken = System.getenv(Constants.SLACK_SDK_TEST_BOT_TOKEN); - String userToken = System.getenv(Constants.SLACK_SDK_TEST_USER_TOKEN); - - static SlackTestConfig testConfig = SlackTestConfig.getInstance(); - static Slack slack = Slack.getInstance(testConfig.getConfig()); - - @BeforeClass - public static void setUp() throws Exception { - SlackTestConfig.initializeRawJSONDataFiles("chat.*"); - } - - @AfterClass - public static void tearDown() throws InterruptedException { - SlackTestConfig.awaitCompletion(testConfig); - } - - private String randomChannelId = null; - - void loadRandomChannelId() throws IOException, SlackApiException { - if (randomChannelId == null) { - ConversationsListResponse channelsListResponse = - slack.methods().conversationsList(r -> r.token(botToken).excludeArchived(true).limit(100)); - assertThat(channelsListResponse.getError(), is(nullValue())); - for (Conversation channel : channelsListResponse.getChannels()) { - if (channel.getName().equals("random")) { - randomChannelId = channel.getId(); - break; + String botToken = System.getenv(Constants.SLACK_SDK_TEST_BOT_TOKEN); + String userToken = System.getenv(Constants.SLACK_SDK_TEST_USER_TOKEN); + + static SlackTestConfig testConfig = SlackTestConfig.getInstance(); + static Slack slack = Slack.getInstance(testConfig.getConfig()); + + @BeforeClass + public static void setUp() throws Exception { + SlackTestConfig.initializeRawJSONDataFiles("chat.*"); + } + + @AfterClass + public static void tearDown() throws InterruptedException { + SlackTestConfig.awaitCompletion(testConfig); + } + + private String randomChannelId = null; + + void loadRandomChannelId() throws IOException, SlackApiException { + if (randomChannelId == null) { + ConversationsListResponse channelsListResponse = slack.methods() + .conversationsList(r -> r.token(botToken).excludeArchived(true).limit(100)); + assertThat(channelsListResponse.getError(), is(nullValue())); + for (Conversation channel : channelsListResponse.getChannels()) { + if (channel.getName().equals("random")) { + randomChannelId = channel.getId(); + break; + } + } + } + } + + String blocksAsString = "[\n" + + " {\n" + + " \"type\": \"section\",\n" + + " \"text\": {\n" + + " \"type\": \"mrkdwn\",\n" + + " \"text\": \"Hello, Assistant to the Regional Manager Dwight! *Michael Scott* wants to know where you'd like to take the Paper Company investors to dinner tonight.\\n\\n *Please select a restaurant:*\"\n" + + + " }\n" + + " },\n" + + " {\n" + + " \"type\": \"divider\"\n" + + " },\n" + + " {\n" + + " \"type\": \"section\",\n" + + " \"text\": {\n" + + " \"type\": \"mrkdwn\",\n" + + " \"text\": \"*Farmhouse Thai Cuisine*\\n:star::star::star::star: 1528 reviews\\n They do have some vegan options, like the roti and curry, plus they have a ton of salad stuff and noodles can be ordered without meat!! They have something for everyone here\"\n" + + + " },\n" + + " \"accessory\": {\n" + + " \"type\": \"image\",\n" + + " \"image_url\": \"https://s3-media3.fl.yelpcdn.com/bphoto/c7ed05m9lC2EmA3Aruue7A/o.jpg\",\n" + + + " \"alt_text\": \"alt text for image\"\n" + + " }\n" + + " },\n" + + " {\n" + + " \"type\": \"section\",\n" + + " \"text\": {\n" + + " \"type\": \"mrkdwn\",\n" + + " \"text\": \"*Kin Khao*\\n:star::star::star::star: 1638 reviews\\n The sticky rice also goes wonderfully with the caramelized pork belly, which is absolutely melt-in-your-mouth and so soft.\"\n" + + + " },\n" + + " \"accessory\": {\n" + + " \"type\": \"image\",\n" + + " \"image_url\": \"https://s3-media2.fl.yelpcdn.com/bphoto/korel-1YjNtFtJlMTaC26A/o.jpg\",\n" + + + " \"alt_text\": \"alt text for image\"\n" + + " }\n" + + " },\n" + + " {\n" + + " \"type\": \"section\",\n" + + " \"text\": {\n" + + " \"type\": \"mrkdwn\",\n" + + " \"text\": \"*Ler Ros*\\n:star::star::star::star: 2082 reviews\\n I would really recommend the Yum Koh Moo Yang - Spicy lime dressing and roasted quick marinated pork shoulder, basil leaves, chili & rice powder.\"\n" + + + " },\n" + + " \"accessory\": {\n" + + " \"type\": \"image\",\n" + + " \"image_url\": \"https://s3-media2.fl.yelpcdn.com/bphoto/DawwNigKJ2ckPeDeDM7jAg/o.jpg\",\n" + + + " \"alt_text\": \"alt text for image\"\n" + + " }\n" + + " },\n" + + " {\n" + + " \"type\": \"divider\"\n" + + " },\n" + + " {\n" + + " \"type\": \"actions\",\n" + + " \"elements\": [\n" + + " {\n" + + " \"type\": \"button\",\n" + + " \"text\": {\n" + + " \"type\": \"plain_text\",\n" + + " \"text\": \"Farmhouse\",\n" + + " \"emoji\": true\n" + + " },\n" + + " \"value\": \"click_me_123\"\n" + + " },\n" + + " {\n" + + " \"type\": \"button\",\n" + + " \"text\": {\n" + + " \"type\": \"plain_text\",\n" + + " \"text\": \"Kin Khao\",\n" + + " \"emoji\": true\n" + + " },\n" + + " \"value\": \"click_me_123\"\n" + + " },\n" + + " {\n" + + " \"type\": \"button\",\n" + + " \"text\": {\n" + + " \"type\": \"plain_text\",\n" + + " \"text\": \"Ler Ros\",\n" + + " \"emoji\": true\n" + + " },\n" + + " \"value\": \"click_me_123\"\n" + + " }\n" + + " ]\n" + + " }\n" + + "]"; + + @Test + public void postMessage_bot() throws Exception { + loadRandomChannelId(); + ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(req -> req + .channel(randomChannelId) + .text("You can also do slack.methods(token)") + .blocks(asBlocks(section( + s -> s.text(plainText("You can also do slack.methods(token)")))))); + assertThat(response.getError(), is(nullValue())); + assertThat(response.getMessage().getText(), is("You can also do slack.methods(token)")); + + String scopes = response.getHttpResponseHeaders().get("x-oauth-scopes").get(0); + assertThat(scopes, is(notNullValue())); + } + + @Test + public void postMessage_user() throws Exception { + loadRandomChannelId(); + ChatPostMessageResponse response = slack.methods(userToken).chatPostMessage(req -> req + .channel(randomChannelId) + .text("You can also do slack.methods(token)")); + assertThat(response.getError(), is(nullValue())); + assertThat(response.getMessage().getText(), is("You can also do slack.methods(token)")); + + String scopes = response.getHttpResponseHeaders().get("x-oauth-scopes").get(0); + assertThat(scopes, is(notNullValue())); + } + + // https://github.com/slackapi/java-slack-sdk/issues/157 + @Test + public void postMessage_blocksInAttachment_do_not_work_bot() throws Exception { + loadRandomChannelId(); + ChatPostMessageResponse firstMessageCreation = slack.methods().chatPostMessage(req -> req + .channel(randomChannelId) + .token(botToken) + .attachments(Arrays.asList( + Attachment + .builder() + .id(123) + .callbackId("callback") + .title("hi") + .blocks(Arrays.asList(DividerBlock.builder() + .blockId("123").build())) + .build()))); + assertThat(firstMessageCreation.getError(), is("invalid_attachments")); + } + + @Test + public void postMessage_blocksInAttachment_do_not_work_user() throws Exception { + loadRandomChannelId(); + ChatPostMessageResponse firstMessageCreation = slack.methods().chatPostMessage(req -> req + .channel(randomChannelId) + .token(userToken) + .attachments(Arrays.asList( + Attachment + .builder() + .id(123) + .callbackId("callback") + .title("hi") + .blocks(Arrays.asList(DividerBlock.builder() + .blockId("123").build())) + .build()))); + assertThat(firstMessageCreation.getError(), is("invalid_attachments")); + } + + @Test + public void chat_getPermalink_bot() throws IOException, SlackApiException { + ConversationsListResponse channels = slack.methods().conversationsList(req -> req + .token(botToken) + .excludeArchived(true)); + assertThat(channels.getError(), is(nullValue())); + assertThat(channels.isOk(), is(true)); + + String channelId = channels.getChannels().get(0).getId(); + + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(req -> req + .channel(channelId) + .token(botToken) + .text("Hi, this is a test message from Java Slack SDK's unit tests") + .linkNames(true)); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.isOk(), is(true)); + assertThat(postResponse.getMessage().getText(), + is("Hi, this is a test message from Java Slack SDK's unit tests")); + + ChatGetPermalinkResponse permalink = slack.methods().chatGetPermalink(req -> req + .token(botToken) + .channel(channelId) + .messageTs(postResponse.getTs())); + assertThat(permalink.getError(), is(nullValue())); + assertThat(permalink.isOk(), is(true)); + assertThat(permalink.getPermalink(), is(notNullValue())); + } + + @Test + public void chat_getPermalink_user() throws IOException, SlackApiException { + ConversationsListResponse channels = slack.methods().conversationsList(req -> req + .token(userToken) + .excludeArchived(true)); + assertThat(channels.getError(), is(nullValue())); + assertThat(channels.isOk(), is(true)); + + String channelId = channels.getChannels().get(0).getId(); + + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(req -> req + .channel(channelId) + .token(userToken) + .text("Hi, this is a test message from Java Slack SDK's unit tests") + .linkNames(true)); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.isOk(), is(true)); + assertThat(postResponse.getMessage().getText(), + is("Hi, this is a test message from Java Slack SDK's unit tests")); + + ChatGetPermalinkResponse permalink = slack.methods().chatGetPermalink(req -> req + .token(userToken) + .channel(channelId) + .messageTs(postResponse.getTs())); + assertThat(permalink.getError(), is(nullValue())); + assertThat(permalink.isOk(), is(true)); + assertThat(permalink.getPermalink(), is(notNullValue())); + } + + @Test + public void chat_getPermalink_bot_async() throws ExecutionException, InterruptedException { + ConversationsListResponse channels = slack.methodsAsync().conversationsList(req -> req + .token(botToken) + .excludeArchived(true)) + .get(); + assertThat(channels.getError(), is(nullValue())); + assertThat(channels.isOk(), is(true)); + + String channelId = channels.getChannels().get(0).getId(); + + ChatPostMessageResponse postResponse = slack.methodsAsync().chatPostMessage(req -> req + .channel(channelId) + .token(botToken) + .text("Hi, this is a test message from Java Slack SDK's unit tests") + .linkNames(true)) + .get(); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.isOk(), is(true)); + assertThat(postResponse.getMessage().getText(), + is("Hi, this is a test message from Java Slack SDK's unit tests")); + + String scopes = postResponse.getHttpResponseHeaders().get("x-oauth-scopes").get(0); + assertThat(scopes, is(notNullValue())); + + ChatGetPermalinkResponse permalink = slack.methodsAsync().chatGetPermalink(req -> req + .token(botToken) + .channel(channelId) + .messageTs(postResponse.getTs())) + .get(); + assertThat(permalink.getError(), is(nullValue())); + assertThat(permalink.isOk(), is(true)); + assertThat(permalink.getPermalink(), is(notNullValue())); + } + + // It's also possible to post a message by giving the name of a channel. + // + // https://docs.slack.dev/reference/methods/chat.postMessage#channels + // You can either pass the channel's name (#general) or encoded ID (C024BE91L), + // and the message will be posted to that channel. + // The channel's ID can be retrieved through the channels.list API method. + // + // https://github.com/slackapi/python-slackclient/blob/master/README.md#sending-a-message-to-slack + // In our examples, we specify the channel name, however it is recommended to + // use the channel_id where possible. + @Test + public void postingWithChannelName() throws IOException, SlackApiException { + makeSureIfGivingChannelNameWorks("random"); + makeSureIfGivingChannelNameWorks("#random"); + } + + private void makeSureIfGivingChannelNameWorks(String channelName) throws IOException, SlackApiException { + ChatPostMessageResponse response = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(botToken) + .channel(channelName) + .text("Hello!") + .build()); + + assertThat(response.getError(), is(nullValue())); + assertThat(response.getChannel(), is(startsWith("C"))); + assertThat(response.getMessage().getText(), is(startsWith("Hello!"))); + } + + // NOTE: You need to add "youtube.com" at + // Features > Event Subscriptions > App Unfurl Domains + @Test + public void unfurl_raw_json_bot() throws Exception { + loadRandomChannelId(); + + String url = "https://www.youtube.com/watch?v=wq1R93UMqlk"; + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(userToken) + .channel(randomChannelId) + .text(url) + .unfurlLinks(true) + .unfurlMedia(true) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); + + String ts = postResponse.getTs(); + Map unfurls = new HashMap<>(); + ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); + detail.setText("Every day is the test."); + unfurls.put(url, detail); + + ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() + .token(botToken) + .channel(randomChannelId) + .ts(ts) + .rawUnfurls(GsonFactory.createSnakeCase().toJson(unfurls)) + .build()); + assertThat(unfurlResponse.getError(), is(nullValue())); + } + + // NOTE: You need to add "youtube.com" at + // Features > Event Subscriptions > App Unfurl Domains + @Test + public void unfurl_with_preview() throws Exception { + loadRandomChannelId(); + + String url = "https://www.youtube.com/watch?v=wq1R93UMqlk"; + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(userToken) + .channel(randomChannelId) + .text(url) + .unfurlLinks(false) + .unfurlMedia(false) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); + + String ts = postResponse.getTs(); + Map unfurls = new HashMap<>(); + ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); + detail.setTitle("The top-level title (set by chat.unfurl)"); + detail.setPreview(ChatUnfurlRequest.UnfurlDetailPreview.builder() + .title(plainText("The title in the preview set (set by chat.unfurl)")) + .subtitle(plainText("The subtitle in the preview (set by chat.unfurl)")) + .iconUrl("https://assets.brandfolder.com/pmix53-32t4so-a6439g/original/slackbot.png") + .build()); + unfurls.put(url, detail); + + ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() + .token(botToken) + .channel(randomChannelId) + .ts(ts) + .unfurls(unfurls) + .build()); + assertThat(unfurlResponse.getError(), is(nullValue())); + + // verify if the message can be parsed by the JSON parser + ConversationsHistoryResponse history = slack.methods(botToken).conversationsHistory(r -> r + .channel(randomChannelId) + .oldest(ts) + .inclusive(true)); + assertThat(history.getError(), is(nullValue())); + } + + // NOTE: You need to add "myappdomain.com" at + // Features > Event Subscriptions > App Unfurl Domains + @Test + public void unfurl_with_work_object_from_json() throws Exception { + loadRandomChannelId(); + + // Post the URL to be unfurled + + String appUnfurlURL = "https://myappdomain.com/id/123?url-posted-by=user"; + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(botToken) + .channel(randomChannelId) + .text(appUnfurlURL) + .unfurlLinks(false) + .unfurlMedia(false) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.getMessage().getText(), is("<" + appUnfurlURL + ">")); + + String ts = postResponse.getTs(); + + // Prepare the work object metadata for a sample Task entity + + String iconURL = "https://example.com/icon/high-priority.png"; // Provide the URL for a hosted image to + // see it in the unfurl + String userID = findUser(); + String jsonString = "{\"entities\":[{\"entity_type\":\"slack#/entities/task\",\"external_ref\":{\"id\":\"94\"},\"url\":\"https://myappdomain.com/admin/slack/workobject/94/change/\",\"entity_payload\":{\"attributes\":{\"title\":{\"text\":\"Default title\"},\"display_type\":\"Assignment\",\"product_icon\":{\"url\":\"https://play-lh.googleusercontent.com/DG-zbXPr8LItYD8F2nD4aR_SK_jpkipLBK77YWY-F0cdJt67VFgCHZtRtjsakzTw3EM=w480-h960-rw\",\"alt_text\":\"The product's icon\"},\"product_name\":\"My Product\"},\"fields\":{\"description\":{\"value\":\"Description of the task\",\"format\":\"markdown\"},\"date_created\":{\"value\":1741164235},\"date_updated\":{\"value\":1741164235},\"assignee\":{\"type\":\"slack#/types/user_id\",\"value\":\"" + + userID + + "\"},\"status\":{\"value\":\"open\",\"tag_color\":\"blue\",\"link\":\"https://example.com/tasks?status=open\"},\"due_date\":{\"value\":\"2025-06-10\",\"type\":\"slack#/types/date\"},\"priority\":{\"value\":\"high\",\"icon\":{\"alt_text\":\"Icon to indicate a high priority item\",\"url\":\"" + + iconURL + + "\"},\"link\":\"https://example.com/tasks?priority=high\"}},\"custom_fields\":[{\"key\":\"channels\",\"label\":\"channels\",\"item_type\":\"slack#/types/channel_id\",\"type\":\"array\",\"value\":[{\"value\":\"" + + randomChannelId + "\",\"type\":\"slack#/types/channel_id\"},{\"value\":\"" + + randomChannelId + + "\",\"type\":\"slack#/types/channel_id\"}]},{\"key\":\"channel\",\"label\":\"Channel\",\"value\":\"" + + randomChannelId + + "\",\"type\":\"slack#/types/channel_id\"},{\"key\":\"img\",\"label\":\"image\",\"type\":\"slack#/types/image\",\"image_url\":\"https://previews.us-east-1.widencdn.net/preview/48045879/assets/asset-view/8588de84-f8ed-4488-a456-45ba986280ee/thumbnail/eyJ3IjoyMDQ4LCJoIjoyMDQ4LCJzY29wZSI6ImFwcCJ9?sig.ver=1&sig.keyId=us-east-1.20240821&sig.expires=1759892400&sig=UgMe4SFiG6i3OP7mWd-ZX61Kx4uobjTmOuZqHjCV2QY\"},{\"type\":\"string\",\"key\":\"item_static_sel\",\"label\":\"Static Select\",\"value\":\"Red\"},{\"type\":\"array\",\"key\":\"multi_static_select_key\",\"label\":\"Multi Static Select\",\"value\":[{\"value\":\"Green\",\"type\":\"string\",\"tag_color\":\"gray\"}],\"item_type\":\"string\"},{\"type\":\"slack#/types/user_id\",\"key\":\"user_select_key\",\"label\":\"User select\",\"value\":\"USLACKBOT\",\"edit\":{\"enabled\":true}},{\"type\":\"array\",\"key\":\"string_array_key\",\"label\":\"Array of markdown strings\",\"item_type\":\"string\",\"value\":[{\"value\":\"__Thing 1__\",\"type\":\"string\",\"format\":\"markdown\"},{\"value\":\"*Thing 2*\",\"type\":\"string\",\"format\":\"markdown\"}],\"edit\":{\"enabled\":true}},{\"type\":\"array\",\"key\":\"string_array_2_key\",\"label\":\"Array of plain strings\",\"item_type\":\"string\",\"value\":[{\"value\":\"Plain string 1\",\"type\":\"string\"},{\"value\":\"Plain string 2\",\"type\":\"string\"}]},{\"type\":\"array\",\"key\":\"multi_user_select_key\",\"label\":\"Multi-user select\",\"item_type\":\"slack#/types/user_id\",\"value\":[{\"value\":\"USLACKBOT\",\"type\":\"slack#/types/user_id\"},{\"value\":\"U014KLZE350\",\"type\":\"slack#/types/user_id\"}]},{\"type\":\"array\",\"key\":\"multi_external_select_key\",\"label\":\"Multi External Select\",\"item_type\":\"string\",\"value\":[{\"value\":\"Jose Allen\",\"type\":\"string\",\"tag_color\":\"gray\"},{\"value\":\"Cristian Santos\",\"type\":\"string\",\"tag_color\":\"gray\"},{\"value\":\"Wayne Morgan\",\"type\":\"string\",\"tag_color\":\"gray\"}],\"edit\":{\"enabled\":true,\"select\":{\"fetch_options_dynamically\":true,\"current_values\":[\"helen-jones\",\"cristian-santos\",\"wayne-morgan\"]}}},{\"type\":\"string\",\"key\":\"external_select_key\",\"label\":\"External Select\",\"value\":\"Kevin Walters\",\"tag_color\":\"gray\",\"edit\":{\"enabled\":true,\"select\":{\"current_value\":\"kevin-walters\",\"fetch_options_dynamically\":true}}},{\"type\":\"slack#/types/timestamp\",\"key\":\"timestamp_key\",\"label\":\"Timestamp\",\"value\":\"1747496700\",\"edit\":{\"enabled\":true}}],\"actions\":{\"primary_actions\":[{\"text\":\"URL action\",\"action_id\":\"url_button_action_id\",\"value\":\"some_val\",\"style\":\"primary\",\"url\":\"https://example.com\",\"accessibility_label\":\"Goes to example.com\"},{\"text\":\"Block action\",\"action_id\":\"block_action_id\",\"value\":\"some_val\",\"style\":\"danger\",\"accessibility_label\":\"No URL so this should be invoked via blocks.actions\"}],\"overflow_actions\":[{\"text\":\"First overflow action\",\"action_id\":\"overflow_block_action_id\",\"value\":\"overflow\",\"style\":\"primary\",\"accessibility_label\":\"No URL so this should be invoked via blocks.actions\"},{\"text\":\"Second overflow action\",\"action_id\":\"second_block_action_id\",\"value\":\"overflow\",\"style\":\"danger\",\"url\":\"https://example.com\",\"accessibility_label\":\" URL \"}]}},\"app_unfurl_url\":\"https://myappdomain.com/id/123?url-posted-by=user\"}]}"; + + // Unfurl the URL + + ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() + .token(botToken) + .channel(randomChannelId) + .ts(ts) + .rawMetadata(jsonString) + .build()); + assertThat(unfurlResponse.getError(), is(nullValue())); + + // Verify if the message can be parsed by the JSON parser + ConversationsHistoryResponse history = slack.methods(botToken).conversationsHistory(r -> r + .channel(randomChannelId) + .oldest(ts) + .inclusive(true)); + assertThat(history.getError(), is(nullValue())); + + // Verify that the work object attachment was added + List attachments = history.getMessages().get(0).getAttachments(); + assertThat(attachments, is(not(nullValue()))); + assertThat(attachments.get(0), is(not(nullValue()))); + Object workObjectAttachment = attachments.get(0).getWorkObjectEntity(); + assertThat(workObjectAttachment, is(not(nullValue()))); + } + + // NOTE: You need to add "myappdomain.com" at + // Features > Event Subscriptions > App Unfurl Domains + @Test + public void unfurl_with_work_object_from_object() throws Exception { + loadRandomChannelId(); + + // Post the URL to be unfurled + + String appUnfurlURL = "https://myappdomain.com/id/F123456?url-posted-by=user"; + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(botToken) + .channel(randomChannelId) + .text(appUnfurlURL) + .unfurlLinks(false) + .unfurlMedia(false) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.getMessage().getText(), is("<" + appUnfurlURL + ">")); + String ts = postResponse.getTs(); + + // Prepare the work object metadata for a sample File entity + + EntityPayload.Attributes.Title title = EntityPayload.Attributes.Title.builder().text("My File") + .build(); + EntityPayload.Attributes attributes = EntityPayload.Attributes + .builder().title(title).build(); + EntityPayload.TypedField createdBy = EntityPayload.TypedField.builder().value("Joe Smith") + .type("string") + .build(); + EntityPayload.Timestamp dateCreated = EntityPayload.Timestamp.builder().value(1756166400).build(); + FileFields fields = FileFields.builder().createdBy(createdBy).dateCreated(dateCreated).build(); + + EntityPayload.CustomField[] customFields = { + EntityPayload.CustomField.builder().type("string").key("hello_world").label("Message") + .value("Hello World").build() }; + EntityPayload payload = EntityPayload.builder() + .attributes(attributes) + .fileFields(fields) + .customFields(customFields) + .build(); + EntityMetadata.ExternalRef externalRef = EntityMetadata.ExternalRef.builder() + .id("F123456").build(); + EntityMetadata entity = EntityMetadata.builder() + .entityType("slack#/entities/file") + .appUnfurlUrl(appUnfurlURL) + .url("https://myappdomain.com/id/F123456") + .externalRef(externalRef) + .entityPayload(payload) + .build(); + EntityMetadata[] entities = { entity }; + UnfurlMetadata metadata = UnfurlMetadata.builder().entities(entities).build(); + + // Unfurl the URL + + ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() + .token(botToken) + .channel(randomChannelId) + .ts(ts) + .metadata(metadata) + .build()); + assertThat(unfurlResponse.getError(), is(nullValue())); + + // Verify if the message can be parsed by the JSON parser + ConversationsHistoryResponse history = slack.methods(botToken).conversationsHistory(r -> r + .channel(randomChannelId) + .oldest(ts) + .inclusive(true)); + assertThat(history.getError(), is(nullValue())); + + // Verify that the work object attachment was added + List attachments = history.getMessages().get(0).getAttachments(); + assertThat(attachments, is(not(nullValue()))); + assertThat(attachments.get(0), is(not(nullValue()))); + Object workObjectAttachment = attachments.get(0).getWorkObjectEntity(); + assertThat(workObjectAttachment, is(not(nullValue()))); + } + + // NOTE: You need to add "youtube.com" at + // Features > Event Subscriptions > App Unfurl Domains + @Test + public void unfurl_raw_json_user() throws Exception { + loadRandomChannelId(); + + String url = "https://www.youtube.com/watch?v=wq1R93UMqlk"; + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(userToken) + .channel(randomChannelId) + .text(url) + .unfurlLinks(true) + .unfurlMedia(true) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); + + String ts = postResponse.getTs(); + Map unfurls = new HashMap<>(); + ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); + detail.setText("Every day is the test."); + unfurls.put(url, detail); + + ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() + .token(userToken) + .channel(randomChannelId) + .ts(ts) + .rawUnfurls(GsonFactory.createSnakeCase().toJson(unfurls)) + .build()); + assertThat(unfurlResponse.getError(), is(nullValue())); + } + + // NOTE: You need to add "youtube.com" at + // Features > Event Subscriptions > App Unfurl Domains + @Test + public void unfurl_text() throws Exception { + loadRandomChannelId(); + + String url = "https://www.youtube.com/watch?v=wq1R93UMqlk"; + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(botToken) + .channel(randomChannelId) + .text(url) + .unfurlLinks(true) + .unfurlMedia(true) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); + + String ts = postResponse.getTs(); + Map unfurls = new HashMap<>(); + ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); + detail.setText("Every day is the test."); + unfurls.put(url, detail); + + ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() + .token(botToken) + .channel(randomChannelId) + .ts(ts) + .unfurls(unfurls) + .build()); + assertThat(unfurlResponse.getError(), is(nullValue())); + } + + @Test + public void unfurl_blocks() throws Exception { + loadRandomChannelId(); + + String url = "https://www.youtube.com/watch?v=wq1R93UMqlk"; + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(botToken) + .channel(randomChannelId) + .text(url) + .unfurlLinks(true) + .unfurlMedia(true) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); + + String ts = postResponse.getTs(); + Map unfurls = new HashMap<>(); + ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); + detail.setBlocks(Arrays.asList( + DividerBlock.builder().blockId("b1").build(), + DividerBlock.builder().blockId("b2").build())); + unfurls.put(url, detail); + + ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() + .token(botToken) + .channel(randomChannelId) + .ts(ts) + .unfurls(unfurls) + .build()); + assertThat(unfurlResponse.getError(), is(nullValue())); + } + + // NOTE: You need to add "example.com" at + // Features > Event Subscriptions > App Unfurl Domains + @Test + public void unfurl_issue_399() throws Exception { + + loadRandomChannelId(); + + String url = "https://www.example.com/test-issue-399"; + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(botToken) + .channel(randomChannelId) + .text(url) + .unfurlLinks(true) + .unfurlMedia(true) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); + + String ts = postResponse.getTs(); + Map unfurls = new HashMap<>(); + + // https://docs.slack.dev/messaging/unfurling-links-in-messages + ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); + detail.setTitle("Let's pretend we're on a rocket ship to Neptune"); + detail.setText("The planet Neptune looms near. What do you want to do?"); + detail.setFallback("imagine_001"); + detail.setAttachmentType("default"); + detail.setCallbackId("callback-id"); + detail.setActions(Arrays.asList( + Action.builder().name("decision").value("orbit").style("primary").text("Orbit") + .type(Action.Type.BUTTON).build(), + Action.builder().name("decision").value("land").text("Attempt to land") + .type(Action.Type.BUTTON).build(), + Action.builder().name("decision").value("self_destruct").style("danger") + .text("Self destruct").type(Action.Type.BUTTON) + .confirm(Confirmation.builder() + .title("Are you sure you want to self destruct?") + .text("Maybe you should attempt to land instead. You might crash.") + .okText("Yes, self destruct") + .dismissText("No thanks") + .build()) + .build())); + unfurls.put(url, detail); + + ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() + .token(botToken) + .channel(randomChannelId) + .ts(ts) + .unfurls(unfurls) + .build()); + assertThat(unfurlResponse.getError(), is(nullValue())); + } + + // NOTE: You need to add "upload.wikimedia.org" at + // Features > Event Subscriptions > App Unfurl Domains + @Test + public void unfurl_issue_399_flickr_example() throws Exception { + + loadRandomChannelId(); + + String url = "https://www.example.com/test-issue-399-flickr"; + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(botToken) + .channel(randomChannelId) + .text(url) + .unfurlLinks(true) + .unfurlMedia(true) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); + + String ts = postResponse.getTs(); + Map unfurls = new HashMap<>(); + + // https://docs.slack.dev/messaging/unfurling-links-in-messages + ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); + detail.setImageUrl( + "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/San_Francisco_Chronicle_Building.jpg/640px-San_Francisco_Chronicle_Building.jpg?download"); + detail.setColor("#ff0084"); + detail.setTitle("Chronicle Building"); + detail.setTitleLink("https://www.example.com/title-link"); + detail.setFields(Arrays.asList( + Field.builder().title("Tags").value( + "chronicle building, flickrhq, san francisco, sf, sky, soma, California, United States") + .build(), + Field.builder().title("Taken").value("Mon, 30 Jun 2014 15:50:53 GMT").build(), + Field.builder().title("Posted").value("Tue, 01 Jul 2014 03:37:27 GMT").build())); + + detail.setText("This is an awesome picture taken in SF"); + detail.setFallback("chronicle_building.png"); + detail.setAttachmentType("default"); + detail.setCallbackId("callback-id"); + detail.setActions(Arrays.asList( + Action.builder().name("buttons").value("Albums").text("Albums") + .url("https://www.example.com/buttons/albums").type(Action.Type.BUTTON) + .build(), + Action.builder().name("buttons").value("Groups").text("Groups") + .url("https://www.example.com/buttons/groups").type(Action.Type.BUTTON) + .build())); + detail.setAuthorName("Phil Dokas"); + detail.setAuthorLink("https://www.example.com/author-link"); + detail.setAuthorIcon("https://secure.gravatar.com/avatar/132fe0f031849e12eea7ce74f99b90f0"); + unfurls.put(url, detail); + + ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() + .token(botToken) + .channel(randomChannelId) + .ts(ts) + .unfurls(unfurls) + .build()); + assertThat(unfurlResponse.getError(), is(nullValue())); + } + + @Test + public void chatUpdateWithBotToken_issue_372() throws IOException, SlackApiException { + loadRandomChannelId(); + ChatPostMessageResponse creation = slack.methods(botToken) + .chatPostMessage(r -> r.channel(randomChannelId).text("This is original")); + assertThat(creation.getError(), is(nullValue())); + assertThat(creation.getMessage().getText(), is("This is original")); + ChatUpdateResponse modified = slack.methods(botToken) + .chatUpdate(r -> r.channel(randomChannelId).text("modified").ts(creation.getTs())); + assertThat(modified.getError(), is(nullValue())); + assertThat(modified.getMessage().getText(), is("modified")); + } + + @Test + public void postMessage_blocksAsString_bot() throws Exception { + loadRandomChannelId(); + + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(botToken) + .channel(randomChannelId) + .text("test") + .blocksAsString(blocksAsString) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.getMessage().getText(), is("test")); + + ChatUpdateResponse updateMessage = slack.methods().chatUpdate(ChatUpdateRequest.builder() + .channel(randomChannelId) + .token(botToken) + .ts(postResponse.getTs()) + .text("modified") + .blocksAsString(blocksAsString) + .build()); + assertThat(updateMessage.getError(), is(nullValue())); + assertThat(updateMessage.getMessage().getText(), is("modified")); + + // To show the text instead of blocks + ChatUpdateResponse updateMessage2 = slack.methods().chatUpdate(ChatUpdateRequest.builder() + .channel(randomChannelId) + .token(botToken) + .ts(postResponse.getTs()) + .blocksAsString("[]") + .text("modified2") + .build()); + assertThat(updateMessage2.getError(), is(nullValue())); + assertThat(updateMessage2.getMessage().getText(), is("modified2")); + } + + @Test + public void postMessage_blocksAsString_user() throws Exception { + loadRandomChannelId(); + + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(userToken) + .channel(randomChannelId) + .text("test") + .blocksAsString(blocksAsString) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + assertThat(postResponse.getMessage().getText(), is("test")); + + ChatUpdateResponse updateMessage = slack.methods().chatUpdate(ChatUpdateRequest.builder() + .channel(randomChannelId) + .token(userToken) + .ts(postResponse.getTs()) + .text("modified") + .blocksAsString(blocksAsString) + .build()); + assertThat(updateMessage.getError(), is(nullValue())); + assertThat(updateMessage.getMessage().getText(), is("modified")); + + // To show the text instead of blocks + ChatUpdateResponse updateMessage2 = slack.methods().chatUpdate(ChatUpdateRequest.builder() + .channel(randomChannelId) + .token(userToken) + .ts(postResponse.getTs()) + .blocksAsString("[]") + .text("modified2") + .build()); + assertThat(updateMessage2.getError(), is(nullValue())); + assertThat(updateMessage2.getMessage().getText(), is("modified2")); + } + + // NOTE: You need to add "myappdomain.com" at + // Features > Event Subscriptions > App Unfurl Domains + @Test + public void postMessage_with_work_object_from_json() throws Exception { + loadRandomChannelId(); + + // Post a message with work object metadata + + String userID = findUser(); + String jsonString = "{\"entities\":[{\"entity_type\":\"slack#/entities/task\",\"external_ref\":{\"id\":\"94\"},\"url\":\"https://myappdomain.com/admin/slack/workobject/94/change/\",\"entity_payload\":{\"attributes\":{\"title\":{\"text\":\"Default title\"},\"display_type\":\"Assignment\",\"product_icon\":{\"url\":\"https://play-lh.googleusercontent.com/DG-zbXPr8LItYD8F2nD4aR_SK_jpkipLBK77YWY-F0cdJt67VFgCHZtRtjsakzTw3EM=w480-h960-rw\",\"alt_text\":\"The product's icon\"},\"product_name\":\"My Product\"},\"fields\":{\"description\":{\"value\":\"Description of the task\",\"format\":\"markdown\"},\"created_by\":{\"value\":\"" + + userID + + "\",\"type\":\"slack#/types/user_id\"},\"date_created\":{\"value\":1741164235},\"date_updated\":{\"value\":1741164235},\"assignee\":{\"type\":\"slack#/types/user_id\",\"value\":\"" + + userID + + "\"},\"status\":{\"value\":\"open\",\"tag_color\":\"blue\",\"link\":\"https://example.com/tasks?status=open\"},\"due_date\":{\"value\":\"2025-06-10\",\"type\":\"slack#/types/date\"},\"link\":\"https://example.com/tasks?priority=high\"},\"custom_fields\":[{\"key\":\"channel\",\"label\":\"Channel\",\"value\":\"" + + randomChannelId + + "\",\"type\":\"slack#/types/channel_id\"},{\"key\":\"img\",\"label\":\"image\",\"type\":\"slack#/types/image\",\"image_url\":\"https://www.bhg.com/thmb/dlKLbrzxqX_H2viaMAwCdq8bo20=/1280x0/filters:no_upscale():strip_icc()/endless-summer-blue-hydrangea-macrophylla-c38f20fe-da0331cb73c94b9db10b6bf74e098356.jpg\"},{\"type\":\"string\",\"key\":\"item_static_sel\",\"label\":\"Static Select\",\"value\":\"Red\"},{\"type\":\"array\",\"key\":\"multi_static_select_key\",\"label\":\"Multi Static Select\",\"value\":[{\"value\":\"Green\",\"type\":\"string\",\"tag_color\":\"gray\"}],\"item_type\":\"string\"},{\"type\":\"slack#/types/user_id\",\"key\":\"user_select_key\",\"label\":\"User select\",\"value\":\"USLACKBOT\",\"edit\":{\"enabled\":true}},{\"type\":\"array\",\"key\":\"string_array_key\",\"label\":\"Array of markdown strings\",\"item_type\":\"string\",\"value\":[{\"value\":\"__Thing 1__\",\"type\":\"string\",\"format\":\"markdown\"},{\"value\":\"*Thing 2*\",\"type\":\"string\",\"format\":\"markdown\"}]},{\"type\":\"array\",\"key\":\"string_array_2_key\",\"label\":\"Array of plain strings\",\"item_type\":\"string\",\"value\":[{\"value\":\"Plain string 1\",\"type\":\"string\"},{\"value\":\"Plain string 2\",\"type\":\"string\"}]},{\"type\":\"array\",\"key\":\"multi_user_select_key\",\"label\":\"Multi-user select\",\"item_type\":\"slack#/types/user_id\",\"value\":[{\"value\":\"USLACKBOT\",\"type\":\"slack#/types/user_id\"},{\"value\":\"U014KLZE350\",\"type\":\"slack#/types/user_id\"}]},{\"type\":\"array\",\"key\":\"multi_external_select_key\",\"label\":\"Multi External Select\",\"item_type\":\"string\",\"value\":[{\"value\":\"Jose Allen\",\"type\":\"string\",\"tag_color\":\"gray\"},{\"value\":\"Cristian Santos\",\"type\":\"string\",\"tag_color\":\"gray\"},{\"value\":\"Wayne Morgan\",\"type\":\"string\",\"tag_color\":\"gray\"}],\"edit\":{\"enabled\":true,\"select\":{\"fetch_options_dynamically\":true,\"current_values\":[\"helen-jones\",\"cristian-santos\",\"wayne-morgan\"]}}},{\"type\":\"string\",\"key\":\"external_select_key\",\"label\":\"External Select\",\"value\":\"Kevin Walters\",\"tag_color\":\"gray\",\"edit\":{\"enabled\":true,\"select\":{\"current_value\":\"kevin-walters\",\"fetch_options_dynamically\":true}}},{\"type\":\"slack#/types/timestamp\",\"key\":\"timestamp_key\",\"label\":\"Timestamp\",\"value\":\"1747496700\",\"edit\":{\"enabled\":true}}],\"actions\":{\"primary_actions\":[{\"text\":\"URL action\",\"action_id\":\"url_button_action_id\",\"value\":\"some_val\",\"style\":\"primary\",\"url\":\"https://example.com\",\"accessibility_label\":\"Goes to example.com\"},{\"text\":\"Block action\",\"action_id\":\"block_action_id\",\"value\":\"some_val\",\"style\":\"danger\",\"accessibility_label\":\"No URL so this should be invoked via blocks.actions\"}],\"overflow_actions\":[{\"text\":\"First overflow action\",\"action_id\":\"overflow_block_action_id\",\"value\":\"overflow\",\"style\":\"primary\",\"accessibility_label\":\"No URL so this should be invoked via blocks.actions\"},{\"text\":\"Second overflow action\",\"action_id\":\"second_block_action_id\",\"value\":\"overflow\",\"style\":\"danger\",\"url\":\"https://example.com\",\"accessibility_label\":\" URL \"}]}},\"app_unfurl_url\":\"https://myappdomain.com/id/123?url-posted-by=user\"}]}"; + + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(botToken) + .channel(randomChannelId) + .text("I have important information to share :wave:") + .metadataAsString(jsonString) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + + // Verify that the work object attachment was added + List attachments = postResponse.getMessage().getAttachments(); + assertThat(attachments, is(not(nullValue()))); + assertThat(attachments.get(0), is(not(nullValue()))); + Object workObjectAttachment = attachments.get(0).getWorkObjectEntity(); + assertThat(workObjectAttachment, is(not(nullValue()))); + + // Verify if the message can be parsed by the JSON parser + String ts = postResponse.getTs(); + ConversationsHistoryResponse history = slack.methods(botToken).conversationsHistory(r -> r + .channel(randomChannelId) + .oldest(ts) + .inclusive(true)); + assertThat(history.getError(), is(nullValue())); + } + + // NOTE: You need to add "myappdomain.com" at + // Features > Event Subscriptions > App Unfurl Domains + @Test + public void postMessage_with_work_object_from_object() throws Exception { + loadRandomChannelId(); + + // Prepare the work object metadata + + EntityPayload.Attributes.Title title = EntityPayload.Attributes.Title.builder().text("The Incident") + .build(); + EntityPayload.Attributes attributes = EntityPayload.Attributes + .builder().title(title).build(); + String userID = findUser(); + EntityPayload.TypedField assignedTo = EntityPayload.TypedField.builder().value(userID) + .type("slack#/types/user_id") + .build(); + IncidentFields fields = IncidentFields.builder().assignedTo(assignedTo).build(); + EntityPayload.CustomField[] customFields = { + EntityPayload.CustomField.builder().type("slack#/types/timestamp").key("important_date") + .label("Important Date") + .value(1756166400).build() }; + EntityPayload payload = EntityPayload.builder() + .attributes(attributes) + .incidentFields(fields) + .customFields(customFields) + .build(); + EntityMetadata.ExternalRef externalRef = EntityMetadata.ExternalRef.builder() + .id("1234").build(); + EntityMetadata entity = EntityMetadata.builder() + .entityType("slack#/entities/incident") + .url("https://myappdomain.com/id/F123456") + .externalRef(externalRef) + .entityPayload(payload) + .build(); + EntityMetadata[] entities = { entity }; + Message.Metadata metadata = Message.Metadata.builder().entities(entities).build(); + + // Post the message + + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(botToken) + .channel(randomChannelId) + .text("I have important information to share :wave:") + .metadata(metadata) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + + // Verify that the work object attachment was added + List attachments = postResponse.getMessage().getAttachments(); + assertThat(attachments, is(not(nullValue()))); + assertThat(attachments.get(0), is(not(nullValue()))); + Object workObjectAttachment = attachments.get(0).getWorkObjectEntity(); + assertThat(workObjectAttachment, is(not(nullValue()))); + + // Verify if the message can be parsed by the JSON parser + String ts = postResponse.getTs(); + ConversationsHistoryResponse history = slack.methods(botToken).conversationsHistory(r -> r + .channel(randomChannelId) + .oldest(ts) + .inclusive(true)); + assertThat(history.getError(), is(nullValue())); + } + + @Test + public void postEphemeral_thread() throws Exception { + loadRandomChannelId(); + String userId = findUser(); + ChatPostMessageResponse first = slack.methods(botToken).chatPostMessage(r -> r + .channel(randomChannelId) + .text("first message")); + assertThat(first.getError(), is(nullValue())); + assertThat(first.getMessage().getText(), is("first message")); + + ChatPostMessageResponse second = slack.methods(botToken).chatPostMessage(r -> r + .channel(randomChannelId) + .threadTs(first.getTs()) + .text("reply to create an active thread")); + assertThat(second.getError(), is(nullValue())); + assertThat(second.getMessage().getText(), is("reply to create an active thread")); + + ChatPostEphemeralResponse third = slack.methods(botToken).chatPostEphemeral(r -> r + .user(userId) + .channel(randomChannelId) + .text("ephemeral reply in thread") + .threadTs(first.getTs())); + assertThat(third.getError(), is(nullValue())); + } + + @Test + public void postEphemeral_authorship() throws Exception { + loadRandomChannelId(); + + String userId = findUser(); + ChatPostEphemeralResponse response = slack.methods(botToken).chatPostEphemeral(r -> r + .channel(randomChannelId) + .user(userId) + .iconEmoji(":wave:") + .username("given name") + .text(":wave: Hi there!")); + assertThat(response.getError(), is(nullValue())); + } + + private String findUser() throws IOException, SlackApiException { + + String userId = null; + + ConversationsMembersResponse membersResponse = slack.methods(botToken) + .conversationsMembers(r -> r.channel(randomChannelId).limit(100)); + assertThat(membersResponse.getError(), is(nullValue())); + List userIds = membersResponse.getMembers(); + for (String id : userIds) { + User user = slack.methods(botToken).usersInfo(r -> r.user(id)).getUser(); + if (user.isBot() || user.isAppUser() || user.isDeleted() || user.isWorkflowBot() + || user.isStranger()) { + continue; + } + userId = id; + break; + } + assertThat(userId, is(notNullValue())); + return userId; + } + + @Test + public void scheduleMessages() throws IOException, SlackApiException { + loadRandomChannelId(); + int postAt = (int) ((new Date().getTime() / 1000) + 180); + + ChatScheduledMessagesListResponse before = slack.methods(botToken) + .chatScheduledMessagesList(r -> r.limit(100)); + assertNull(before.getError()); + + ChatScheduleMessageResponse message1 = slack.methods(botToken) + .chatScheduleMessage(r -> r.channel(randomChannelId).postAt(postAt).text("hello")); + assertNull(message1.getError()); + + List blocks = Arrays.asList( + DividerBlock.builder().build(), + SectionBlock.builder().text(PlainTextObject.builder().text("foo").build()).build()); + // This request no longer fails starting on Feb 3, 2025 + // ChatScheduleMessageResponse message2 = + // slack.methods(botToken).chatScheduleMessage(r -> + // r.channel(randomChannelId).postAt(postAt) + // // the `text` field is required since May 2021 + // //.text("fallback") + // .blocks(blocks)); + // assertEquals("invalid_arguments", message2.getError()); + // assertEquals("[ERROR] missing required field: text", + // message2.getResponseMetadata().getMessages().get(0)); + + ChatScheduleMessageResponse message3 = slack.methods(botToken) + .chatScheduleMessage(r -> r.channel(randomChannelId).postAt(postAt) + // the `text` field is required since May 2021 + .text("fallback") + .blocks(blocks)); + assertNull(message3.getError()); + + ChatScheduledMessagesListResponse after = slack.methods(botToken) + .chatScheduledMessagesList(r -> r.limit(100)); + assertNull(after.getError()); + assertTrue(after.getScheduledMessages().size() - before.getScheduledMessages().size() == 2); + } + + // https://github.com/slackapi/java-slack-sdk/issues/415 + @Test + public void attachmentsWithBlocks_issue_415() throws IOException, SlackApiException { + loadRandomChannelId(); + /* + * { + * "attachments": [ + * { + * "color": "#00FF00", + * "blocks": [ + * { + * "type": "section", + * "text": { + * "type": "mrkdwn", + * "text": "*I would expect this text to show*" + * } + * } + * ] + * } + * ] + * } + */ + List attachments = asAttachments( + attachment(a -> a.color("#00FF00").blocks(asBlocks( + section(s -> s.text(markdownText( + "*I would expect this text to show*"))))))); + ChatPostMessageResponse result = slack.methods(botToken).chatPostMessage(r -> r + .channel(randomChannelId) + .attachments(attachments)); + assertThat(result.getError(), is(nullValue())); + } + + // Just in case, this test verifies the issue doesn't exist in MethodsClient + // https://github.com/slackapi/java-slack-sdk/issues/429 + @Test + public void post_messages_in_Chinese_issue_429() throws IOException, SlackApiException { + loadRandomChannelId(); + + ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(r -> r + .channel(randomChannelId) + .text(":wave: Hello! 哈囉")); + assertThat(response.getError(), is(nullValue())); + assertThat(response.getMessage().getText(), is(":wave: Hello! 哈囉")); + } + + @Test + public void post_messages_timepicker() throws Exception { + loadRandomChannelId(); + + ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(r -> r + .channel(randomChannelId) + .blocks(Arrays.asList(section(s -> s.text(plainText("test")).blockId("b").accessory( + timePicker(t -> t + .actionId("a") + .initialTime("09:10") + .placeholder(plainText("It's time to start!")))))))); + // invalid_blocks means you haven't turned the beta feature on + // Go to https://api.slack.com/apps/{api_app_id}/developer-beta + assertThat(response.getError(), is(nullValue())); + } + + // https://github.com/slackapi/java-slack-sdk/issues/647 + @Test + public void share_message_with_files_issue_647() throws Exception { + loadRandomChannelId(); + + FilesUploadResponse fileUpload = slack.methods(botToken).filesUpload(r -> r + .content("This is a test") + .initialComment("Uploading a file...") + .channels(Arrays.asList(randomChannelId))); + assertThat(fileUpload.isOk(), is(true)); + + File.ShareDetail share = fileUpload.getFile().getShares().getPublicChannels().get(randomChannelId) + .get(0); + String permalink = slack.methods(botToken).chatGetPermalink(r -> r + .channel(randomChannelId) + .messageTs(share.getTs())).getPermalink(); + + ChatPostMessageResponse message = slack.methods(botToken).chatPostMessage(r -> r + .channel(randomChannelId) + .unfurlLinks(true) + .text("Here is the uploaded file: " + permalink)); + assertThat(message.isOk(), is(true)); + } + + @Test + public void share_message_with_files_issue_647_v2() throws Exception { + loadRandomChannelId(); + + FilesUploadV2Response fileUpload = slack.methods(botToken).filesUploadV2(r -> r + .content("This is a test") + .initialComment("Uploading a file...") + .channel(randomChannelId)); + assertThat(fileUpload.isOk(), is(true)); + + Thread.sleep(10000L); // for test stability + File.ShareDetail share = slack.methods(botToken).filesInfo(r -> r.file(fileUpload.getFile().getId())) + .getFile().getShares().getPublicChannels().get(randomChannelId).get(0); + String permalink = slack.methods(botToken).chatGetPermalink(r -> r + .channel(randomChannelId) + .messageTs(share.getTs())).getPermalink(); + + ChatPostMessageResponse message = slack.methods(botToken).chatPostMessage(r -> r + .channel(randomChannelId) + .unfurlLinks(true) + .text("Here is the uploaded file: " + permalink)); + assertThat(message.isOk(), is(true)); + } + + // 2022-05-06 14:07:28,327 WARN [main] com.slack.api.methods.RequestFormBuilder + // The top-level `text` argument is missing in the request payload for a + // chat.postMessage call - It's a best practice to always provide a `text` + // argument when posting a message. The `text` is used in places where the + // content cannot be rendered such as: system push notifications, assistive + // technology such as screen readers, etc. + // 2022-05-06 14:07:28,327 WARN [main] com.slack.api.methods.RequestFormBuilder + // Additionally, the attachment-level `fallback` argument is missing in the + // request payload for a chat.postMessage call - To avoid this warning, it is + // recommended to always provide a top-level `text` argument when posting a + // message. Alternatively, you can provide an attachment-level `fallback` + // argument, though this is now considered a legacy field (see + // https://docs.slack.dev/legacy/legacy-messaging/legacy-secondary-message-attachments#legacy_fields + // for more details). + @Test + public void textWarnings() throws Exception { + loadRandomChannelId(); + + ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() + .token(botToken) + .channel(randomChannelId) + .text(null) + .blocksAsString(blocksAsString) + .build()); + assertThat(postResponse.getError(), is(nullValue())); + + ChatUpdateResponse updateMessage = slack.methods().chatUpdate(ChatUpdateRequest.builder() + .channel(randomChannelId) + .token(botToken) + .ts(postResponse.getTs()) + .text(null) + .blocksAsString(blocksAsString) + .build()); + assertThat(updateMessage.getError(), is(nullValue())); + } + + @Test + public void issue_785() throws Exception { + loadRandomChannelId(); + + String ts = null; + try { + ChatPostMessageResponse newMessage = slack.methods(botToken).chatPostMessage(r -> r + .text("Here is the link: https://i.imgur.com/brgYmPX.gifv") + .unfurlLinks(true) + .unfurlMedia(true) + .channel(randomChannelId)); + assertThat(newMessage.getError(), is(nullValue())); + ts = newMessage.getTs(); + Thread.sleep(3_000L); + + ConversationsHistoryResponse history = slack.methods(botToken).conversationsHistory(r -> r + .channel(randomChannelId).limit(1)); + assertThat(history.getError(), is(nullValue())); + List attachments = history.getMessages().get(0).getAttachments(); + // the attachments can be null + if (attachments != null && attachments.get(0) != null) { + Attachment.VideoHtml videoHtml = attachments.get(0).getVideoHtml(); + assertThat(videoHtml.getHtml(), is( + "")); + assertThat(videoHtml.getSource(), is(nullValue())); + } + } finally { + if (ts != null) { + final String _ts = ts; + slack.methods(botToken).chatDelete(r -> r.channel(randomChannelId).ts(_ts)); + } } - } } - } - - String blocksAsString = "[\n" + - " {\n" + - " \"type\": \"section\",\n" + - " \"text\": {\n" + - " \"type\": \"mrkdwn\",\n" + - " \"text\": \"Hello, Assistant to the Regional Manager Dwight! *Michael Scott* wants to know where you'd like to take the Paper Company investors to dinner tonight.\\n\\n *Please select a restaurant:*\"\n" + - " }\n" + - " },\n" + - " {\n" + - " \"type\": \"divider\"\n" + - " },\n" + - " {\n" + - " \"type\": \"section\",\n" + - " \"text\": {\n" + - " \"type\": \"mrkdwn\",\n" + - " \"text\": \"*Farmhouse Thai Cuisine*\\n:star::star::star::star: 1528 reviews\\n They do have some vegan options, like the roti and curry, plus they have a ton of salad stuff and noodles can be ordered without meat!! They have something for everyone here\"\n" + - " },\n" + - " \"accessory\": {\n" + - " \"type\": \"image\",\n" + - " \"image_url\": \"https://s3-media3.fl.yelpcdn.com/bphoto/c7ed05m9lC2EmA3Aruue7A/o.jpg\",\n" + - " \"alt_text\": \"alt text for image\"\n" + - " }\n" + - " },\n" + - " {\n" + - " \"type\": \"section\",\n" + - " \"text\": {\n" + - " \"type\": \"mrkdwn\",\n" + - " \"text\": \"*Kin Khao*\\n:star::star::star::star: 1638 reviews\\n The sticky rice also goes wonderfully with the caramelized pork belly, which is absolutely melt-in-your-mouth and so soft.\"\n" + - " },\n" + - " \"accessory\": {\n" + - " \"type\": \"image\",\n" + - " \"image_url\": \"https://s3-media2.fl.yelpcdn.com/bphoto/korel-1YjNtFtJlMTaC26A/o.jpg\",\n" + - " \"alt_text\": \"alt text for image\"\n" + - " }\n" + - " },\n" + - " {\n" + - " \"type\": \"section\",\n" + - " \"text\": {\n" + - " \"type\": \"mrkdwn\",\n" + - " \"text\": \"*Ler Ros*\\n:star::star::star::star: 2082 reviews\\n I would really recommend the Yum Koh Moo Yang - Spicy lime dressing and roasted quick marinated pork shoulder, basil leaves, chili & rice powder.\"\n" + - " },\n" + - " \"accessory\": {\n" + - " \"type\": \"image\",\n" + - " \"image_url\": \"https://s3-media2.fl.yelpcdn.com/bphoto/DawwNigKJ2ckPeDeDM7jAg/o.jpg\",\n" + - " \"alt_text\": \"alt text for image\"\n" + - " }\n" + - " },\n" + - " {\n" + - " \"type\": \"divider\"\n" + - " },\n" + - " {\n" + - " \"type\": \"actions\",\n" + - " \"elements\": [\n" + - " {\n" + - " \"type\": \"button\",\n" + - " \"text\": {\n" + - " \"type\": \"plain_text\",\n" + - " \"text\": \"Farmhouse\",\n" + - " \"emoji\": true\n" + - " },\n" + - " \"value\": \"click_me_123\"\n" + - " },\n" + - " {\n" + - " \"type\": \"button\",\n" + - " \"text\": {\n" + - " \"type\": \"plain_text\",\n" + - " \"text\": \"Kin Khao\",\n" + - " \"emoji\": true\n" + - " },\n" + - " \"value\": \"click_me_123\"\n" + - " },\n" + - " {\n" + - " \"type\": \"button\",\n" + - " \"text\": {\n" + - " \"type\": \"plain_text\",\n" + - " \"text\": \"Ler Ros\",\n" + - " \"emoji\": true\n" + - " },\n" + - " \"value\": \"click_me_123\"\n" + - " }\n" + - " ]\n" + - " }\n" + - "]"; - - @Test - public void postMessage_bot() throws Exception { - loadRandomChannelId(); - ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(req -> req - .channel(randomChannelId) - .text("You can also do slack.methods(token)") - .blocks(asBlocks(section(s -> s.text(plainText("You can also do slack.methods(token)"))))) - ); - assertThat(response.getError(), is(nullValue())); - assertThat(response.getMessage().getText(), is("You can also do slack.methods(token)")); - - String scopes = response.getHttpResponseHeaders().get("x-oauth-scopes").get(0); - assertThat(scopes, is(notNullValue())); - } - - @Test - public void postMessage_user() throws Exception { - loadRandomChannelId(); - ChatPostMessageResponse response = slack.methods(userToken).chatPostMessage(req -> req - .channel(randomChannelId) - .text("You can also do slack.methods(token)")); - assertThat(response.getError(), is(nullValue())); - assertThat(response.getMessage().getText(), is("You can also do slack.methods(token)")); - - String scopes = response.getHttpResponseHeaders().get("x-oauth-scopes").get(0); - assertThat(scopes, is(notNullValue())); - } - - // https://github.com/slackapi/java-slack-sdk/issues/157 - @Test - public void postMessage_blocksInAttachment_do_not_work_bot() throws Exception { - loadRandomChannelId(); - ChatPostMessageResponse firstMessageCreation = slack.methods().chatPostMessage(req -> req - .channel(randomChannelId) - .token(botToken) - .attachments(Arrays.asList( - Attachment - .builder() - .id(123) - .callbackId("callback") - .title("hi") - .blocks(Arrays.asList(DividerBlock.builder().blockId("123").build())) - .build()))); - assertThat(firstMessageCreation.getError(), is("invalid_attachments")); - } - - @Test - public void postMessage_blocksInAttachment_do_not_work_user() throws Exception { - loadRandomChannelId(); - ChatPostMessageResponse firstMessageCreation = slack.methods().chatPostMessage(req -> req - .channel(randomChannelId) - .token(userToken) - .attachments(Arrays.asList( - Attachment - .builder() - .id(123) - .callbackId("callback") - .title("hi") - .blocks(Arrays.asList(DividerBlock.builder().blockId("123").build())) - .build()))); - assertThat(firstMessageCreation.getError(), is("invalid_attachments")); - } - - @Test - public void chat_getPermalink_bot() throws IOException, SlackApiException { - ConversationsListResponse channels = slack.methods().conversationsList(req -> req - .token(botToken) - .excludeArchived(true)); - assertThat(channels.getError(), is(nullValue())); - assertThat(channels.isOk(), is(true)); - - String channelId = channels.getChannels().get(0).getId(); - - ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(req -> req - .channel(channelId) - .token(botToken) - .text("Hi, this is a test message from Java Slack SDK's unit tests") - .linkNames(true)); - assertThat(postResponse.getError(), is(nullValue())); - assertThat(postResponse.isOk(), is(true)); - assertThat(postResponse.getMessage().getText(), - is("Hi, this is a test message from Java Slack SDK's unit tests")); - - ChatGetPermalinkResponse permalink = slack.methods().chatGetPermalink(req -> req - .token(botToken) - .channel(channelId) - .messageTs(postResponse.getTs())); - assertThat(permalink.getError(), is(nullValue())); - assertThat(permalink.isOk(), is(true)); - assertThat(permalink.getPermalink(), is(notNullValue())); - } - - @Test - public void chat_getPermalink_user() throws IOException, SlackApiException { - ConversationsListResponse channels = slack.methods().conversationsList(req -> req - .token(userToken) - .excludeArchived(true)); - assertThat(channels.getError(), is(nullValue())); - assertThat(channels.isOk(), is(true)); - - String channelId = channels.getChannels().get(0).getId(); - - ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(req -> req - .channel(channelId) - .token(userToken) - .text("Hi, this is a test message from Java Slack SDK's unit tests") - .linkNames(true)); - assertThat(postResponse.getError(), is(nullValue())); - assertThat(postResponse.isOk(), is(true)); - assertThat(postResponse.getMessage().getText(), - is("Hi, this is a test message from Java Slack SDK's unit tests")); - - ChatGetPermalinkResponse permalink = slack.methods().chatGetPermalink(req -> req - .token(userToken) - .channel(channelId) - .messageTs(postResponse.getTs())); - assertThat(permalink.getError(), is(nullValue())); - assertThat(permalink.isOk(), is(true)); - assertThat(permalink.getPermalink(), is(notNullValue())); - } - - @Test - public void chat_getPermalink_bot_async() throws ExecutionException, InterruptedException { - ConversationsListResponse channels = slack.methodsAsync().conversationsList(req -> req - .token(botToken) - .excludeArchived(true)) - .get(); - assertThat(channels.getError(), is(nullValue())); - assertThat(channels.isOk(), is(true)); - - String channelId = channels.getChannels().get(0).getId(); - - ChatPostMessageResponse postResponse = slack.methodsAsync().chatPostMessage(req -> req - .channel(channelId) - .token(botToken) - .text("Hi, this is a test message from Java Slack SDK's unit tests") - .linkNames(true)) - .get(); - assertThat(postResponse.getError(), is(nullValue())); - assertThat(postResponse.isOk(), is(true)); - assertThat(postResponse.getMessage().getText(), - is("Hi, this is a test message from Java Slack SDK's unit tests")); - - String scopes = postResponse.getHttpResponseHeaders().get("x-oauth-scopes").get(0); - assertThat(scopes, is(notNullValue())); - - ChatGetPermalinkResponse permalink = slack.methodsAsync().chatGetPermalink(req -> req - .token(botToken) - .channel(channelId) - .messageTs(postResponse.getTs())) - .get(); - assertThat(permalink.getError(), is(nullValue())); - assertThat(permalink.isOk(), is(true)); - assertThat(permalink.getPermalink(), is(notNullValue())); - } - - // It's also possible to post a message by giving the name of a channel. - // - // https://docs.slack.dev/reference/methods/chat.postMessage#channels - // You can either pass the channel's name (#general) or encoded ID (C024BE91L), - // and the message will be posted to that channel. - // The channel's ID can be retrieved through the channels.list API method. - // - // https://github.com/slackapi/python-slackclient/blob/master/README.md#sending-a-message-to-slack - // In our examples, we specify the channel name, however it is recommended to use the channel_id where possible. - @Test - public void postingWithChannelName() throws IOException, SlackApiException { - makeSureIfGivingChannelNameWorks("random"); - makeSureIfGivingChannelNameWorks("#random"); - } - - private void makeSureIfGivingChannelNameWorks(String channelName) throws IOException, SlackApiException { - ChatPostMessageResponse response = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() - .token(botToken) - .channel(channelName) - .text("Hello!") - .build()); - - assertThat(response.getError(), is(nullValue())); - assertThat(response.getChannel(), is(startsWith("C"))); - assertThat(response.getMessage().getText(), is(startsWith("Hello!"))); - } - - // NOTE: You need to add "youtube.com" at - // Features > Event Subscriptions > App Unfurl Domains - @Test - public void unfurl_raw_json_bot() throws Exception { - loadRandomChannelId(); - - String url = "https://www.youtube.com/watch?v=wq1R93UMqlk"; - ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() - .token(userToken) - .channel(randomChannelId) - .text(url) - .unfurlLinks(true) - .unfurlMedia(true) - .build()); - assertThat(postResponse.getError(), is(nullValue())); - assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); - - String ts = postResponse.getTs(); - Map unfurls = new HashMap<>(); - ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); - detail.setText("Every day is the test."); - unfurls.put(url, detail); - - ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() - .token(botToken) - .channel(randomChannelId) - .ts(ts) - .rawUnfurls(GsonFactory.createSnakeCase().toJson(unfurls)) - .build()); - assertThat(unfurlResponse.getError(), is(nullValue())); - } - - // NOTE: You need to add "youtube.com" at - // Features > Event Subscriptions > App Unfurl Domains - @Test - public void unfurl_with_preview() throws Exception { - loadRandomChannelId(); - - String url = "https://www.youtube.com/watch?v=wq1R93UMqlk"; - ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() - .token(userToken) - .channel(randomChannelId) - .text(url) - .unfurlLinks(false) - .unfurlMedia(false) - .build()); - assertThat(postResponse.getError(), is(nullValue())); - assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); - - String ts = postResponse.getTs(); - Map unfurls = new HashMap<>(); - ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); - detail.setTitle("The top-level title (set by chat.unfurl)"); - detail.setPreview(ChatUnfurlRequest.UnfurlDetailPreview.builder() - .title(plainText("The title in the preview set (set by chat.unfurl)")) - .subtitle(plainText("The subtitle in the preview (set by chat.unfurl)")) - .iconUrl("https://assets.brandfolder.com/pmix53-32t4so-a6439g/original/slackbot.png") - .build() - ); - unfurls.put(url, detail); - - ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() - .token(botToken) - .channel(randomChannelId) - .ts(ts) - .unfurls(unfurls) - .build()); - assertThat(unfurlResponse.getError(), is(nullValue())); - - // verify if the message can be parsed by the JSON parser - ConversationsHistoryResponse history = slack.methods(botToken).conversationsHistory(r -> r - .channel(randomChannelId) - .oldest(ts) - .inclusive(true) - ); - assertThat(history.getError(), is(nullValue())); - } - - // NOTE: You need to add "youtube.com" at - // Features > Event Subscriptions > App Unfurl Domains - @Test - public void unfurl_raw_json_user() throws Exception { - loadRandomChannelId(); - - String url = "https://www.youtube.com/watch?v=wq1R93UMqlk"; - ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() - .token(userToken) - .channel(randomChannelId) - .text(url) - .unfurlLinks(true) - .unfurlMedia(true) - .build()); - assertThat(postResponse.getError(), is(nullValue())); - assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); - - String ts = postResponse.getTs(); - Map unfurls = new HashMap<>(); - ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); - detail.setText("Every day is the test."); - unfurls.put(url, detail); - - ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() - .token(userToken) - .channel(randomChannelId) - .ts(ts) - .rawUnfurls(GsonFactory.createSnakeCase().toJson(unfurls)) - .build()); - assertThat(unfurlResponse.getError(), is(nullValue())); - } - - // NOTE: You need to add "youtube.com" at - // Features > Event Subscriptions > App Unfurl Domains - @Test - public void unfurl_text() throws Exception { - loadRandomChannelId(); - - String url = "https://www.youtube.com/watch?v=wq1R93UMqlk"; - ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() - .token(botToken) - .channel(randomChannelId) - .text(url) - .unfurlLinks(true) - .unfurlMedia(true) - .build()); - assertThat(postResponse.getError(), is(nullValue())); - assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); - - String ts = postResponse.getTs(); - Map unfurls = new HashMap<>(); - ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); - detail.setText("Every day is the test."); - unfurls.put(url, detail); - - ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() - .token(botToken) - .channel(randomChannelId) - .ts(ts) - .unfurls(unfurls) - .build()); - assertThat(unfurlResponse.getError(), is(nullValue())); - } - - @Test - public void unfurl_blocks() throws Exception { - loadRandomChannelId(); - - String url = "https://www.youtube.com/watch?v=wq1R93UMqlk"; - ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() - .token(botToken) - .channel(randomChannelId) - .text(url) - .unfurlLinks(true) - .unfurlMedia(true) - .build()); - assertThat(postResponse.getError(), is(nullValue())); - assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); - - String ts = postResponse.getTs(); - Map unfurls = new HashMap<>(); - ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); - detail.setBlocks(Arrays.asList( - DividerBlock.builder().blockId("b1").build(), - DividerBlock.builder().blockId("b2").build() - )); - unfurls.put(url, detail); - - ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() - .token(botToken) - .channel(randomChannelId) - .ts(ts) - .unfurls(unfurls) - .build()); - assertThat(unfurlResponse.getError(), is(nullValue())); - } - - // NOTE: You need to add "example.com" at - // Features > Event Subscriptions > App Unfurl Domains - @Test - public void unfurl_issue_399() throws Exception { - - loadRandomChannelId(); - - String url = "https://www.example.com/test-issue-399"; - ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() - .token(botToken) - .channel(randomChannelId) - .text(url) - .unfurlLinks(true) - .unfurlMedia(true) - .build()); - assertThat(postResponse.getError(), is(nullValue())); - assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); - - String ts = postResponse.getTs(); - Map unfurls = new HashMap<>(); - - // https://docs.slack.dev/messaging/unfurling-links-in-messages - ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); - detail.setTitle("Let's pretend we're on a rocket ship to Neptune"); - detail.setText("The planet Neptune looms near. What do you want to do?"); - detail.setFallback("imagine_001"); - detail.setAttachmentType("default"); - detail.setCallbackId("callback-id"); - detail.setActions(Arrays.asList( - Action.builder().name("decision").value("orbit").style("primary").text("Orbit").type(Action.Type.BUTTON).build(), - Action.builder().name("decision").value("land").text("Attempt to land").type(Action.Type.BUTTON).build(), - Action.builder().name("decision").value("self_destruct").style("danger").text("Self destruct").type(Action.Type.BUTTON) - .confirm(Confirmation.builder() - .title("Are you sure you want to self destruct?") - .text("Maybe you should attempt to land instead. You might crash.") - .okText("Yes, self destruct") - .dismissText("No thanks") - .build() - ).build() - )); - unfurls.put(url, detail); - - ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() - .token(botToken) - .channel(randomChannelId) - .ts(ts) - .unfurls(unfurls) - .build()); - assertThat(unfurlResponse.getError(), is(nullValue())); - } - - // NOTE: You need to add "upload.wikimedia.org" at - // Features > Event Subscriptions > App Unfurl Domains - @Test - public void unfurl_issue_399_flickr_example() throws Exception { - - loadRandomChannelId(); - - String url = "https://www.example.com/test-issue-399-flickr"; - ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() - .token(botToken) - .channel(randomChannelId) - .text(url) - .unfurlLinks(true) - .unfurlMedia(true) - .build()); - assertThat(postResponse.getError(), is(nullValue())); - assertThat(postResponse.getMessage().getText(), is("<" + url + ">")); - - String ts = postResponse.getTs(); - Map unfurls = new HashMap<>(); - - // https://docs.slack.dev/messaging/unfurling-links-in-messages - ChatUnfurlRequest.UnfurlDetail detail = new ChatUnfurlRequest.UnfurlDetail(); - detail.setImageUrl("https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/San_Francisco_Chronicle_Building.jpg/640px-San_Francisco_Chronicle_Building.jpg?download"); - detail.setColor("#ff0084"); - detail.setTitle("Chronicle Building"); - detail.setTitleLink("https://www.example.com/title-link"); - detail.setFields(Arrays.asList( - Field.builder().title("Tags").value("chronicle building, flickrhq, san francisco, sf, sky, soma, California, United States").build(), - Field.builder().title("Taken").value("Mon, 30 Jun 2014 15:50:53 GMT").build(), - Field.builder().title("Posted").value("Tue, 01 Jul 2014 03:37:27 GMT").build() - )); - - detail.setText("This is an awesome picture taken in SF"); - detail.setFallback("chronicle_building.png"); - detail.setAttachmentType("default"); - detail.setCallbackId("callback-id"); - detail.setActions(Arrays.asList( - Action.builder().name("buttons").value("Albums").text("Albums").url("https://www.example.com/buttons/albums").type(Action.Type.BUTTON).build(), - Action.builder().name("buttons").value("Groups").text("Groups").url("https://www.example.com/buttons/groups").type(Action.Type.BUTTON).build() - )); - detail.setAuthorName("Phil Dokas"); - detail.setAuthorLink("https://www.example.com/author-link"); - detail.setAuthorIcon("https://secure.gravatar.com/avatar/132fe0f031849e12eea7ce74f99b90f0"); - unfurls.put(url, detail); - - ChatUnfurlResponse unfurlResponse = slack.methods().chatUnfurl(ChatUnfurlRequest.builder() - .token(botToken) - .channel(randomChannelId) - .ts(ts) - .unfurls(unfurls) - .build()); - assertThat(unfurlResponse.getError(), is(nullValue())); - } - - @Test - public void chatUpdateWithBotToken_issue_372() throws IOException, SlackApiException { - loadRandomChannelId(); - ChatPostMessageResponse creation = slack.methods(botToken).chatPostMessage(r -> r.channel(randomChannelId).text("This is original")); - assertThat(creation.getError(), is(nullValue())); - assertThat(creation.getMessage().getText(), is("This is original")); - ChatUpdateResponse modified = slack.methods(botToken).chatUpdate(r -> r.channel(randomChannelId).text("modified").ts(creation.getTs())); - assertThat(modified.getError(), is(nullValue())); - assertThat(modified.getMessage().getText(), is("modified")); - } - - @Test - public void postMessage_blocksAsString_bot() throws Exception { - loadRandomChannelId(); - - ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() - .token(botToken) - .channel(randomChannelId) - .text("test") - .blocksAsString(blocksAsString) - .build()); - assertThat(postResponse.getError(), is(nullValue())); - assertThat(postResponse.getMessage().getText(), is("test")); - - ChatUpdateResponse updateMessage = slack.methods().chatUpdate(ChatUpdateRequest.builder() - .channel(randomChannelId) - .token(botToken) - .ts(postResponse.getTs()) - .text("modified") - .blocksAsString(blocksAsString) - .build()); - assertThat(updateMessage.getError(), is(nullValue())); - assertThat(updateMessage.getMessage().getText(), is("modified")); - - // To show the text instead of blocks - ChatUpdateResponse updateMessage2 = slack.methods().chatUpdate(ChatUpdateRequest.builder() - .channel(randomChannelId) - .token(botToken) - .ts(postResponse.getTs()) - .blocksAsString("[]") - .text("modified2") - .build()); - assertThat(updateMessage2.getError(), is(nullValue())); - assertThat(updateMessage2.getMessage().getText(), is("modified2")); - } - - @Test - public void postMessage_blocksAsString_user() throws Exception { - loadRandomChannelId(); - - ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() - .token(userToken) - .channel(randomChannelId) - .text("test") - .blocksAsString(blocksAsString) - .build()); - assertThat(postResponse.getError(), is(nullValue())); - assertThat(postResponse.getMessage().getText(), is("test")); - - ChatUpdateResponse updateMessage = slack.methods().chatUpdate(ChatUpdateRequest.builder() - .channel(randomChannelId) - .token(userToken) - .ts(postResponse.getTs()) - .text("modified") - .blocksAsString(blocksAsString) - .build()); - assertThat(updateMessage.getError(), is(nullValue())); - assertThat(updateMessage.getMessage().getText(), is("modified")); - - // To show the text instead of blocks - ChatUpdateResponse updateMessage2 = slack.methods().chatUpdate(ChatUpdateRequest.builder() - .channel(randomChannelId) - .token(userToken) - .ts(postResponse.getTs()) - .blocksAsString("[]") - .text("modified2") - .build()); - assertThat(updateMessage2.getError(), is(nullValue())); - assertThat(updateMessage2.getMessage().getText(), is("modified2")); - } - - @Test - public void postEphemeral_thread() throws Exception { - loadRandomChannelId(); - String userId = findUser(); - ChatPostMessageResponse first = slack.methods(botToken).chatPostMessage(r -> r - .channel(randomChannelId) - .text("first message")); - assertThat(first.getError(), is(nullValue())); - assertThat(first.getMessage().getText(), is("first message")); - - ChatPostMessageResponse second = slack.methods(botToken).chatPostMessage(r -> r - .channel(randomChannelId) - .threadTs(first.getTs()) - .text("reply to create an active thread")); - assertThat(second.getError(), is(nullValue())); - assertThat(second.getMessage().getText(), is("reply to create an active thread")); - - ChatPostEphemeralResponse third = slack.methods(botToken).chatPostEphemeral(r -> r - .user(userId) - .channel(randomChannelId) - .text("ephemeral reply in thread") - .threadTs(first.getTs())); - assertThat(third.getError(), is(nullValue())); - } - - @Test - public void postEphemeral_authorship() throws Exception { - loadRandomChannelId(); - - String userId = findUser(); - ChatPostEphemeralResponse response = slack.methods(botToken).chatPostEphemeral(r -> r - .channel(randomChannelId) - .user(userId) - .iconEmoji(":wave:") - .username("given name") - .text(":wave: Hi there!")); - assertThat(response.getError(), is(nullValue())); - } - - private String findUser() throws IOException, SlackApiException { - - String userId = null; - - ConversationsMembersResponse membersResponse = slack.methods(botToken) - .conversationsMembers(r -> r.channel(randomChannelId).limit(100)); - assertThat(membersResponse.getError(), is(nullValue())); - List userIds = membersResponse.getMembers(); - for (String id : userIds) { - User user = slack.methods(botToken).usersInfo(r -> r.user(id)).getUser(); - if (user.isBot() || user.isAppUser() || user.isDeleted() || user.isWorkflowBot() || user.isStranger()) { - continue; - } - userId = id; - break; + + @Test + public void post_messages_video() throws Exception { + loadRandomChannelId(); + + ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(r -> r + .channel(randomChannelId) + .blocks(asBlocks(video(v -> v + .blockId("b") + .title(plainText("Video title")) + .titleUrl("https://www.youtube.com/watch?v=q19RtuCHt1Q") + .videoUrl("https://www.youtube.com/embed/q19RtuCHt1Q") + .description(plainText("Video description")) + .thumbnailUrl("https://assets.brandfolder.com/pmix53-32t4so-a6439g/original/slackbot.png") + .altText("Video Alt text") + .authorName("Slack Java SDK Unit Test") + .providerIconUrl( + "https://assets.brandfolder.com/pmix53-32t4so-a6439g/original/slackbot.png") + .providerName("Slack Java SDK Video Provider"))))); + // invalid_blocks means you do not have links.embed:write permission + assertThat(response.getError(), is(nullValue())); + } + + @Test + public void post_messages_video_required_params_only() throws Exception { + loadRandomChannelId(); + + ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(r -> r + .channel(randomChannelId) + .blocks(asBlocks(video(v -> v + .blockId("b") + .title(plainText("Video title")) + // .titleUrl("https://www.youtube.com/watch?v=q19RtuCHt1Q") + .videoUrl("https://www.youtube.com/embed/q19RtuCHt1Q") + // .description(plainText("Video description")) + .thumbnailUrl("https://assets.brandfolder.com/pmix53-32t4so-a6439g/original/slackbot.png") + .altText("Video Alt text") + // .authorName("Slack Java SDK Unit Test") + // .providerIconUrl("https://assets.brandfolder.com/pmix53-32t4so-a6439g/original/slackbot.png") + // .providerName("Slack Java SDK Video Provider") + )))); + // invalid_blocks means you do not have links.embed:write permission + assertThat(response.getError(), is(nullValue())); } - assertThat(userId, is(notNullValue())); - return userId; - } - - @Test - public void scheduleMessages() throws IOException, SlackApiException { - loadRandomChannelId(); - int postAt = (int) ((new Date().getTime() / 1000) + 180); - - ChatScheduledMessagesListResponse before = slack.methods(botToken).chatScheduledMessagesList(r -> r.limit(100)); - assertNull(before.getError()); - - ChatScheduleMessageResponse message1 = slack.methods(botToken).chatScheduleMessage(r -> - r.channel(randomChannelId).postAt(postAt).text("hello")); - assertNull(message1.getError()); - - List blocks = Arrays.asList( - DividerBlock.builder().build(), - SectionBlock.builder().text(PlainTextObject.builder().text("foo").build()).build() - ); - // This request no longer fails starting on Feb 3, 2025 -// ChatScheduleMessageResponse message2 = slack.methods(botToken).chatScheduleMessage(r -> -// r.channel(randomChannelId).postAt(postAt) -// // the `text` field is required since May 2021 -// //.text("fallback") -// .blocks(blocks)); -// assertEquals("invalid_arguments", message2.getError()); -// assertEquals("[ERROR] missing required field: text", message2.getResponseMetadata().getMessages().get(0)); - - ChatScheduleMessageResponse message3 = slack.methods(botToken).chatScheduleMessage(r -> - r.channel(randomChannelId).postAt(postAt) - // the `text` field is required since May 2021 - .text("fallback") - .blocks(blocks)); - assertNull(message3.getError()); - - ChatScheduledMessagesListResponse after = slack.methods(botToken).chatScheduledMessagesList(r -> r.limit(100)); - assertNull(after.getError()); - assertTrue(after.getScheduledMessages().size() - before.getScheduledMessages().size() == 2); - } - - // https://github.com/slackapi/java-slack-sdk/issues/415 - @Test - public void attachmentsWithBlocks_issue_415() throws IOException, SlackApiException { - loadRandomChannelId(); - /* - * { - * "attachments": [ - * { - * "color": "#00FF00", - * "blocks": [ - * { - * "type": "section", - * "text": { - * "type": "mrkdwn", - * "text": "*I would expect this text to show*" - * } - * } - * ] - * } - * ] - * } - */ - List attachments = asAttachments( - attachment(a -> a.color("#00FF00").blocks(asBlocks( - section(s -> s.text(markdownText("*I would expect this text to show*"))) - ))) - ); - ChatPostMessageResponse result = slack.methods(botToken).chatPostMessage(r -> r - .channel(randomChannelId) - .attachments(attachments) - ); - assertThat(result.getError(), is(nullValue())); - } - - // Just in case, this test verifies the issue doesn't exist in MethodsClient - // https://github.com/slackapi/java-slack-sdk/issues/429 - @Test - public void post_messages_in_Chinese_issue_429() throws IOException, SlackApiException { - loadRandomChannelId(); - - ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(r -> r - .channel(randomChannelId) - .text(":wave: Hello! 哈囉")); - assertThat(response.getError(), is(nullValue())); - assertThat(response.getMessage().getText(), is(":wave: Hello! 哈囉")); - } - - @Test - public void post_messages_timepicker() throws Exception { - loadRandomChannelId(); - - ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(r -> r.channel(randomChannelId) - .blocks(Arrays.asList(section(s -> s.text(plainText("test")).blockId("b").accessory( - timePicker(t -> t - .actionId("a") - .initialTime("09:10") - .placeholder(plainText("It's time to start!"))) - )) - )) - ); - // invalid_blocks means you haven't turned the beta feature on - // Go to https://api.slack.com/apps/{api_app_id}/developer-beta - assertThat(response.getError(), is(nullValue())); - } - - // https://github.com/slackapi/java-slack-sdk/issues/647 - @Test - public void share_message_with_files_issue_647() throws Exception { - loadRandomChannelId(); - - FilesUploadResponse fileUpload = slack.methods(botToken).filesUpload(r -> r - .content("This is a test") - .initialComment("Uploading a file...") - .channels(Arrays.asList(randomChannelId)) - ); - assertThat(fileUpload.isOk(), is(true)); - - File.ShareDetail share = fileUpload.getFile().getShares().getPublicChannels().get(randomChannelId).get(0); - String permalink = slack.methods(botToken).chatGetPermalink(r -> r - .channel(randomChannelId) - .messageTs(share.getTs()) - ).getPermalink(); - - ChatPostMessageResponse message = slack.methods(botToken).chatPostMessage(r -> r - .channel(randomChannelId) - .unfurlLinks(true) - .text("Here is the uploaded file: " + permalink) - ); - assertThat(message.isOk(), is(true)); - } - - @Test - public void share_message_with_files_issue_647_v2() throws Exception { - loadRandomChannelId(); - - FilesUploadV2Response fileUpload = slack.methods(botToken).filesUploadV2(r -> r - .content("This is a test") - .initialComment("Uploading a file...") - .channel(randomChannelId) - ); - assertThat(fileUpload.isOk(), is(true)); - - Thread.sleep(10000L); // for test stability - File.ShareDetail share = slack.methods(botToken).filesInfo(r -> r.file(fileUpload.getFile().getId())) - .getFile().getShares().getPublicChannels().get(randomChannelId).get(0); - String permalink = slack.methods(botToken).chatGetPermalink(r -> r - .channel(randomChannelId) - .messageTs(share.getTs()) - ).getPermalink(); - - ChatPostMessageResponse message = slack.methods(botToken).chatPostMessage(r -> r - .channel(randomChannelId) - .unfurlLinks(true) - .text("Here is the uploaded file: " + permalink) - ); - assertThat(message.isOk(), is(true)); - } - - // 2022-05-06 14:07:28,327 WARN [main] com.slack.api.methods.RequestFormBuilder The top-level `text` argument is missing in the request payload for a chat.postMessage call - It's a best practice to always provide a `text` argument when posting a message. The `text` is used in places where the content cannot be rendered such as: system push notifications, assistive technology such as screen readers, etc. - // 2022-05-06 14:07:28,327 WARN [main] com.slack.api.methods.RequestFormBuilder Additionally, the attachment-level `fallback` argument is missing in the request payload for a chat.postMessage call - To avoid this warning, it is recommended to always provide a top-level `text` argument when posting a message. Alternatively, you can provide an attachment-level `fallback` argument, though this is now considered a legacy field (see https://docs.slack.dev/legacy/legacy-messaging/legacy-secondary-message-attachments#legacy_fields for more details). - @Test - public void textWarnings() throws Exception { - loadRandomChannelId(); - - ChatPostMessageResponse postResponse = slack.methods().chatPostMessage(ChatPostMessageRequest.builder() - .token(botToken) - .channel(randomChannelId) - .text(null) - .blocksAsString(blocksAsString) - .build()); - assertThat(postResponse.getError(), is(nullValue())); - - ChatUpdateResponse updateMessage = slack.methods().chatUpdate(ChatUpdateRequest.builder() - .channel(randomChannelId) - .token(botToken) - .ts(postResponse.getTs()) - .text(null) - .blocksAsString(blocksAsString) - .build()); - assertThat(updateMessage.getError(), is(nullValue())); - } - - @Test - public void issue_785() throws Exception { - loadRandomChannelId(); - - String ts = null; - try { - ChatPostMessageResponse newMessage = slack.methods(botToken).chatPostMessage(r -> r - .text("Here is the link: https://i.imgur.com/brgYmPX.gifv") - .unfurlLinks(true) - .unfurlMedia(true) - .channel(randomChannelId) - ); - assertThat(newMessage.getError(), is(nullValue())); - ts = newMessage.getTs(); - Thread.sleep(3_000L); - - ConversationsHistoryResponse history = slack.methods(botToken).conversationsHistory(r -> r - .channel(randomChannelId).limit(1)); - assertThat(history.getError(), is(nullValue())); - List attachments = history.getMessages().get(0).getAttachments(); - // the attachments can be null - if (attachments != null && attachments.get(0) != null) { - Attachment.VideoHtml videoHtml = attachments.get(0).getVideoHtml(); - assertThat(videoHtml.getHtml(), is("")); - assertThat(videoHtml.getSource(), is(nullValue())); - } - } finally { - if (ts != null) { - final String _ts = ts; - slack.methods(botToken).chatDelete(r -> r.channel(randomChannelId).ts(_ts)); - } + + @Test + public void post_message_with_datetimepicker() throws Exception { + loadRandomChannelId(); + + ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(r -> r + .channel(randomChannelId) + .blocks(asBlocks( + actions(a -> a.blockId("b").elements(asElements( + datetimePicker(dt -> dt.actionId("a")))))))); + assertThat(response.getError(), is(nullValue())); + } + + @Test + public void post_message_with_workflow_button() throws Exception { + loadRandomChannelId(); + + String triggerUrl = System.getenv("SLACK_SDK_TEST_WORKFLOW_TRIGGER_URL"); + ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(r -> r + .channel(randomChannelId) + .blocks(asBlocks( + actions(a -> a.blockId("b").elements(asElements( + workflowButton(w -> w + .actionId("workflow") + .style("danger") + .accessibilityLabel("test") + .text(plainText("Start the workflow")) + .workflow(WorkflowObject.builder() + .trigger(WorkflowObject.Trigger + .builder() + .url(triggerUrl) + // .customizableInputParameters(Arrays.asList( + // WorkflowObject.Trigger.InputParam.builder() + // .name("foo") + // .value("bar") + // .build() + // )) + .build()) + .build())))))))); + assertThat(response.getError(), is(nullValue())); } - } - - @Test - public void post_messages_video() throws Exception { - loadRandomChannelId(); - - ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(r -> r.channel(randomChannelId) - .blocks(asBlocks(video(v -> v - .blockId("b") - .title(plainText("Video title")) - .titleUrl("https://www.youtube.com/watch?v=q19RtuCHt1Q") - .videoUrl("https://www.youtube.com/embed/q19RtuCHt1Q") - .description(plainText("Video description")) - .thumbnailUrl("https://assets.brandfolder.com/pmix53-32t4so-a6439g/original/slackbot.png") - .altText("Video Alt text") - .authorName("Slack Java SDK Unit Test") - .providerIconUrl("https://assets.brandfolder.com/pmix53-32t4so-a6439g/original/slackbot.png") - .providerName("Slack Java SDK Video Provider") - ))) - ); - // invalid_blocks means you do not have links.embed:write permission - assertThat(response.getError(), is(nullValue())); - } - - @Test - public void post_messages_video_required_params_only() throws Exception { - loadRandomChannelId(); - - ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(r -> r.channel(randomChannelId) - .blocks(asBlocks(video(v -> v - .blockId("b") - .title(plainText("Video title")) -// .titleUrl("https://www.youtube.com/watch?v=q19RtuCHt1Q") - .videoUrl("https://www.youtube.com/embed/q19RtuCHt1Q") -// .description(plainText("Video description")) - .thumbnailUrl("https://assets.brandfolder.com/pmix53-32t4so-a6439g/original/slackbot.png") - .altText("Video Alt text") -// .authorName("Slack Java SDK Unit Test") -// .providerIconUrl("https://assets.brandfolder.com/pmix53-32t4so-a6439g/original/slackbot.png") -// .providerName("Slack Java SDK Video Provider") - ))) - ); - // invalid_blocks means you do not have links.embed:write permission - assertThat(response.getError(), is(nullValue())); - } - - @Test - public void post_message_with_datetimepicker() throws Exception { - loadRandomChannelId(); - - ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(r -> r.channel(randomChannelId) - .blocks(asBlocks( - actions(a -> a.blockId("b").elements(asElements( - datetimePicker(dt -> dt.actionId("a")) - ))) - )) - ); - assertThat(response.getError(), is(nullValue())); - } - - @Test - public void post_message_with_workflow_button() throws Exception { - loadRandomChannelId(); - - String triggerUrl = System.getenv("SLACK_SDK_TEST_WORKFLOW_TRIGGER_URL"); - ChatPostMessageResponse response = slack.methods(botToken).chatPostMessage(r -> r.channel(randomChannelId) - .blocks(asBlocks( - actions(a -> a.blockId("b").elements(asElements( - workflowButton(w -> w - .actionId("workflow") - .style("danger") - .accessibilityLabel("test") - .text(plainText("Start the workflow")) - .workflow(WorkflowObject.builder() - .trigger(WorkflowObject.Trigger.builder() - .url(triggerUrl) -// .customizableInputParameters(Arrays.asList( -// WorkflowObject.Trigger.InputParam.builder() -// .name("foo") -// .value("bar") -// .build() -// )) - .build()) - .build()) - ) - ))) - )) - ); - assertThat(response.getError(), is(nullValue())); - } } diff --git a/slack-api-model/src/main/java/com/slack/api/model/Attachment.java b/slack-api-model/src/main/java/com/slack/api/model/Attachment.java index 21472c87d..7d953faf3 100644 --- a/slack-api-model/src/main/java/com/slack/api/model/Attachment.java +++ b/slack-api-model/src/main/java/com/slack/api/model/Attachment.java @@ -357,6 +357,7 @@ public static class Record { private String mimetype; private String url; private AttachmentMetadata metadata; + private Object workObjectEntity; @Getter(AccessLevel.NONE) @Setter(AccessLevel.NONE) diff --git a/slack-api-model/src/main/java/com/slack/api/model/EntityMetadata.java b/slack-api-model/src/main/java/com/slack/api/model/EntityMetadata.java new file mode 100644 index 000000000..5342b001a --- /dev/null +++ b/slack-api-model/src/main/java/com/slack/api/model/EntityMetadata.java @@ -0,0 +1,373 @@ +package com.slack.api.model; + +import com.google.gson.JsonElement; +import com.google.gson.annotations.SerializedName; +import lombok.*; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class EntityMetadata { + private String entityType; + private ExternalRef externalRef; + private String url; + private EntityPayload entityPayload; + // app_unfurl_url is only required when passing metadata to `chat.unfurl` + private String appUnfurlUrl; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class ExternalRef { + private String id; + private String type; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class EntityPayload { + private Attributes attributes; + + private FileFields fileFields; + private TaskFields taskFields; + private IncidentFields incidentFields; + private ContentItemFields contentItemFields; + private JsonElement fields; + + private CustomField[] customFields; + private FileEntitySlackFile slackFile; + private String[] displayOrder; + private Actions actions; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class FileFields { + private Image preview; + private TypedField createdBy; + private Timestamp dateCreated; + private Timestamp dateUpdated; + private TypedField lastModifiedBy; + private StringField fileSize; + private StringField mimeType; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class TaskFields { + private StringField description; + private TypedField createdBy; + private Timestamp dateCreated; + private Timestamp dateUpdated; + private TypedField assignee; + private StringField status; + private TypedField dueDate; + private StringField priority; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class ContentItemFields { + private Image preview; + private StringField description; + private TypedField createdBy; + private Timestamp dateCreated; + private Timestamp dateUpdated; + private TypedField lastModifiedBy; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class IncidentFields { + private StringField status; + private StringField priority; + private StringField urgency; + private TypedField createdBy; + private TypedField assignedTo; + private Timestamp dateCreated; + private Timestamp dateUpdated; + private StringField description; + private StringField service; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class TypedField { + private Object value; + private String type; + private String label; + private Edit edit; + + // When type is 'string' + private String link; + private Icon icon; + @SerializedName("long") + private Boolean longStr; + private String format; + private String tagColor; + + // When type is 'slack#/types/image' + private String altText; + private String imageUrl; + private SlackFile slackFile; + + // When type is 'slack#/types/user' + private User user; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class User { + // Slack user ID + private String userId; + + // or + private String text; + private String url; + private String email; + private Icon icon; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class StringField { + private String label; + private String value; + private String format; + private String link; + private Icon icon; + @SerializedName("long") + private Boolean longStr; + private String type; + private String tagColor; + private Edit edit; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class Timestamp { + private String label; + private Integer value; + private String link; + private Icon icon; + private String type; + private Edit edit; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class Attributes { + private Title title; + private String displayType; + private String displayId; + private Icon productIcon; + private String productName; + private String locale; + private FullSizePreview fullSizePreview; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class Title { + private String text; + private Edit edit; + } + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class CustomField { + private String label; + private String key; + private Object value; + private String type; + private String link; + private Icon icon; + @SerializedName("long") + private Boolean longStr; + private String format; + private String imageUrl; + private SlackFile slackFile; + private String altText; + private String tagColor; + private Edit edit; + private String itemType; + private User user; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class Icon { + private String altText; + private String url; + private SlackFile slackFile; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class FullSizePreview { + private Boolean isSupported; + private String previewUrl; + private Boolean isAnimated; + private String width; + private String height; + private String mime_type; + private Error error; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class Error { + private String code; + private String message; + } + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class Image { + private String label; + private String altText; + private String imageUrl; + private SlackFile slackFile; + private String title; + private String type; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class FileEntitySlackFile { + private String id; + private String type; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class SlackFile { + private String url; + private String id; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class Edit { + private Boolean enabled; + private PlainText placeholder; + private PlainText hint; + private Boolean optional; + private Select select; + private Number number; + private Text text; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class Select { + private String currentValue; + private String[] currentValues; + private Object[] staticOptions; + private Boolean fetchOptionsDynamically; + private Integer minQueryLength; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class Number { + private Boolean isDecimalAllowed; + private Integer minValue; + private Integer maxValue; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class Text { + private Integer minLength; + private Integer maxLength; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class PlainText { + private String type; + private String text; + private Boolean emoji; + } + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class Actions { + private ActionButton[] primaryActions; + private ActionButton[] overflowActions; + } + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class ActionButton { + private String text; + private String actionId; + private String value; + private String style; + private String url; + private String accessibilityLabel; + private ButtonProcessingState processingState; + + @Data + @Builder + @NoArgsConstructor + @AllArgsConstructor + public static class ButtonProcessingState { + private Boolean enabled; + private String interstitialText; + } + } + } +} diff --git a/slack-api-model/src/main/java/com/slack/api/model/ErrorResponseMetadata.java b/slack-api-model/src/main/java/com/slack/api/model/ErrorResponseMetadata.java index 28f6899a1..2e598f84b 100644 --- a/slack-api-model/src/main/java/com/slack/api/model/ErrorResponseMetadata.java +++ b/slack-api-model/src/main/java/com/slack/api/model/ErrorResponseMetadata.java @@ -8,4 +8,5 @@ public class ErrorResponseMetadata { private List messages; + private List warnings; } diff --git a/slack-api-model/src/main/java/com/slack/api/model/Message.java b/slack-api-model/src/main/java/com/slack/api/model/Message.java index f9fbf8083..a58416669 100644 --- a/slack-api-model/src/main/java/com/slack/api/model/Message.java +++ b/slack-api-model/src/main/java/com/slack/api/model/Message.java @@ -235,8 +235,12 @@ public void setPublic(boolean isPublic) { @NoArgsConstructor @AllArgsConstructor public static class Metadata { + // Event metadata private String eventType; private Map eventPayload; + + // Work object metadata + private EntityMetadata[] entities; } private Room room; // Huddle diff --git a/slack-api-model/src/main/java/com/slack/api/model/event/EntityDetailsRequestedEvent.java b/slack-api-model/src/main/java/com/slack/api/model/event/EntityDetailsRequestedEvent.java new file mode 100644 index 000000000..81c135f64 --- /dev/null +++ b/slack-api-model/src/main/java/com/slack/api/model/event/EntityDetailsRequestedEvent.java @@ -0,0 +1,38 @@ +package com.slack.api.model.event; + +import lombok.Data; + +/** + * https://docs.slack.dev/reference/events/entity_details_requested + */ +@Data +public class EntityDetailsRequestedEvent implements Event { + + public static final String TYPE_NAME = "entity_details_requested"; + + private final String type = TYPE_NAME; + private String user; + private String userLocale; + private Link link; + private String entityUrl; + private String appUnfurlUrl; + private String trigger_id; + private ExternalRef external_ref; + private String channel; + private String messageTs; + // The thread_ts field only appears when the link was shared within a message thread. + private String threadTs; + private String eventTs; + + @Data + public static class Link { + private String domain; + private String url; + } + + @Data + public static class ExternalRef { + private String id; + private String type; + } +} diff --git a/slack-api-model/src/test/java/test_locally/api/model/event/EntityDetailsRequestedEventTest.java b/slack-api-model/src/test/java/test_locally/api/model/event/EntityDetailsRequestedEventTest.java new file mode 100644 index 000000000..b310cdca6 --- /dev/null +++ b/slack-api-model/src/test/java/test_locally/api/model/event/EntityDetailsRequestedEventTest.java @@ -0,0 +1,51 @@ +package test_locally.api.model.event; + +import com.google.gson.Gson; +import com.slack.api.model.event.EntityDetailsRequestedEvent; +import org.junit.Test; +import test_locally.unit.GsonFactory; + +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; + +public class EntityDetailsRequestedEventTest { + + @Test + public void typeName() { + assertThat(EntityDetailsRequestedEvent.TYPE_NAME, is("entity_details_requested")); + } + + @Test + public void deserialize() { + String json = "{\n" + // + " type: 'entity_details_requested',\n" + // + " user: 'U014KLZE350',\n" + // + " trigger_id: '1285887690115.1156727510051.43015732ffe3fc75a3e8e22ad7562efe',\n" + // + " user_locale: 'en-US',\n" + // + " entity_url: 'https://myappdomain.com/id/123',\n" + // + " external_ref: { id: 'myappdomain_incident_id_05' },\n" + // + " link: { url: 'https://myappdomain.com', domain: 'myappdomain.com' },\n" + // + " app_unfurl_url: 'https://myappdomain.com/id/123?myquery=param',\n" + // + " channel: 'C123ABC456',\n" + // + " message_ts: '1759856283.212899',\n" + // + " thread_ts: '1759856283.212899',\n" + // + " event_ts: '1759880869.953553'\n" + // + " }"; + EntityDetailsRequestedEvent event = GsonFactory.createSnakeCase().fromJson(json, EntityDetailsRequestedEvent.class); + assertThat(event.getType(), is("entity_details_requested")); + assertThat(event.getAppUnfurlUrl(), is("https://myappdomain.com/id/123?myquery=param")); + assertThat(event.getEntityUrl(), is("https://myappdomain.com/id/123")); + assertThat(event.getMessageTs(), is("1759856283.212899")); + } + + @Test + public void serialize() { + Gson gson = GsonFactory.createSnakeCase(); + EntityDetailsRequestedEvent event = new EntityDetailsRequestedEvent(); + event.setEventTs("123"); + String generatedJson = gson.toJson(event); + String expectedJson = "{\"type\":\"entity_details_requested\",\"event_ts\":\"123\"}"; + assertThat(generatedJson, is(expectedJson)); + } + +} diff --git a/slack-app-backend/src/main/java/com/slack/api/app_backend/events/handler/EntityDetailsRequestedHandler.java b/slack-app-backend/src/main/java/com/slack/api/app_backend/events/handler/EntityDetailsRequestedHandler.java new file mode 100644 index 000000000..4c6ab3ccb --- /dev/null +++ b/slack-app-backend/src/main/java/com/slack/api/app_backend/events/handler/EntityDetailsRequestedHandler.java @@ -0,0 +1,14 @@ + +package com.slack.api.app_backend.events.handler; + +import com.slack.api.app_backend.events.EventHandler; +import com.slack.api.app_backend.events.payload.EntityDetailsRequestedPayload; +import com.slack.api.model.event.EntityDetailsRequestedEvent; + +public abstract class EntityDetailsRequestedHandler extends EventHandler { + + @Override + public String getEventType() { + return EntityDetailsRequestedEvent.TYPE_NAME; + } +} diff --git a/slack-app-backend/src/main/java/com/slack/api/app_backend/events/payload/EntityDetailsRequestedPayload.java b/slack-app-backend/src/main/java/com/slack/api/app_backend/events/payload/EntityDetailsRequestedPayload.java new file mode 100644 index 000000000..176f0569f --- /dev/null +++ b/slack-app-backend/src/main/java/com/slack/api/app_backend/events/payload/EntityDetailsRequestedPayload.java @@ -0,0 +1,25 @@ +package com.slack.api.app_backend.events.payload; + +import com.slack.api.model.event.EntityDetailsRequestedEvent; +import lombok.Data; + +import java.util.List; + +@Data +public class EntityDetailsRequestedPayload implements EventsApiPayload { + + private String token; + private String enterpriseId; + private String teamId; + private String apiAppId; + private String type; + private List authedUsers; + private List authedTeams; + private List authorizations; + private boolean isExtSharedChannel; + private String eventId; + private Integer eventTime; + private String eventContext; + + private EntityDetailsRequestedEvent event; +} From 74cffd40f3244d0d41f4dae5c68653e96a19a84f Mon Sep 17 00:00:00 2001 From: Elaine Vegeris Date: Wed, 8 Oct 2025 13:45:17 -0400 Subject: [PATCH 2/6] need to update these json-logs? --- json-logs/samples/api/views.open.json | 3 ++- json-logs/samples/api/views.publish.json | 3 ++- json-logs/samples/api/views.push.json | 3 ++- json-logs/samples/api/views.update.json | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/json-logs/samples/api/views.open.json b/json-logs/samples/api/views.open.json index 1801cfe5e..2aa553dbe 100644 --- a/json-logs/samples/api/views.open.json +++ b/json-logs/samples/api/views.open.json @@ -3964,6 +3964,7 @@ "response_metadata": { "messages": [ "" - ] + ], + "warnings": [] } } \ No newline at end of file diff --git a/json-logs/samples/api/views.publish.json b/json-logs/samples/api/views.publish.json index 1801cfe5e..2aa553dbe 100644 --- a/json-logs/samples/api/views.publish.json +++ b/json-logs/samples/api/views.publish.json @@ -3964,6 +3964,7 @@ "response_metadata": { "messages": [ "" - ] + ], + "warnings": [] } } \ No newline at end of file diff --git a/json-logs/samples/api/views.push.json b/json-logs/samples/api/views.push.json index 1801cfe5e..2aa553dbe 100644 --- a/json-logs/samples/api/views.push.json +++ b/json-logs/samples/api/views.push.json @@ -3964,6 +3964,7 @@ "response_metadata": { "messages": [ "" - ] + ], + "warnings": [] } } \ No newline at end of file diff --git a/json-logs/samples/api/views.update.json b/json-logs/samples/api/views.update.json index 1801cfe5e..2aa553dbe 100644 --- a/json-logs/samples/api/views.update.json +++ b/json-logs/samples/api/views.update.json @@ -3964,6 +3964,7 @@ "response_metadata": { "messages": [ "" - ] + ], + "warnings": [] } } \ No newline at end of file From e01e5667c8ae47af6d406f8a43081be94f8d5fb4 Mon Sep 17 00:00:00 2001 From: Elaine Vegeris Date: Thu, 9 Oct 2025 19:52:55 -0400 Subject: [PATCH 3/6] update --- .../src/main/java/com/slack/api/model/EntityMetadata.java | 3 --- .../slack/api/model/event/EntityDetailsRequestedEvent.java | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/slack-api-model/src/main/java/com/slack/api/model/EntityMetadata.java b/slack-api-model/src/main/java/com/slack/api/model/EntityMetadata.java index 5342b001a..4bdab5f99 100644 --- a/slack-api-model/src/main/java/com/slack/api/model/EntityMetadata.java +++ b/slack-api-model/src/main/java/com/slack/api/model/EntityMetadata.java @@ -236,9 +236,6 @@ public static class Icon { public static class FullSizePreview { private Boolean isSupported; private String previewUrl; - private Boolean isAnimated; - private String width; - private String height; private String mime_type; private Error error; diff --git a/slack-api-model/src/main/java/com/slack/api/model/event/EntityDetailsRequestedEvent.java b/slack-api-model/src/main/java/com/slack/api/model/event/EntityDetailsRequestedEvent.java index 81c135f64..83b17125e 100644 --- a/slack-api-model/src/main/java/com/slack/api/model/event/EntityDetailsRequestedEvent.java +++ b/slack-api-model/src/main/java/com/slack/api/model/event/EntityDetailsRequestedEvent.java @@ -16,8 +16,8 @@ public class EntityDetailsRequestedEvent implements Event { private Link link; private String entityUrl; private String appUnfurlUrl; - private String trigger_id; - private ExternalRef external_ref; + private String triggerId; + private ExternalRef externalRef; private String channel; private String messageTs; // The thread_ts field only appears when the link was shared within a message thread. From 8ea0ffccff48a2cbe2f17a141cdb52bca8bb54f0 Mon Sep 17 00:00:00 2001 From: Elaine Vegeris Date: Fri, 17 Oct 2025 15:01:17 -0400 Subject: [PATCH 4/6] update view_submission properties --- json-logs/samples/api/views.open.json | 11 ++++++++++- json-logs/samples/api/views.publish.json | 11 ++++++++++- json-logs/samples/api/views.push.json | 11 ++++++++++- json-logs/samples/api/views.update.json | 11 ++++++++++- .../main/java/com/slack/api/model/view/View.java | 14 +++++++++++++- 5 files changed, 53 insertions(+), 5 deletions(-) diff --git a/json-logs/samples/api/views.open.json b/json-logs/samples/api/views.open.json index 2aa553dbe..9243298e7 100644 --- a/json-logs/samples/api/views.open.json +++ b/json-logs/samples/api/views.open.json @@ -3959,7 +3959,16 @@ "previous_view_id": "", "app_id": "", "app_installed_team_id": "", - "bot_id": "" + "bot_id": "", + "entity_url": "", + "external_ref": { + "id": "", + "type": "" + }, + "app_unfurl_url": "", + "message_ts": "", + "thread_ts": "", + "channel": "" }, "response_metadata": { "messages": [ diff --git a/json-logs/samples/api/views.publish.json b/json-logs/samples/api/views.publish.json index 2aa553dbe..9243298e7 100644 --- a/json-logs/samples/api/views.publish.json +++ b/json-logs/samples/api/views.publish.json @@ -3959,7 +3959,16 @@ "previous_view_id": "", "app_id": "", "app_installed_team_id": "", - "bot_id": "" + "bot_id": "", + "entity_url": "", + "external_ref": { + "id": "", + "type": "" + }, + "app_unfurl_url": "", + "message_ts": "", + "thread_ts": "", + "channel": "" }, "response_metadata": { "messages": [ diff --git a/json-logs/samples/api/views.push.json b/json-logs/samples/api/views.push.json index 2aa553dbe..9243298e7 100644 --- a/json-logs/samples/api/views.push.json +++ b/json-logs/samples/api/views.push.json @@ -3959,7 +3959,16 @@ "previous_view_id": "", "app_id": "", "app_installed_team_id": "", - "bot_id": "" + "bot_id": "", + "entity_url": "", + "external_ref": { + "id": "", + "type": "" + }, + "app_unfurl_url": "", + "message_ts": "", + "thread_ts": "", + "channel": "" }, "response_metadata": { "messages": [ diff --git a/json-logs/samples/api/views.update.json b/json-logs/samples/api/views.update.json index 2aa553dbe..9243298e7 100644 --- a/json-logs/samples/api/views.update.json +++ b/json-logs/samples/api/views.update.json @@ -3959,7 +3959,16 @@ "previous_view_id": "", "app_id": "", "app_installed_team_id": "", - "bot_id": "" + "bot_id": "", + "entity_url": "", + "external_ref": { + "id": "", + "type": "" + }, + "app_unfurl_url": "", + "message_ts": "", + "thread_ts": "", + "channel": "" }, "response_metadata": { "messages": [ diff --git a/slack-api-model/src/main/java/com/slack/api/model/view/View.java b/slack-api-model/src/main/java/com/slack/api/model/view/View.java index 038c630f4..333f0b5db 100644 --- a/slack-api-model/src/main/java/com/slack/api/model/view/View.java +++ b/slack-api-model/src/main/java/com/slack/api/model/view/View.java @@ -32,11 +32,23 @@ public class View { private ViewState state; private String hash; private Boolean clearOnClose; // must be nullable for App Home - private Boolean notifyOnClose; // must be nullable for App Home + private Boolean notifyOnClose; // must be nullable for App Home private Boolean submitDisabled; // workflow_step private String rootViewId; private String previousViewId; // views.update private String appId; private String appInstalledTeamId; // workflow_step private String botId; + private String entityUrl; + private ExternalRef externalRef; + private String appUnfurlUrl; + private String messageTs; + private String threadTs; + private String channel; + + @Data + public static class ExternalRef { + private String id; + private String type; + } } From 55656ec09fb4270bd2e2294c71220ae2feec0bd6 Mon Sep 17 00:00:00 2001 From: Elaine Vegeris Date: Sun, 19 Oct 2025 17:58:21 -0400 Subject: [PATCH 5/6] alphabetize --- .../slack/api/methods/AsyncMethodsClient.java | 17 ++++--- .../java/com/slack/api/methods/Methods.java | 6 --- .../com/slack/api/methods/MethodsClient.java | 21 +++++---- .../slack/api/methods/RequestFormBuilder.java | 46 +++++++++---------- .../methods/impl/AsyncMethodsClientImpl.java | 20 ++++---- .../api/methods/impl/MethodsClientImpl.java | 20 ++++---- .../request/chat/ChatUnfurlRequest.java | 4 ++ .../response/chat/ChatUnfurlResponse.java | 4 +- .../EntityDetailsRequestedHandler.java | 1 - 9 files changed, 69 insertions(+), 70 deletions(-) diff --git a/slack-api-client/src/main/java/com/slack/api/methods/AsyncMethodsClient.java b/slack-api-client/src/main/java/com/slack/api/methods/AsyncMethodsClient.java index d7bde48d0..c83809b0c 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/AsyncMethodsClient.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/AsyncMethodsClient.java @@ -246,7 +246,6 @@ import com.slack.api.methods.response.workflows.WorkflowsStepFailedResponse; import com.slack.api.methods.response.workflows.WorkflowsUpdateStepResponse; -import java.io.IOException; import java.util.concurrent.CompletableFuture; /** @@ -1146,6 +1145,14 @@ CompletableFuture CompletableFuture emojiList(RequestConfigurator req); + // ------------------------------ + // entity + // ------------------------------ + + CompletableFuture entityPresentDetails(EntityPresentDetailsRequest req); + + CompletableFuture entityPresentDetails(RequestConfigurator req); + // ------------------------------ // files // ------------------------------ @@ -1568,12 +1575,4 @@ CompletableFuture CompletableFuture workflowsUpdateStep(RequestConfigurator req); - // ------------------------------ - // work object entities - // ------------------------------ - - CompletableFuture entityPresentDetails(EntityPresentDetailsRequest req); - - CompletableFuture entityPresentDetails(RequestConfigurator req); - } diff --git a/slack-api-client/src/main/java/com/slack/api/methods/Methods.java b/slack-api-client/src/main/java/com/slack/api/methods/Methods.java index 0dad97b18..282286733 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/Methods.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/Methods.java @@ -731,10 +731,4 @@ private Methods() { public static final String WORKFLOWS_STEP_COMPLETED = "workflows.stepCompleted"; public static final String WORKFLOWS_STEP_FAILED = "workflows.stepFailed"; public static final String WORKFLOWS_UPDATE_STEP = "workflows.updateStep"; - - // ------------------------------ - // work object entities - // ------------------------------ - - public static final String ENTITY_PRESENT_DETAILSs = "entity.presentDetails"; } diff --git a/slack-api-client/src/main/java/com/slack/api/methods/MethodsClient.java b/slack-api-client/src/main/java/com/slack/api/methods/MethodsClient.java index 5a0999722..2c5320a24 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/MethodsClient.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/MethodsClient.java @@ -1873,6 +1873,17 @@ DndTeamInfoResponse dndTeamInfo(RequestConfigurator req) throws IOException, SlackApiException; + // ------------------------------ + // entity + // ------------------------------ + + EntityPresentDetailsResponse entityPresentDetails(EntityPresentDetailsRequest req) + throws IOException, SlackApiException; + + EntityPresentDetailsResponse entityPresentDetails( + RequestConfigurator req) + throws IOException, SlackApiException; + // ------------------------------ // files // ------------------------------ @@ -2725,14 +2736,4 @@ WorkflowsUpdateStepResponse workflowsUpdateStep( RequestConfigurator req) throws IOException, SlackApiException; - // ------------------------------ - // work object entities - // ------------------------------ - - EntityPresentDetailsResponse entityPresentDetails(EntityPresentDetailsRequest req) - throws IOException, SlackApiException; - - EntityPresentDetailsResponse entityPresentDetails( - RequestConfigurator req) - throws IOException, SlackApiException; } diff --git a/slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java b/slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java index 912b8df27..e17686258 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java @@ -2013,6 +2013,29 @@ public static FormBody.Builder toForm(EmojiListRequest req) { return form; } + public static FormBody.Builder toForm(EntityPresentDetailsRequest req) { + FormBody.Builder form = new FormBody.Builder(); + + setIfNotNull("trigger_id", req.getTriggerId(), form); + + if (req.getRawMetadata() != null) { + setIfNotNull("metadata", req.getRawMetadata(), form); + } else if (req.getMetadata() != null) { + EntityMetadata metadata = req.getMetadata(); + metadata = prepareEntityMetadata(metadata); + String json = GSON.toJson(metadata, EntityMetadata.class); + setIfNotNull("metadata", json, form); + } + + setIfNotNull("user_auth_required", req.isUserAuthRequired(), form); + + setIfNotNull("user_auth_url", req.getUserAuthUrl(), form); + + setIfNotNull("error", req.getError(), form); + + return form; + } + public static FormBody.Builder toForm(FilesDeleteRequest req) { FormBody.Builder form = new FormBody.Builder(); setIfNotNull("file", req.getFile(), form); @@ -3029,29 +3052,6 @@ public static FormBody.Builder toForm(WorkflowsUpdateStepRequest req) { return form; } - public static FormBody.Builder toForm(EntityPresentDetailsRequest req) { - FormBody.Builder form = new FormBody.Builder(); - - setIfNotNull("trigger_id", req.getTriggerId(), form); - - if (req.getRawMetadata() != null) { - setIfNotNull("metadata", req.getRawMetadata(), form); - } else if (req.getMetadata() != null) { - EntityMetadata metadata = req.getMetadata(); - metadata = prepareEntityMetadata(metadata); - String json = GSON.toJson(metadata, EntityMetadata.class); - setIfNotNull("metadata", json, form); - } - - setIfNotNull("user_auth_required", req.isUserAuthRequired(), form); - - setIfNotNull("user_auth_url", req.getUserAuthUrl(), form); - - setIfNotNull("error", req.getError(), form); - - return form; - } - // ---------------------------------------------------------------------------------- // internal methods // ---------------------------------------------------------------------------------- diff --git a/slack-api-client/src/main/java/com/slack/api/methods/impl/AsyncMethodsClientImpl.java b/slack-api-client/src/main/java/com/slack/api/methods/impl/AsyncMethodsClientImpl.java index 2b5a2f0eb..1285b656d 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/impl/AsyncMethodsClientImpl.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/impl/AsyncMethodsClientImpl.java @@ -2049,6 +2049,16 @@ public CompletableFuture emojiList(RequestConfigurator entityPresentDetails(EntityPresentDetailsRequest req) { + return executor.execute(ENTITY_PRESENT_DETAILS, toMap(req), () -> methods.entityPresentDetails(req)); + } + + @Override + public CompletableFuture entityPresentDetails(RequestConfigurator req) { + return entityPresentDetails(req.configure(EntityPresentDetailsRequest.builder()).build()); + } + @Override public CompletableFuture filesDelete(FilesDeleteRequest req) { return executor.execute(FILES_DELETE, toMap(req), () -> methods.filesDelete(req)); @@ -2875,14 +2885,4 @@ public CompletableFuture workflowsUpdateStep(Reques return workflowsUpdateStep(req.configure(WorkflowsUpdateStepRequest.builder()).build()); } - @Override - public CompletableFuture entityPresentDetails(EntityPresentDetailsRequest req) { - return executor.execute(ENTITY_PRESENT_DETAILS, toMap(req), () -> methods.entityPresentDetails(req)); - } - - @Override - public CompletableFuture entityPresentDetails(RequestConfigurator req) { - return entityPresentDetails(req.configure(EntityPresentDetailsRequest.builder()).build()); - } - } diff --git a/slack-api-client/src/main/java/com/slack/api/methods/impl/MethodsClientImpl.java b/slack-api-client/src/main/java/com/slack/api/methods/impl/MethodsClientImpl.java index ba5321e8b..14a0fa591 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/impl/MethodsClientImpl.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/impl/MethodsClientImpl.java @@ -2310,6 +2310,16 @@ public EmojiListResponse emojiList(RequestConfigurator req) throws IOException, SlackApiException { + return entityPresentDetails(req.configure(EntityPresentDetailsRequest.builder()).build()); + } + @Override public FilesDeleteResponse filesDelete(FilesDeleteRequest req) throws IOException, SlackApiException { return postFormWithTokenAndParseResponse(toForm(req), Methods.FILES_DELETE, getToken(req), FilesDeleteResponse.class); @@ -3568,16 +3578,6 @@ public WorkflowsUpdateStepResponse workflowsUpdateStep(RequestConfigurator req) throws IOException, SlackApiException { - return entityPresentDetails(req.configure(EntityPresentDetailsRequest.builder()).build()); - } - // ---------------------------------------------- // OkHttp layer methods // ---------------------------------------------- diff --git a/slack-api-client/src/main/java/com/slack/api/methods/request/chat/ChatUnfurlRequest.java b/slack-api-client/src/main/java/com/slack/api/methods/request/chat/ChatUnfurlRequest.java index b0b6812a3..c64c66f76 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/request/chat/ChatUnfurlRequest.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/request/chat/ChatUnfurlRequest.java @@ -76,7 +76,11 @@ public class ChatUnfurlRequest implements SlackApiRequest { // https://docs.slack.dev/changelog/2021-08-changes-to-unfurls private String source; + /** + * JSON object with an entities field providing an array of work object entities. + */ private String rawMetadata; + private UnfurlMetadata metadata; @Data diff --git a/slack-api-client/src/main/java/com/slack/api/methods/response/chat/ChatUnfurlResponse.java b/slack-api-client/src/main/java/com/slack/api/methods/response/chat/ChatUnfurlResponse.java index a3466850c..94662125d 100644 --- a/slack-api-client/src/main/java/com/slack/api/methods/response/chat/ChatUnfurlResponse.java +++ b/slack-api-client/src/main/java/com/slack/api/methods/response/chat/ChatUnfurlResponse.java @@ -1,6 +1,8 @@ package com.slack.api.methods.response.chat; import com.slack.api.methods.SlackApiTextResponse; +import com.slack.api.model.ResponseMetadata; + import lombok.Data; import java.util.List; @@ -16,5 +18,5 @@ public class ChatUnfurlResponse implements SlackApiTextResponse { private String provided; private transient Map> httpResponseHeaders; private String callstack; - private Object response_metadata; + private ResponseMetadata responseMetadata; } diff --git a/slack-app-backend/src/main/java/com/slack/api/app_backend/events/handler/EntityDetailsRequestedHandler.java b/slack-app-backend/src/main/java/com/slack/api/app_backend/events/handler/EntityDetailsRequestedHandler.java index 4c6ab3ccb..59ff76ab3 100644 --- a/slack-app-backend/src/main/java/com/slack/api/app_backend/events/handler/EntityDetailsRequestedHandler.java +++ b/slack-app-backend/src/main/java/com/slack/api/app_backend/events/handler/EntityDetailsRequestedHandler.java @@ -1,4 +1,3 @@ - package com.slack.api.app_backend.events.handler; import com.slack.api.app_backend.events.EventHandler; From 1105f3c3a7f5e0afa54ebad11ac594cad5f87935 Mon Sep 17 00:00:00 2001 From: Elaine Vegeris Date: Sun, 19 Oct 2025 19:10:18 -0400 Subject: [PATCH 6/6] update test --- .../api/methods_admin_api/FieldValidationTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/slack-api-client/src/test/java/test_locally/api/methods_admin_api/FieldValidationTest.java b/slack-api-client/src/test/java/test_locally/api/methods_admin_api/FieldValidationTest.java index ee8df0748..92f8981d1 100644 --- a/slack-api-client/src/test/java/test_locally/api/methods_admin_api/FieldValidationTest.java +++ b/slack-api-client/src/test/java/test_locally/api/methods_admin_api/FieldValidationTest.java @@ -442,12 +442,12 @@ public void adminEmoji() throws Exception { { AdminEmojiAddResponse obj = parse(prefix + "add", AdminEmojiAddResponse.class); verifyIfAllGettersReturnNonNull(obj); - //verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages"); // TODO + verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages", "getWarnings"); } { AdminEmojiAddAliasResponse obj = parse(prefix + "addAlias", AdminEmojiAddAliasResponse.class); verifyIfAllGettersReturnNonNull(obj); - //verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages"); + verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages", "getWarnings"); } { AdminEmojiListResponse obj = parse(prefix + "list", AdminEmojiListResponse.class); @@ -456,12 +456,12 @@ public void adminEmoji() throws Exception { { AdminEmojiRemoveResponse obj = parse(prefix + "remove", AdminEmojiRemoveResponse.class); verifyIfAllGettersReturnNonNull(obj); - //verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages"); + verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages", "getWarnings"); } { AdminEmojiRenameResponse obj = parse(prefix + "rename", AdminEmojiRenameResponse.class); verifyIfAllGettersReturnNonNull(obj); - //verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages"); + verifyIfAllGettersReturnNonNullRecursively(obj.getResponseMetadata(), "getMessages", "getWarnings"); } }