Skip to content

Commit 942bbda

Browse files
authored
feat(web-api): add recipient_team_id and recipient_user_id to chat.startStream method (#2377)
1 parent 0cdae24 commit 942bbda

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

packages/web-api/src/types/request/chat.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,18 @@ export interface ChatStartStreamArguments
223223
Channel,
224224
Partial<ThreadTS>,
225225
Partial<MarkdownText>,
226-
Unfurls {}
226+
Unfurls {
227+
/**
228+
* @description The ID of the team that is associated with `recipient_user_id`.
229+
* This is required when starting a streaming conversation outside of a DM.
230+
*/
231+
recipient_team_id?: string;
232+
/**
233+
* @description The ID of the user to receive the streaming conversation messages.
234+
* This is required when starting a streaming conversation outside of a DM.
235+
*/
236+
recipient_user_id?: string;
237+
}
227238

228239
export type ChatStopStreamArguments = TokenOverridable &
229240
ChannelAndTS &

packages/web-api/test/types/methods/chat.test-d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,16 @@ expectAssignable<Parameters<typeof web.chat.startStream>>([
608608
unfurl_media: false,
609609
},
610610
]);
611+
expectAssignable<Parameters<typeof web.chat.startStream>>([
612+
{
613+
channel: 'C1234',
614+
markdown_text: 'hello',
615+
unfurl_links: true,
616+
unfurl_media: false,
617+
recipient_team_id: 'T1234',
618+
recipient_user_id: 'U1234',
619+
},
620+
]);
611621

612622
// chat.stopStream
613623
// -- sad path

0 commit comments

Comments
 (0)