Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion docs/english/guides/ai-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion docs/japanese/guides/assistants.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 11 additions & 1 deletion json-logs/samples/api/chat.unfurl.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,15 @@
"ok": false,
"error": "",
"needed": "",
"provided": ""
"provided": "",
"callstack": "",
"warning": "",
"response_metadata": {
"messages": [
""
],
"warnings": [
""
]
}
}
4 changes: 3 additions & 1 deletion json-logs/samples/api/conversations.list.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,7 @@
},
"error": "",
"needed": "",
"provided": ""
"provided": "",
"arg": "",
"callstack": ""
}
12 changes: 12 additions & 0 deletions json-logs/samples/api/entity.presentDetails.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"ok": false,
"warning": "",
"error": "",
"needed": "",
"provided": "",
"response_metadata": {
"messages": [
""
]
}
}
7 changes: 6 additions & 1 deletion json-logs/samples/api/users.info.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "",
Expand Down
3 changes: 2 additions & 1 deletion json-logs/samples/api/views.open.json
Original file line number Diff line number Diff line change
Expand Up @@ -3964,6 +3964,7 @@
"response_metadata": {
"messages": [
""
]
],
"warnings": []
}
}
3 changes: 2 additions & 1 deletion json-logs/samples/api/views.publish.json
Original file line number Diff line number Diff line change
Expand Up @@ -3964,6 +3964,7 @@
"response_metadata": {
"messages": [
""
]
],
"warnings": []
}
}
3 changes: 2 additions & 1 deletion json-logs/samples/api/views.push.json
Original file line number Diff line number Diff line change
Expand Up @@ -3964,6 +3964,7 @@
"response_metadata": {
"messages": [
""
]
],
"warnings": []
}
}
3 changes: 2 additions & 1 deletion json-logs/samples/api/views.update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3964,6 +3964,7 @@
"response_metadata": {
"messages": [
""
]
],
"warnings": []
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;

/**
Expand Down Expand Up @@ -1565,4 +1568,12 @@ CompletableFuture<AdminConversationsWhitelistListGroupsLinkedToChannelResponse>

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

// ------------------------------
// work object entities
// ------------------------------

CompletableFuture<EntityPresentDetailsResponse> entityPresentDetails(EntityPresentDetailsRequest req);

CompletableFuture<EntityPresentDetailsResponse> entityPresentDetails(RequestConfigurator<EntityPresentDetailsRequest.EntityPresentDetailsRequestBuilder> req);

}
18 changes: 15 additions & 3 deletions slack-api-client/src/main/java/com/slack/api/methods/Methods.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
// ------------------------------
Expand All @@ -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";
Expand Down Expand Up @@ -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
// ------------------------------
Expand Down Expand Up @@ -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";
}
Loading
Loading