diff --git a/frontend/src/contracts/voice.ts b/frontend/src/contracts/voice.ts index 07c8ad1..730d98e 100644 --- a/frontend/src/contracts/voice.ts +++ b/frontend/src/contracts/voice.ts @@ -17,6 +17,18 @@ export type VoiceStreamEndCommand = WsRequest<'voice.stream.end', VoiceStreamEnd export type VoiceStreamError = WsFailure<'voice.stream.error'>; +export type VoiceStreamCancelPayload = { + stream_id: string; + job_id: string | null; +}; + +export type VoiceStreamCancelCommand = WsRequest<'voice.stream.cancel', VoiceStreamCancelPayload>; + +export type VoiceStreamCancelAck = + | WsSuccess<'voice.stream.cancelled', { stream_id: string }> + | VoiceStreamError + | WsFailure<'voice.stream.cancel'>; + export type VoiceStreamStarted = WsSuccess< 'voice.stream.started', { stream_id: string; job_id: string } diff --git a/frontend/src/dev/fakes/FakeWsServer.ts b/frontend/src/dev/fakes/FakeWsServer.ts index 1b0d82e..5512e7c 100644 --- a/frontend/src/dev/fakes/FakeWsServer.ts +++ b/frontend/src/dev/fakes/FakeWsServer.ts @@ -13,6 +13,7 @@ import type { SessionHello, SessionReady, VoiceParseResultMessage, + VoiceStreamCancelCommand, VoiceStreamEndCommand, VoiceStreamStartCommand, VoiceStreamStartResponse,