chore: Add Swagger Doc for Team Members (#4390)
Add swagger documentation for Team Members APIs
This commit is contained in:
35
swagger/paths/application/team_members/create.yml
Normal file
35
swagger/paths/application/team_members/create.yml
Normal 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
|
||||
31
swagger/paths/application/team_members/delete.yml
Normal file
31
swagger/paths/application/team_members/delete.yml
Normal 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
|
||||
21
swagger/paths/application/team_members/index.yml
Normal file
21
swagger/paths/application/team_members/index.yml
Normal 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
|
||||
35
swagger/paths/application/team_members/update.yml
Normal file
35
swagger/paths/application/team_members/update.yml
Normal 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
|
||||
Reference in New Issue
Block a user