import { Config } from "./v1.js"; import { ChatV2Req, ChatV2Resp, ChatV2StreamResp, BotInfo, SimpleBot, EnterMessage, MetaDataType, Conversation, RoleType, ObjectStringItem, ContentType } from "./v2.js"; import { ChatV3Message, ChatV3Req, ChatV3Resp, ChatV3StreamResp, FileObject } from "./v3.js"; export declare class Coze { private readonly config; private readonly fetch; constructor(config: Partial); chatV2(request: Omit): Promise; chatV2Streaming(request: Omit): Promise>; chatV3(request: Omit): Promise; chatV3Streaming(request: Omit): Promise>; getBotInfo({ bot_id }: { bot_id: string; }): Promise; listBots({ space_id, page_size, page_index, }: { space_id: string; page_size?: number; page_index?: number; }): Promise<{ space_bots: SimpleBot[]; page_size: number; page_index: number; total: number; }>; createConversation({ messages, meta_data, }?: { messages?: EnterMessage[]; meta_data?: MetaDataType; }): Promise; getConversation({ conversation_id, }: { conversation_id: string; }): Promise; createMessage({ conversation_id, role, content, content_type, meta_data, }: { conversation_id: string; role: RoleType; content: string | ObjectStringItem[]; content_type: ContentType; meta_data: MetaDataType; }): Promise; listMessages({ conversation_id, order, chat_id, before_id, after_id, limit, }: { conversation_id: string; order?: "desc" | "asc"; chat_id?: string; before_id?: string; after_id?: string; limit?: number; }): Promise<{ data: ChatV3Message[]; pagination: { first_id: string; last_id: string; has_more: boolean; }; }>; readMessage({ message_id, conversation_id, }: { conversation_id: string; message_id: string; }): Promise; updateMessage({ message_id, conversation_id, meta_data, content, content_type, }: { conversation_id: string; message_id: string; meta_data?: MetaDataType; content?: string | ObjectStringItem[]; content_type?: ContentType; }): Promise; getChat({ conversation_id, chat_id, }: { conversation_id: string; chat_id: string; }): Promise; getChatHistory({ conversation_id, chat_id, }: { conversation_id: string; chat_id: string; }): Promise; /** * https://www.coze.cn/docs/developer_guides/upload_files * @param filePath The file will be uploaded. * @returns */ uploadFile(filePath: string): Promise; /** * https://www.coze.cn/docs/developer_guides/retrieve_files * @param file_id The file id. * @returns */ readFileMeta({ file_id, }: { file_id: string; }): Promise; runWorkflow({ workflow_id, parameters, bot_id, ext, }: { workflow_id: string; bot_id?: string; parameters?: Record; ext?: Record; }): Promise<{ cost: string; token: number; data: any; }>; private makeRequest; private handleStreamingResponse; private formatConversationPayload; private formatMessagePayload; private parseMessageContent; private parseMessageListResponse; } //# sourceMappingURL=index.d.ts.map