feat: Update Swagger for the custom filter endpoint (#3367)

This commit is contained in:
Tejaswini Chile
2021-11-12 19:28:03 +05:30
committed by GitHub
parent cf5f6d5a74
commit 37a36349f2
5 changed files with 137 additions and 3 deletions

View File

@@ -0,0 +1,44 @@
post:
tags:
- Conversation
operationId: conversationFilter
description: Filter conversations with custom filter options and pagination
summary: Conversations Filter
security:
- userApiKey: []
- agentBotApiKey: []
parameters:
- name: page
in: query
type: integer
- name: payload
in: body
required: true
schema:
type: array
items:
type: object
properties:
attribute_key:
type: string
description: filter attribute name
filter_operator:
type: string
description: filter operator name
values:
type: array
description: array of the attribute values to filter
query_operator:
type: string
description: query operator name
- $ref: '#/parameters/account_id'
responses:
200:
description: Success
schema:
$ref: '#/definitions/conversation_list'
400:
description: Bad Request Error
schema:
$ref: '#/definitions/bad_request_error'
description: Access denied

View File

@@ -146,7 +146,7 @@ public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversat
/api/v1/accounts/{account_id}/agents/{id}:
patch:
$ref: ./application/agents/update.yml
delete:
delete:
$ref: ./application/agents/delete.yml
@@ -174,6 +174,10 @@ public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversat
parameters:
- $ref: '#/parameters/account_id'
$ref: ./application/conversation/create.yml
/api/v1/accounts/{account_id}/conversations/filter:
parameters:
- $ref: '#/parameters/account_id'
$ref: ./application/conversation/filter.yml
/api/v1/accounts/{account_id}/conversations/{converstion_id}:
parameters:
- $ref: '#/parameters/account_id'
@@ -230,9 +234,9 @@ public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversat
$ref: ./application/inboxes/inbox_members/create.yml
patch:
$ref: ./application/inboxes/inbox_members/update.yml
delete:
delete:
$ref: ./application/inboxes/inbox_members/delete.yml
# Messages

View File

@@ -1908,6 +1908,82 @@
}
}
},
"/api/v1/accounts/{account_id}/conversations/filter": {
"post": {
"tags": [
"Conversation"
],
"operationId": "conversationFilter",
"description": "Filter conversations with custom filter options and pagination",
"summary": "Conversations Filter",
"security": [
{
"userApiKey": [
]
},
{
"agentBotApiKey": [
]
}
],
"parameters": [
{
"name": "page",
"in": "query",
"type": "integer"
},
{
"name": "payload",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attribute_key": {
"type": "string",
"description": "filter attribute name"
},
"filter_operator": {
"type": "string",
"description": "filter operator name"
},
"values": {
"type": "array",
"description": "array of the attribute values to filter"
},
"query_operator": {
"type": "string",
"description": "query operator name"
}
}
}
}
},
{
"$ref": "#/parameters/account_id"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/conversation_list"
}
},
"400": {
"description": "Bad Request Error",
"schema": {
"$ref": "#/definitions/bad_request_error"
}
},
"description": "Access denied"
}
}
},
"/api/v1/accounts/{account_id}/conversations/{converstion_id}": {
"parameters": [
{