Skip to content

Commit 916d8e9

Browse files
authored
feat(types): add agent_session_stopped and agent_session_title_changed events (#2707)
1 parent f5fd35a commit 916d8e9

3 files changed

Lines changed: 30 additions & 0 deletions

File tree

.changeset/agent-session-events.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@slack/types": minor
3+
---
4+
5+
feat(types): add [`agent_session_stopped`](https://docs.slack.dev/reference/events/agent_session_stopped) and [`agent_session_title_changed`](https://docs.slack.dev/reference/events/agent_session_title_changed) events

packages/types/src/events/agent.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// https://docs.slack.dev/reference/events/agent_session_stopped
2+
export interface AgentSessionStoppedEvent {
3+
type: 'agent_session_stopped';
4+
channel: string;
5+
user: string;
6+
thread_ts: string;
7+
streaming_message_ts: string[];
8+
event_ts: string;
9+
}
10+
11+
// https://docs.slack.dev/reference/events/agent_session_title_changed
12+
export interface AgentSessionTitleChangedEvent {
13+
type: 'agent_session_title_changed';
14+
channel: string;
15+
user: string;
16+
team_id: string;
17+
thread_ts: string;
18+
title: string;
19+
previous_title?: string;
20+
event_ts: string;
21+
}

packages/types/src/events/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { AgentSessionStoppedEvent, AgentSessionTitleChangedEvent } from './agent';
12
import type {
23
AppContextChangedEvent,
34
AppDeletedEvent,
@@ -88,6 +89,7 @@ import type {
8889
import type { TokensRevokedEvent } from './token';
8990
import type { UserChangeEvent, UserHuddleChangedEvent, UserProfileChangedEvent, UserStatusChangedEvent } from './user';
9091

92+
export * from './agent';
9193
export * from './app';
9294
export * from './assistant';
9395
export * from './call';
@@ -121,6 +123,8 @@ export * from './user';
121123
* This is a discriminated union. The discriminant is the `type` property.
122124
*/
123125
export type SlackEvent =
126+
| AgentSessionStoppedEvent
127+
| AgentSessionTitleChangedEvent
124128
| AppContextChangedEvent
125129
| AppDeletedEvent
126130
| AppHomeOpenedEvent

0 commit comments

Comments
 (0)