chore: Add documentation for automation rule, fix conversation/inbox_members (#4852)
This commit is contained in:
20
swagger/paths/application/automation_rule/create.yml
Normal file
20
swagger/paths/application/automation_rule/create.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
tags:
|
||||
- Automation Rule
|
||||
operationId: add-new-automation-rule-to-account
|
||||
summary: Add a new automation rule
|
||||
description: Add a new automation rule to account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/automation_rule_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/automation_rule'
|
||||
'403':
|
||||
description: Access denied
|
||||
20
swagger/paths/application/automation_rule/delete.yml
Normal file
20
swagger/paths/application/automation_rule/delete.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
tags:
|
||||
- Automation Rule
|
||||
operationId: delete-automation-rule-from-account
|
||||
summary: Remove a automation rule from account
|
||||
description: Remove a automation rule from account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the automation rule to be deleted
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
'403':
|
||||
description: Access denied
|
||||
'404':
|
||||
description: automation rule not found
|
||||
20
swagger/paths/application/automation_rule/index.yml
Normal file
20
swagger/paths/application/automation_rule/index.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
tags:
|
||||
- Automation Rule
|
||||
operationId: get-account-automation-rule
|
||||
summary: List all automation rules in an account
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- $ref: '#/parameters/page'
|
||||
description: Get details of automation rules in an Account
|
||||
security:
|
||||
- userApiKey: []
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
schema:
|
||||
type: array
|
||||
description: Array of all automation rules
|
||||
items:
|
||||
$ref: '#/definitions/automation_rule'
|
||||
'403':
|
||||
description: Access denied
|
||||
20
swagger/paths/application/automation_rule/show.yml
Normal file
20
swagger/paths/application/automation_rule/show.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
tags:
|
||||
- Automation Rule
|
||||
operationId: get-details-of-a-single-automation-rule
|
||||
summary: Get a automation rule details
|
||||
description: Get the details of a automation rule in the account
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the automation rule to be updated.
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/automation_rule'
|
||||
'401':
|
||||
description: Unauthorized
|
||||
'404':
|
||||
description: The given rule ID does not exist in the account
|
||||
27
swagger/paths/application/automation_rule/update.yml
Normal file
27
swagger/paths/application/automation_rule/update.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
tags:
|
||||
- Automation Rule
|
||||
operationId: update-automation-rule-in-account
|
||||
summary: Update automation rule in Account
|
||||
description: Update a automation rule in account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the automation rule to be updated.
|
||||
- name: data
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/automation_rule_create_update_payload'
|
||||
responses:
|
||||
'200':
|
||||
description: Success
|
||||
schema:
|
||||
$ref: '#/definitions/automation_rule'
|
||||
'403':
|
||||
description: Access denied
|
||||
'404':
|
||||
description: Rule not found
|
||||
@@ -40,7 +40,7 @@ get:
|
||||
type: integer
|
||||
default: 1
|
||||
description: paginate through conversations
|
||||
|
||||
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
@@ -79,6 +79,10 @@ post:
|
||||
additional_attributes:
|
||||
type: object
|
||||
description: Lets you specify attributes like browser information
|
||||
custom_attributes:
|
||||
type: object
|
||||
description: The object to save custom attributes for conversation, accepts custom attributes key and value
|
||||
example: { attribute_key: attribute_value, priority_conversation_number: 3 }
|
||||
status:
|
||||
type: string
|
||||
enum: ['open', 'resolved', 'pending']
|
||||
|
||||
@@ -6,6 +6,7 @@ description: Remove a custom attribute from account
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- in: path
|
||||
name: id
|
||||
type: integer
|
||||
|
||||
@@ -3,6 +3,13 @@ tags:
|
||||
operationId: get-details-of-a-single-custom-attribute
|
||||
summary: Get a custom attribute details
|
||||
description: Get the details of a custom attribute in the account
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- in: path
|
||||
name: id
|
||||
type: integer
|
||||
required: true
|
||||
description: The ID of the custom attribute to be updated.
|
||||
responses:
|
||||
200:
|
||||
description: Success
|
||||
|
||||
@@ -6,6 +6,7 @@ description: Get Details of Agents in an Team
|
||||
security:
|
||||
- userApiKey: []
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- $ref: '#/parameters/team_id'
|
||||
responses:
|
||||
200:
|
||||
|
||||
@@ -181,6 +181,11 @@
|
||||
/api/v1/accounts/{account_id}/custom_attribute_definitions/{id}:
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: ID of the custom attribute
|
||||
required: true
|
||||
get:
|
||||
$ref: './application/custom_attributes/show.yml'
|
||||
patch:
|
||||
@@ -208,6 +213,30 @@
|
||||
$ref: ./application/contactable_inboxes/get.yml
|
||||
|
||||
|
||||
# Automation Rule
|
||||
/api/v1/accounts/{account_id}/automation_rule_definitions:
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
get:
|
||||
$ref: ./application/automation_rule/index.yml
|
||||
post:
|
||||
$ref: ./application/automation_rule/create.yml
|
||||
/api/v1/accounts/{account_id}/automation_rule_definitions/{id}:
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- name: id
|
||||
in: path
|
||||
type: number
|
||||
description: ID of the Automation Rule
|
||||
required: true
|
||||
get:
|
||||
$ref: ./application/automation_rule/show.yml
|
||||
patch:
|
||||
$ref: ./application/automation_rule/update.yml
|
||||
delete:
|
||||
$ref: ./application/automation_rule/delete.yml
|
||||
|
||||
|
||||
# Conversations
|
||||
/api/v1/accounts/{account_id}/conversations/meta:
|
||||
$ref: ./application/conversation/meta.yml
|
||||
@@ -273,8 +302,6 @@
|
||||
- $ref: '#/parameters/inbox_id'
|
||||
get:
|
||||
$ref: ./application/inboxes/inbox_members/show.yml
|
||||
patch:
|
||||
$ref: ./application/inboxes/inbox_members/update.yml
|
||||
delete:
|
||||
$ref: ./application/inboxes/inbox_members/delete.yml
|
||||
|
||||
@@ -283,6 +310,8 @@
|
||||
- $ref: '#/parameters/account_id'
|
||||
post:
|
||||
$ref: ./application/inboxes/inbox_members/create.yml
|
||||
patch:
|
||||
$ref: ./application/inboxes/inbox_members/update.yml
|
||||
|
||||
|
||||
|
||||
@@ -345,7 +374,7 @@
|
||||
$ref: ./application/teams/update.yml
|
||||
delete:
|
||||
$ref: ./application/teams/delete.yml
|
||||
/accounts/{account-id}/teams/{team_id}/team_members:
|
||||
/accounts/{account_id}/teams/{team_id}/team_members:
|
||||
parameters:
|
||||
- $ref: '#/parameters/account_id'
|
||||
- $ref: '#/parameters/team_id'
|
||||
|
||||
Reference in New Issue
Block a user