Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add ability to resolve API channel conversations (#8348)
- Create a new endpoint to fetch a single conversation in client apis - Create a new endpoint to resolve a single conversation in client apis - Update swagger API definition to include missing endpoints Fixes: #6329 Co-authored-by: Cristian Duta <Cristian.Duta@ti8m.ch>
- Loading branch information
1 parent
cc47cca
commit ebae547
Showing
11 changed files
with
298 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
app/views/public/api/v1/inboxes/conversations/show.json.jbuilder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
json.partial! 'public/api/v1/models/conversation', formats: [:json], resource: @conversation |
1 change: 1 addition & 0 deletions
1
app/views/public/api/v1/inboxes/conversations/toggle_status.json.jbuilder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
json.partial! 'public/api/v1/models/conversation', formats: [:json], resource: @conversation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
tags: | ||
- Conversations API | ||
operationId: get-single-conversation | ||
summary: Get a single conversation | ||
description: Retrieves the details of a specific conversation | ||
responses: | ||
200: | ||
description: Success | ||
schema: | ||
$ref: '#/definitions/public_conversation' | ||
401: | ||
description: Unauthorized | ||
404: | ||
description: Conversation not found |
14 changes: 14 additions & 0 deletions
14
swagger/paths/public/inboxes/conversations/toggle_status.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
tags: | ||
- Conversations API | ||
operationId: resolve-conversation | ||
summary: Resolve a conversation | ||
description: Marks a conversation as resolved | ||
responses: | ||
200: | ||
description: Conversation resolved successfully | ||
schema: | ||
$ref: '#/definitions/public_conversation' | ||
401: | ||
description: Unauthorized | ||
404: | ||
description: Conversation not found |
18 changes: 18 additions & 0 deletions
18
swagger/paths/public/inboxes/conversations/toggle_typing.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
tags: | ||
- Conversations API | ||
operationId: toggle-typing-status | ||
summary: Toggle typing status | ||
description: Toggles the typing status in a conversation | ||
parameters: | ||
- name: typing_status | ||
in: query | ||
required: true | ||
type: string | ||
description: Typing status, either 'on' or 'off' | ||
responses: | ||
200: | ||
description: Typing status toggled successfully | ||
401: | ||
description: Unauthorized | ||
404: | ||
description: Conversation not found |
12 changes: 12 additions & 0 deletions
12
swagger/paths/public/inboxes/conversations/update_last_seen.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
tags: | ||
- Conversations API | ||
operationId: update-last-seen | ||
summary: Update last seen | ||
description: Updates the last seen time of the contact in a conversation | ||
responses: | ||
200: | ||
description: Last seen updated successfully | ||
401: | ||
description: Unauthorized | ||
404: | ||
description: Conversation not found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters