UNPKG

@butlerbot/sdk

Version:

The official ButlerBot SDK

26 lines (25 loc) 993 B
import { Conversation, ConversationOptions } from "./modules/conversation"; type OptionalApiKey<T> = Omit<T, "apiKey"> & { /** Optional API key, defaults to API key specified in client */ apiKey?: string; }; export type ButlerBotClientOptions = { /** The server endpoint, API calls are sent here */ serverUrl?: string; /** The API key to use with ButlerBot */ apiKey: string; /** Whether to enable debug logs */ debug?: boolean; }; export declare class ButlerBotClient { private apiKey; private serverUrl; private debug; constructor(config: ButlerBotClientOptions); /** Checks the health of the server returning true if server is alive */ healthCheck(healthCheckPath?: string): Promise<boolean>; /** Spawns a new Conversation, inherits api key and server URL */ createConversation(config?: OptionalApiKey<ConversationOptions>): Conversation; } export { Conversation, ConversationOptions }; export * from "./types/type_registry";