Chore: Update Swagger API docs (#608)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
post:
|
||||
tags:
|
||||
- Conversation
|
||||
- ConversationAssignment
|
||||
operationId: conversationAssignment
|
||||
summary: Assign Conversation
|
||||
description: Assign a conversation to an agent
|
||||
@@ -19,7 +19,7 @@ post:
|
||||
assignee_id:
|
||||
type: number
|
||||
responses:
|
||||
204:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/user'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
get:
|
||||
tags:
|
||||
- Conversation
|
||||
- ConversationLabels
|
||||
operationId: conversationLabelsList
|
||||
summary: List Labels
|
||||
description: Lists all the labels of a conversation
|
||||
@@ -8,7 +8,7 @@ get:
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: id of the conversation
|
||||
description: ID of the conversation
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
@@ -22,7 +22,7 @@ get:
|
||||
|
||||
post:
|
||||
tags:
|
||||
- Conversation
|
||||
- ConversationLabels
|
||||
operationId: conversationAddLabels
|
||||
summary: Add Labels
|
||||
description: Creates new labels and associates it with the conversation
|
||||
@@ -30,7 +30,7 @@ post:
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: id of the conversation
|
||||
description: ID of the conversation
|
||||
required: true
|
||||
- name: data
|
||||
in: body
|
||||
@@ -40,11 +40,11 @@ post:
|
||||
properties:
|
||||
labels:
|
||||
type: array
|
||||
description: 'array of labels'
|
||||
description: 'Array of labels'
|
||||
properties:
|
||||
type: string
|
||||
responses:
|
||||
204:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/conversation_labels'
|
||||
|
||||
@@ -5,9 +5,29 @@ get:
|
||||
description: List all the conversations with pagination
|
||||
summary: Conversations List
|
||||
parameters:
|
||||
- name: query_hash
|
||||
- name: assignee_type
|
||||
in: query
|
||||
type: string
|
||||
enum: ['me', 'unassigned', 'all']
|
||||
required: true
|
||||
- name: status
|
||||
in: query
|
||||
type: string
|
||||
enum: ['open', 'resolved', 'bot']
|
||||
required: true
|
||||
- name: page
|
||||
in: query
|
||||
type: integer
|
||||
required: true
|
||||
- name: inbox_id
|
||||
in: query
|
||||
type: integer
|
||||
- name: labels
|
||||
in: query
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
post:
|
||||
tags:
|
||||
- Conversation
|
||||
operationId: conversationNewMessage
|
||||
summary: Create New Message
|
||||
description: All the agent replies are created as new messages through this endpoint
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: id of the conversation
|
||||
required: true
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/conversation_message_create'
|
||||
responses:
|
||||
204:
|
||||
description: Success
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/generic_id'
|
||||
- $ref: '#/definitions/message'
|
||||
404:
|
||||
description: Conversation not found
|
||||
403:
|
||||
description: Access denied
|
||||
54
swagger/paths/conversation/messages/index_create.yml
Normal file
54
swagger/paths/conversation/messages/index_create.yml
Normal file
@@ -0,0 +1,54 @@
|
||||
get:
|
||||
tags:
|
||||
- Messages
|
||||
operationId: listAllMessages
|
||||
summary: Get messages
|
||||
description: List all messages of a conversation
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: ID of the conversation
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
type: array
|
||||
description: Array of messages
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/generic_id'
|
||||
- $ref: '#/definitions/message'
|
||||
404:
|
||||
description: Conversation not found
|
||||
403:
|
||||
description: Access denied
|
||||
|
||||
post:
|
||||
tags:
|
||||
- Messages
|
||||
operationId: conversationNewMessage
|
||||
summary: Create New Message
|
||||
description: All the agent replies are created as new messages through this endpoint
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: ID of the conversation
|
||||
required: true
|
||||
- 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
|
||||
@@ -8,10 +8,21 @@ post:
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: id of the conversation
|
||||
description: ID of the conversation
|
||||
required: true
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum: ["open", "resolved"]
|
||||
required: true
|
||||
description: The status of the conversation
|
||||
responses:
|
||||
204:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/conversation_status_toggle'
|
||||
|
||||
17
swagger/paths/inboxes/index.yml
Normal file
17
swagger/paths/inboxes/index.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
get:
|
||||
tags:
|
||||
- Inbox
|
||||
operationId: listAllInboxes
|
||||
summary: List all inboxes
|
||||
description: List all inboxes available in the current account
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
type: array
|
||||
description: 'Array of inboxes'
|
||||
$ref: '#/definitions/inbox'
|
||||
404:
|
||||
description: Inbox not found
|
||||
403:
|
||||
description: Access denied
|
||||
33
swagger/paths/inboxes/update.yml
Normal file
33
swagger/paths/inboxes/update.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
patch:
|
||||
tags:
|
||||
- Inbox
|
||||
operationId: disableAutoAssignment
|
||||
summary: Disable auto assignment
|
||||
description: Disable Auto Assignment for an inbox
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: ID of the inbox
|
||||
required: true
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
enable_auto_assignment:
|
||||
type: boolean
|
||||
required: true
|
||||
description: 'Enable Auto Assignment'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
type: object
|
||||
description: 'Updated inbox object'
|
||||
$ref: '#/definitions/inbox'
|
||||
404:
|
||||
description: Inbox not found
|
||||
403:
|
||||
description: Access denied
|
||||
@@ -1,23 +1,37 @@
|
||||
# Contacts
|
||||
/contacts:
|
||||
$ref: ./contact/list_create.yml
|
||||
/contacts/{id}:
|
||||
$ref: ./contact/crud.yml
|
||||
/contacts/{id}/conversations:
|
||||
$ref: ./contact/conversations.yml
|
||||
# Widget
|
||||
/account/{account_id}/widget/inboxes:
|
||||
$ref: ./widget/inboxes/create.yml
|
||||
/account/{account_id}/widget/inboxes/${id}:
|
||||
$ref: ./widget/inboxes/update.yml
|
||||
|
||||
# Inboxes
|
||||
/account/{account_id}/inboxes:
|
||||
$ref: ./inboxes/index.yml
|
||||
/account/{account_id}/inboxes/{id}:
|
||||
$ref: ./inboxes/update.yml
|
||||
|
||||
# Conversations
|
||||
/conversations:
|
||||
/account/{account_id}/conversations:
|
||||
$ref: ./conversation/list.yml
|
||||
/conversations/{id}:
|
||||
/account/{account_id}/conversations/{id}:
|
||||
$ref: ./conversation/crud.yml
|
||||
/conversations/{id}/toggle_status:
|
||||
/account/{account_id}/conversations/{id}/toggle_status:
|
||||
$ref: ./conversation/toggle_status.yml
|
||||
/conversations/{id}/update_last_seen:
|
||||
$ref: ./conversation/update_last_seen.yml
|
||||
/conversations/{id}/labels:
|
||||
|
||||
# Messages
|
||||
/account/{account_id}/conversations/{id}/messages:
|
||||
$ref: ./conversation/messages/index_create.yml
|
||||
|
||||
/account/{account_id}/conversations/{id}/labels:
|
||||
$ref: ./conversation/labels.yml
|
||||
/conversations/{id}/assignments:
|
||||
|
||||
/account/{account_id}/conversations/{id}/assignments:
|
||||
$ref: ./conversation/assignments.yml
|
||||
/conversations/{id}/messages:
|
||||
$ref: ./conversation/messages.yml
|
||||
|
||||
# Contacts
|
||||
/account/{account_id}/contacts:
|
||||
$ref: ./contact/list_create.yml
|
||||
/account/{account_id}/contacts/{id}:
|
||||
$ref: ./contact/crud.yml
|
||||
/account/{account_id}/contacts/{id}/conversations:
|
||||
$ref: ./contact/conversations.yml
|
||||
|
||||
34
swagger/paths/widget/inboxes/create.yml
Normal file
34
swagger/paths/widget/inboxes/create.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
post:
|
||||
tags:
|
||||
- Widget
|
||||
operationId: widgetInboxCreation
|
||||
summary: Create a website inbox
|
||||
description: You can create more than one website inbox in each account
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
website:
|
||||
type: object
|
||||
properties:
|
||||
website_name:
|
||||
type: string
|
||||
description: The name of the inbox
|
||||
website_url:
|
||||
type: string
|
||||
description: URL at which the widget will be loaded
|
||||
widget_color:
|
||||
type: string
|
||||
description: A Hex-color string used to customize the widget
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/inbox'
|
||||
404:
|
||||
description: Inbox not found
|
||||
403:
|
||||
description: Access denied
|
||||
28
swagger/paths/widget/inboxes/update.yml
Normal file
28
swagger/paths/widget/inboxes/update.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
patch:
|
||||
tags:
|
||||
- Widget
|
||||
operationId: widgetInboxUpdate
|
||||
summary: Update a website inbox
|
||||
description: Update widget color of an inbox
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
website:
|
||||
type: object
|
||||
properties:
|
||||
widget_color:
|
||||
type: string
|
||||
description: A Hex-color string used to customize the widget
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/inbox'
|
||||
404:
|
||||
description: Inbox not found
|
||||
403:
|
||||
description: Access denied
|
||||
Reference in New Issue
Block a user