// Types.d.ts export const BASE_URL: string; export type RequestMethods = 'GET' | 'POST' | 'PATCH' | 'DELETE'; interface Params { [key: string]: any; } interface HeaderParams { [key: string]: string; } interface User { } interface ChatMessageConfig { inputs: any; query: string; user: User; stream?: boolean; conversation_id?: string | null; files?: File[] | null; } export declare class DifyClient { constructor(apiKey: string, baseUrl?: string); updateApiKey(apiKey: string): void; sendRequest( method: RequestMethods, endpoint: string, data?: any, params?: Params, stream?: boolean, headerParams?: HeaderParams ): Promise; messageFeedback(message_id: string, rating: number, user: User): Promise; getApplicationParameters(user: User): Promise; fileUpload(data: FormData): Promise; } export declare class CompletionClient extends DifyClient { createCompletionMessage( inputs: any, user: User, stream?: boolean, files?: File[] | null ): Promise; } export declare class ChatClient extends DifyClient { createChatMessage(config: ChatMessageConfig): Promise; getConversationMessages( user: User, conversation_id?: string, first_id?: string | null, limit?: number | null ): Promise; getConversations(user: User, first_id?: string | null, limit?: number | null, pinned?: boolean | null): Promise; renameConversation(conversation_id: string, name: string, user: User): Promise; deleteConversation(conversation_id: string, user: User): Promise; }