Restructure omni services and add Chatwoot research snapshot

This commit is contained in:
Ruslan Bakiev
2026-02-21 11:11:27 +07:00
parent edea7a0034
commit b73babbbf6
7732 changed files with 978203 additions and 32 deletions

View File

@@ -0,0 +1,10 @@
json.id account_saml_settings.id
json.account_id account_saml_settings.account_id
json.sso_url account_saml_settings.sso_url
json.certificate account_saml_settings.certificate
json.fingerprint account_saml_settings.certificate_fingerprint
json.idp_entity_id account_saml_settings.idp_entity_id
json.sp_entity_id account_saml_settings.sp_entity_id
json.role_mappings account_saml_settings.role_mappings || {}
json.created_at account_saml_settings.created_at
json.updated_at account_saml_settings.updated_at

View File

@@ -0,0 +1,2 @@
json.custom_role_id account_user&.custom_role_id
json.custom_role account_user&.custom_role&.as_json(only: [:id, :name, :description, :permissions])

View File

@@ -0,0 +1,14 @@
json.id agent_capacity_policy.id
json.name agent_capacity_policy.name
json.description agent_capacity_policy.description
json.exclusion_rules agent_capacity_policy.exclusion_rules
json.created_at agent_capacity_policy.created_at.to_i
json.updated_at agent_capacity_policy.updated_at.to_i
json.account_id agent_capacity_policy.account_id
json.assigned_agent_count agent_capacity_policy.account_users.count
json.inbox_capacity_limits agent_capacity_policy.inbox_capacity_limits do |limit|
json.id limit.id
json.inbox_id limit.inbox_id
json.conversation_limit limit.conversation_limit
end

View File

@@ -0,0 +1,11 @@
json.id resource.id
json.sla_id resource.sla_policy_id
json.sla_status resource.sla_status
json.created_at resource.created_at.to_i
json.updated_at resource.updated_at.to_i
json.sla_description resource.sla_policy.description
json.sla_name resource.sla_policy.name
json.sla_first_response_time_threshold resource.sla_policy.first_response_time_threshold
json.sla_next_response_time_threshold resource.sla_policy.next_response_time_threshold
json.sla_only_during_business_hours resource.sla_policy.only_during_business_hours
json.sla_resolution_time_threshold resource.sla_policy.resolution_time_threshold

View File

@@ -0,0 +1,6 @@
json.id custom_role.id
json.name custom_role.name
json.description custom_role.description
json.permissions custom_role.permissions
json.created_at custom_role.created_at
json.updated_at custom_role.updated_at

View File

@@ -0,0 +1,12 @@
json.id reporting_event.id
json.name reporting_event.name
json.value reporting_event.value
json.value_in_business_hours reporting_event.value_in_business_hours
json.event_start_time reporting_event.event_start_time
json.event_end_time reporting_event.event_end_time
json.account_id reporting_event.account_id
json.inbox_id reporting_event.inbox_id
json.user_id reporting_event.user_id
json.conversation_id reporting_event.conversation_id
json.created_at reporting_event.created_at
json.updated_at reporting_event.updated_at

View File

@@ -0,0 +1,5 @@
json.id sla_event.id
json.event_type sla_event.event_type
json.meta sla_event.meta
json.updated_at sla_event.updated_at.to_i
json.created_at sla_event.created_at.to_i

View File

@@ -0,0 +1,7 @@
json.id sla_policy.id
json.name sla_policy.name
json.description sla_policy.description
json.first_response_time_threshold sla_policy.first_response_time_threshold
json.next_response_time_threshold sla_policy.next_response_time_threshold
json.resolution_time_threshold sla_policy.resolution_time_threshold
json.only_during_business_hours sla_policy.only_during_business_hours

View File

@@ -0,0 +1,9 @@
json.account_id resource.account_id
json.config resource.config
json.created_at resource.created_at.to_i
json.description resource.description
json.guardrails resource.guardrails
json.id resource.id
json.name resource.name
json.response_guidelines resource.response_guidelines
json.updated_at resource.updated_at.to_i

View File

@@ -0,0 +1,31 @@
json.account_id resource.account_id
json.answer resource.answer
json.assistant do
json.partial! 'api/v1/models/captain/assistant', formats: [:json], resource: resource.assistant
end
json.created_at resource.created_at.to_i
if resource.documentable
json.documentable do
json.type resource.documentable_type
case resource.documentable_type
when 'Captain::Document'
json.id resource.documentable.id
json.external_link resource.documentable.external_link
json.name resource.documentable.name
when 'Conversation'
json.id resource.documentable.display_id
json.display_id resource.documentable.display_id
when 'User'
json.id resource.documentable.id
json.email resource.documentable.email
json.available_name resource.documentable.available_name
end
end
end
json.id resource.id
json.question resource.question
json.updated_at resource.updated_at.to_i
json.status resource.status

View File

@@ -0,0 +1,6 @@
json.id resource.id
json.message resource.message
json.message_type resource.message_type
json.created_at resource.created_at.to_i
json.copilot_thread resource.copilot_thread.push_event_data
json.account_id resource.account_id

View File

@@ -0,0 +1,6 @@
json.id resource.id
json.title resource.title
json.created_at resource.created_at.to_i
json.user resource.user.push_event_data
json.assistant resource.assistant.push_event_data
json.account_id resource.account_id

View File

@@ -0,0 +1,15 @@
json.id custom_tool.id
json.slug custom_tool.slug
json.title custom_tool.title
json.description custom_tool.description
json.endpoint_url custom_tool.endpoint_url
json.http_method custom_tool.http_method
json.request_template custom_tool.request_template
json.response_template custom_tool.response_template
json.auth_type custom_tool.auth_type
json.auth_config custom_tool.auth_config
json.param_schema custom_tool.param_schema
json.enabled custom_tool.enabled
json.account_id custom_tool.account_id
json.created_at custom_tool.created_at.to_i
json.updated_at custom_tool.updated_at.to_i

View File

@@ -0,0 +1,14 @@
json.account_id resource.account_id
json.assistant do
json.partial! 'api/v1/models/captain/assistant', formats: [:json], resource: resource.assistant
end
json.content resource.content
json.content_type resource.content_type
json.created_at resource.created_at.to_i
json.external_link resource.external_link
json.display_url resource.display_url
json.file_size resource.file_size
json.id resource.id
json.name resource.name
json.status resource.status
json.updated_at resource.updated_at.to_i

View File

@@ -0,0 +1,16 @@
json.id scenario.id
json.title scenario.title
json.description scenario.description
json.instruction scenario.instruction
json.tools scenario.tools
json.enabled scenario.enabled
json.assistant_id scenario.assistant_id
json.account_id scenario.account_id
json.created_at scenario.created_at
json.updated_at scenario.updated_at
if scenario.assistant.present?
json.assistant do
json.id scenario.assistant.id
json.name scenario.assistant.name
end
end