/** Realistic Chatwoot webhook payloads used across the test suite. */ export const incomingEmailMessage = { event: 'message_created', id: 90210, message_type: 'incoming', content_type: 'incoming_email', content: 'Dzień dobry, czy gaz R1234yf pasuje do mojego Golfa VII z 2016 roku?', created_at: Math.floor(Date.now() / 1000), private: false, conversation: { id: 1311, inbox_id: 1, status: 'open', channel: 'Channel::Email', labels: [], custom_attributes: {}, additional_attributes: { source: 'email', mail_subject: 'Pytanie o klimatyzację', }, meta: { sender: { id: 332, name: 'Jan Kowalski', email: 'jan.kowalski@example.com' }, }, contact_inbox: { source_id: 'jan.kowalski@example.com' }, }, sender: { id: 332, name: 'Jan Kowalski', email: 'jan.kowalski@example.com' }, attachments: [], }; export const outgoingMessage = { ...incomingEmailMessage, id: 90211, message_type: 'outgoing', }; export const privateNote = { ...incomingEmailMessage, id: 90212, private: true, }; export const statusUpdate = { event: 'conversation_status_changed', id: 90213, conversation: { id: 1311 }, }; export const missingConversationId = { event: 'message_created', id: 90214, message_type: 'incoming', content: 'hello', conversation: {}, }; export const ticketedConversationMessage = { ...incomingEmailMessage, id: 90215, conversation: { ...incomingEmailMessage.conversation, labels: ['ticket'], custom_attributes: { ticket_number: 'EKS-20260820-1311', handoff: true }, }, }; export const bounceMessage = { ...incomingEmailMessage, id: 90216, content: 'This is the mail system at host mx.example.com. Your message could not be delivered.', conversation: { ...incomingEmailMessage.conversation, additional_attributes: { source: 'email', mail_subject: 'Undelivered Mail Returned to Sender', }, meta: { sender: { id: 9, name: '', email: 'mailer-daemon@example.com' } }, }, sender: { id: 9, name: '', email: 'mailer-daemon@example.com' }, }; export const noLabelsPayload = { event: 'message_created', id: 90217, message_type: 'incoming', content: 'Gdzie jest moja paczka?', created_at: Math.floor(Date.now() / 1000), conversation: { id: 1412, inbox_id: 1, channel: 'Channel::Email', }, sender: { id: 401, name: 'Anna Nowak', email: 'anna.nowak@example.com' }, };