forked from chatwoot/chatwoot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add API documentation for teams (chatwoot#2221)
Add API documentation for teams
- Loading branch information
1 parent
6469acc
commit fd0c26c
Showing
18 changed files
with
378 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
swagger/definitions/request/team/create_update_payload.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
description: The name of the team | ||
description: | ||
type: string | ||
description: The description of the team | ||
allow_auto_assign: | ||
type: boolean | ||
description: If this setting is turned on, the system would automatically assign the conversation to an agent in the team while assigning the conversation to a team |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
type: object | ||
properties: | ||
id: | ||
type: number | ||
description: The id of the team | ||
name: | ||
type: string | ||
description: The name of the team | ||
description: | ||
type: string | ||
description: The description about the team | ||
allow_auto_assign: | ||
type: boolean | ||
description: If this setting is turned on, the system would automatically assign the conversation to an agent in the team while assigning the conversation to a team | ||
account_id: | ||
type: number | ||
description: The id of the account with the team is a part of | ||
is_member: | ||
type: boolean | ||
description: This field shows whether the current user is a part of the team |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
in: path | ||
name: account_id | ||
schema: | ||
type: integer | ||
required: true | ||
description: Numeric ID of the account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
account_id: | ||
$ref: ./account_id.yml | ||
|
||
team_id: | ||
$ref: ./team_id.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
in: path | ||
name: id | ||
schema: | ||
type: integer | ||
required: true | ||
description: The id of the team to be updated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.