@developer.notchatbot/webchat
Version:
A beautiful React chatbot widget with single-file bundle
15 lines (14 loc) • 584 B
TypeScript
import { Message } from '../types';
/**
* Transforms API messages to WebChat message format
* @param apiMessages Array of messages from the API
* @returns Array of WebChat Message objects
*/
export declare const transformApiMessagesToWebChat: (apiMessages: any[]) => Message[];
/**
* Transforms WebChat messages to API format
* @param messages Array of WebChat Message objects
* @param conversationId The conversation ID
* @returns Array of messages in API format
*/
export declare const transformWebChatMessagesToApi: (messages: Message[], conversationId: string) => any[];