parent
971755b845
commit
e0f29b9d81
11 changed files with 328 additions and 3 deletions
|
@ -52,8 +52,8 @@ Rails.application.routes.draw do
|
|||
post :reauthorize_page
|
||||
end
|
||||
end
|
||||
resources :canned_responses, except: [:show, :edit, :new]
|
||||
resources :automation_rules, except: [:edit] do
|
||||
resources :canned_responses, only: [:index, :create, :update, :destroy]
|
||||
resources :automation_rules, only: [:index, :create, :show, :update, :destroy] do
|
||||
post :clone
|
||||
end
|
||||
resources :campaigns, only: [:index, :create, :show, :update, :destroy]
|
||||
|
@ -145,7 +145,7 @@ Rails.application.routes.draw do
|
|||
resource :authorization, only: [:create]
|
||||
end
|
||||
|
||||
resources :webhooks, except: [:show]
|
||||
resources :webhooks, only: [:index, :create, :update, :destroy]
|
||||
namespace :integrations do
|
||||
resources :apps, only: [:index, :show]
|
||||
resources :hooks, only: [:create, :update, :destroy]
|
||||
|
|
|
@ -12,6 +12,8 @@ request_error:
|
|||
|
||||
generic_id:
|
||||
$ref: ./resource/extension/generic.yml
|
||||
canned_response:
|
||||
$ref: ./resource/canned_response.yml
|
||||
contact:
|
||||
$ref: ./resource/contact.yml
|
||||
conversation:
|
||||
|
@ -64,6 +66,9 @@ agent_bot_create_update_payload:
|
|||
user_create_update_payload:
|
||||
$ref: ./request/user/create_update_payload.yml
|
||||
|
||||
canned_response_create_update_payload:
|
||||
$ref: ./request/canned_response/create_update_payload.yml
|
||||
|
||||
## contact
|
||||
contact_create:
|
||||
$ref: ./request/contact/create.yml
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
type: object
|
||||
properties:
|
||||
content:
|
||||
type: string
|
||||
description: Message content for canned response
|
||||
short_code:
|
||||
type: string
|
||||
description: Short Code for quick access of the canned response
|
14
swagger/definitions/resource/canned_response.yml
Normal file
14
swagger/definitions/resource/canned_response.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
description: ID of the canned response
|
||||
content:
|
||||
type: string
|
||||
description: Message content for canned response
|
||||
short_code:
|
||||
type: string
|
||||
description: Short Code for quick access of the canned response
|
||||
account_id:
|
||||
type: integer
|
||||
description: Account Id
|
|
@ -54,6 +54,7 @@ x-tagGroups:
|
|||
tags:
|
||||
- Account AgentBots
|
||||
- Agent
|
||||
- Canned Response
|
||||
- Contact
|
||||
- Conversation
|
||||
- Conversation Assignment
|
||||
|
|
21
swagger/paths/application/canned_responses/create.yml
Normal file
21
swagger/paths/application/canned_responses/create.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
tags:
|
||||
- Canned Response
|
||||
operationId: add-new-canned-response-to-account
|
||||
summary: Add a New Canned Response
|
||||
description: Add a new Canned Response to Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/canned_response_create_update_payload'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
description: 'Newly Created Canned Response'
|
||||
$ref: '#/definitions/canned_response'
|
||||
403:
|
||||
description: Access denied
|
20
swagger/paths/application/canned_responses/delete.yml
Normal file
20
swagger/paths/application/canned_responses/delete.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
tags:
|
||||
- Canned Response
|
||||
operationId: delete-canned-response-from-account
|
||||
summary: Remove a Canned Response from Account
|
||||
description: Remove a Canned Response from Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the canned response to be deleted
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
404:
|
||||
description: Canned Response not found
|
||||
403:
|
||||
description: Access denied
|
17
swagger/paths/application/canned_responses/index.yml
Normal file
17
swagger/paths/application/canned_responses/index.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
tags:
|
||||
- Canned Response
|
||||
operationId: get-account-canned-response
|
||||
summary: List all Canned Responses in an Account
|
||||
description: Get Details of Canned Responses in an Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
type: array
|
||||
description: 'Array of all canned responses'
|
||||
items:
|
||||
$ref: '#/definitions/canned_response'
|
||||
403:
|
||||
description: Access denied
|
28
swagger/paths/application/canned_responses/update.yml
Normal file
28
swagger/paths/application/canned_responses/update.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
tags:
|
||||
- Canned Response
|
||||
operationId: update-canned-response-in-account
|
||||
summary: Update Canned Response in Account
|
||||
description: Update a Canned Response in Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the canned response to be updated.
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/canned_response_create_update_payload'
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
schema:
|
||||
description: 'The updated canned response'
|
||||
$ref: '#/definitions/canned_response'
|
||||
404:
|
||||
description: Agent not found
|
||||
403:
|
||||
description: Access denied
|
|
@ -154,6 +154,21 @@
|
|||
delete:
|
||||
$ref: ./application/agents/delete.yml
|
||||
|
||||
# Agents
|
||||
/api/v1/accounts/{account_id}/canned_responses:
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
get:
|
||||
$ref: ./application/canned_responses/index.yml
|
||||
post:
|
||||
$ref: ./application/canned_responses/create.yml
|
||||
/api/v1/accounts/{account_id}/canned_responses/{id}:
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
patch:
|
||||
$ref: ./application/canned_responses/update.yml
|
||||
delete:
|
||||
$ref: ./application/canned_responses/delete.yml
|
||||
|
||||
# Contacts
|
||||
/api/v1/accounts/{account_id}/contacts:
|
||||
|
|
|
@ -1333,6 +1333,167 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/accounts/{account_id}/canned_responses": {
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
}
|
||||
],
|
||||
"get": {
|
||||
"tags": [
|
||||
"Canned Response"
|
||||
],
|
||||
"operationId": "get-account-canned-response",
|
||||
"summary": "List all Canned Responses in an Account",
|
||||
"description": "Get Details of Canned Responses in an Account",
|
||||
"security": [
|
||||
{
|
||||
"userApiKey": [
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"description": "Array of all canned responses",
|
||||
"items": {
|
||||
"$ref": "#/definitions/canned_response"
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Access denied"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"Canned Response"
|
||||
],
|
||||
"operationId": "add-new-canned-response-to-account",
|
||||
"summary": "Add a New Canned Response",
|
||||
"description": "Add a new Canned Response to Account",
|
||||
"security": [
|
||||
{
|
||||
"userApiKey": [
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/canned_response_create_update_payload"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/canned_response"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Access denied"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/accounts/{account_id}/canned_responses/{id}": {
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
}
|
||||
],
|
||||
"patch": {
|
||||
"tags": [
|
||||
"Canned Response"
|
||||
],
|
||||
"operationId": "update-canned-response-in-account",
|
||||
"summary": "Update Canned Response in Account",
|
||||
"description": "Update a Canned Response in Account",
|
||||
"security": [
|
||||
{
|
||||
"userApiKey": [
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"description": "The ID of the canned response to be updated."
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/canned_response_create_update_payload"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/canned_response"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Agent not found"
|
||||
},
|
||||
"403": {
|
||||
"description": "Access denied"
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"Canned Response"
|
||||
],
|
||||
"operationId": "delete-canned-response-from-account",
|
||||
"summary": "Remove a Canned Response from Account",
|
||||
"description": "Remove a Canned Response from Account",
|
||||
"security": [
|
||||
{
|
||||
"userApiKey": [
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"description": "The ID of the canned response to be deleted"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success"
|
||||
},
|
||||
"404": {
|
||||
"description": "Canned Response not found"
|
||||
},
|
||||
"403": {
|
||||
"description": "Access denied"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/accounts/{account_id}/contacts": {
|
||||
"get": {
|
||||
"tags": [
|
||||
|
@ -3549,6 +3710,27 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"canned_response": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "ID of the canned response"
|
||||
},
|
||||
"content": {
|
||||
"type": "string",
|
||||
"description": "Message content for canned response"
|
||||
},
|
||||
"short_code": {
|
||||
"type": "string",
|
||||
"description": "Short Code for quick access of the canned response"
|
||||
},
|
||||
"account_id": {
|
||||
"type": "integer",
|
||||
"description": "Account Id"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -4196,6 +4378,19 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"canned_response_create_update_payload": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"description": "Message content for canned response"
|
||||
},
|
||||
"short_code": {
|
||||
"type": "string",
|
||||
"description": "Short Code for quick access of the canned response"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contact_create": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
@ -4894,6 +5089,7 @@
|
|||
"tags": [
|
||||
"Account AgentBots",
|
||||
"Agent",
|
||||
"Canned Response",
|
||||
"Contact",
|
||||
"Conversation",
|
||||
"Conversation Assignment",
|
||||
|
|
Loading…
Reference in a new issue