diff --git a/swagger/definitions/index.yml b/swagger/definitions/index.yml index fd9cc1664..627b2cfb5 100644 --- a/swagger/definitions/index.yml +++ b/swagger/definitions/index.yml @@ -225,6 +225,10 @@ agent_conversation_metrics: $ref: './resource/reports/conversation/agent.yml' channel_summary: $ref: './resource/reports/channel_summary.yml' +first_response_time_distribution: + $ref: './resource/reports/first_response_time_distribution.yml' +inbox_label_matrix: + $ref: './resource/reports/inbox_label_matrix.yml' contact_detail: $ref: ./resource/contact_detail.yml diff --git a/swagger/definitions/resource/reports/first_response_time_distribution.yml b/swagger/definitions/resource/reports/first_response_time_distribution.yml new file mode 100644 index 000000000..790e5afe6 --- /dev/null +++ b/swagger/definitions/resource/reports/first_response_time_distribution.yml @@ -0,0 +1,34 @@ +type: object +description: First response time distribution report grouped by channel type. Shows the count of conversations with first response times in different time buckets. +additionalProperties: + type: object + description: First response time distribution for a specific channel type (e.g., Channel::WebWidget, Channel::Api) + properties: + 0-1h: + type: number + description: Number of conversations with first response time less than 1 hour + 1-4h: + type: number + description: Number of conversations with first response time between 1-4 hours + 4-8h: + type: number + description: Number of conversations with first response time between 4-8 hours + 8-24h: + type: number + description: Number of conversations with first response time between 8-24 hours + 24h+: + type: number + description: Number of conversations with first response time greater than 24 hours +example: + Channel::WebWidget: + 0-1h: 150 + 1-4h: 80 + 4-8h: 45 + 8-24h: 30 + 24h+: 15 + Channel::Api: + 0-1h: 75 + 1-4h: 40 + 4-8h: 20 + 8-24h: 10 + 24h+: 5 diff --git a/swagger/definitions/resource/reports/inbox_label_matrix.yml b/swagger/definitions/resource/reports/inbox_label_matrix.yml new file mode 100644 index 000000000..a9b4ebc59 --- /dev/null +++ b/swagger/definitions/resource/reports/inbox_label_matrix.yml @@ -0,0 +1,50 @@ +type: object +description: Inbox-label matrix report showing the count of conversations for each inbox-label combination. +properties: + inboxes: + type: array + description: List of inboxes included in the report + items: + type: object + properties: + id: + type: number + description: The inbox ID + name: + type: string + description: The inbox name + labels: + type: array + description: List of labels included in the report + items: + type: object + properties: + id: + type: number + description: The label ID + title: + type: string + description: The label title + matrix: + type: array + description: 2D array where matrix[i][j] represents the count of conversations in inboxes[i] with labels[j] + items: + type: array + items: + type: number +example: + inboxes: + - id: 1 + name: Website Chat + - id: 2 + name: Email Support + labels: + - id: 1 + title: bug + - id: 2 + title: feature-request + - id: 3 + title: urgent + matrix: + - [10, 5, 3] + - [8, 12, 2] diff --git a/swagger/index.html b/swagger/index.html index eb09d7768..e1546e56f 100644 --- a/swagger/index.html +++ b/swagger/index.html @@ -18,6 +18,6 @@