Chore: Document Conversation APIs in swagger (#552)
* Added the documentation for the conversation APIs - 8 endpoints * Added descriptions for the existing endpoints * Added new resource models and updated some parts of the contact API
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
type: object
|
||||
properties:
|
||||
display_id:
|
||||
type: number
|
||||
messages:
|
||||
type: array
|
||||
items:
|
||||
|
||||
@@ -15,4 +15,4 @@ properties:
|
||||
channel:
|
||||
type: string
|
||||
assignee:
|
||||
type: object
|
||||
$ref: '#/definitions/user'
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
type: object
|
||||
properties:
|
||||
allOf:
|
||||
- $ref: '#/definitions/contact'
|
||||
- $ref: ./resource/extension/contact.yaml
|
||||
@@ -0,0 +1,7 @@
|
||||
type: object
|
||||
properties:
|
||||
payload:
|
||||
type: array
|
||||
description: 'array of labels'
|
||||
items:
|
||||
type: string
|
||||
22
swagger/definitions/resource/extension/conversation/list.yml
Normal file
22
swagger/definitions/resource/extension/conversation/list.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
type: object
|
||||
properties:
|
||||
data:
|
||||
type: object
|
||||
properties:
|
||||
meta:
|
||||
type: object
|
||||
properties:
|
||||
mine_count:
|
||||
type: number
|
||||
unassigned_count:
|
||||
type: number
|
||||
all_count:
|
||||
type: number
|
||||
payload:
|
||||
type: array
|
||||
description: 'array of conversations'
|
||||
items:
|
||||
allOf:
|
||||
- $ref: '#/definitions/generic_id'
|
||||
- $ref: '#/definitions/conversation'
|
||||
- $ref: '../contact/conversation.yml'
|
||||
19
swagger/definitions/resource/extension/conversation/show.yml
Normal file
19
swagger/definitions/resource/extension/conversation/show.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
type: object
|
||||
properties:
|
||||
meta:
|
||||
type: object
|
||||
properties:
|
||||
labels:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
additional_attributes:
|
||||
type: object
|
||||
contact_id:
|
||||
type: number
|
||||
payload:
|
||||
type: array
|
||||
description: 'array of messages'
|
||||
items:
|
||||
allOf:
|
||||
- $ref: '#/definitions/extended_message'
|
||||
@@ -0,0 +1,14 @@
|
||||
type: object
|
||||
properties:
|
||||
meta:
|
||||
type: object
|
||||
payload:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
current_status:
|
||||
type: string
|
||||
enum: ['open', 'resolved']
|
||||
conversation_id:
|
||||
type: number
|
||||
@@ -0,0 +1,4 @@
|
||||
type: object
|
||||
properties:
|
||||
display_id:
|
||||
type: number
|
||||
@@ -0,0 +1,6 @@
|
||||
type: object
|
||||
properties:
|
||||
source_id:
|
||||
type: number
|
||||
sender:
|
||||
type: object
|
||||
16
swagger/definitions/resource/message.yml
Normal file
16
swagger/definitions/resource/message.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
type: object
|
||||
properties:
|
||||
content:
|
||||
type: string
|
||||
inbox_id:
|
||||
type: number
|
||||
conversation_id:
|
||||
type: number
|
||||
message_type:
|
||||
type: string
|
||||
created_at:
|
||||
type: integer
|
||||
private:
|
||||
type: boolean
|
||||
attachment:
|
||||
type: object
|
||||
19
swagger/definitions/resource/user.yml
Normal file
19
swagger/definitions/resource/user.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: number
|
||||
uid:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
account_id:
|
||||
type: number
|
||||
role:
|
||||
type: string
|
||||
enum: ['agent', 'administrator']
|
||||
confirmed:
|
||||
type: boolean
|
||||
nickname:
|
||||
type: string
|
||||
Reference in New Issue
Block a user