converse-ai-support-library
Version:
A React component library for floating contact buttons (email, chat, call)
76 lines (75 loc) • 1.64 kB
TypeScript
import { MessageRole } from './enums';
export interface VapiChatRequest {
assistantId: string;
input: string;
previousChatId?: string;
}
export interface VapiMessage {
role: MessageRole;
content: string;
}
export interface VapiCostItem {
type: string;
amount: number;
currency: string;
details?: string;
}
export interface VapiChatResponse {
id: string;
orgId: string;
assistantId: string;
cost: number;
costs: VapiCostItem[];
createdAt: string;
updatedAt: string;
input: VapiMessage[];
output: VapiMessage[];
messages: VapiMessage[];
}
export interface VapiError {
message: string;
status?: number;
code?: string;
}
export interface ConversationCreateRequest {
enterpriseId: string;
teamAgentMappingId: string;
type: string;
leadId: string;
mediaId: string;
name?: string;
customerEmail?: string;
number?: string;
}
export interface ConversationCreateResponse {
conversationId: string;
}
export interface DealerEmailResponse {
dealerEmail: string;
}
export interface SendEmailRequest {
conversationId: string;
senderEmail: string;
receiverEmail: string;
subject: string;
body: string;
role: string;
}
export interface SendEmailResponse {
success: boolean;
message?: string;
}
export interface EmailContentResponse {
subject: string;
message: string;
}
export interface EmailGenerateRequest {
taskPrompt: string;
name?: string;
email?: string;
phone?: string;
}
export interface EmailGenerateAPIResponse {
emailContent: string;
status: string;
}