chore: Add Swagger Doc for Team Members (#4390)

Add swagger documentation for Team Members APIs
This commit is contained in:
Sojan Jose
2022-04-05 16:05:49 +05:30
committed by GitHub
parent 2595e774e5
commit 7a8aa4ca2e
41 changed files with 440 additions and 94 deletions

View File

@@ -0,0 +1,35 @@
tags:
- Teams
operationId: add-new-agent-to-team
summary: Add a New Agent
description: Add a new Agent to Team
security:
- userApiKey: []
parameters:
- name: data
in: body
required: true
schema:
type: object
required:
- user_ids
properties:
user_ids:
type: array
items:
type: integer
description: IDs of users to be added to the team
responses:
200:
description: Success
schema:
type: array
description: 'Array of all active agents'
items:
$ref: '#/definitions/agent'
404:
description: Team not found
403:
description: Access denied
422:
description: User must exist

View File

@@ -0,0 +1,31 @@
tags:
- Teams
operationId: delete-agent-in-team
summary: Remove an Agent from Team
description: Remove an Agent from Team
security:
- userApiKey: []
parameters:
- name: data
in: body
required: true
schema:
type: object
required:
- team_id
- user_ids
properties:
user_ids:
type: array
items:
type: integer
description: IDs of users to be deleted from the team
responses:
200:
description: Success
404:
description: Team not found
403:
description: Access denied
422:
description: User must exist

View File

@@ -0,0 +1,21 @@
tags:
- Teams
operationId: get-team-members
summary: List Agents in Team
description: Get Details of Agents in an Team
security:
- userApiKey: []
parameters:
- $ref: '#/parameters/team_id'
responses:
200:
description: Success
schema:
type: array
description: 'Array of all agents in the team'
items:
$ref: '#/definitions/agent'
404:
description: Inbox not found
403:
description: Access denied

View File

@@ -0,0 +1,35 @@
tags:
- Teams
operationId: update-agents-in-team
summary: Update Agents in Team
description: All agents except the one passed in params will be removed
security:
- userApiKey: []
parameters:
- name: data
in: body
required: true
schema:
type: object
required:
- user_ids
properties:
user_ids:
type: array
items:
type: integer
description: IDs of users to be added to the team
responses:
200:
description: Success
schema:
type: array
description: 'Array of all agents in the team'
items:
$ref: '#/definitions/agent'
404:
description: Team not found
403:
description: Access denied
422:
description: User must exist