// 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 { } 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; textToAudio(text: string ,user: string, streaming?: boolean): Promise; getMeta(user: User): 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( inputs: any, query: string, user: User, stream?: boolean, conversation_id?: string | null, files?: File[] | null ): Promise; getSuggested(message_id: string, user: User): Promise; stopMessage(task_id: string, user: User) : Promise; getConversations( user: User, first_id?: string | null, limit?: number | null, pinned?: boolean | null ): Promise; getConversationMessages( user: User, conversation_id?: string, first_id?: string | null, limit?: number | null ): Promise; renameConversation(conversation_id: string, name: string, user: User,auto_generate:boolean): Promise; deleteConversation(conversation_id: string, user: User): Promise; audioToText(data: FormData): Promise; } export declare class WorkflowClient extends DifyClient { run(inputs: any, user: User, stream?: boolean,): Promise; stop(task_id: string, user: User): Promise; }