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

@@ -1,5 +1,5 @@
tags:
- Agent
- Agents
operationId: add-new-agent-to-account
summary: Add a New Agent
description: Add a new Agent to Account

View File

@@ -1,5 +1,5 @@
tags:
- Agent
- Agents
operationId: delete-agent-from-account
summary: Remove an Agent from Account
description: Remove an Agent from Account

View File

@@ -1,5 +1,5 @@
tags:
- Agent
- Agents
operationId: get-account-agents
summary: List Agents in Account
description: Get Details of Agents in an Account

View File

@@ -1,5 +1,5 @@
tags:
- Agent
- Agents
operationId: update-agent-in-account
summary: Update Agent in Account
description: Update an Agent in Account

View File

@@ -1,5 +1,5 @@
tags:
- Canned Response
- Canned Responses
operationId: add-new-canned-response-to-account
summary: Add a New Canned Response
description: Add a new Canned Response to Account

View File

@@ -1,5 +1,5 @@
tags:
- Canned Response
- Canned Responses
operationId: delete-canned-response-from-account
summary: Remove a Canned Response from Account
description: Remove a Canned Response from Account

View File

@@ -1,5 +1,5 @@
tags:
- Canned Response
- Canned Responses
operationId: get-account-canned-response
summary: List all Canned Responses in an Account
description: Get Details of Canned Responses in an Account

View File

@@ -1,6 +1,6 @@
get:
tags:
- Contact
- Contacts
operationId: contactConversations
summary: Contact Conversations
description: Get conversations associated to that contact

View File

@@ -8,7 +8,7 @@ parameters:
get:
tags:
- Contact
- Contacts
operationId: contactDetails
summary: Show Contact
description: Get a contact belonging to the account using ID
@@ -24,7 +24,7 @@ get:
put:
tags:
- Contact
- Contacts
operationId: contactUpdate
summary: Update Contact
description: Update a contact belonging to the account using ID
@@ -46,7 +46,7 @@ put:
delete:
tags:
- Contact
- Contacts
operationId: contactDelete
summary: Delete Contact
responses:

View File

@@ -1,5 +1,5 @@
tags:
- Contact
- Contacts
operationId: contactFilter
description: Filter contacts with custom filter options and pagination
summary: Contact Filter

View File

@@ -1,6 +1,6 @@
get:
tags:
- Contact
- Contacts
operationId: contactList
description: Listing all the resolved contacts with pagination (Page size = 15) . Resolved contacts are the ones with a value for identifier, email or phone number
summary: List Contacts
@@ -20,7 +20,7 @@ get:
post:
tags:
- Contact
- Contacts
operationId: contactCreate
description: Create a new Contact
summary: Create Contact

View File

@@ -1,6 +1,6 @@
get:
tags:
- Contact
- Contacts
operationId: contactSearch
description: Search the resolved contacts using a search key, currently supports email search (Page size = 15). Resolved contacts are the ones with a value for identifier, email or phone number
summary: Search Contacts

View File

@@ -1,5 +1,5 @@
tags:
- Conversation
- Conversations
operationId: conversationFilter
description: Filter conversations with custom filter options and pagination
summary: Conversations Filter

View File

@@ -3,7 +3,7 @@ parameters:
get:
tags:
- Conversation
- Conversations
operationId: conversationList
description: List all the conversations with pagination
summary: Conversations List
@@ -43,7 +43,7 @@ get:
post:
tags:
- Conversation
- Conversations
operationId: newConversation
summary: Create New Conversation
description: "Creating a conversation in chatwoot requires a source id. \n\n Learn more about source_id: https://github.com/chatwoot/chatwoot/wiki/Building-on-Top-of-Chatwoot:-Importing-Existing-Contacts-and-Creating-Conversations"

View File

@@ -1,5 +1,5 @@
tags:
- Conversation
- Conversations
operationId: get-details-of-a-conversation
summary: Conversation Details
description: Get all details regarding a conversation with all messages in the conversation

View File

@@ -1,5 +1,5 @@
tags:
- Conversation
- Conversations
operationId: toggle-status-of-a-conversation
summary: Toggle Status
description: Toggles the status of the conversation between open and resolved

View File

@@ -1,6 +1,6 @@
post:
tags:
- Conversation
- Conversations
operationId: conversationUpdateLastSeen
summary: Update Last Seen
description: Updates the last seen of the conversation so that conversations will have the bubbles in the agents screen

View File

@@ -1,5 +1,5 @@
tags:
- Custom Filter
- Custom Filters
operationId: create-a-custom-filter
summary: Create a custom filter
description: Create a custom filter in the account

View File

@@ -1,5 +1,5 @@
tags:
- Custom Filter
- Custom Filters
operationId: delete-a-custom-filter
summary: Delete a custom filter
description: Delete a custom filter from the account

View File

@@ -1,5 +1,5 @@
tags:
- Custom Filter
- Custom Filters
operationId: list-all-filters
summary: List all custom filters
description: List all custom filters in a category of a user

View File

@@ -1,5 +1,5 @@
tags:
- Custom Filter
- Custom Filters
operationId: get-details-of-a-single-custom-filter
summary: Get a custom filter details
description: Get the details of a custom filter in the account

View File

@@ -1,5 +1,5 @@
tags:
- Custom Filter
- Custom Filters
operationId: update-a-custom-filter
summary: Update a custom filter
description: Update a custom filter's attributes

View File

@@ -1,6 +1,6 @@
post:
tags:
- Inbox
- Inboxes
operationId: inboxCreation
summary: Create an inbox
description: You can create more than one website inbox in each account

View File

@@ -1,6 +1,6 @@
get:
tags:
- Inbox
- Inboxes
operationId: getInboxAgentBot
summary: Show Inbox Agent Bot
description: See if an agent bot is associated to the Inbox

View File

@@ -1,5 +1,5 @@
tags:
- Inbox
- Inboxes
operationId: add-new-agent-to-inbox
summary: Add a New Agent
description: Add a new Agent to Inbox

View File

@@ -1,5 +1,5 @@
tags:
- Inbox
- Inboxes
operationId: delete-agent-in-inbox
summary: Remove an Agent from Inbox
description: Remove an Agent from Inbox

View File

@@ -1,5 +1,5 @@
tags:
- Inbox
- Inboxes
operationId: get-inbox-members
summary: List Agents in Inbox
description: Get Details of Agents in an Inbox

View File

@@ -1,5 +1,5 @@
tags:
- Inbox
- Inboxes
operationId: update-agents-in-inbox
summary: Update Agents in Inbox
description: All agents except the one passed in params will be removed

View File

@@ -1,6 +1,6 @@
get:
tags:
- Inbox
- Inboxes
operationId: listAllInboxes
summary: List all inboxes
description: List all inboxes available in the current account

View File

@@ -1,6 +1,6 @@
post:
tags:
- Inbox
- Inboxes
operationId: updateAgentBot
summary: Add or remove agent bot
description: To add an agent bot pass agent_bot id, to remove agent bot from an inbox pass null

View File

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

View File

@@ -1,6 +1,6 @@
patch:
tags:
- Inbox
- Inboxes
operationId: updateInbox
summary: Update Inbox
description: Add avatar and disable auto assignment for an inbox

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