2025-02-18 11:35:47 +08:00
|
|
|
import type {
|
|
|
|
CreateNewChatParams,
|
|
|
|
StopChatParams,
|
|
|
|
UnsubscribeFromChatParams,
|
|
|
|
DuplicateChatParams
|
|
|
|
} from '../../request_interfaces/chats';
|
2025-01-31 07:29:06 +08:00
|
|
|
import type { BusterSocketRequestBase } from '../base_interfaces';
|
2025-01-28 04:21:42 +08:00
|
|
|
|
2025-02-05 02:01:00 +08:00
|
|
|
/**
|
|
|
|
* Request type for creating a new chat session or continuing an existing one.
|
|
|
|
* @interface ChatCreateNewChat
|
|
|
|
* @extends BusterSocketRequestBase
|
|
|
|
*/
|
2025-02-18 11:35:47 +08:00
|
|
|
export type ChatCreateNewChat = BusterSocketRequestBase<'/chats/post', CreateNewChatParams>;
|
2025-01-28 04:21:42 +08:00
|
|
|
|
2025-02-05 02:01:00 +08:00
|
|
|
/**
|
|
|
|
* Request type for stopping an active chat or message generation.
|
|
|
|
* @interface ChatStopChat
|
|
|
|
* @extends BusterSocketRequestBase
|
|
|
|
*/
|
2025-02-18 11:35:47 +08:00
|
|
|
export type ChatStopChat = BusterSocketRequestBase<'/chats/stop', StopChatParams>;
|
2025-01-28 04:21:42 +08:00
|
|
|
|
2025-02-05 02:01:00 +08:00
|
|
|
/**
|
|
|
|
* Request type for unsubscribing from real-time updates of a specific chat.
|
|
|
|
* @interface ChatUnsubscribeFromChat
|
|
|
|
* @extends BusterSocketRequestBase
|
|
|
|
*/
|
|
|
|
export type ChatUnsubscribeFromChat = BusterSocketRequestBase<
|
|
|
|
'/chats/unsubscribe',
|
2025-02-18 11:35:47 +08:00
|
|
|
UnsubscribeFromChatParams
|
2025-02-05 02:01:00 +08:00
|
|
|
>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Request type for duplicating an existing chat.
|
|
|
|
* @interface ChatsDuplicateChat
|
|
|
|
* @extends BusterSocketRequestBase
|
|
|
|
*/
|
2025-02-18 11:35:47 +08:00
|
|
|
export type ChatsDuplicateChat = BusterSocketRequestBase<'/chats/duplicate', DuplicateChatParams>;
|
2025-01-28 04:21:42 +08:00
|
|
|
|
2025-02-05 02:01:00 +08:00
|
|
|
/**
|
|
|
|
* Union type of all possible chat-related request types.
|
|
|
|
*/
|
2025-01-28 04:21:42 +08:00
|
|
|
export type ChatEmits =
|
|
|
|
| ChatCreateNewChat
|
|
|
|
| ChatUnsubscribeFromChat
|
2025-02-11 07:43:38 +08:00
|
|
|
| ChatsDuplicateChat
|
|
|
|
| ChatStopChat;
|