This PR refactors the schema we introduced in #7518 based on the feedback from production tests. Here is the change log - Decouple Inbox association to a new table inbox_response_sources -> this lets us share the same response source between multiple inboxes - Add a status field to responses. This ensures that, by default, responses are created in pending status. You can do quality assurance before making them active. In future, this status can be leveraged by the bot to auto-generate response questions from conversations which require a handoff - Add response_source association to responses and remove hard dependency from response_documents. This lets users write free-form question answers based on conversations, which doesn't necessarily need a response source.
16 lines
536 B
Ruby
16 lines
536 B
Ruby
json.id resource.id
|
|
json.name resource.name
|
|
json.source_link resource.source_link
|
|
json.source_type resource.source_type
|
|
json.account_id resource.account_id
|
|
json.created_at resource.created_at.to_i
|
|
json.updated_at resource.updated_at.to_i
|
|
json.response_documents do
|
|
json.array! resource.response_documents do |response_document|
|
|
json.id response_document.id
|
|
json.document_link response_document.document_link
|
|
json.created_at response_document.created_at.to_i
|
|
json.updated_at response_document.updated_at.to_i
|
|
end
|
|
end
|