Chore: Swagger Docs V1 (#546)
This commit is contained in:
9
swagger/definitions/error/bad_request.yml
Normal file
9
swagger/definitions/error/bad_request.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
title: data
|
||||
type: object
|
||||
properties:
|
||||
description:
|
||||
type: string
|
||||
errors:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/request_error'
|
||||
8
swagger/definitions/error/request.yml
Normal file
8
swagger/definitions/error/request.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
type: object
|
||||
properties:
|
||||
field:
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
code:
|
||||
type: string
|
||||
39
swagger/definitions/index.yml
Normal file
39
swagger/definitions/index.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
# ERROR
|
||||
bad_request_error:
|
||||
$ref: ./error/bad_request.yml
|
||||
request_error:
|
||||
$ref: ./error/request.yml
|
||||
|
||||
# RESOURCE
|
||||
contact:
|
||||
$ref: ./resource/contact.yml
|
||||
conversation:
|
||||
$ref: ./resource/conversation.yml
|
||||
|
||||
# RESPONSE
|
||||
extended_contact:
|
||||
allOf:
|
||||
- $ref: '#/definitions/contact'
|
||||
- $ref: ./resource/extension/contact/show.yml
|
||||
contact_base:
|
||||
allOf:
|
||||
- $ref: '#/definitions/contact'
|
||||
- $ref: ./resource/extension/generic.yml
|
||||
contact_list:
|
||||
type: array
|
||||
items:
|
||||
allOf:
|
||||
- $ref: '#/definitions/contact'
|
||||
- $ref: ./resource/extension/generic.yml
|
||||
contact_conversations:
|
||||
type: array
|
||||
items:
|
||||
allOf:
|
||||
- $ref: '#/definitions/conversation'
|
||||
- $ref: ./resource/extension/contact/conversation.yml
|
||||
|
||||
# REQUEST
|
||||
contact_create:
|
||||
$ref: ./request/contact/create.yml
|
||||
contact_update:
|
||||
$ref: ./request/contact/update.yml
|
||||
6
swagger/definitions/request/contact/create.yml
Normal file
6
swagger/definitions/request/contact/create.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
type: object
|
||||
properties:
|
||||
account_id:
|
||||
type: number
|
||||
inbox_id:
|
||||
type: number
|
||||
8
swagger/definitions/request/contact/update.yml
Normal file
8
swagger/definitions/request/contact/update.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
phone_number:
|
||||
type: string
|
||||
12
swagger/definitions/resource/contact.yml
Normal file
12
swagger/definitions/resource/contact.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
type: object
|
||||
properties:
|
||||
email:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
phone_number:
|
||||
type: string
|
||||
thumbnail:
|
||||
type: string
|
||||
additional_attributes:
|
||||
type: object
|
||||
21
swagger/definitions/resource/conversation.yml
Normal file
21
swagger/definitions/resource/conversation.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
type: object
|
||||
properties:
|
||||
display_id:
|
||||
type: number
|
||||
messages:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
inbox_id:
|
||||
type: number
|
||||
status:
|
||||
type: string
|
||||
enum: ['open', 'resolved']
|
||||
timestamp:
|
||||
type: string
|
||||
user_last_seen_at:
|
||||
type: string
|
||||
agent_last_seen_at:
|
||||
type: agent_last_seen_at
|
||||
unread_count:
|
||||
type: number
|
||||
@@ -0,0 +1,18 @@
|
||||
type: object
|
||||
properties:
|
||||
meta:
|
||||
type: object
|
||||
properties:
|
||||
sender:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: number
|
||||
name:
|
||||
type: string
|
||||
thumbnail:
|
||||
type: string
|
||||
channel:
|
||||
type: string
|
||||
assignee:
|
||||
type: object
|
||||
5
swagger/definitions/resource/extension/contact/list.yml
Normal file
5
swagger/definitions/resource/extension/contact/list.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
type: object
|
||||
properties:
|
||||
allOf:
|
||||
- $ref: '#/definitions/contact'
|
||||
- $ref: ./resource/extension/contact.yaml
|
||||
7
swagger/definitions/resource/extension/contact/show.yml
Normal file
7
swagger/definitions/resource/extension/contact/show.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: number
|
||||
availability_status:
|
||||
type: string
|
||||
enum: ['online', 'offline']
|
||||
4
swagger/definitions/resource/extension/generic.yml
Normal file
4
swagger/definitions/resource/extension/generic.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: number
|
||||
Reference in New Issue
Block a user