feat: allow querying reporting events via the API (#12832)
This commit is contained in:
@@ -248,3 +248,9 @@ contact_conversations_response:
|
||||
$ref: ./resource/contact_conversations_response.yml
|
||||
contactable_inboxes_response:
|
||||
$ref: ./resource/contactable_inboxes_response.yml
|
||||
reporting_event:
|
||||
$ref: ./resource/reporting_event.yml
|
||||
reporting_event_meta:
|
||||
$ref: ./resource/reporting_event_meta.yml
|
||||
reporting_events_list_response:
|
||||
$ref: ./resource/reporting_events_list_response.yml
|
||||
|
||||
47
swagger/definitions/resource/reporting_event.yml
Normal file
47
swagger/definitions/resource/reporting_event.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: number
|
||||
description: ID of the reporting event
|
||||
name:
|
||||
type: string
|
||||
description: Name of the event (e.g., first_response, resolution, reply_time)
|
||||
value:
|
||||
type: number
|
||||
format: double
|
||||
description: Value of the metric in seconds
|
||||
value_in_business_hours:
|
||||
type: number
|
||||
format: double
|
||||
description: Value of the metric in seconds, calculated only for business hours
|
||||
event_start_time:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The timestamp when the event started
|
||||
event_end_time:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The timestamp when the event ended
|
||||
account_id:
|
||||
type: number
|
||||
description: ID of the account
|
||||
conversation_id:
|
||||
type: number
|
||||
nullable: true
|
||||
description: ID of the conversation
|
||||
inbox_id:
|
||||
type: number
|
||||
nullable: true
|
||||
description: ID of the inbox
|
||||
user_id:
|
||||
type: number
|
||||
nullable: true
|
||||
description: ID of the user/agent
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The timestamp when the reporting event was created
|
||||
updated_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The timestamp when the reporting event was last updated
|
||||
11
swagger/definitions/resource/reporting_event_meta.yml
Normal file
11
swagger/definitions/resource/reporting_event_meta.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
type: object
|
||||
properties:
|
||||
count:
|
||||
type: integer
|
||||
description: Total number of reporting events
|
||||
current_page:
|
||||
type: integer
|
||||
description: Current page number
|
||||
total_pages:
|
||||
type: integer
|
||||
description: Total number of pages
|
||||
@@ -0,0 +1,10 @@
|
||||
type: object
|
||||
properties:
|
||||
meta:
|
||||
$ref: '#/components/schemas/reporting_event_meta'
|
||||
description: Metadata about the reporting events list response
|
||||
payload:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/reporting_event'
|
||||
description: List of reporting events
|
||||
Reference in New Issue
Block a user