Skip to content

Commit 55656ec

Browse files
committed
alphabetize
1 parent 8ea0ffc commit 55656ec

File tree

9 files changed

+69
-70
lines changed

9 files changed

+69
-70
lines changed

slack-api-client/src/main/java/com/slack/api/methods/AsyncMethodsClient.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@
246246
import com.slack.api.methods.response.workflows.WorkflowsStepFailedResponse;
247247
import com.slack.api.methods.response.workflows.WorkflowsUpdateStepResponse;
248248

249-
import java.io.IOException;
250249
import java.util.concurrent.CompletableFuture;
251250

252251
/**
@@ -1146,6 +1145,14 @@ CompletableFuture<AdminConversationsWhitelistListGroupsLinkedToChannelResponse>
11461145

11471146
CompletableFuture<EmojiListResponse> emojiList(RequestConfigurator<EmojiListRequest.EmojiListRequestBuilder> req);
11481147

1148+
// ------------------------------
1149+
// entity
1150+
// ------------------------------
1151+
1152+
CompletableFuture<EntityPresentDetailsResponse> entityPresentDetails(EntityPresentDetailsRequest req);
1153+
1154+
CompletableFuture<EntityPresentDetailsResponse> entityPresentDetails(RequestConfigurator<EntityPresentDetailsRequest.EntityPresentDetailsRequestBuilder> req);
1155+
11491156
// ------------------------------
11501157
// files
11511158
// ------------------------------
@@ -1568,12 +1575,4 @@ CompletableFuture<AdminConversationsWhitelistListGroupsLinkedToChannelResponse>
15681575

15691576
CompletableFuture<WorkflowsUpdateStepResponse> workflowsUpdateStep(RequestConfigurator<WorkflowsUpdateStepRequest.WorkflowsUpdateStepRequestBuilder> req);
15701577

1571-
// ------------------------------
1572-
// work object entities
1573-
// ------------------------------
1574-
1575-
CompletableFuture<EntityPresentDetailsResponse> entityPresentDetails(EntityPresentDetailsRequest req);
1576-
1577-
CompletableFuture<EntityPresentDetailsResponse> entityPresentDetails(RequestConfigurator<EntityPresentDetailsRequest.EntityPresentDetailsRequestBuilder> req);
1578-
15791578
}

slack-api-client/src/main/java/com/slack/api/methods/Methods.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -731,10 +731,4 @@ private Methods() {
731731
public static final String WORKFLOWS_STEP_COMPLETED = "workflows.stepCompleted";
732732
public static final String WORKFLOWS_STEP_FAILED = "workflows.stepFailed";
733733
public static final String WORKFLOWS_UPDATE_STEP = "workflows.updateStep";
734-
735-
// ------------------------------
736-
// work object entities
737-
// ------------------------------
738-
739-
public static final String ENTITY_PRESENT_DETAILSs = "entity.presentDetails";
740734
}

slack-api-client/src/main/java/com/slack/api/methods/MethodsClient.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,6 +1873,17 @@ DndTeamInfoResponse dndTeamInfo(RequestConfigurator<DndTeamInfoRequest.DndTeamIn
18731873
EmojiListResponse emojiList(RequestConfigurator<EmojiListRequest.EmojiListRequestBuilder> req)
18741874
throws IOException, SlackApiException;
18751875

1876+
// ------------------------------
1877+
// entity
1878+
// ------------------------------
1879+
1880+
EntityPresentDetailsResponse entityPresentDetails(EntityPresentDetailsRequest req)
1881+
throws IOException, SlackApiException;
1882+
1883+
EntityPresentDetailsResponse entityPresentDetails(
1884+
RequestConfigurator<EntityPresentDetailsRequest.EntityPresentDetailsRequestBuilder> req)
1885+
throws IOException, SlackApiException;
1886+
18761887
// ------------------------------
18771888
// files
18781889
// ------------------------------
@@ -2725,14 +2736,4 @@ WorkflowsUpdateStepResponse workflowsUpdateStep(
27252736
RequestConfigurator<WorkflowsUpdateStepRequest.WorkflowsUpdateStepRequestBuilder> req)
27262737
throws IOException, SlackApiException;
27272738

2728-
// ------------------------------
2729-
// work object entities
2730-
// ------------------------------
2731-
2732-
EntityPresentDetailsResponse entityPresentDetails(EntityPresentDetailsRequest req)
2733-
throws IOException, SlackApiException;
2734-
2735-
EntityPresentDetailsResponse entityPresentDetails(
2736-
RequestConfigurator<EntityPresentDetailsRequest.EntityPresentDetailsRequestBuilder> req)
2737-
throws IOException, SlackApiException;
27382739
}

slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,6 +2013,29 @@ public static FormBody.Builder toForm(EmojiListRequest req) {
20132013
return form;
20142014
}
20152015

2016+
public static FormBody.Builder toForm(EntityPresentDetailsRequest req) {
2017+
FormBody.Builder form = new FormBody.Builder();
2018+
2019+
setIfNotNull("trigger_id", req.getTriggerId(), form);
2020+
2021+
if (req.getRawMetadata() != null) {
2022+
setIfNotNull("metadata", req.getRawMetadata(), form);
2023+
} else if (req.getMetadata() != null) {
2024+
EntityMetadata metadata = req.getMetadata();
2025+
metadata = prepareEntityMetadata(metadata);
2026+
String json = GSON.toJson(metadata, EntityMetadata.class);
2027+
setIfNotNull("metadata", json, form);
2028+
}
2029+
2030+
setIfNotNull("user_auth_required", req.isUserAuthRequired(), form);
2031+
2032+
setIfNotNull("user_auth_url", req.getUserAuthUrl(), form);
2033+
2034+
setIfNotNull("error", req.getError(), form);
2035+
2036+
return form;
2037+
}
2038+
20162039
public static FormBody.Builder toForm(FilesDeleteRequest req) {
20172040
FormBody.Builder form = new FormBody.Builder();
20182041
setIfNotNull("file", req.getFile(), form);
@@ -3029,29 +3052,6 @@ public static FormBody.Builder toForm(WorkflowsUpdateStepRequest req) {
30293052
return form;
30303053
}
30313054

3032-
public static FormBody.Builder toForm(EntityPresentDetailsRequest req) {
3033-
FormBody.Builder form = new FormBody.Builder();
3034-
3035-
setIfNotNull("trigger_id", req.getTriggerId(), form);
3036-
3037-
if (req.getRawMetadata() != null) {
3038-
setIfNotNull("metadata", req.getRawMetadata(), form);
3039-
} else if (req.getMetadata() != null) {
3040-
EntityMetadata metadata = req.getMetadata();
3041-
metadata = prepareEntityMetadata(metadata);
3042-
String json = GSON.toJson(metadata, EntityMetadata.class);
3043-
setIfNotNull("metadata", json, form);
3044-
}
3045-
3046-
setIfNotNull("user_auth_required", req.isUserAuthRequired(), form);
3047-
3048-
setIfNotNull("user_auth_url", req.getUserAuthUrl(), form);
3049-
3050-
setIfNotNull("error", req.getError(), form);
3051-
3052-
return form;
3053-
}
3054-
30553055
// ----------------------------------------------------------------------------------
30563056
// internal methods
30573057
// ----------------------------------------------------------------------------------

slack-api-client/src/main/java/com/slack/api/methods/impl/AsyncMethodsClientImpl.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,6 +2049,16 @@ public CompletableFuture<EmojiListResponse> emojiList(RequestConfigurator<EmojiL
20492049
return emojiList(req.configure(EmojiListRequest.builder()).build());
20502050
}
20512051

2052+
@Override
2053+
public CompletableFuture<EntityPresentDetailsResponse> entityPresentDetails(EntityPresentDetailsRequest req) {
2054+
return executor.execute(ENTITY_PRESENT_DETAILS, toMap(req), () -> methods.entityPresentDetails(req));
2055+
}
2056+
2057+
@Override
2058+
public CompletableFuture<EntityPresentDetailsResponse> entityPresentDetails(RequestConfigurator<EntityPresentDetailsRequest.EntityPresentDetailsRequestBuilder> req) {
2059+
return entityPresentDetails(req.configure(EntityPresentDetailsRequest.builder()).build());
2060+
}
2061+
20522062
@Override
20532063
public CompletableFuture<FilesDeleteResponse> filesDelete(FilesDeleteRequest req) {
20542064
return executor.execute(FILES_DELETE, toMap(req), () -> methods.filesDelete(req));
@@ -2875,14 +2885,4 @@ public CompletableFuture<WorkflowsUpdateStepResponse> workflowsUpdateStep(Reques
28752885
return workflowsUpdateStep(req.configure(WorkflowsUpdateStepRequest.builder()).build());
28762886
}
28772887

2878-
@Override
2879-
public CompletableFuture<EntityPresentDetailsResponse> entityPresentDetails(EntityPresentDetailsRequest req) {
2880-
return executor.execute(ENTITY_PRESENT_DETAILS, toMap(req), () -> methods.entityPresentDetails(req));
2881-
}
2882-
2883-
@Override
2884-
public CompletableFuture<EntityPresentDetailsResponse> entityPresentDetails(RequestConfigurator<EntityPresentDetailsRequest.EntityPresentDetailsRequestBuilder> req) {
2885-
return entityPresentDetails(req.configure(EntityPresentDetailsRequest.builder()).build());
2886-
}
2887-
28882888
}

slack-api-client/src/main/java/com/slack/api/methods/impl/MethodsClientImpl.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2310,6 +2310,16 @@ public EmojiListResponse emojiList(RequestConfigurator<EmojiListRequest.EmojiLis
23102310
return emojiList(req.configure(EmojiListRequest.builder()).build());
23112311
}
23122312

2313+
@Override
2314+
public EntityPresentDetailsResponse entityPresentDetails(EntityPresentDetailsRequest req) throws IOException, SlackApiException {
2315+
return postFormWithTokenAndParseResponse(toForm(req), Methods.ENTITY_PRESENT_DETAILS, getToken(req), EntityPresentDetailsResponse.class);
2316+
}
2317+
2318+
@Override
2319+
public EntityPresentDetailsResponse entityPresentDetails(RequestConfigurator<EntityPresentDetailsRequest.EntityPresentDetailsRequestBuilder> req) throws IOException, SlackApiException {
2320+
return entityPresentDetails(req.configure(EntityPresentDetailsRequest.builder()).build());
2321+
}
2322+
23132323
@Override
23142324
public FilesDeleteResponse filesDelete(FilesDeleteRequest req) throws IOException, SlackApiException {
23152325
return postFormWithTokenAndParseResponse(toForm(req), Methods.FILES_DELETE, getToken(req), FilesDeleteResponse.class);
@@ -3568,16 +3578,6 @@ public WorkflowsUpdateStepResponse workflowsUpdateStep(RequestConfigurator<Workf
35683578
return workflowsUpdateStep(req.configure(WorkflowsUpdateStepRequest.builder()).build());
35693579
}
35703580

3571-
@Override
3572-
public EntityPresentDetailsResponse entityPresentDetails(EntityPresentDetailsRequest req) throws IOException, SlackApiException {
3573-
return postFormWithTokenAndParseResponse(toForm(req), Methods.ENTITY_PRESENT_DETAILSs, getToken(req), EntityPresentDetailsResponse.class);
3574-
}
3575-
3576-
@Override
3577-
public EntityPresentDetailsResponse entityPresentDetails(RequestConfigurator<EntityPresentDetailsRequest.EntityPresentDetailsRequestBuilder> req) throws IOException, SlackApiException {
3578-
return entityPresentDetails(req.configure(EntityPresentDetailsRequest.builder()).build());
3579-
}
3580-
35813581
// ----------------------------------------------
35823582
// OkHttp layer methods
35833583
// ----------------------------------------------

slack-api-client/src/main/java/com/slack/api/methods/request/chat/ChatUnfurlRequest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ public class ChatUnfurlRequest implements SlackApiRequest {
7676
// https://docs.slack.dev/changelog/2021-08-changes-to-unfurls
7777
private String source;
7878

79+
/**
80+
* JSON object with an entities field providing an array of work object entities.
81+
*/
7982
private String rawMetadata;
83+
8084
private UnfurlMetadata metadata;
8185

8286
@Data

slack-api-client/src/main/java/com/slack/api/methods/response/chat/ChatUnfurlResponse.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.slack.api.methods.response.chat;
22

33
import com.slack.api.methods.SlackApiTextResponse;
4+
import com.slack.api.model.ResponseMetadata;
5+
46
import lombok.Data;
57

68
import java.util.List;
@@ -16,5 +18,5 @@ public class ChatUnfurlResponse implements SlackApiTextResponse {
1618
private String provided;
1719
private transient Map<String, List<String>> httpResponseHeaders;
1820
private String callstack;
19-
private Object response_metadata;
21+
private ResponseMetadata responseMetadata;
2022
}

slack-app-backend/src/main/java/com/slack/api/app_backend/events/handler/EntityDetailsRequestedHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
package com.slack.api.app_backend.events.handler;
32

43
import com.slack.api.app_backend.events.EventHandler;

0 commit comments

Comments
 (0)