@prass/botpress-native
Version:
A simple and powerful SDK for integrating Botpress Chat API with React Native,
22 lines (21 loc) • 500 B
TypeScript
type RawMessage = {
type: string;
data: {
id: string;
conversationId: string;
userId: string;
createdAt: string;
payload: Record<string, any>;
isBot: boolean;
};
};
export type ReturnMessage = {
id: string;
conversationId: string;
userId: string;
createdAt: string;
message: Record<string, any>;
isBot: boolean;
} | null;
export declare const MessageSerializer: (rawMessage: RawMessage) => ReturnMessage;
export {};