Chore: Update swagger API documentation (#745)
* Chore: Update swagger documentation
This commit is contained in:
@@ -3,6 +3,12 @@ properties:
|
||||
id:
|
||||
type: number
|
||||
description: ID of the inbox
|
||||
name:
|
||||
type: string
|
||||
description: The name of the inbox
|
||||
website_url:
|
||||
type: string
|
||||
description: Website URL
|
||||
channel_type:
|
||||
type: string
|
||||
description: The type of the inbox
|
||||
@@ -21,3 +27,12 @@ properties:
|
||||
web_widget_script:
|
||||
type: string
|
||||
description: Script used to load the website widget
|
||||
welcome_title:
|
||||
type: string
|
||||
description: Welcome title to be displayed on the widget
|
||||
welcome_tagline:
|
||||
type: string
|
||||
description: Welcome tagline to be displayed on the widget
|
||||
agent_away_message:
|
||||
type: string
|
||||
description: A message which will be sent if there is not agent available. This is not available if agentbot is connected
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
post:
|
||||
tags:
|
||||
- Widget
|
||||
operationId: widgetInboxCreation
|
||||
summary: Create a website inbox
|
||||
- Inbox
|
||||
operationId: inboxCreation
|
||||
summary: Create an inbox
|
||||
description: You can create more than one website inbox in each account
|
||||
parameters:
|
||||
- name: data
|
||||
@@ -11,15 +11,30 @@ post:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
website:
|
||||
name:
|
||||
type: string
|
||||
description: The name of the inbox
|
||||
avatar:
|
||||
type: file
|
||||
description: File for avatar image
|
||||
channel:
|
||||
type: object
|
||||
properties:
|
||||
website_name:
|
||||
type:
|
||||
type: string
|
||||
description: The name of the inbox
|
||||
enum: ['web_widget']
|
||||
website_url:
|
||||
type: string
|
||||
description: URL at which the widget will be loaded
|
||||
welcome_title:
|
||||
type: string
|
||||
description: Welcome title to be displayed on the widget
|
||||
welcome_tagline:
|
||||
type: string
|
||||
description: Welcome tagline to be displayed on the widget
|
||||
agent_away_message:
|
||||
type: string
|
||||
description: A message which will be sent if there is not agent available. This is not available if agentbot is connected
|
||||
widget_color:
|
||||
type: string
|
||||
description: A Hex-color string used to customize the widget
|
||||
|
||||
@@ -16,6 +16,9 @@ patch:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The name of the inbox
|
||||
enable_auto_assignment:
|
||||
type: boolean
|
||||
required: true
|
||||
@@ -24,6 +27,24 @@ patch:
|
||||
type: file
|
||||
required: false
|
||||
description: 'Image file for avatar'
|
||||
channel:
|
||||
type: object
|
||||
properties:
|
||||
website_url:
|
||||
type: string
|
||||
description: URL at which the widget will be loaded
|
||||
welcome_title:
|
||||
type: string
|
||||
description: Welcome title to be displayed on the widget
|
||||
welcome_tagline:
|
||||
type: string
|
||||
description: Welcome tagline to be displayed on the widget
|
||||
agent_away_message:
|
||||
type: string
|
||||
description: A message which will be sent if there is not agent available. This is not available if agentbot is connected
|
||||
widget_color:
|
||||
type: string
|
||||
description: A Hex-color string used to customize the widget
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
# Widget
|
||||
/accounts/{account_id}/widget/inboxes:
|
||||
$ref: ./widget/inboxes/create.yml
|
||||
/accounts/{account_id}/widget/inboxes/${id}:
|
||||
$ref: ./widget/inboxes/update.yml
|
||||
|
||||
|
||||
# Inboxes
|
||||
/accounts/{account_id}/inboxes:
|
||||
$ref: ./inboxes/index.yml
|
||||
/accounts/{account_id}/inboxes:
|
||||
$ref: ./inboxes/create.yml
|
||||
/accounts/{account_id}/inboxes/{id}:
|
||||
$ref: ./inboxes/update.yml
|
||||
/accounts/{account_id}/inboxes/{id}/set_agent_bot:
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"paths": {
|
||||
"/accounts/{account_id}/widget/inboxes": {
|
||||
"/accounts/{account_id}/inboxes": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"Widget"
|
||||
"Inbox"
|
||||
],
|
||||
"operationId": "widgetInboxCreation",
|
||||
"summary": "Create a website inbox",
|
||||
"operationId": "inboxCreation",
|
||||
"summary": "Create an inbox",
|
||||
"description": "You can create more than one website inbox in each account",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -41,17 +41,39 @@
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"website": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the inbox"
|
||||
},
|
||||
"avatar": {
|
||||
"type": "file",
|
||||
"description": "File for avatar image"
|
||||
},
|
||||
"channel": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"website_name": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "The name of the inbox"
|
||||
"enum": [
|
||||
"web_widget"
|
||||
]
|
||||
},
|
||||
"website_url": {
|
||||
"type": "string",
|
||||
"description": "URL at which the widget will be loaded"
|
||||
},
|
||||
"welcome_title": {
|
||||
"type": "string",
|
||||
"description": "Welcome title to be displayed on the widget"
|
||||
},
|
||||
"welcome_tagline": {
|
||||
"type": "string",
|
||||
"description": "Welcome tagline to be displayed on the widget"
|
||||
},
|
||||
"agent_away_message": {
|
||||
"type": "string",
|
||||
"description": "A message which will be sent if there is not agent available. This is not available if agentbot is connected"
|
||||
},
|
||||
"widget_color": {
|
||||
"type": "string",
|
||||
"description": "A Hex-color string used to customize the widget"
|
||||
@@ -78,75 +100,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/accounts/{account_id}/widget/inboxes/${id}": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/accounts/{account_id}/inboxes": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Inbox"
|
||||
],
|
||||
"operationId": "listAllInboxes",
|
||||
"summary": "List all inboxes",
|
||||
"description": "List all inboxes available in the current account",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/inbox"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Inbox not found"
|
||||
},
|
||||
"403": {
|
||||
"description": "Access denied"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/accounts/{account_id}/inboxes/{id}": {
|
||||
"patch": {
|
||||
"tags": [
|
||||
@@ -170,6 +123,10 @@
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the inbox"
|
||||
},
|
||||
"enable_auto_assignment": {
|
||||
"type": "boolean",
|
||||
"required": true,
|
||||
@@ -179,6 +136,31 @@
|
||||
"type": "file",
|
||||
"required": false,
|
||||
"description": "Image file for avatar"
|
||||
},
|
||||
"channel": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"website_url": {
|
||||
"type": "string",
|
||||
"description": "URL at which the widget will be loaded"
|
||||
},
|
||||
"welcome_title": {
|
||||
"type": "string",
|
||||
"description": "Welcome title to be displayed on the widget"
|
||||
},
|
||||
"welcome_tagline": {
|
||||
"type": "string",
|
||||
"description": "Welcome tagline to be displayed on the widget"
|
||||
},
|
||||
"agent_away_message": {
|
||||
"type": "string",
|
||||
"description": "A message which will be sent if there is not agent available. This is not available if agentbot is connected"
|
||||
},
|
||||
"widget_color": {
|
||||
"type": "string",
|
||||
"description": "A Hex-color string used to customize the widget"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1076,6 +1058,18 @@
|
||||
"web_widget_script": {
|
||||
"type": "string",
|
||||
"description": "Script used to load the website widget"
|
||||
},
|
||||
"welcome_title": {
|
||||
"type": "string",
|
||||
"description": "Welcome title to be displayed on the widget"
|
||||
},
|
||||
"welcome_tagline": {
|
||||
"type": "string",
|
||||
"description": "Welcome tagline to be displayed on the widget"
|
||||
},
|
||||
"agent_away_message": {
|
||||
"type": "string",
|
||||
"description": "A message which will be sent if there is not agent available. This is not available if agentbot is connected"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user