Chore: Inbox Members API improvements (#3008)

- New Inbox Member APIs
- Return JSON errors for Platform APIs
This commit is contained in:
Sojan Jose
2021-09-14 11:55:02 +05:30
committed by GitHub
parent ccd0dc39ad
commit 22d1c8baf2
25 changed files with 767 additions and 131 deletions

View 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

View 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

View 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

View 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

View File

@@ -1,7 +1,7 @@
get:
tags:
- Inbox
operationId: GetInboxe
operationId: GetInbox
summary: Get an inbox
description: Get an inbox available in the current account
parameters:

View File

@@ -209,6 +209,18 @@ public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversat
/api/v1/accounts/{account_id}/inboxes/{id}/set_agent_bot:
$ref: ./inboxes/set_agent_bot.yml
# Inbox Members
/api/v1/accounts/{account_id}/inbox_members:
get:
$ref: ./inboxes/inbox_members/show.yml
post:
$ref: ./inboxes/inbox_members/create.yml
patch:
$ref: ./inboxes/inbox_members/update.yml
delete:
$ref: ./inboxes/inbox_members/delete.yml
# Messages
/api/v1/accounts/{account_id}/conversations/{id}/messages:
@@ -273,7 +285,7 @@ public/api/v1/inboxes/{inbox_identifier}/contacts/{contact_identifier}/conversat
### Custom Filters goes here
# Teams
# Custom Filters
/api/v1/accounts/{account_id}/custom_filters:
parameters:
- $ref: '#/parameters/account_id'