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>
This commit is contained in:
@@ -94,7 +94,6 @@
|
||||
patch:
|
||||
$ref: ./public/inboxes/contacts/update.yml
|
||||
|
||||
|
||||
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations:
|
||||
parameters:
|
||||
- $ref: '#/parameters/public_inbox_identifier'
|
||||
@@ -104,6 +103,38 @@
|
||||
get:
|
||||
$ref: ./public/inboxes/conversations/index.yml
|
||||
|
||||
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}:
|
||||
parameters:
|
||||
- $ref: '#/parameters/public_inbox_identifier'
|
||||
- $ref: '#/parameters/public_contact_identifier'
|
||||
- $ref: '#/parameters/conversation_id'
|
||||
get:
|
||||
$ref: ./public/inboxes/conversations/show.yml
|
||||
|
||||
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_status:
|
||||
parameters:
|
||||
- $ref: '#/parameters/public_inbox_identifier'
|
||||
- $ref: '#/parameters/public_contact_identifier'
|
||||
- $ref: '#/parameters/conversation_id'
|
||||
post:
|
||||
$ref: ./public/inboxes/conversations/toggle_status.yml
|
||||
|
||||
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/toggle_typing:
|
||||
parameters:
|
||||
- $ref: '#/parameters/public_inbox_identifier'
|
||||
- $ref: '#/parameters/public_contact_identifier'
|
||||
- $ref: '#/parameters/conversation_id'
|
||||
post:
|
||||
$ref: ./public/inboxes/conversations/toggle_typing.yml
|
||||
|
||||
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/update_last_seen:
|
||||
parameters:
|
||||
- $ref: '#/parameters/public_inbox_identifier'
|
||||
- $ref: '#/parameters/public_contact_identifier'
|
||||
- $ref: '#/parameters/conversation_id'
|
||||
post:
|
||||
$ref: ./public/inboxes/conversations/update_last_seen.yml
|
||||
|
||||
/public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversations/{conversation_id}/messages:
|
||||
parameters:
|
||||
- $ref: '#/parameters/public_inbox_identifier'
|
||||
|
||||
14
swagger/paths/public/inboxes/conversations/show.yml
Normal file
14
swagger/paths/public/inboxes/conversations/show.yml
Normal file
@@ -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
swagger/paths/public/inboxes/conversations/toggle_status.yml
Normal file
14
swagger/paths/public/inboxes/conversations/toggle_status.yml
Normal file
@@ -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
swagger/paths/public/inboxes/conversations/toggle_typing.yml
Normal file
18
swagger/paths/public/inboxes/conversations/toggle_typing.yml
Normal file
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user