chore: Add API documentation for teams (#2221)
Add API documentation for teams
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
19
swagger/paths/teams/create.yml
Normal file
19
swagger/paths/teams/create.yml
Normal 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
|
||||
12
swagger/paths/teams/delete.yml
Normal file
12
swagger/paths/teams/delete.yml
Normal 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
|
||||
14
swagger/paths/teams/index.yml
Normal file
14
swagger/paths/teams/index.yml
Normal 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
|
||||
14
swagger/paths/teams/show.yml
Normal file
14
swagger/paths/teams/show.yml
Normal 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
|
||||
18
swagger/paths/teams/update.yml
Normal file
18
swagger/paths/teams/update.yml
Normal 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
|
||||
Reference in New Issue
Block a user