* feat: ignore bots in avg_first_response_time * feat: ignore bots in avg_first_response count * feat: add bot handoff event * feat: add handoff event listener and reporting event * fix: ignore agent bot in first response * refactor: calculate first_response with last handoff * refactor: method defn order * test: new reporting events * feat: Revert "feat: ignore bots in avg_first_response count" This reverts commit de1977c219a2e7a9180dd02272244fe3b3f7ce89. * feat: Revert "feat: ignore bots in avg_first_response_time" This reverts commit bb9171945d5e3b2f6015f4f96dd1b76b3efb6987. * fix: business hour calculation for first_reply * fix: event_start_time for first_response * feat: add migration to recompute first_responses * refactor: separate mute helpers for conversation * refactor: rename migration * refactor: migration script * fix: migration typo * fix: typo in query * feat: update schema.rb * Revert "feat: update schema.rb" This reverts commit 353ef355f2d956dd219907bb66982dc90ca5d896. * feat: update schema * refactor: update events as a batch job * fix: ignore the event if value is negative * feat: don't create a new hand-off if it's already present * refactor: break the action into smaller chunks * refactor: update reporting listener spec Handle the case to ensure extra bot handoffs are not created for a give conversation * fix: import error --------- Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
50 lines
1.5 KiB
Ruby
50 lines
1.5 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
module Events::Types
|
|
### Installation Events ###
|
|
# account events
|
|
ACCOUNT_CREATED = 'account.created'
|
|
|
|
#### Account Events ###
|
|
# campaign events
|
|
CAMPAIGN_TRIGGERED = 'campaign.triggered'
|
|
|
|
# channel events
|
|
WEBWIDGET_TRIGGERED = 'webwidget.triggered'
|
|
|
|
# conversation events
|
|
CONVERSATION_CREATED = 'conversation.created'
|
|
CONVERSATION_UPDATED = 'conversation.updated'
|
|
CONVERSATION_READ = 'conversation.read'
|
|
CONVERSATION_BOT_HANDOFF = 'conversation.bot_handoff'
|
|
# FIXME: deprecate the opened and resolved events in future in favor of status changed event.
|
|
CONVERSATION_OPENED = 'conversation.opened'
|
|
CONVERSATION_RESOLVED = 'conversation.resolved'
|
|
|
|
CONVERSATION_STATUS_CHANGED = 'conversation.status_changed'
|
|
CONVERSATION_CONTACT_CHANGED = 'conversation.contact_changed'
|
|
ASSIGNEE_CHANGED = 'assignee.changed'
|
|
TEAM_CHANGED = 'team.changed'
|
|
CONVERSATION_TYPING_ON = 'conversation.typing_on'
|
|
CONVERSATION_TYPING_OFF = 'conversation.typing_off'
|
|
CONVERSATION_MENTIONED = 'conversation.mentioned'
|
|
|
|
# message events
|
|
MESSAGE_CREATED = 'message.created'
|
|
FIRST_REPLY_CREATED = 'first.reply.created'
|
|
MESSAGE_UPDATED = 'message.updated'
|
|
|
|
# contact events
|
|
CONTACT_CREATED = 'contact.created'
|
|
CONTACT_UPDATED = 'contact.updated'
|
|
CONTACT_MERGED = 'contact.merged'
|
|
CONTACT_DELETED = 'contact.deleted'
|
|
|
|
# notification events
|
|
NOTIFICATION_CREATED = 'notification.created'
|
|
|
|
# agent events
|
|
AGENT_ADDED = 'agent.added'
|
|
AGENT_REMOVED = 'agent.removed'
|
|
end
|