Restructure omni services and add Chatwoot research snapshot
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
json.meta do
|
||||
json.total_count @attachments_count
|
||||
end
|
||||
|
||||
json.payload @attachments do |attachment|
|
||||
json.message_id attachment.push_event_data[:message_id]
|
||||
json.thumb_url attachment.push_event_data[:thumb_url]
|
||||
json.data_url attachment.push_event_data[:data_url]
|
||||
json.file_size attachment.push_event_data[:file_size]
|
||||
json.file_type attachment.push_event_data[:file_type]
|
||||
json.extension attachment.push_event_data[:extension]
|
||||
json.width attachment.push_event_data[:width]
|
||||
json.height attachment.push_event_data[:height]
|
||||
json.created_at attachment.message.created_at.to_i
|
||||
json.sender attachment.message.sender.push_event_data if attachment.message.sender
|
||||
end
|
||||
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/conversations/partials/conversation', formats: [:json], conversation: @conversation
|
||||
@@ -0,0 +1 @@
|
||||
json.custom_attributes @conversation.custom_attributes
|
||||
@@ -0,0 +1,10 @@
|
||||
json.meta do
|
||||
json.mine_count @conversations_count[:mine_count]
|
||||
json.unassigned_count @conversations_count[:unassigned_count]
|
||||
json.all_count @conversations_count[:all_count]
|
||||
end
|
||||
json.payload do
|
||||
json.array! @conversations do |conversation|
|
||||
json.partial! 'api/v1/conversations/partials/conversation', formats: [:json], conversation: conversation
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,13 @@
|
||||
json.data do
|
||||
json.meta do
|
||||
json.mine_count @conversations_count[:mine_count]
|
||||
json.assigned_count @conversations_count[:assigned_count]
|
||||
json.unassigned_count @conversations_count[:unassigned_count]
|
||||
json.all_count @conversations_count[:all_count]
|
||||
end
|
||||
json.payload do
|
||||
json.array! @conversations do |conversation|
|
||||
json.partial! 'api/v1/conversations/partials/conversation', formats: [:json], conversation: conversation
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1 @@
|
||||
json.payload @labels
|
||||
@@ -0,0 +1 @@
|
||||
json.payload @labels
|
||||
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/models/message', message: @message
|
||||
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/models/message', message: @message
|
||||
@@ -0,0 +1,14 @@
|
||||
json.meta do
|
||||
json.labels @conversation.cached_label_list_array
|
||||
json.additional_attributes @conversation.additional_attributes
|
||||
json.contact @conversation.contact.push_event_data
|
||||
json.assignee @conversation.assignee.push_event_data if @conversation.assignee.present?
|
||||
json.agent_last_seen_at @conversation.agent_last_seen_at
|
||||
json.assignee_last_seen_at @conversation.assignee_last_seen_at
|
||||
end
|
||||
|
||||
json.payload do
|
||||
json.array! @messages do |message|
|
||||
json.partial! 'api/v1/models/message', message: message
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/models/message', message: @message
|
||||
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/models/message', message: @message
|
||||
@@ -0,0 +1,6 @@
|
||||
json.meta do
|
||||
json.mine_count @conversations_count[:mine_count]
|
||||
json.assigned_count @conversations_count[:assigned_count]
|
||||
json.unassigned_count @conversations_count[:unassigned_count]
|
||||
json.all_count @conversations_count[:all_count]
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
json.array! @participants do |participant|
|
||||
json.partial! 'api/v1/models/agent', format: :json, resource: participant.user
|
||||
end
|
||||
@@ -0,0 +1,3 @@
|
||||
json.array! @participants do |participant|
|
||||
json.partial! 'api/v1/models/agent', format: :json, resource: participant.user
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
json.meta do
|
||||
json.mine_count @conversations_count[:mine_count]
|
||||
json.unassigned_count @conversations_count[:unassigned_count]
|
||||
json.all_count @conversations_count[:all_count]
|
||||
end
|
||||
json.payload do
|
||||
json.array! @conversations do |conversation|
|
||||
json.partial! 'api/v1/models/conversation', formats: [:json], conversation: conversation
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/conversations/partials/conversation', formats: [:json], conversation: @conversation
|
||||
@@ -0,0 +1,9 @@
|
||||
json.meta do
|
||||
end
|
||||
|
||||
json.payload do
|
||||
json.success @status
|
||||
json.conversation_id @conversation.display_id
|
||||
json.current_status @conversation.status
|
||||
json.snoozed_until @conversation.snoozed_until
|
||||
end
|
||||
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/conversations/partials/conversation', formats: [:json], conversation: @conversation
|
||||
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/conversations/partials/conversation', formats: [:json], conversation: @conversation
|
||||
@@ -0,0 +1 @@
|
||||
json.partial! 'api/v1/conversations/partials/conversation', formats: [:json], conversation: @conversation
|
||||
Reference in New Issue
Block a user