chore: Add API documentation for teams (#2221)

Add API documentation for teams
This commit is contained in:
Pranav Raj S
2021-05-05 20:39:00 +05:30
committed by GitHub
parent 6469acc750
commit fd0c26cdae
18 changed files with 378 additions and 11 deletions

View File

@@ -3,7 +3,7 @@ post:
- ConversationAssignment
operationId: conversationAssignment
summary: Assign Conversation
description: Assign a conversation to an agent
description: Assign a conversation to an agent or a team
parameters:
- name: id
in: path
@@ -18,6 +18,10 @@ post:
properties:
assignee_id:
type: number
description: Id of the assignee user
team_id:
type: number
description: Id of the team. If the assignee_id is present, this param would be ignored
responses:
200:
description: Success

View File

@@ -52,3 +52,23 @@
# Profile
/profile:
$ref: ./profile/index.yml
# Teams
/accounts/{account_id}/teams:
parameters:
- $ref: '#/parameters/account_id'
get:
$ref: ./teams/index.yml
post:
$ref: ./teams/create.yml
/accounts/{account_id}/teams/{id}:
parameters:
- $ref: '#/parameters/account_id'
- $ref: '#/parameters/team_id'
get:
$ref: './teams/show.yml'
patch:
$ref: ./teams/update.yml
delete:
$ref: ./teams/delete.yml

View File

@@ -0,0 +1,19 @@
tags:
- Teams
operationId: create-a-team
summary: Create a team
description: Create a team in the account
parameters:
- $ref: '#/parameters/account_id'
- name: data
in: body
required: true
schema:
$ref: '#/definitions/team_create_update_payload'
responses:
200:
description: Success
schema:
$ref: '#/definitions/team'
401:
description: Unauthorized

View File

@@ -0,0 +1,12 @@
tags:
- Teams
operationId: delete-a-team,
summary: Delete a team
description: Delete a team from the account
responses:
200:
description: Success
401:
description: Unauthorized
404:
description: The team does not exist in the account

View File

@@ -0,0 +1,14 @@
tags:
- Teams
operationId: list-all-teams
summary: List all teams
description: List all teams available in the current account
responses:
200:
description: Success
schema:
type: array
description: 'Array of teams'
$ref: '#/definitions/team'
401:
description: Unauthorized

View File

@@ -0,0 +1,14 @@
tags:
- Teams
operationId: get-details-of-a-single-team
summary: Get a team details
description: Get the details of a team in the account
responses:
200:
description: Success
schema:
$ref: '#/definitions/team'
401:
description: Unauthorized
404:
description: The given team id does not exist in the account

View File

@@ -0,0 +1,18 @@
tags:
- Teams
operationId: update-a-team
summary: Update a team
description: Update a team's attributes
parameters:
- name: data
in: body
required: true
schema:
$ref: '#/definitions/team_create_update_payload'
responses:
200:
description: Success
schema:
$ref: '#/definitions/team'
401:
description: Unauthorized