cecon-interfaces
Version:
Interfaces de Projetos Cecon
51 lines (50 loc) • 1.39 kB
TypeScript
import { IN8nChatApiCallback } from './i-chat-api-callback';
export interface IN8nChatResponse {
responseId: string;
originalMessageId: string;
sessionId: string;
userId: string;
message: string;
messageType: 'text' | 'image' | 'audio' | 'video' | 'document' | 'template' | 'quick_reply' | 'button';
timestamp: Date;
platform: string;
responseData?: {
buttons?: Array<{
id: string;
text: string;
type: 'reply' | 'url' | 'call';
payload?: string;
url?: string;
phoneNumber?: string;
apiCallback?: IN8nChatApiCallback;
}>;
quickReplies?: Array<{
id: string;
text: string;
payload?: string;
apiCallback?: IN8nChatApiCallback;
}>;
template?: {
type: string;
elements: any[];
};
media?: {
url: string;
type: string;
caption?: string;
filename?: string;
};
};
delivery: {
priority: 'low' | 'normal' | 'high';
delay?: number;
retryAttempts?: number;
};
metadata?: {
automated: boolean;
botName?: string;
workflowId?: string;
nodeId?: string;
};
status: 'queued' | 'sent' | 'delivered' | 'read' | 'failed';
}