chore: Move agent availability to Account level (#3074)
- Move agent availability to the account level
This commit is contained in:
50
swagger/paths/application/inboxes/create.yml
Normal file
50
swagger/paths/application/inboxes/create.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
post:
|
||||
tags:
|
||||
- Inbox
|
||||
operationId: inboxCreation
|
||||
summary: Create an inbox
|
||||
description: You can create more than one website inbox in each account
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The name of the inbox
|
||||
avatar:
|
||||
type: file
|
||||
description: File for avatar image
|
||||
channel:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
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
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/inbox'
|
||||
404:
|
||||
description: Inbox not found
|
||||
403:
|
||||
description: Access denied
|
||||
22
swagger/paths/application/inboxes/get_agent_bot.yml
Normal file
22
swagger/paths/application/inboxes/get_agent_bot.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
get:
|
||||
tags:
|
||||
- Inbox
|
||||
operationId: getInboxAgentBot
|
||||
summary: Show Inbox Agent Bot
|
||||
description: See if an agent bot is associated to the Inbox
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: ID of the inbox
|
||||
required: true
|
||||
responses:
|
||||
204:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/agent_bot'
|
||||
404:
|
||||
description: Inbox not found, Agent bot not found
|
||||
403:
|
||||
description: Access denied
|
||||
36
swagger/paths/application/inboxes/inbox_members/create.yml
Normal file
36
swagger/paths/application/inboxes/inbox_members/create.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
tags:
|
||||
- Inbox
|
||||
operationId: add-new-agent-to-inbox
|
||||
summary: Add a New Agent
|
||||
description: Add a new Agent to Inbox
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
inbox_id:
|
||||
type: string
|
||||
description: The ID of the inbox
|
||||
required: true
|
||||
user_ids:
|
||||
type: array
|
||||
description: IDs of users to be added to the inbox
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
type: array
|
||||
description: 'Array of all active agents'
|
||||
items:
|
||||
$ref: '#/definitions/agent'
|
||||
404:
|
||||
description: Inbox not found
|
||||
403:
|
||||
description: Access denied
|
||||
422:
|
||||
description: User must exist
|
||||
31
swagger/paths/application/inboxes/inbox_members/delete.yml
Normal file
31
swagger/paths/application/inboxes/inbox_members/delete.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
tags:
|
||||
- Inbox
|
||||
operationId: delete-agent-in-inbox
|
||||
summary: Remove an Agent from Inbox
|
||||
description: Remove an Agent from Inbox
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
inbox_id:
|
||||
type: string
|
||||
description: The ID of the inbox
|
||||
required: true
|
||||
user_ids:
|
||||
type: array
|
||||
description: IDs of users to be deleted from the inbox
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
404:
|
||||
description: Inbox not found
|
||||
403:
|
||||
description: Access denied
|
||||
422:
|
||||
description: User must exist
|
||||
21
swagger/paths/application/inboxes/inbox_members/show.yml
Normal file
21
swagger/paths/application/inboxes/inbox_members/show.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
tags:
|
||||
- Inbox
|
||||
operationId: get-inbox-members
|
||||
summary: List Agents in Inbox
|
||||
description: Get Details of Agents in an Inbox
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/parameters/inbox_id'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
type: array
|
||||
description: 'Array of all active agents'
|
||||
items:
|
||||
$ref: '#/definitions/agent'
|
||||
404:
|
||||
description: Inbox not found
|
||||
403:
|
||||
description: Access denied
|
||||
36
swagger/paths/application/inboxes/inbox_members/update.yml
Normal file
36
swagger/paths/application/inboxes/inbox_members/update.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
tags:
|
||||
- Inbox
|
||||
operationId: update-agents-in-inbox
|
||||
summary: Update Agents in Inbox
|
||||
description: All agents execept the one passed in params will be removed
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
inbox_id:
|
||||
type: string
|
||||
description: The ID of the inbox
|
||||
required: true
|
||||
user_ids:
|
||||
type: array
|
||||
description: IDs of users to be added to the inbox
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
type: array
|
||||
description: 'Array of all active agents'
|
||||
items:
|
||||
$ref: '#/definitions/agent'
|
||||
404:
|
||||
description: Inbox not found
|
||||
403:
|
||||
description: Access denied
|
||||
422:
|
||||
description: User must exist
|
||||
20
swagger/paths/application/inboxes/index.yml
Normal file
20
swagger/paths/application/inboxes/index.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
get:
|
||||
tags:
|
||||
- Inbox
|
||||
operationId: listAllInboxes
|
||||
summary: List all inboxes
|
||||
description: List all inboxes available in the current account
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
type: array
|
||||
description: 'Array of inboxes'
|
||||
items:
|
||||
$ref: '#/definitions/inbox'
|
||||
404:
|
||||
description: Inbox not found
|
||||
403:
|
||||
description: Access denied
|
||||
30
swagger/paths/application/inboxes/set_agent_bot.yml
Normal file
30
swagger/paths/application/inboxes/set_agent_bot.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
post:
|
||||
tags:
|
||||
- Inbox
|
||||
operationId: updateAgentBot
|
||||
summary: Add or remove agent bot
|
||||
description: To add an agent bot pass agent_bot id, to remove agent bot from an inbox pass null
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: ID of the inbox
|
||||
required: true
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
agent_bot:
|
||||
type: number
|
||||
required: true
|
||||
description: 'Agent bot ID'
|
||||
responses:
|
||||
204:
|
||||
description: Success
|
||||
404:
|
||||
description: Inbox not found, Agent bot not found
|
||||
403:
|
||||
description: Access denied
|
||||
22
swagger/paths/application/inboxes/show.yml
Normal file
22
swagger/paths/application/inboxes/show.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
get:
|
||||
tags:
|
||||
- Inbox
|
||||
operationId: GetInbox
|
||||
summary: Get an inbox
|
||||
description: Get an inbox available in the current account
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: ID of the inbox
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/inbox'
|
||||
404:
|
||||
description: Inbox not found
|
||||
403:
|
||||
description: Access denied
|
||||
59
swagger/paths/application/inboxes/update.yml
Normal file
59
swagger/paths/application/inboxes/update.yml
Normal file
@@ -0,0 +1,59 @@
|
||||
patch:
|
||||
tags:
|
||||
- Inbox
|
||||
operationId: updateInbox
|
||||
summary: Update Inbox
|
||||
description: Add avatar and disable auto assignment for an inbox
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: ID of the inbox
|
||||
required: true
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The name of the inbox
|
||||
enable_auto_assignment:
|
||||
type: boolean
|
||||
required: true
|
||||
description: 'Enable Auto Assignment'
|
||||
avatar:
|
||||
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
|
||||
schema:
|
||||
type: object
|
||||
description: 'Updated inbox object'
|
||||
$ref: '#/definitions/inbox'
|
||||
404:
|
||||
description: Inbox not found
|
||||
403:
|
||||
description: Access denied
|
||||
Reference in New Issue
Block a user