chore: Move agent availability to Account level (#3074)
- Move agent availability to the account level
This commit is contained in:
25
swagger/paths/application/conversation/messages/create.yml
Normal file
25
swagger/paths/application/conversation/messages/create.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
tags:
|
||||
- Messages
|
||||
operationId: create-a-new-message-in-a-conversation
|
||||
summary: Create New Message
|
||||
description: Create a new message in the conversation
|
||||
security:
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/conversation_message_create'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/generic_id'
|
||||
- $ref: '#/definitions/message'
|
||||
404:
|
||||
description: Conversation not found
|
||||
403:
|
||||
description: Access denied
|
||||
@@ -0,0 +1,47 @@
|
||||
post:
|
||||
tags:
|
||||
- Messages
|
||||
operationId: conversationNewMessageAttachment
|
||||
summary: Create New Message Attachment
|
||||
description: Create an attachment message. Refer to this discussion if you have any further doubts. https://github.com/chatwoot/chatwoot/discussions/1809#discussioncomment-1211845
|
||||
consumes:
|
||||
- multipart/form-data
|
||||
security:
|
||||
- userApiKey: []
|
||||
- agentBotApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- $ref: '#/parameters/conversation_id'
|
||||
required: true
|
||||
- in: formData
|
||||
name: content
|
||||
type: string
|
||||
description: The content of the message
|
||||
required: true
|
||||
- in: formData
|
||||
name: message_type
|
||||
type: string
|
||||
enum: ['outgoing', 'incoming']
|
||||
- in: formData
|
||||
name: private
|
||||
type: boolean
|
||||
description: Flag to identify if it is a private note
|
||||
- in: formData
|
||||
name: attachments[]
|
||||
type: array
|
||||
description: The files to be uploaded.
|
||||
items:
|
||||
type: file
|
||||
|
||||
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/generic_id'
|
||||
- $ref: '#/definitions/message'
|
||||
404:
|
||||
description: Conversation not found
|
||||
403:
|
||||
description: Access denied
|
||||
12
swagger/paths/application/conversation/messages/delete.yml
Normal file
12
swagger/paths/application/conversation/messages/delete.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
tags:
|
||||
- Messages
|
||||
operationId: delete-a-message
|
||||
summary: Delete a message
|
||||
description: Delete a message and it's attachments from the conversation.
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
401:
|
||||
description: Unauthorized
|
||||
404:
|
||||
description: The message or conversation does not exist in the account
|
||||
18
swagger/paths/application/conversation/messages/index.yml
Normal file
18
swagger/paths/application/conversation/messages/index.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
tags:
|
||||
- Messages
|
||||
operationId: list-all-messages
|
||||
summary: Get messages
|
||||
description: List all messages of a conversation
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
type: array
|
||||
description: Array of messages
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/generic_id'
|
||||
- $ref: '#/definitions/message'
|
||||
404:
|
||||
description: Conversation not found
|
||||
401:
|
||||
description: Unauthorized
|
||||
Reference in New Issue
Block a user